diff --git a/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/52429fad-270c-475d-a9f5-bf79f0ff355b_content_list.json b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/52429fad-270c-475d-a9f5-bf79f0ff355b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2203a8998693b7da4615687f9bdb1798c53727ab --- /dev/null +++ b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/52429fad-270c-475d-a9f5-bf79f0ff355b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79a4c8a4d027dfadc08add9088a2fdcb53fe1f2b6b6449bfde6dff71f49b01fd +size 67236 diff --git a/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/52429fad-270c-475d-a9f5-bf79f0ff355b_model.json b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/52429fad-270c-475d-a9f5-bf79f0ff355b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..49a3dc50107f8005b22ded28ab4961b695158552 --- /dev/null +++ b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/52429fad-270c-475d-a9f5-bf79f0ff355b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9fba7dc73a5f5bb5fc651bdba9fb742b7e9b279c349eb2eda6e97d824f81052 +size 80797 diff --git a/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/52429fad-270c-475d-a9f5-bf79f0ff355b_origin.pdf b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/52429fad-270c-475d-a9f5-bf79f0ff355b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..add9d8565ef26189e74db67cd832d361de827092 --- /dev/null +++ b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/52429fad-270c-475d-a9f5-bf79f0ff355b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76f901a25240b425da8af38f46fef13ffb12ed7ace83e0819bdbffab3838a152 +size 3433016 diff --git a/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/full.md b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4f8d1fe78d2df25aa8caf8086b8cd891f6ccdde0 --- /dev/null +++ b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/full.md @@ -0,0 +1,321 @@ +# Conv-MPN: Convolutional Message Passing Neural Network for Structured Outdoor Architecture Reconstruction + +Fuyang Zhang*, Nelson Nauata* and Yasutaka Furukawa +Simon Fraser University, BC, Canada + +{fuyangz, nnauata, furukawa}@sfu.ca + +![](images/cf1a44c0eaccd44e2ddef13e2dfabbe4f54a4b13bea72ae9ebcd76ab77194f53.jpg) +Input + +![](images/42cb8a2014136ed254fe6b30f589d669866518b0c2115ade19c71821c7ebab79.jpg) +Iteration 0 + +![](images/b781042f4efe5321fc153b637af09ec0db19f84275d0db57088593a8c642ea19.jpg) +Iteration 1 +Figure 1. Conv-MPN, a novel message passing neural network, reconstructs outdoor buildings as planar graphs from a single image. The reconstructions after 0, 1, or 3 iterations of message passing are as shown. + +![](images/6c57816ccb0431b0e868a63e9af20672ae80601dc5979304fb17e4790d945aff.jpg) +Conv-MPN reconstruction +Iteration 3 + +![](images/7ed03390992002dc9b32989c4fc43e4c270cec54a8083cb82f3763eb22d3afff.jpg) +Ground-truth + +# Abstract + +This paper proposes a novel message passing neural (MPN) architecture Conv-MPN, which reconstructs an outdoor building as a planar graph from a single RGB image. Conv-MPN is specifically designed for cases where nodes of a graph have explicit spatial embedding. In our problem, nodes correspond to building edges in an image. Conv-MPN is different from MPN in that 1) the feature associated with a node is represented as a feature volume instead of a 1D vector; and 2) convolutions encode messages instead of fully connected layers. Conv-MPN learns to select a true subset of nodes (i.e., building edges) to reconstruct a building planar graph. Our qualitative and quantitative evaluations over 2,000 buildings show that Conv-MPN makes significant improvements over the existing fully neural solutions. We believe that the paper has a potential to open a new line of graph neural network research for structured geometry reconstruction. + +# 1. Introduction + +Human vision evolved to master holistic image understanding, capable of detecting structural elements in an im + +age and inferring their relationships. Look at a satellite image in Fig. 1. We can quickly see three building components, detect their building corners, and identify the common edges with the neighboring components. + +The ultimate form of such structured geometry is the CAD representation, which enables a wide spectrum of applications such as rendering, effects mapping, simulation, or human interactions. Unfortunately, CAD model construction is still an open problem for computer vision, and is possible only by the hands of expert modelers. + +Towards the automated construction of CAD geometry, the emergence of deep neural networks (DNNs) have brought revolutionary improvements to the detection of low-level primitives (e.g., corners). However, holistic understanding of high-level geometric structures (e.g., the inference of a graph) remains as a challenge for DNNs. The current state-of-the-art utilizes DNNs for low-level primitive detection, but employs optimization methods for high-level geometric structure inference [21, 16]. Optimization is powerful, but requires complex problem formulations and intensive engineering for injecting structural constraints. + +This paper seeks to push the boundary of deep neural architecture for the task of structured geometry reconstruction. In particular, we propose a convolutional message passing neural network (Conv-MPN). Conv-MPN is a variant of a graph neural network (GNN), and learns to infer re + +relationships of nodes by exchanging messages. Conv-MPN is specifically designed for cases where a node has an explicit spatial embedding, and makes two key distinctions from a standard message passing neural network (MPN): 1) the feature of a node is represented as a 3D volume as in CNNs instead of a 1D vector; and 2) convolutions encode messages instead of fully connected layers [24, 25] or matrix multiplications [5, 8]. This design allows Conv-MPN to exploit the spatial information associated with the nodes. + +We have demonstrated the effectiveness of Conv-MPN on an outdoor architecture vectorization problem [21], where the input is a satellite RGB image and the output is a planar graph depicting both the internal and external architectural feature lines. This is a challenging problem for computer vision akin to the floorplan vectorization, which did not have an effective solution until recently [19]. + +The main challenge lies in the inference of a graph structure with an arbitrary topology. The outdoor architecture vectorization from a satellite image is even more challenging as Manhattan assumption does not hold due to the foreshortening effects. We would like to also emphasize the difference from the traditional building shape extraction problem [1], which represents a building as a set of pixels. + +We qualitative and quantitative evaluate the proposed approach on more than 2,000 complex building examples in the cities of Atlanta, Las Vegas, and Paris [21]. Conv-MPN makes significant improvements over all the existing neural solutions. We believe that this research has a potential to open a new line of graph neural network research for structured geometry reconstruction. Code and pretrained models can be found at https://github.com/zhangfuyang/Conv-MPN. + +# 2. Related work + +We first review structured reconstruction techniques based on the levels of graph structure to be inferred, then the use of message passing techniques on structured data. + +Reconstruction with a fixed topology: With the fixed known topology, graph reconstruction amounts to simply detecting keypoints and classifying their semantic types, because their connections are already given. Convolutional neural networks have shown to be effective in solving human pose estimation [22, 31, 29] and hand tracking [34, 38, 30]. + +Low- to mid-level structured reconstruction: DNNs detect corners and classify the presence of their connections for wire-frame parsing [15, 37, 36]. However, the connection classification is performed for each edge independently, lacking higher level geometric reasoning that considers a graph as a whole. In remote sensing, most building extraction methods represent a building as a set of pixels [14] or a 1D polygonal loop [2, 6, 20, 7], limiting the output to a + +building external boundary as a 1D loop. In contrast, we seek to infer a graph of an arbitrary topology encoding both internal and external architectural feature lines. + +Structured reconstruction (optimization): The state-of-the-art graph structure inference combines CNNs and optimization, in particular, integer programming (IP) [19, 18, 21]. CNNs detect low-level geometric primitives (e.g., corners) or infer pixel-wise graph information (e.g., edge likelihood). IP fuses all the information and infer graph structure, which is powerful but requires complex problem formulations and intensive engineering for injecting structural constraints. + +Structured reconstruction (learning): A few methods learn to infer high-level geometric structure. Ritchie et al. [27] used DNNs to learn the arrangement of 2D strokes on a canvas with a simple shape-grammar similar to the L-system. Frans et al. [12]. proposed an unsupervised approach to the problem. However, their grammar is too rudimentary to represent building architecture. Zeng et al. [35] utilizes an architectural shape-grammar to reconstruct outdoor buildings from an ortho-rectified depthmap. However, their shape-grammar is again too restrictive: 1) Requiring ortho-rectification to utilize the Manhattan assumption; and 2) Modeling only small residential houses. This paper does not rely on a shape grammar, instead learns structural regularities from examples and utilize in the structure inference. + +Message passing and convolution on graphs: Message passing has been an effective tool for high-level data reasoning [23, 3, 13, 17, 9, 32, 4]. A standard way is to extend the convolution operation over a grid of pixels to a graph of vertices [5, 17, 9, 10, 23]. Bruna et al. [5], Defferand et al. [9] and Kipf et al. [17] utilizes spectral analysis to define graph convolutions that act on an entire graph. The key difference is that our convolutions do not occur in the graph domain. Conv-MPN takes a graph with an explicit spatial embedding, represent a node as a feature volume and perform convolutions in the spatial domain. This framework allows Conv-MPN to exploit the spatial information associated with the nodes of a graph. + +# 3. Preliminaries + +This paper tackles the 2D architecture vectorization problem from a single satellite image, where a building is represented as a 2D planar graph. This section describes our data source and pre-processing steps (See Fig. 2). + +Dataset: Our data source is a set of high-resolution satellite RGB images from SpaceNet [11] corpus, hosted through the Amazon Web Services (AWS) as a part of the SpaceNet Challenge [1]. In particular, we use an existing benchmark [21], which cropped 2,001 buildings into $256 \times 256$ square image patches for the cities of Atlanta, Paris and Las Vegas [21]. We use the same training and testing split + +![](images/fc50b467e7deb01dd456fa948b9360c32fb46cd7aa29244c536cce73f46c1ec3.jpg) +Figure 2. Preliminaries. Given a RGB image, we detect building corner candidates, enumerate building edge candidates, then formulate a graph for inference whose nodes are building edges. + +(1601/400) as well as the metrics, which consists of the precision, recall, and f1-score for each of the corner, edge, and region primitives. Note that the satellite images are off-nadir, and buildings do not follow the Manhattan assumption due to the foreshortening effects. + +Corner candidates enumeration: Given an input RGB image-patch $\mathcal{I}$ ( $256 \times 256$ ), we use Faster-RCNN with ResNet-50 as the backbone [26] to detect corner candidates, while treating each corner as a $8 \times 8$ bounding box with a corner at the center. The model is trained using SGD with the leaning rate set to 0.0001 and the batch-size of 1. + +Graph formulation: Given building corner candidates, we enumerate building edge candidates by every pair of corners. Each edge candidate becomes a node in the graph for Conv-MPN inference in the next step (See Fig. 2 right). Nodes are connected when the corresponding building edges share the same building corner. Notice that we have a building planar graph and the graph for Conv-MPN inference. We explicitly write "building corner" or "building edge" when terms are confusing. + +# 4. Conv-MPN architecture + +The fundamental idea behind Conv-MPN is simple yet powerful. Standard graph neural networks (GNNs) [4] encode geometry information as a 1D vector numerically instead of a 3D feature volume spatially. MLP with 1D feature vectors cannot make effective geometric analysis, while convolution with 3D feature volumes enables natural spatial reasoning. Our idea is to take the standard MPN architecture then replace 1) a latent vector with a latent 3D volume for the feature representation; and 2) fully connected layers (or matrix multiplications) with convolutions for the message encoding. The section explains the Conv-MPN architecture specific to our problem setting, but it is straightforward to extend the framework to the entire GNN family. + +# 4.1. Feature initialization + +A node in the inference graph corresponds to a building-edge, which is to be represented as a 3D feature vol + +ume. We initialize the feature volume by passing a building RGB image concatenated with a binary building edge mask $(256 \times 256 \times 4)$ through Dilated Residual Network (DRN) [33] (See Fig. 3). More specifically, we use the first three blocks of the DRN-C-26 architecture, followed by one $3 \times 3$ stride 2 convolution for downsampling to $64 \times 64 \times 32$ . During training, we initialize the network parameters by the pretrained weights on the ImageNet [28].1 + +# 4.2. Convolutional message passing + +A standard form of feature vector update in MPN is to utilize multi layer perceptron (MLP) for encoding messages and mixing with the current feature: + +$$ +f _ {v} \leftarrow \operatorname {M L P} \left(f _ {v}; \sum_ {w \in \mathbf {N} (v)} \operatorname {M L P} \left(f _ {v}; f _ {w}\right)\right) \tag {1} +$$ + +$f_{v}$ denotes the feature vector associated with a node $v$ , $\mathbf{N}(v)$ denotes the set of neighboring nodes, and “;” denotes the feature concatenation. + +While Conv-MPN could simply replace MLP by CNN to form a feature update rule, that would require two CNN modules and hence more GPU memory. A node feature spreads across a volume and a simple pooling could keep all the information in a message without collisions. More precisely, instead of encoding a message for every pair of nodes, we just pool features across all the neighboring nodes to encode a message, followed by CNN to update a feature vector: + +$$ +f _ {v} \leftarrow \operatorname {C N N} \left[ f _ {v}; \underset {w \in \mathbf {N} (v)} {\operatorname {P o o l}} f _ {w} \right]. \tag {2} +$$ + +We experimented max, sum, and mean poolings and the max pooling worked the best. We perform feature update up to 3 iterations due to the GPU memory limitation. The CNN module consists of 7 Conv-ReLU-BN blocks, which are not shared across different iterations. We use Conv-MPN(t=x) to denote our architecture with $x$ iterations of convolutoinal message passing. + +# 4.3. Building edge verification + +After a few iterations of feature update, we put a CNN decoder to each node and output a confidence score, indicating if the corresponding building edge is true or not (See Fig. 3). The decoder first pass the feature into a 5 ConvReLU-BN blocks to convert feature into $64 \times 64 \times 128$ . After that, feature are downsampled into $2 \times 2 \times 128$ via max-pooling. In the end, the feature is flattened into 512 dimensional feature vector, followed by a single fully connected layer to regress a confidence score. + +![](images/ada44389a52549ecb066d31a9a63e9471d95a64e50f574643409b5089c59e085.jpg) +Figure 3. Conv-MPN Architecture. Given a graph, DRN encoder initializes a feature volume for each node. Convolutional message passing update feature volumes for T times. A building edge verification module uses a simple CNN decoder to estimate the confidence of a node (i.e., a building edge candidate). + +# 4.4. Edge classification loss + +We use the weighted binary cross-entropy loss: + +$$ +\mathcal {L} = - \sum \mathcal {H} \log \hat {\mathcal {H}} - \lambda (1 - \mathcal {H}) \log (1 - \hat {\mathcal {H}}). \tag {3} +$$ + +$\mathcal{H}$ and $\hat{\mathcal{H}}$ are the ground-truth and the prediction of the building edge confidence. $\lambda = 3$ is used to increase the weight on positive samples. + +# 5. Experiments + +We have implemented the proposed system in PyTorch. The learning rate is initialized to $5 \times 10^{-4}$ , while we decay the rate by 0.8 when the testing loss does not decrease in 4 epochs. We terminate the training process when the testing loss does not decrease in 20 epochs. + +Conv-MPN is GPU memory intensive due to the use of 3D feature volumes. A single NVIDIA TitanX GPU with 24G memory is used for all the experiments except for Conv-MPN $(t = 3)$ , which requires two TitanX GPUs. We set the batch size to be 1, but accumulate gradients and update the parameters every 8 batches to suppress noisy gradients. + +During training, the inference graph becomes too large to fit in a GPU memory for large buildings with many building corner candidates. For training Conv-MPN (and GNN in the comparative evaluations), we used 1215 buildings that have at most 15 building corner candidates. During testing, inference requires less memory and we simply apply the trained network on large buildings, which surprisingly works well for Conv-MPN in our experiments. Training Conv-MPN $(t = 1)$ , Conv-MPN $(t = 2)$ , and Conv-MPN $(t = 3)$ takes roughly 20, 30, and 40 hours. + +# 5.1. Main results + +Figure 4 shows representative planar graph reconstructions by Conv-MPN. The method is able to recover complex building structure beyond the Manhattan geometry without relying on any hand-crafted constraints or priors. + +Next, we conduct comparative evaluations against five competing methods: PolyRNN++ [2], PPGNet [36], Hamaguchi et al. [14], L-CNN [37], and Nauata et al. [21] (See Table 1 and Fig. 5). Here, we provide brief summary of the five methods. + +- PolyRNN++ traces the building external boundary in a recurrent fashion [2] and produces a 1D polygonal loop. + +- PPGNet [36] uses CNN to detect corners and classifies their connections. However, the connection (i.e., edge) classification is independent of other connections, lacking in higher level geometric reasoning. + +- Hamaguchi et al. [14] won the SpaceNet Building Footprint Extraction challenge [1]. The method uses CNN to produce binary masks of building footprints [14]. We convert the segmentation into a polygonal loop, and use OpenCV implementation of the Ramer-Douglas-Peucker algorithm with a threshold of 10 to simplify the curve. + +- L-CNN [37] proposes an end-to-end neural network that detects corners and classifiers their connections. Like PPGNet, L-CNN also performs connection classification for each edge independently. + +- Nauata et al. [21] is the current state-of-the-art for the problem, which detects 3 types of geometric primitives, classifies 2 types of pairwise primitive relationships, and uses integer programming to combine all the information into a building planar graph. + +Nauata et al. relies on integer programming with handcrafted objectives and structural constraints. The first 4 methods and Conv-MPN seek to learn geometric regularities or priors from examples instead. + +Table 1 shows that Conv-MPN achieves the best higher-order (region) metrics among prior-free solutions. For the corner and edge metrics, Conv-MPN is not always the best. In particular, L-CNN outperforms Conv-MPN slightly on the edge metrics. However, as shown in Fig. 6, the graph structure from L-CNN is often broken, as edges are estimated independently. Figures 5 and 6 demonstrate that the region metrics best reflect our perceptual quality of the planar graph structure, in which Conv-MPN makes significant + +![](images/afd9309224d95e4f8c981564eb9279263a20cb66ef1e4170bbfb360c79faf197.jpg) +Figure 4. From left to right, an input RGB image, GNN, Zero message, Conv-MPN reconstructions after 1, 2, or 3 iterations of convolutional message passing and ground-truth. + +Table 1. Comparative evaluations: Table shows precision and recall values, when the edge confidence threshold is set to 0.5. The cyan, orange, and magenta colors indicate the first, second, and third best results, respectively among the prior-free methods. Nauata et al. is the concurrent state-of-the-art method. This method is not prior-free and uses integer optimization with hand-crafted objectives and structural constraints. + +
ModelCornerEdgeRegion
Preci.RecallF1-scorePreci.RecallF1-scorePreci.RecallF1-score
PolyRNN++ [2]49.643.746.419.515.217.139.813.720.4
PPGNet [36]78.069.273.355.150.652.832.430.831.6
Hamaguchi et al. [14]58.357.858.025.422.323.851.036.742.7
L-CNN [37]66.786.275.251.071.259.425.941.531.9
Conv-MPN (t=3) [Ours]77.980.279.056.960.758.751.157.654.2
Nauata et al. [21]91.164.675.668.148.056.370.953.160.8
+ +improvements. Note that Conv-MPN stays behind Nau-tata et al. [21] on the region F1-score, which requires hand-crafted objectives and structural constraints in a complex IP optimization formulation. We would like to emphasize again that Conv-MPN learns such priors and constraints all from examples automatically, which is a phenomenal feat and makes a big improvements against all the other prior-free solutions. + +# 5.2. Ablation study + +We verify the contributions of Conv-MPN architecture, in particular, on the effects of 1) feature volume representation and 2) message passing. Figures 6 and 7 provide the quantitative and qualitative comparisons, respectively. + +Feature volume representation: We compare against a + +vanilla GNN, where we take the Conv-MPN architecture and replace $(64 \times 64 \times 32)$ feature volume by a 512 dimensional vector. The feature initialization, message passing, and line verification modules are modified accordingly to match up the feature dimensions (refer to the supplementary document for the details). We conduct message passing once both on Conv-MPN and GNN for clear comparison. + +Figure 7 shows that GNN provides competitive results for the edge recall, but performs poorly on the other metrics. In particular, the performance gap is significant for the regions, which requires high-level geometry reasoning and demonstrates the power of our feature representation. + +Message passing: We compare against two Conv-MPN variants that do not conduct message passing. The first variant (denoted as "per-edge classifier") simply does not + +![](images/c00d4add87eb59b33e2f795584d4dc41c3ab0ec411d5405ff8b62de26f5b1e31.jpg) +Figure 5. Comparative evaluations against competing methods. PolyRNN++ [2], PPGNet [36], Hamaguchi et al. [14], and L-CNN [37] are prior-free existing methods, all utilizing DNNs. Nauata et al. [21] is not prior-free. Zero message is a variant of our Conv-MPN without any message passing. Conv-MPN is our prior-free system. + +exchange messages by cutting the inter-node connections. The second variant (denoted as "zero message") is equivalent to Conv-MPN $(t = 1)$ , except that it always overwrites + +the pooled neighbor features with a value of 0. + +Figure 7 shows that Conv-MPN $(t = 1)$ is superior to "per-edge classifier" and "zero message" in most metrics. In + +![](images/53c19ed7f983edc5df7f27faf81d96656c9ada5bdc79a6296e3641f1ffc2f8b4.jpg) +L-CNN + +![](images/a12016c223fcdb4d2d21816b4042d33de9ad81095680c5ff2f8e7b257ed8d06c.jpg) + +![](images/2624aabafa14e749a63a63b18cf00f475f1d9c4d2c3682931cc8395a7e653301.jpg) +PPGNet + +![](images/828aaa6d885d5b979f72f1f626d5201319b0a91007df3f376ea4e149deb498a6.jpg) + +![](images/62ef1489bf1ce083b229056a4d03d6c64992153aadcf448e7aa91177c10622c4.jpg) +Zero message + +![](images/445ad6e9277074b1db868b449b1d0ac98ab244db56cb0ba6cefd0ecc71b49d8c.jpg) + +![](images/4ec124b367b2699fecf982592cfecbde188e37b8a5923e62ff1ea59fced54830.jpg) +Conv-MPN (t=3) + +![](images/9bc447a9f47f3f95515a1b7e11a7ad98fe62dec844a1e773cd2e11f1566f7249.jpg) + +![](images/a3656690c97db259c41b8d446a2bb610e2148680bb5a9b1743005e725b279f2e.jpg) + +![](images/f6a03e9c4cff3426eccedb6a02ba7ccdc7ce947e094b0607ded81da21e0b659a.jpg) + +![](images/4a3c5397499d88d2fb15c94bb8ff46b44ab6ae2895a7efba96cfa0f836720975.jpg) + +![](images/d7c503dc0a84afc6504b6a6fd52b2dbbc33266044a002968baa66445fceded9a.jpg) + +![](images/820c51ced98e82662282e11f7e7464258896038e2fd7ef01ac0bd64288e0983e.jpg) + +![](images/e6c622e873e576a38d41b58db36f801ba3f4b9df8402599681ce6f8c3fdb90e1.jpg) + +![](images/53dce52f7d9999c60ae845480a9561029b47f39d42039ccc0490ee07e48d08df.jpg) + +![](images/bde0716b421b86abc0e9a910473dfad72fbcf1cb1b873d89827e312c114ae684.jpg) + +![](images/4d84dddf6d8f1e6593b17b6ad45716897cc232f5347a131a1254331ff1fc7c42.jpg) + +![](images/4a3d22cab149f830691e64201454895817d6f6709d4c8ecdac925e293b17986c.jpg) +Figure 6. Close-up comparisons. From left to right, L-CNN[37], PPGNet[36], Zero message, and Conv-MPN(t=3). In the zooming area, we show the common mistakes that Conv-MPN can help to prevent. Typically, Conv-MPN helps removing the edge intersections, thin triangles and connecting missing edges. + +![](images/fe39cf1b920bce5abc3da31def7ceb592e8d3a0b4281097f300053c107e1e4bc.jpg) + +![](images/cb0a85d42b3896b0243ec479e3cb158aca3b77bb8aba438a5dca6a5c15dc8e02.jpg) + +![](images/49bfac468775557d4c095d03896346f958166fafe5c9cb75ec7d2420f2f46989.jpg) + +![](images/8fcb37519f87ae36699cce223887887e520c8b39ec68cd8863de8fd63fed2a91.jpg) + +![](images/dc7a2fa8d1d9cf749a8e1474ebacf6b78d37e004eb9025c6bad97b3dfa871141.jpg) + +![](images/ea89bdbc56c7bbbf1c4d37c4158ced3efe48ff3df232623ac9c51ad8fa730027.jpg) + +particular, the performance gap in the region metrics are again significant, indicating that Conv-MPN effectively exchanges information via the convolutional message passing. + +Figure 7 also shows how Conv-MPN improve reconstructions over multiple iterations of the convolutional message passing (See Figure. 4 for qualitative evaluations). The performance improvement is consistent and strong from no iterations to 1 and 2 iterations, where per-edge-classifier can be considered as Conv-MPN $(t = 0)$ . Due to the memory limitation, Conv-MPN $(t = 3)$ is the largest model we trained, which shows the best results, where the performance improvements start to saturate. + +# 5.3. Failure cases + +Conv-MPN is far from perfect, where Figure 8 shows failure examples. The first major failure mode comes from missing corners. If a building corner is not detected, Conv-MPN will automatically miss all the incident structure. The second major failure mode is large buildings with 30 corner candidates or more, which do not appear in the training set due to the memory limitation. + +# 6. Conclusion + +This paper presents a novel message passing neural architecture Conv-MPN for structured outdoor architecture + +![](images/1d2ce60f13bdf6354ff775ca9ba619924a5c8cd1baf900ea799689c9f9c8496c.jpg) + +![](images/4a9da76e9395caea547522fb8ac246d484c208ade8b56da693959ebf3fc4e6d1.jpg) + +![](images/84789c1ae83bb632f9f1240bb3ba2e51d8f53abae83dec27604fdbb78175573b.jpg) + +Figure 7. The precision and recall for the corners, edges and regions, while changing the edge confidence thresholds in the range [0.1, 0.8] with an increment of 0.05. We plot the precision and recall separately for clarity. Note that y-axes for different plots are not in the same scale for better visualization. +![](images/4a78930d6990ceae71bf994a4a331cf67e523ab3c8c7557063409a86347beab7.jpg) +gnn per edge classifier zero message Conv-MPN(t=1) Conv-MPN(t=2) Conv-MPN(t=3) + +![](images/c7289c608e25016ecfef80e9729858c5c2ada197c9708b35a5cae3be2dfd00bd.jpg) + +![](images/1512af9868e025de75dee023a24a266c6918c10e2ce8c72a879413c12140faee.jpg) + +![](images/6ddcc7942b48769fad75c6b52d5ea240d243ff8d7b619385f023cba8831bee49.jpg) +Figure 8. Failure cases. The left two examples suffer from missing corners by mask R-CNN. The right two examples show complex buildings, which Conv-MPN does not generalize well. + +![](images/0759297971e2fae1739685bd3fe0f0cd9d9d6272933ffbee7aa9908e2b8a7c61.jpg) + +![](images/6afb43b8c47b2379ff36980a5fa1f7aead379701f029906eac149e6c4aba2610.jpg) + +![](images/076f66f21ddfc4d9213e38a6f1280fc89af8c646381feb37f506839539e87b9a.jpg) + +reconstruction. Our idea is simple yet powerful. ConvMPN represents the feature associated with a node as a feature volume and utilizes CNN for message passing, while retaining the standard message passing neural architecture. Qualitative and quantitative evaluations verify the effectiveness of our idea and demonstrates significant performance improvements over the existing prior-free solutions. The main drawback is the extensive memory consumption, which is one of our future work to address. + +The current popular approach to structured reconstruction is to inject domain knowledge as hand-crafted objectives or constraints into an optimization formulation. ConvMPN learns all such priors from examples, then infer a planar graph structure form a single image. We believe that this paper has a potential to open a new line of graph neural network research for structured geometry reconstruction. We will share our code and data to promote further research. + +Acknowledgement: This research is partially supported by + +NSERC Discovery Grants, NSERC Discovery Grants Accelerator Supplements, and DND/NSERC Discovery Grant Supplement. This research is also supported by the Intelligence Advanced Research Projects Activity (IARPA) via Department of Interior / Interior Business Center (DOI/IBC) contract number D17PC00288. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright annotation thereon. 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 IARPA, DOI/IBC, or the U.S. Government. + +# References + +[1] SpaceNet on Amazon Web Services (AWS). "Datasets." The SpaceNet Catalog. Last modified April 30, 2018. https://spacenetchallenge.github.io/datasets/datasetHomePage.html, 2018. Online; accessed 19 October 2018. 2, 4 +[2] David Acuna, Huan Ling, Amlan Kar, and Sanja Fidler. Efficient interactive annotation of segmentation datasets with polygon-rnn++. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 859-868, 2018. 2, 4, 5, 6 +[3] James Atwood and Don Towsley. Diffusion-convolitional neural networks. In Advances in Neural Information Processing Systems, pages 1993-2001, 2016. 2 +[4] Peter W Battaglia, Jessica B Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018. 2, 3 +[5] Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. arXiv preprint arXiv:1312.6203, 2013. 2 +[6] Lluis Castrejon, Kaustav Kundu, Raquel Urtasun, and Sanja Fidler. Annotating object instances with a polygon-rnn. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5230-5238, 2017. 2 +[7] Dominic Cheng, Renjie Liao, Sanja Fidler, and Raquel Urtasun. Darnet: Deep active ray network for building segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7431-7439, 2019. 2 +[8] Michael Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 3844-3852. Curran Associates, Inc., 2016. 2 +[9] Michael Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In Advances in neural information processing systems, pages 3844-3852, 2016. 2 +[10] David K Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Alán Aspuru-Guzik, and Ryan P Adams. Convolutional networks on graphs for learning molecular fingerprints. In Advances in neural information processing systems, pages 2224-2232, 2015. 2 +[11] Adam Van Etten, Dave Lindenbaum, and Todd M. Bacastow. Spacenet: A remote sensing dataset and challenge series. CoRR, abs/1807.01232, 2018. 2 +[12] Kevin Frans and Chin-Yi Cheng. Unsupervised image to sequence translation with canvas-drawer networks. arXiv preprint arXiv:1809.08340, 2018. 2 +[13] Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1263–1272. JMLR.org, 2017. 2 + +[14] Ryuhei Hamaguchi and Shuhei Hikosaka. Building detection from satellite imagery using ensemble of size-specific detectors. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pages 223-2234. IEEE, 2018. 2, 4, 5, 6 +[15] Kun Huang, Yifan Wang, Zihan Zhou, Tianjiao Ding, Shenghua Gao, and Yi Ma. Learning to parse wireframes in images of man-made environments. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 626-635, 2018. 2 +[16] Jiaye Wu Yasutaka Furukawa Jiacheng Chen, Chen Liu. Floor-sp: Inverse cad for floorplans by sequential room-wise shortest path. In The IEEE International Conference on Computer Vision (ICCV), 2019. 1 +[17] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016. 2 +[18] Chen Liu, Jiaye Wu, and Yasutaka Furukawa. Floornet: A unified framework for floorplan reconstruction from 3d scans. In Proceedings of the European Conference on Computer Vision (ECCV), pages 201-217, 2018. 2 +[19] Chen Liu, Jiajun Wu, Pushmeet Kohli, and Yasutaka Furukawa. Raster-to-vector: Revisiting floorplan transformation. In Proceedings of the IEEE International Conference on Computer Vision, pages 2195-2203, 2017. 2 +[20] Diego Marcos, Devis Tuia, Benjamin Kellenberger, Lisa Zhang, Min Bai, Renjie Liao, and Raquel Urtasun. Learning deep structured active contours end-to-end. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8877-8885, 2018. 2 +[21] Nauata Nelson and Furukawa Yasutaka. Vectorizing world buildings: Planar graph reconstruction by primitive detection and relationship classification. arXiv preprint arXiv:1912.05135, 2019. 1, 2, 4, 5, 6 +[22] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In European conference on computer vision, pages 483-499. Springer, 2016. 2 +[23] Mathias Niepert, Mohamed Ahmed, and Konstantin Kutzkov. Learning convolutional neural networks for graphs. In International conference on machine learning, pages 2014-2023, 2016. 2 +[24] 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 +[25] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in neural information processing systems, pages 5099-5108, 2017. 2 +[26] 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 +[27] Daniel Ritchie, Anna Thomas, Pat Hanrahan, and Noah Goodman. Neurally-guided procedural models: Amortized + +inference for procedural graphics programs using neural networks. In Advances in neural information processing systems, pages 622-630, 2016. 2 +[28] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211-252, 2015. 3 +[29] Ke Sun, Bin Xiao, Dong Liu, and Jingdong Wang. Deep high-resolution representation learning for human pose estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5693-5703, 2019. 2 +[30] Donglai Xiang, Hanbyul Joo, and Yaser Sheikh. Monocular total capture: Posing face, body, and hands in the wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10965-10974, 2019. 2 +[31] Bin Xiao, Haiping Wu, and Yichen Wei. Simple baselines for human pose estimation and tracking. In Proceedings of the European Conference on Computer Vision (ECCV), pages 466-481, 2018. 2 +[32] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In International Conference on Learning Representations, 2019. 2 +[33] Fisher Yu, Vladlen Koltun, and Thomas Funkhouser. Dilated residual networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 472-480, 2017. 3 +[34] Shanxin Yuan, Guillermo Garcia-Hernando, Björn Stenger, Gyeongsik Moon, Ju Yong Chang, Kyoung Mu Lee, Pavlo Molchanov, Jan Kautz, Sina Honari, Liuhao Ge, et al. Depth-based 3d hand pose estimation: From current achievements to future goals. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2636-2645, 2018. 2 +[35] Huayi Zeng, Jiaye Wu, and Yasutaka Furukawa. Neural procedural reconstruction for residential buildings. In Proceedings of the European Conference on Computer Vision (ECCV), pages 737-753, 2018. 2 +[36] Ziheng Zhang, Zhengxin Li, Ning Bi, Jia Zheng, Jinlei Wang, Kun Huang, Weixin Luo, Yanyu Xu, and Shenghua Gao. Ppgnet: Learning point-pair graph for line segment detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7105-7114, 2019. 2, 4, 5, 6, 7 +[37] Yichao Zhou, Haozhi Qi, and Yi Ma. End-to-end wireframe parsing. In Proceedings of the IEEE International Conference on Computer Vision, pages 962-971, 2019. 2, 4, 5, 6, 7 +[38] Christian Zimmermann and Thomas Brox. Learning to estimate 3d hand pose from single rgb images. In Proceedings of the IEEE International Conference on Computer Vision, pages 4903-4911, 2017. 2 \ No newline at end of file diff --git a/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/images.zip b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..523a3d337fb5f404b347bf68d02a98f5d1dede17 --- /dev/null +++ b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:177fb4f2f67764f474d0ee55f9cc82b97357171743c8f3b2f1967c3f00a145c5 +size 1223883 diff --git a/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/layout.json b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2cb4e3543f300a44d2dabe38517f053cc73b2de0 --- /dev/null +++ b/convmpnconvolutionalmessagepassingneuralnetworkforstructuredoutdoorarchitecturereconstruction/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffdd005263d64ead8a922b4a88e95c48520f7dbf3994442d31dbae8a2467c01e +size 330029 diff --git a/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/8d1c3b1a-2bdb-44f0-8da3-0e84b632cc89_content_list.json b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/8d1c3b1a-2bdb-44f0-8da3-0e84b632cc89_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..dae54042012429cedf79fa4521dbcf4aeafea9ba --- /dev/null +++ b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/8d1c3b1a-2bdb-44f0-8da3-0e84b632cc89_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a539d924452da5a68dd74d848f518b094a725165d93666feb98bce26db27217 +size 73360 diff --git a/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/8d1c3b1a-2bdb-44f0-8da3-0e84b632cc89_model.json b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/8d1c3b1a-2bdb-44f0-8da3-0e84b632cc89_model.json new file mode 100644 index 0000000000000000000000000000000000000000..27119c3814b301652f33f2379da9d44b83ebe4e9 --- /dev/null +++ b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/8d1c3b1a-2bdb-44f0-8da3-0e84b632cc89_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:871164870db839ebe3ccef6c341d8b61f8633af2f6f2c3782163d044447bc25b +size 89505 diff --git a/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/8d1c3b1a-2bdb-44f0-8da3-0e84b632cc89_origin.pdf b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/8d1c3b1a-2bdb-44f0-8da3-0e84b632cc89_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..840d76250cae44b0e6fdab17d18ddde4306aa832 --- /dev/null +++ b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/8d1c3b1a-2bdb-44f0-8da3-0e84b632cc89_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adbb6c59e97978d2c6486ad6108c9e2f693fd4a281683b7a957ffba0164ef28e +size 805883 diff --git a/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/full.md b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/full.md new file mode 100644 index 0000000000000000000000000000000000000000..32a8072c6b1ce695c8a0067c4086111345afb9f7 --- /dev/null +++ b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/full.md @@ -0,0 +1,294 @@ +# Convolution in the Cloud: Learning Deformable Kernels in 3D Graph Convolution Networks for Point Cloud Analysis + +Zhi-Hao Lin1 Sheng-Yu Huang1 Yu-Chiang Frank Wang1,2 + +1Graduate Institute of Communication Engineering, National Taiwan University, Taiwan +2ASUS Intelligent Cloud Services, Taiwan + +{r08942062,r08942095,ycwang}@ntu.edu.tw + +# Abstract + +Point clouds are among the popular geometry representations for 3D vision applications. However, without regular structures like 2D images, processing and summarizing information over these unordered data points are very challenging. Although a number of previous works attempt to analyze point clouds and achieve promising performances, their performances would degrade significantly when data variations like shift and scale changes are presented. In this paper, we propose 3D Graph Convolution Networks (3D-GCN), which is designed to extract local 3D features from point clouds across scales, while shift and scale-invariance properties are introduced. The novelty of our 3D-GCN lies in the definition of learnable kernels with a graph max-pooling mechanism. We show that 3D-GCN can be applied to 3D classification and segmentation tasks, with ablation studies and visualizations verifying the design of 3D-GCN. Our code is publicly available at https://github.com/j1a0m0e4sNTU/3dgenc. + +# 1. Introduction + +3D vision has been an active research topic, closely related to applications such as augmented reality, drones and self-driving vehicles [20, 15]. Existing 3D data representations include the use of voxel, mesh or point cloud features. Voxels [3, 33] describe 3D objects as voxel grids but generally suffer from insufficient resolution and high memory costs. Meshes are common in animations, while such representations are not directly associated with the 3D sensor outputs [16, 19]. Finally, 3D point clouds focus on describing shape information of 3D objects and can be easily acquired by 3D sensors, but the resulting unordered set of 3D points might limit the subsequent analysis tasks. + +With the recent remarkable progress of deep learning techniques, in particular the Convolutional Neural Network (CNN), promising performances have been observed in a variety of computer vision tasks [6, 11]. However, image + +![](images/87184aa991b7ec7103b1d74f72167cf5c46cb160bc871387d165cb809c4c00b8.jpg) +(a) + +![](images/03c35237efc53e36b309d482c2681ffb8e69f6aa1da4d8ba7116af80283fde60.jpg) +(b) +Figure 1: Convolution in (a) 2D images and (b) 3D graphs. Note that standard 2D CNN cannot be easily applied to handle 3D point cloud data, since the kernels in 3D graph convolution networks need to exhibit additional deformation in shape due to unstructured inputs. + +data are generally presented in terms of grid structures (e.g., pixels or cells over scales), which makes the convolution operation feasible. For irregular and unstructured data like 3D point clouds, it is not possible to learn and deploy kernels with fixed sizes or patterns on such data. In order to process such an unstructured/unordered set of points, PointNet [21] applies multiple fully connected layers to encode 3D point clouds, followed by global max-pooling operation, and shows impressive results for 3D data recognition and segmentation. Since global pooling operation is deployed, locally structured information of 3D point cloud might not be properly observed. Moreover, it is not designed to be invariant to global transformation like shift or scaling, as we later discuss and verify. + +To better describe local information of 3D data, some research works utilize mesh data and their corresponding graph structures (i.e., vertices and associated edges) for extracting desirable information. For example, [27, 4] choose to propagate and aggregate features of adjacent vertices for deriving the final representation, while others [16, 2] define kernels with fixed patterns to observe local information. + +Motivated by the above works, [26, 14, 1, 30, 32] attempt to construct graph-like structures for 3D point clouds. Since such methods consider global coordinates in representing their graphs, shift and scaling effects would degrade the performances of their models. + +In this paper, we propose a novel deep learning model of 3D Graph Convolution Networks (3D-GCN) for processing and learning structural information of 3D point clouds. Motivated by 2D CNN, we aim at deriving deformable 3D kernels, whose shape and weights are learnable during the training stage. Moreover, similar to the max pooling operation in standard CNN, we perform a unique graph max pooling operation in 3D-GCN to summarize the processed features across different scales. As a result, our 3D-GCN is able to observe and extract structural information of unordered 3D point clouds with arbitrary shape and size. As detailed and confirmed later, our 3D-GCN is invariant to 3D point cloud shift and scaling changes, which are the key properties for real-world 3D vision applications. + +We now summarize our main contributions as follows: + +- We propose a 3D Graph Convolution Network (3D-GCN) for processing 3D point cloud data, exhibiting shift and scale-invariant properties for promising classification/segmentation performances. +- The shape and weights of each kernel in our 3D-GCN are learnable during training, which show capabilities in describing local structural information from unordered 3D point clouds. +- A novel graph max pooling is also introduced in 3D-GCN, allowing extraction and summarization of point cloud features across different scales for improved performances. + +# 2. Related Work + +Multi-view and voxelized methods. Since standard Convolutional Neural Networks cannot be directly applied to handle unstructured data like 3D point clouds, existing works typically choose to convert point clouds into proper representation for further processing purposes. For example, [33, 3, 18, 17, 25] register point features into voxel grid or directly use voxelized 3D shapes as the model input, so that standard 3D CNN can be performed on such input data. Although octree-based methods like [24, 31] have been proposed to refine the resolution of the predicted output, voxel-based methods are generally known to suffer from insufficient resolution and enormous memory consumption for 3D voxel representation. + +Alternatively, a number of works [28, 9, 22, 29, 1] choose to project 3D shapes onto 2D planes in multiple views, followed by 2D CNN for feature extraction. While impressive results are reported, it cannot be easily extended to 3D data segmentation or reconstruction [11, 6]. + +Point-cloud based methods. In order to deal with 3D point cloud data, PointNet [21] has multiple shared fully connected layers to handle unordered 3D point inputs, followed by channel-wise max-pooling to extract global features to represent 3D point cloud data. While PointNet is able to handle 3D point cloud data without limitation to its unordered property, it essentially learns key point representation of the input object for deriving the final features. Local geometric information is not directly encoded, and this model would be sensitive to input translation and scaling variation, as we later verify. + +To alleviate the aforementioned problem, researchers propose to sort the 3D points into an ordered list, where neighboring points have smaller euclidean distances in the 3D space. For example, [8] sorts all the points along different dimensions, then employ Recurrent Neural Networks (RNN) to extract features from the resulting sequences. [10, 5] convert the 3D points into an 1D list via kd-tree according to their coordinates, followed by 1D CNNs to extract the corresponding features. Nevertheless, sorting a 3D point set into an 1D list is not trivial; moreover, local geometric information may not be easily preserved in such ordered lists. + +Geometry-based methods. Different from the aforementioned works which take the entire 3D data as the input, another branch of methods choose to learn local geometric information from a subset of 3D points [23, 32, 26, 14, 7, 13, 34, 30]. By dividing the 3D points into smaller groups, this type of approach extracts features from each local group for representation purposes. For example, PointNet++ [23] divides 3D point clouds into several ball regions, and apply [21] to each ball for local feature extraction. DGCNN [32] constructs local graphs by identifying the nearest neighbors of 3D points in the feature space, followed by the EdgeConv operation for feature extraction. Shen et al. [26] extend the above idea and additionally learn geometry information during feature aggregation. RS-CNN [14] applies weighted sum of neighboring point features, where each weight is learned with MLPs according to geometric relation between two points. These works attempt to extract geometrical information within local regions of 3D point clouds. However, existing methods typically use exact coordinates of points or distance vectors as the input features, and thus the model performance would be influenced by shifting and scaling effects, which would not be preferable for real-world applications like scene segmentation and multi-object detection. In this paper, we propose a novel 3D-GCN with learnable 3D graph kernels and Graph Max-Pooling mechanism, resulting in effective geometric features across different scales while exhibiting scale and shift-invariance. + +![](images/50cfe530c0e7e1eeb47a7ef9325d7f7d7914f28d22a4d0a924da8a4558d0b972.jpg) +Figure 2: Illustration of receptive field $R_{n}^{M}$ and kernel $K^{S}$ . We have $R_{n}^{M}$ indicates the $M$ neighboring points for the $n$ th point $\pmb{p}_{n}$ , and kernel $K^{S}$ composes of $S$ supports with center at $\pmb{k}_{C} = (0,0,0)$ . Note that directional vector $d_{m,n}$ and $k_{s}$ are used to measure the similarity in (4). + +# 3. 3D Graph Convolution Networks + +# 3.1. Notations + +We present a novel 3D Graph Convolution Network (3D-GCN) to extract features from point cloud data, with applications to visual classification and semantic segmentation. For the sake of completeness, we define the notations used in this paper as follows. A point cloud instance is viewed as a set, which contains a total of $N$ points $\mathcal{P} = \{\pmb{p}_n\mid n = 1,2,\dots ,N\}$ located on the surface of an object of interest. Note that $\pmb{p}_n$ denotes the $n$ -th point of this instance, and its attributes may describe coordinates $(x_{n},y_{n},z_{n})$ , normal vector $(\nu_n^x,\nu_n^y,\nu_n^z)$ , or RGB color information $(r_n,g_n,b_n)$ . In this work, the point cloud describes only the coordinates of each point on the object surface. In other words, we have $\pmb{p}_n = (x_n,y_n,z_n)$ , and thus a 3D point cloud object is represented by a matrix of size $N\times 3$ . + +For classification tasks, our 3D-GCN takes the point cloud input and produces the predicted output scores $c$ for each class of interest. For semantic segmentation, we need to predict the part/scene label for each point in a 3D object. Thus, the output would be of size $N \times c$ , which also indicates that the 3D-GCN performs point-wise classification in the task of semantic segmentation. + +# 3.2. Deformable Kernels for 3D Graph Convolution + +Receptive Fields in 3D-GCN A 3D point cloud object with $N$ points is denoted as $\mathcal{P} = \{\pmb{p}_n \mid n = 1,2,\dots,N\}, \pmb{p}_n \in \mathbb{R}^3$ . To describe the feature derived at each point in 3D-GCN, we have $\pmb{f}(\pmb{p}) \in \mathbb{R}^{D}$ denote the associated $D$ -dimensional feature vector. To capture local geometric information of each point $\pmb{p}_n$ , we determine the 3D receptive field of $\pmb{p}_n$ by a set of $M$ neighboring points. As illustrated in Figure 2, we denote $R_n^M$ as the receptive + +![](images/bfe2ac1c0e4066620ea9f3c739ab4b0336e40ad473d0d57a38b2010eb1004be1.jpg) +Figure 3: 3D Graph Convolution. As in (4), $sim(\pmb{p}_m, \pmb{k}_s)$ calculates the inner product between $\pmb{f}(\pmb{p}_m)$ and $\pmb{w}(\pmb{k}_s)$ based on the cosine similarity between $\pmb{d}_{m,n}$ and $\pmb{k}_s$ . For each support $\pmb{k}_s$ , the largest sim output among all neighbors $\pmb{p}_m$ is obtained. Summing up with $\langle \pmb{f}(\pmb{p}_n), \pmb{w}(\pmb{k}_C) \rangle$ produces the final convolution output (i.e., (5)). + +field of point $\pmb{p}_n$ with size $M$ as: + +$$ +R _ {n} ^ {M} = \left\{\boldsymbol {p} _ {n}, \boldsymbol {p} _ {m} \mid \forall \boldsymbol {p} _ {m} \in \mathcal {N} (\boldsymbol {p} _ {n}, M) \right\}, \tag {1} +$$ + +where $\mathcal{N}(\pmb{p}_n, M)$ denotes $M$ nearest neighbors of $\pmb{p}_n$ based on the distance $\| \pmb{p}_m - \pmb{p}_n\|$ , and we have the corresponding directional vector $\pmb{d}_{m,n} = \pmb{p}_m - \pmb{p}_n$ calculated for later convolution purposes. We note that, given a 3D point cloud object, we only need to determine the receptive fields for each point once. If the pooling operation is performed in later stages (as discussed in Sect. 3.3), receptive fields for the pooled point clouds at that scale needs to be constructed. In 3D-GCN, the features within the receptive field of $\pmb{p}_n$ with size $M$ is expressed as $\{\pmb{f}(\pmb{p}_n), \pmb{f}(\pmb{p}_m) | \forall \pmb{p}_m \in \mathcal{N}(\pmb{p}_n, M)\}$ . These features will be calculated and updated during the convolution operation, as later discussed. + +It is worth noting that, recent models for 3D point clouds [23, 30] select neighboring points for each point by a predefined radius $r$ . While parameter $r$ can be tuned to properly describe the local structures of 3D point clouds, their model cannot deal with scale variations as we later discuss and verify in Sect. 4. + +Learning Kernels in 3D-GCN In standard 2D CNN models, the kernel is composed of weight parameters in grids, sharing the same patterns across image patches (as depicted in Figure 1a). However, for 3D point cloud data, the data points are viewed as an unordered set, and no particular spatial 3D patterns can be observed. + +![](images/31a55dd35c15b6bcf4b4d76a8ecc481022dcf844ad6e7b4abee68249653594bf.jpg) +Figure 4: Graph Max-Pooling. This pooling process performs channel-wise max-pooling from the features in the receptive field of each $\pmb{p}_n \in \mathcal{P}^{in}$ , followed by randomly sampling a subset from $\mathcal{P}^{in}$ with a sampling rate $r$ . +Figure 5: Illustration of the lack of invariance property. Recent models like PointNet [21] require techniques like zero-mean normalization for 3D point cloud representation, which might be sensitive to noisy 3D input points (as verified in Sect. 4). + +To perform convolution in 3D point cloud structures, we propose 3D Graph Convolution Kernel $K^S$ , where $S$ denotes the number of supports in that kernel. More precisely, we have $K^S$ composed of $S + 1$ kernel points $\pmb{k}_j \in \mathbb{R}^3$ , i.e., + +$$ +K ^ {S} = \left\{\boldsymbol {k} _ {C}, \boldsymbol {k} _ {1}, \boldsymbol {k} _ {2}, \dots , \boldsymbol {k} _ {S} \right\}. \tag {2} +$$ + +Note that $\pmb{k}_C = (0,0,0)$ is the center of the kernel, and $\pmb{k}_1$ to $\pmb{k}_S$ denote the associated supports. + +In 2D CNN, each element in a kernel is the learned weight which describes the spatial patterns of interest. In our 3D-GCN, we define the weight vector $\boldsymbol{w}(\boldsymbol{k}) \in \mathbb{R}^{D}$ for each kernel point $\boldsymbol{k}$ . Thus, the weighted-sum of features $\boldsymbol{f}(\boldsymbol{p})$ using the corresponding weights would achieve the convolution operation. Since the number and directions of supports might not be the same as the receptive fields of a 3D point, we need to define the directional vector $\boldsymbol{k}_{s} - \boldsymbol{k}_{C} = \boldsymbol{k}_{s}, s = 1, 2, \ldots, S$ for describing the pattern of the learned kernel. As illustrated in Figure 2, expect for $\boldsymbol{k}_{C} = (0, 0, 0)$ , the kernel in 3D-GCN is now defined as $\{\boldsymbol{w}(\boldsymbol{k}_{C}), (\boldsymbol{k}_{s}, \boldsymbol{w}(\boldsymbol{k}_{s})) | s = 1, 2, \ldots, S\}$ , where each element is learned via training. + +3D Graph Convolution In 2D CNN, the convolution operation can be regarded as calculating the similarity between the 2D kernel and the associated image patch. Larger output values indicate higher visual similarity. With the aforementioned receptive field and kernel definitions for 3D point cloud data, we define 3D Graph Convolution by calculating the similarity between $R_{n}^{M}$ and $K^{S}$ , denoted as $\text{Conv}(R_{n}^{M}, K^{S})$ . + +However, unlike 2D CNN in which both kernel and image patches are of the same grid structures, it is not trivial to perform convolution in 3D graph structures. Thus, to measure the similarity between the features within the receptive + +![](images/994ca797b52033790b56ae875db499b356c4a2a26c3bc3334cf0ee921ee58355.jpg) +Normalized 3D object + +![](images/02e19530c792b6eb2d08b77bf90bf9242c40d29d3a41ad6a8542a625176ff65a.jpg) +Normalized 3D object with noisy data + +field of $\pmb{p_n}$ (i.e., $\pmb {f}(\pmb {p}_n),\pmb {f}(\pmb {p}_m),\forall \pmb {p}_m\in \mathcal{N}(\pmb {p}_n,M)$ as defined in (1)) and weight vectors of kernel $K^S$ centered at $\pmb{k}_{C}$ with $S$ supports (i.e., $\pmb {w}(\pmb {k}_C),\pmb {w}(\pmb {k}_s),\forall s = 1,2,\dots ,S)$ we consider all possible pairs between $(\pmb {p}_m,\pmb {k}_s)$ . Thus, Conv $(R_{n}^{M},K^{S})$ in 3D-GCN is defined as: + +$$ +\operatorname {C o n v} \left(R _ {n} ^ {M}, K ^ {S}\right) = \left\langle \boldsymbol {f} \left(\boldsymbol {p} _ {n}\right), \boldsymbol {w} \left(\boldsymbol {k} _ {C}\right) \right\rangle + g (\mathcal {A}), \tag {3} +$$ + +where $\langle \cdot \rangle$ denotes the inner-product operation, and $\mathcal{A} = \{\operatorname{sim}(\pmb{p}_m, \pmb{k}_s) | \forall m \in (1, M), \forall s \in (1, S)\}$ . Note that the sim function in (3) is defined as: + +$$ +\operatorname {s i m} \left(\boldsymbol {p} _ {m}, \boldsymbol {k} _ {s}\right) = \left\langle \boldsymbol {f} \left(\boldsymbol {p} _ {m}\right), \boldsymbol {w} \left(\boldsymbol {k} _ {s}\right) \right\rangle \frac {\left\langle \boldsymbol {d} _ {m , n} , \boldsymbol {k} _ {s} \right\rangle}{\| \boldsymbol {d} _ {m , n} \| \| \boldsymbol {k} _ {s} \|}, \tag {4} +$$ + +which calculates the inner product between $\pmb{f}(\pmb{p}_n)$ and $\pmb{w}(\pmb{k}_C)$ based on their cosine similarity. The function $g$ in (3) sums up the maximum similarity $\text{sim}(\pmb{p}_m, \pmb{k}_s)$ for each support $\pmb{k}_s$ in that kernel. With the above definitions, the 3D Graph Convolution operation in our 3D-GCN is calculated as: + +$$ +\begin{array}{l} \operatorname {C o n v} \left(R _ {n} ^ {M}, K ^ {S}\right) = \left\langle \boldsymbol {f} \left(\boldsymbol {p} _ {n}\right), \boldsymbol {w} \left(\boldsymbol {k} _ {C}\right) \right\rangle \\ + \sum_ {s = 1} ^ {S} \max _ {m \in (1, M)} \left\{\operatorname {s i m} \left(\boldsymbol {p} _ {m}, \boldsymbol {k} _ {s}\right) \right\}. \tag {5} \\ \end{array} +$$ + +Recall that the neighbors $M$ and supports $S$ are the hyperparameters (similar to the kernel sizes in 2D CNN). Note that (5) utilizes directional vectors $\pmb{d}_{m,n}$ within $R_{n}^{M}$ instead of global coordinates, which introduces shift-invariant property to our 3D-GCN model. In addition, the similarity function in (4) simply calculates the cosine similarity between $\pmb{d}_{m,n}$ and $\pmb{k}_s$ regardless of their lengths. Therefore, the scale-invariant property can be jointly observed by our 3D-GCN. Figure 3 illustrates 3D Graph Convolution operation in our 3D-GCN. + +# 3.3. Convolution and Pooling in 3D-GCN + +3D Graph Convolution Layer A 3D Graph Convolution layer is composed of a pre-determined number $L$ of + +![](images/8ace831261f5cbe1c146259bc163ffedaa6ac73d44efa05c37c66de823d8dd63.jpg) +(a) Classification + +![](images/9b22c644b8dfa2f2180c911d551f1a4556615fcf910b206b16a302fc05364f35.jpg) +(b) Part segmentation +Figure 6: Architecture of 3D-GCN for (a) classification and (b) part segmentation. Note that grey and yellow blocks denote point and feature inputs, respectively. Green arrows denote 3D Graph Convolution Layers, while green triangles denote the Graph Max-Pooling layer. We have MLP and outputs denoted in brown and blue, respectively. + +kernels $K^S$ , each with a constant support number, which can be denoted as $\{K_i^S | i = 1,2,\dots,L\}$ . Taking the 3D point cloud input $\mathcal{P} \in \mathbb{R}^{N \times 3}$ with the corresponding $D$ -dimensional features $\mathcal{F}^{in} \in \mathbb{R}^{N \times D}$ , our 3D Graph Convolution Layer applies (5) with each kernel respectively, producing output features $\mathcal{F}^{out} \in \mathbb{R}^{N \times L}$ . Thus, each output layer $i = 1,2,\dots,L$ can be expressed as: + +$$ +\operatorname {C o n v L a y e r} \left(\left(\mathcal {P}, \mathcal {F} ^ {i n}\right), K _ {i} ^ {S}\right) = \left(\mathcal {P}, \mathcal {F} _ {i} ^ {\text {o u t}}\right), \tag {6} +$$ + +where $\mathcal{F}_i^{out} \in \mathbb{R}^N$ is the $i$ -th channel of $\mathcal{F}^{out}$ . To initialize the convolution and learning process, we simply set $\pmb{f}(\pmb{p}) = 1, \forall \pmb{p} \in \mathcal{P}$ , and $\pmb{w}(\pmb{k}) = 1, \forall \pmb{k}$ in the first input layer. In other words, we only consider directional information to initialize 3D-GCN operations. + +3D Graph Max-Pooling Pooling operation plays an important role in standard 2D CNN, which summarizes the dominant responses within each scale for later high-level processing purposes, resulting in coarse-to-fine feature extraction. In 3D-GCN, we also propose a pooling operation, 3D Graph Max-Pooling, for performing similar mechanisms in 3D point clouds. + +Our 3D Graph Max-Pooling layer takes the receptive field of each point $R_{n}^{M}$ , and applies channel-wise max-pooling to aggregate features $\pmb{f}(\pmb{p}), \forall \pmb{p} \in R_{n}^{M}$ , followed by sampling a subset of $\mathcal{P}$ with a sampling rate $r$ . Thus, this pooling process can be formulated as: + +$$ +\operatorname {P o o l L a y e r} _ {r} \left(\mathcal {P} ^ {i n}, \mathcal {F} ^ {i n}\right) = \left(\mathcal {P} ^ {\text {o u t}}, \mathcal {F} ^ {\text {o u t}}\right), \tag {7} +$$ + +where $\mathcal{P}^{in}\in \mathbb{R}^{N\times 3},\mathcal{P}^{out}\in \mathbb{R}^{\frac{N}{r}\times 3}$ , and $\mathcal{F}^{in}\in \mathbb{R}^{N\times D},\mathcal{F}^{out}\in \mathbb{R}^{\frac{N}{r}\times D}$ . As depicted in Figure 4, this pooling layer enables us to learn multi-scale 3D point cloud features, and make learning and calculation more efficient, which are crucial factors in 3D deep learning models. + +Invariance Properties By learning the directional information within local receptive fields via 3D graph kernels, + +together with the pooling mechanism, our 3D-GCN exhibits promising shift and scale invariance properties. While existing works like [14, 21, 23, 26, 30] report promising performances, they typically consider global coordinates or require point cloud normalization to alleviate such data variances, which would limit their invariance properties (see examples in Figure 5). In Sect. 4), we will compare thorough experiments to confirm the robustness of our 3D-GCN when the above variants are presented. + +# 3.4. 3D Point Cloud Analysis + +Classification To train 3D-GCN to recognize 3D point cloud data as particular categories, we apply and combine multiple 3D graph convolution and max-pooling layers, followed by adding multi-layer perceptron (MLP) for predicting the desirable outputs. Standard soft-max losses and backpropagation can be calculated to learn such 3D-GCN models (see Figure 6a for example architectures). + +Semantic Segmentation One can also apply 3D-GCN to perform 3D point cloud semantic segmentation. To achieve this goal, we aggregate multi-scale features and advance a shared-MLP for point-wise classification. We note that, when aggregating features across different scales $j$ and $j + 1$ , the number of 3D points do not match due to the pooling mechanism. Thus, for example, to concatenate the feature at $p_n^j$ in scale $j$ with that from $j + 1$ , we perform the following operation to identify the corresponding point of interest in scale $j + 1$ : + +$$ +\boldsymbol {p} _ {\tilde {n}} ^ {j + 1} = \arg \min _ {\boldsymbol {p}} \left\{\| \boldsymbol {p} - \boldsymbol {p} _ {n} ^ {j} \| | \forall \boldsymbol {p} \in \mathcal {P} ^ {j + 1} \right\}. \tag {8} +$$ + +Thus, the concatenated features would be $\left(\pmb {f}(\pmb {p}_n^j),\pmb {f}(\pmb{p}_{\tilde{n}}^{j + 1})\right)$ The architecture of 3D-GCN for semantic segmentation is illustrated in Figure 6b. + +![](images/783590998314df69f3ac607de4a1a4a3503f590fe3d829c4f8a98de7589e8bd8.jpg) +(a) + +![](images/6e96aee0e3b19585185be10ec07e4d0ee3f29711b727665a4fc3f82a5aeb12a6.jpg) +(b) +Figure 7: Evaluation of invariance properties on ModelNet40. (a) Shift: Objects randomly shifted within a distance along all directions (with unshifted version denoted as 0), (b) Scale: Objects scaled to different sizes (with the original size denoted as 1), (c) Rotation: Objects rotated along the upward direction (degree is denoted in this figure). Note that DGCNN in [32] was pre-trained on objects with scale variants (i.e., scale within [0.5, 1.5]), but it cannot handle unseen scale variants as shown in (b). + +![](images/a8e6ba4ac3945a48039ed5801692056629bbe0e2615c4795eb7638aa4e5044ed.jpg) +(c) + +# 4. Experiments + +# 4.1. 3D Model Classification + +Dataset. We evaluate 3D-GCN for 3D shape classification on the ModelNet40 [33] dataset, which consists of 12311 CAD models of 40-categories, splitting into 9843 3D objects for training and 2468 for testing. To generate point clouds for training and testing, we sample 1024 points uniformly from the surface of each object without any normalization during training and testing. + +Network configuration. Our 3D-GCN model structure for classification is shown in Figure 6a. The feature-extracting part is composed of 5 3D graph convolution layers, with kernel numbers (32, 64, 128, 256, 1024) from low to high-level layers. We set the support number $S = 1$ for our kernels, and neighbor number $M = 25$ for the receptive fields. There are 3 3D Graph max-pooling layers in model structure, all with a fixed sample ratio $r = 4$ . Following PointNet [21], the output feature of last 3D Graph Convolution Layer in our 3D-GCN is applied with global max-pooling, resulting a final feature representation of 1024 dimension. For classification, the MLP is of 2 layers, where Batchnorm and Dropout with drop ratio of 0.3 applied after the fist layer of MLP. We train our network with batch size 8, learning rate 0.0001 which is decayed half every 10 epochs, using the ADAM optimizer. + +Results. The classification results of our 3D-GCN are listed in Table 1, in which we also compare our results with a number of recent approaches including PointNet [21], PointNet++ [23], DGCNN [32] and KPCov [30]. From this table, we see that our 3D-GCN is generally comparable or performs favorably against several state-of-the-art mod- + +
Methodinput#pointsAcc.(%)
ECC [27]xyz1k87.4
PointNet [21]xyz1k89.2
Kd-Net (depth=10) [10]xyz1k90.6
PointNet++ [23]xyz1k90.7
KCNet [26]xyz1k91.0
MRTNet [5]xyz1k91.2
DGCNN [32]xyz1k92.9
SO-Net [12]xyz2k90.9
KPConv rigid [30]xyz6.8k92.9
PointNet++ [23]xyz, normal5k91.9
SO-Net [12]xyz, normal5k93.4
Oursxyz1k92.1
+ +Table 1: Shape classification results on ModelNet40. Note that "normal" denotes the normal vectors of object surfaces. We see that our method achieved comparable or improved results with inputs of size only 1k points. + +els when the test data are without any shift or scale variations presented. + +To further evaluate the invariance properties of our model, we compare to the above models using 3D point cloud data with 1024 points, normalized to a unit sphere with zero mean, without data augmentation. We test them under three different situations: coordinate shift, shape scaling, and shape rotation. The results are shown in Figure 7a, 7b, and 7c, respectively. From the results shown in these figures, we see that the performance of PointNet and DGCNN significantly dropped with coordinate shifts, which is caused by extracting features from global coordinates. When scale variants are presented, only our model was able to perform recognition with satisfactory performances. As for shape rotation, better invariance ability was exhibited by our 3D-GCN. Thus, the above experiments confirm the effectiveness and robustness of our 3D-GCN. + +
methodclass mIOUinstance mIOUair planebagcapcarchairear phoneguitarknifelamplaptopmotor bikemugpistolrocketskate boardtable
Kd-Net [10]77.482.380.174.674.370.388.673.590.287.281.084.987.486.778.151.869.980.3
MRTNet [5]79.383.081.076.787.073.889.167.690.685.480.695.164.491.879.787.069.180.6
PointNet [21]80.483.783.478.782.574.989.673.091.585.980.895.365.293.081.257.972.880.6
KCNet [26]82.284.782.881.586.477.690.376.891.087.284.595.569.294.481.660.175.281.3
RS-Net [8]81.484.982.786.484.178.290.469.391.487.083.595.466.092.681.856.175.882.2
SO-Net [12]81.084.982.877.888.077.390.673.590.783.982.894.869.194.280.953.172.983.0
PointNet++ [23]81.985.182.479.087.777.390.871.891.085.983.795.371.694.181.358.776.482.6
DGCNN [32]82.385.284.083.486.777.890.674.791.287.582.895.766.394.981.163.574.582.6
KPConv deform [30]85.186.484.686.387.281.191.177.892.688.482.796.278.195.885.469.082.083.6
Ours82.185.183.184.086.677.590.374.190.986.483.895.666.894.881.359.675.782.8
+ +Table 2: Part segmentation results on ShapeNetPart. Note that while our method achieved comparable results as state-of-the-art models did, our model complexity was significantly less than others as discussed in Sect. 4.4. + +![](images/c536ab9179039023c94bc01b00bbd1af07cf658aa1f631e7fc271f044310d130.jpg) +Figure 8: Visualization of part segmentation on ShapeNetPart. We compare our segmentation outputs to those produced by KPCov [30] and PointNet++ [23]. In addition, shift (by 100) and scale (by 10 times) variations are presented for evaluating the invariance capacity for each model. Note that GT denotes the ground truth part labels. + +# 4.2. 3D Model Part Segmentation + +Dataset. To evaluate the use of 3D-GCN for part segmentation, we consider the ShapeNetPart dataset [35], which consists of 16881 CAD models from 16 object types, with each point in an object corresponding to a part label. With a total of 50 categories, 2 to 6 part categories are available for each object type. In our work, we sample 1024 points from each 3D model for training and testing. + +Network configuration. The model architecture is shown in Figure 6b. The feature-extracting part is composed of 5 layers with kernel numbers (128, 128, 256, 256, 512) at the associated layers, and two 3D Graph Max-pooling layers with a fixed sample ratio $r = 4$ are deployed. We set the support number $S = 1$ for each kernel, and neighbor number $M = 50$ for the receptive field in 3D-GCN. The features for segmentation are concatenated from the layer outputs at different scales, as described in Section 3.4. Following PointNet [21], we also have one-hot vectors indicating object type concatenated to the above features, followed by 3 shared MLP layers to classify the segment label for each point. We train the 3D-GCN with learning rate 0.001 and + +decayed half every 10 epochs, using the ADAM optimizer. + +Results. We evaluate the segmentation performance in terms of mean intersection over union (mIoU), which is the average IoU of each part type in that object category. Note that the mIoU of each category is calculated by averaging mIoUs of all the shape instances. More specifically, class mIoU is the average of mIoU over all 16 categories, while instance mIoU is the average of mIoU over all instances. The part segmentation results are listed in Table 2. Note that without using global coordinates, our 3D-GCN achieved comparable or better results than recent approaches did. + +Furthermore, we demonstrate the robustness of 3D-GCN by visualizing the segmentation result under different transformations of an object, as shown in Figure 8. We shift the center/coordinates of each object by 100 and enlarge object size by 10 times, and Figure 8 compares our segmentation performances with others. We found that KPCov [30] and PointNet++ [23] failed to properly segment the corresponding parts in both cases. On the other hand, our 3D-GCN exhibited very promising invariance capabilities regardless of shift and scale variations. + +
Neighboring ratio (%)51030
Accuracy (%)63.386.885.1
+ +Table 3: Effects on shape classification on ModelNet40 with varying neighboring ratio. Note that insufficient numbers of neighbors are not expected to properly represent the receptive fields, while the performances would be less sensitive to larger numbers due to our learnable kernels. + +
Directional vectorABC
Accuracy(%)89.592.293.9
+ +# 4.3. Ablation Study + +Neighbor number $M$ in receptive fields. We now conduct experiments on 3D-GCN by varying the neighbor number ratio when constructing the receptive fields in 3D-GCN (e.g., ratio $5\%$ indicates we set the receptive field size as $M = 100 \times 0.05 = 5$ ). The results are shown in Table 3. From this table, we see that insufficient or excessive neighbor numbers would affect the performance of 3D-GCN in describing local structural information of 3D point clouds, thus moderate neighbor number leads to better performance. + +Learning of directional vector $k_{s}$ for each kernel. To demonstrate the power of learnable/deformable kernels in 3D-GCN, we consider three possible uses of directional vectors $k_{s}$ in kernel $K^{S}$ (we fix the support number $S$ as 3). We first consider the inner product between the receptive field and the kernel as simply a correlation between the associated features, regardless of their geometry/cosine similarity. That is, (4) is simply replaced by $\operatorname{sim}(\pmb{p}_m, \pmb{k}_s) = \langle \pmb{f}(\pmb{p}_m), \pmb{w}(\pmb{k}_s) \rangle$ . The resulting accuracy is shown in the first column in Table 4. We next consider and assign 3 unit vectors along each axis (e.g., $(1,0,0)$ along x-axis) as the 3 directional vectors $k_{s}$ . Since these vectors are not learnable, and results shown in the second column of Table 4 was not satisfactory either. Finally, as shown in the last column of the table, we verify that the use of our learnable $k_{s}$ would be desirable. Note that directional information is important for extracting geometric information, and learnable $k_{s}$ makes kernel deformable and fitting the object of interest, which is why improved recognition performance can be achieved. + +# 4.4. Visualization and Complexity analysis + +In Figure 9, we visualize the points of an object which have large response values at each layer of our 3D-GCN. From low to high-level layers, we can see that responses + +![](images/9151eb1b99650bc6c0a55f0561175984c8379fe4935d523eca37a37bd4c83389.jpg) +Figure 9: Example kernel responses in different layers (segmentation on ShapeNetPart). Note that points with larger responses are colored in darker red. As expected, the dominant responses are shifted from point (low) to part (high) levels in 3D-GCN. + +Table 4: Effects on shape classification on ModelNet10 using learnable directional vector or not. A: no directional information, B: assign three unit vectors (along 3 axes) as $k_{s}$ , and C: our learnable directional vectors. + +
method#paramsAcc. (%)
PointNet [21]3.5M89.2
PointNet++ [23]1.48M91.9
DGCNN [32]1.81M92.9
KPCov [30]14.3M92.9
Ours0.89M92.1
+ +Table 5: Number of parameters in different models (classification on ModelNet40). + +were shifted from point to part levels, which confirms our ability in processing and summarizing 3D information across scales, which is equivalent to the use of 2D CNN in describing image data. + +On the other hand, we compare the number of parameters of recent 3D point cloud models, and list the comparison outputs in Table 5. From this table, we see that our model achieves comparable recognition performances as state-of-the-art models did, while our model requires the fewest amount of parameters. This confirms both effectiveness and efficiency of our proposed 3D-GCN. + +# 5. Conclusion + +In this work, we introduced 3D-GCN which learns geometrical information of 3D point clouds across scales, and thus exhibits properties of shift and scale invariance. The technical contributions of our 3D-GCN lie in the design and learning of learnable kernels in 3D graphs, and the proposed scheme for graph max-pooling from 3D point clouds. While our model achieved comparable or improved classification and segmentation performances than recent state-of-the-art models did, we confirmed that our model is invariant to shift and scale changes and is computationally more efficient. + +Acknowledgement This work is supported in part by the Ministry of Science and Technology of Taiwan under grant MOST 108-2634-F-002-018. + +# References + +[1] Matan Atzmon, Haggai Maron, and Yaron Lipman. Point Convolutional Neural Networks by Extension Operators. arXiv preprint arXiv:1803.10091, 2018. 2 +[2] Davide Boscaini, Jonathan Masci, Emanuele Rodola, and Michael Bronstein. Learning Shape Correspondence with Anisotropic Convolutional Neural Networks. In Advances in Neural Information Processing Systems, 2016. 1 +[3] Christopher B Choy, Danfei Xu, JunYoung Gwak, Kevin Chen, and Silvio Savarese. 3D-R2N2: A Unified Approach for Single and Multi-view 3D Object Reconstruction. In Proceedings of the European Conference on Computer Vision (ECCV), 2016. 1, 2 +[4] 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 (AAAI), 2019. 1 +[5] Matheus Gadelha, Rui Wang, and Subhransu Maji. Multiresolution Tree Networks for 3D Point Cloud Processing. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. 2, 6, 7 +[6] 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 (CVPR), 2016. 1, 2 +[7] Binh-Son Hua, Minh-Khoi Tran, and Sai-Kit Yeung. Pointwise Convolutional Neural Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[8] Qiangui Huang, Weiyue Wang, and Ulrich Neumann. Recurrent Slice Networks for 3D Segmentation of Point Clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2, 7 +[9] 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 (CVPR), 2018. 2 +[10] 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 (ICCV), 2017. 2, 6, 7 +[11] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems (NIPS), 2012. 1, 2 +[12] 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 (CVPR), 2018. 6, 7 +[13] Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. PointCNN: Convolution on X-Transformed Points. In Advances in Neural Information Processing Systems, 2018. 2 +[14] Yongcheng Liu, Bin Fan, Shiming Xiang, and Chunhong Pan. Relation-Shape Convolutional Neural Network for + +Point Cloud Analysis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 5 +[15] Wenjie Luo, Bin Yang, and Raquel Urtasun. Fast and Furious: Real Time End-to-End 3D Detection, Tracking and Motion Forecasting with a Single Convolutional Net. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 1 +[16] Jonathan Masci, Davide Boscaini, Michael Bronstein, and Pierre Vandergheynst. Geodesic convolutional Neural Networks on Riemannian Manifolds. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2015. 1 +[17] Daniel Maturana and Sebastian Scherer. VoxNet: A 3D Convolutional Neural Network for Real-time Object Recognition. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2015. 2 +[18] Hsien-Yu Meng, Lin Gao, YuKun Lai, and Dinesh Manocha. VV-Net: Voxel VAE Net with Group Convolutions for Point Cloud Segmentation. arXiv preprint arXiv:1811.04337, 2018.2 +[19] Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodola, Jan Svoboda, and Michael M Bronstein. Geometric Deep Learning on Graphs and Manifolds Using Mixture Model CNNs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 1 +[20] Charles R Qi, Wei Liu, Chenxia Wu, Hao Su, and Leonidas J Guibas. Frustum PointNets for 3D Object Detection from RGB-D Data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 1 +[21] 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 (CVPR), 2017. 1, 2, 4, 5, 6, 7, 8 +[22] 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 (CVPR), 2016. 2 +[23] 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 (NIPS), 2017. 2, 3, 5, 6, 7, 8 +[24] 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 (CVPR), 2017. 2 +[25] Xavier Roynard, Jean-Emmanuel Deschaud, and François Goulette. Classification of Point Cloud Scenes with Multiscale Voxel Deep Network. arXiv preprint arXiv:1804.03583, 2018. 2 +[26] Yiru Shen, Chen Feng, Yaoqing Yang, and Dong Tian. Mining Point Cloud Local Structures by Kernel Correlation and + +Graph Pooling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2, 5, 6, 7 +[27] 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 (CVPR), 2017. 1, 6 +[28] 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 (ICCV), 2015. 2 +[29] Maxim Tatarchenko, Jaesik Park, Vladlen Koltun, and Qian-Yi Zhou. Tangent Convolutions for Dense Prediction in 3D. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[30] Hugues Thomas, Charles R. Qi, Jean-Emmanuel Deschaud, Beatz Marcotegui, Francois Goulette, and Leonidas J. Guibas. KPCov: Flexible and Deformable Convolution for Point Clouds. In The IEEE International Conference on Computer Vision (ICCV), 2019. 2, 3, 5, 6, 7, 8 +[31] 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. 2 +[32] 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):146:1-146:12, 2019. 2, 6, 7, 8 +[33] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguuang Zhang, Xiaou Tang, and Jianxiong Xiao. 3D ShapeNets: A Deep Representation for Volumetric Shapes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 1, 2, 6 +[34] Yifan Xu, Tianqi Fan, Mingye Xu, Long Zeng, and Yu Qiao. SpiderCNN: Deep Learning on Point Sets with Parameterized Convolutional Filters. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. 2 +[35] Li Yi, Vladimir G. Kim, Duygu Ceylan, I-Chao Shen, Mengyan Yan, Hao Su, Cewu Lu, Qixing Huang, Alla Sheffer, and Leonidas Guibas. A Scalable Active Framework for Region Annotation in 3D Shape Collections. SIGGRAPH Asia, 2016. 7 \ No newline at end of file diff --git a/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/images.zip b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e4d8554e158df6a7960d859e87ae61c446860768 --- /dev/null +++ b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e20a27d362126eed2cf5c062c4750d4075a9ab4a9bb54b4bb88185a723c1a35d +size 505854 diff --git a/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/layout.json b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..16145d8a8d50f91889231e0e37db0cdf8190fb83 --- /dev/null +++ b/convolutioninthecloudlearningdeformablekernelsin3dgraphconvolutionnetworksforpointcloudanalysis/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3b5d4931a88b9da860d95b591db563864879fbbad58fea4aa7af5f874993450 +size 404975 diff --git a/cookgancausalitybasedtexttoimagesynthesis/8674cbb3-cb76-4b23-ab87-9a8fb59fc1bb_content_list.json b/cookgancausalitybasedtexttoimagesynthesis/8674cbb3-cb76-4b23-ab87-9a8fb59fc1bb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e9bd7c6ea3edad4219802162ed85ba65770e9183 --- /dev/null +++ b/cookgancausalitybasedtexttoimagesynthesis/8674cbb3-cb76-4b23-ab87-9a8fb59fc1bb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cee49ae17c01e2250884cfd19833013de5a5da015384af1f19e4f1eb2429accc +size 61666 diff --git a/cookgancausalitybasedtexttoimagesynthesis/8674cbb3-cb76-4b23-ab87-9a8fb59fc1bb_model.json b/cookgancausalitybasedtexttoimagesynthesis/8674cbb3-cb76-4b23-ab87-9a8fb59fc1bb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..60989330bdea61fb35adf1df18d3825cf1eb9808 --- /dev/null +++ b/cookgancausalitybasedtexttoimagesynthesis/8674cbb3-cb76-4b23-ab87-9a8fb59fc1bb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d8f694be66ca00d3fe6fb4ccc7e3beb0bc668bab046c8e19166978e10a1fbbb +size 72081 diff --git a/cookgancausalitybasedtexttoimagesynthesis/8674cbb3-cb76-4b23-ab87-9a8fb59fc1bb_origin.pdf b/cookgancausalitybasedtexttoimagesynthesis/8674cbb3-cb76-4b23-ab87-9a8fb59fc1bb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7b0bc244a1533556aaa9f1306fd024c3a17a5e50 --- /dev/null +++ b/cookgancausalitybasedtexttoimagesynthesis/8674cbb3-cb76-4b23-ab87-9a8fb59fc1bb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3189657e9457569d02742d411a1bf8960a42b1befcd7d7c3c3db663bc41cad6 +size 1802423 diff --git a/cookgancausalitybasedtexttoimagesynthesis/full.md b/cookgancausalitybasedtexttoimagesynthesis/full.md new file mode 100644 index 0000000000000000000000000000000000000000..df5dc2b98cd605651877f15258bf230ccea00bde --- /dev/null +++ b/cookgancausalitybasedtexttoimagesynthesis/full.md @@ -0,0 +1,245 @@ +# CookGAN: Causality based Text-to-Image Synthesis + +Bin Zhu City University of Hong Kong binzhu4-c@my.cityu.edu.hk + +Chong-Wah Ngo +City University of Hong Kong +cscwngo@cityu.edu.hk + +# Abstract + +This paper addresses the problem of text-to-image synthesis from a new perspective, i.e., the cause-and-effect chain in image generation. Causality is a common phenomenon in cooking. The dish appearance changes depending on the cooking actions and ingredients. The challenge of synthesis is that a generated image should depict the visual result of action-on-object. This paper presents a new network architecture, CookGAN, that mimics visual effect in causality chain, preserves fine-grained details and progressively upsamples image. Particularly, a cooking simulator sub-network is proposed to incrementally make changes to food images based on the interaction between ingredients and cooking methods over a series of steps. Experiments on Recipe1M verify that CookGAN manages to generate food images with reasonably impressive inception score. Furthermore, the images are semantically interpretable and manipulable. + +# 1. Introduction + +Text-to-image synthesis aims to generate images from natural language description. A generated image is expected to be photo and semantics realistic. Specifically, an image should have sufficient visual details that semantically align with the text description. Since the proposal of Generative Adversarial Network (GAN) [1], there have been numerous progresses that address the issues in photo-realistic quality [11, 18, 19, 20], and semantic consistency [17]. While both aspects emphasize image quality, an aspect being overlooked in the literature is the cause-and-effect visual scenario in image generation. For example, an image corresponding to the text "cut chicken into dice and stir with roasted peanuts" is hard to be generated with the current text-to-image synthesis paradigm. The reason is that the sentence is action-oriented. The expected image details are entities like "diced chicken" and "roasted peanuts", and the visual consequence of stirring both entities. The current state-of-the-art techniques that rely on mapping between textual and visual entities cannot deal with this cause-and- + +effect realistic image generation. + +This paper studies recipe-to-image synthesis, specifically, to generate food image from cooking recipe. Different from visual narrative sentences that describe the visual content expected in an image, recipes provide ingredients as entities and cooking steps to textually instruct preparation of a dish. The expected image is to present the final prepared dish as a visual consequence over a series of cooking steps. Note that a cooking step is not necessarily to be visually relevant. It implies a new state of ingredient entities after the step is taken. + +We propose a new network architecture, named CookGAN, to address the causality effect in image generation. Different from other GANs [18, 19, 20, 16, 23, 17], CookGAN is a tailor-made GAN for food image generation. The input to CookGAN consists of a list of words (i.e., ingredients) and a sequence of procedural descriptions (i.e., cooking steps). CookGAN addresses four issues in generating causality realistic food image. First, the network allows explicit interaction between cooking steps and ingredients. Second, the evolution of dish over different steps is learnt incrementally, such that on-the-fly modification of ingredients and instructions is possible to visualize novel effect of a dish. Third, the bundled effect of ingredient-action can be modeled. For example, the shape of egg changes depending on whether an action is boil, fry or steam. Fourth, the visibility and impact of ingredients to dish are learnt. For example, "sugar" is likely non-visible, while "tomato sauce" can significantly change the appearance of a dish. + +Other than these issues, photo and semantics realistic image generation are also considered. Similar in spirit as other GANs [19, 20, 16], CookGAN progressively upsamples image from low to high resolution. The relative importance of each ingredient to the sub-regions of a generated image is computed for presentation of fine-grained ingredient details. The ingredients of a generated food image can also be semantically interpreted using an existing ingredient encoder [13]. + +The main contribution of this paper is addressing causality effect in image generation. To the best of our knowledge, there is no prior work for this problem. We contribute a nov- + +el network, CookGAN, that vividly mimics cooking process in step-by-step learning of cause-and-effect scenario. CookGAN is capable of generating photo and causality realistic food images as demonstrated in the experiments. + +# 2. Related Works + +Conditional GAN (CGAN) [9] has pushed forward the rapid progress of text-to-image synthesis. By employing CGAN, Reed et al.[11] proposed a complete and standard pipeline of text-to-image synthesis to generate images from text descriptions. Nevertheless, the size of image is as small as $64 \times 64$ . To address this problem, StackGAN [18] was proposed to generate higher resolution images in two stages. The CGAN in first stage captures the primitive shapes and basic colors of objects in a low-resolution image. Together with text descriptions, the image is refined with more details by the CGAN in the second stage. + +Nevertheless, the two stages in StackGAN are learnt independently, resulting in lack of interaction between two closely related stages. This problem is addressed by training an end-to-end multi-stage GANs. Both StackGAN++ [19] and HDGAN [20] adopt tree-like structure with multiple pairs of generators and discriminators to progressively generate an image from low to high resolution. Different branches of the tree capture image distributions at various scales of resolution. The progressive way of upsampling enables a generator to inherit the mid-level features from the previous immediate stage for effective image generation. A limitation of these approaches, nevertheless, is that image generation is sensitive to different ways of expressing the meaning of a sentence. The issue of consistent semantics was recently addressed by SDGAN [17]. Consistent high-level semantics and diverse low-level semantics are guaranteed by a Siamese mechanism and semantic-conditioned batch normalization respectively. + +The aforementioned approaches take only sentence-level features as condition. As a consequence, fine-grained image details are often missing in the generated images. This issue is addressed in AttnGAN [16] and DMGAN [23] by further leveraging word-level features as condition. By assigning weights to words, AttnGAN [16] manages to generate fine-grained image details at different regions of an image. Furthermore, the generator is trained by ensuring cross-modal similarity between a text description and the generated image. Similar in spirit but through a different way, DMGAN [23] employs a memory network to determine word importance based on the initial generated image. By fusing image content and word-attended text, an image is dynamically refined with fine-grained details. + +CookGAN inherits most properties of the existing GANs for text-to-image synthesis. Specifically, CookGAN is multi-stage as [19, 20, 16] for progressive upsampling, and emphasizes word-level condition as [16] for fine-grained + +image generation. Different from these GANs, CookGAN is designed to address causality effect. Specially, the cause-and-effect evolution of a food image is implicitly captured in a sequential network, while fine-grained ingredient details are explicitly modeled with attention-like network. + +There are few works [4, 6, 2, 21, 10] addressing the problem of food image synthesis. In [4], rather than using recipe, image is generated based on food style. In [6, 2], only ingredients are exploited for food image generation while cooking steps are ignored. PizzaGAN is proposed in [10] to synthesize food images by learning different operators to add, remove and cook ingredients. Different from CookGAN where input is recipe, PizzaGAN relies on image-level labels to perform stepwise generation of images mirroring cooking procedure. While interesting, the approach is tailored made for pizza image generation with limited kinds of ingredients and cooking methods being considered. Extension for dishes beyond pizza is not straightforward. The most relevant work to this paper is [21], which trains $R^2GAN$ to generate $64 \times 64$ thumbnail images from recipes. Nevertheless, the design of $R^2GAN$ is not from the angle of causality effect, but rather to learn cross-modal feature spaces for explainable recipe search. Specifically, $R^2GAN$ treats ingredients and cooking steps independently and then collapses them into a feature for image generation and cross-modal learning. Different from this paper, the issue of how the cause of a cooking step results in a new effect for ingredients is not considered. To our best knowledge, the high-resolution food image generation considering causality is still an unexplored problem. + +# 3. CookGAN + +# 3.1. Model Architecture + +The architecture of CookGAN is depicted in Figure 1. Given a recipe in text, we employ a recipe encoder, $R^2 GAN$ [21], to extract recipe features. $R^2 GAN$ embeds the features extracted from ingredients and cooking instructions respectively into a latent space compatible with food images. As demonstrated by $R^2 GAN$ , the embedded feature, denoted as $\varphi_r$ , can be used to generate a thumbnail image of resolution $64 \times 64$ . The basic idea of CookGAN is to progressively upsample the small-size image up to a resolution of $256 \times 256$ . The key component of CookGAN is Cooking Simulator (Section 3.2), which generates cause-and-effect visual scenario. + +CookGAN contains three pairs of generators and discriminators $\{(G_0, D_0), (G_1, D_1), (G_2, D_2)\}$ . Initially, an embedded feature $\varphi_r$ is concatenated with random noise $z$ sampled from a Gaussian distribution $Z \sim \mathcal{N}(0, I)$ . The result is input to an upsampling block, which is a multi-layer feedforward network that transforms the perturbed features into hidden image features $V_0$ . The first generator $G_0$ pro + +![](images/c105d5c451275703b336f569d8135479eaef1c7ab96fa7c4c3b240549ba9bef1.jpg) +Figure 1. The food image of a recipe is progressively upsampled from resolution of $64 \times 64$ to $256 \times 256$ . The Cooking Simulator is a tailor-made sub-network to implicitly model cause-and-effect visual change in cooking process. + +duces $64 \times 64$ images using $V_{0}$ . The features $V_{0}$ are also fed into Cooking Simulator for the preparation of features in the next round of image upsampling. The process is repeated for two times, where $G_{1}$ and $G_{2}$ generate $128 \times 128$ and $256 \times 256$ images respectively. + +CookGAN learns image distributions at different scales in an end-to-end fashion. Each generator is in charge of capturing distribution at a particular scale along with a discriminator to distinguish between real and fake images. Same as vanilla GAN [1], generator and discriminator are trained in an adversarial manner. Specifically, the three discriminators are trained separately, each of which used for training the corresponding generator. Meanwhile, the entire pipeline of image generation network at different scales, including the three upsampling blocks, generators and Cooking Simulators, are trained jointly. The objective function is defined as following: + +$$ +L = \sum_ {i = 0} ^ {2} L _ {G _ {i}} + \lambda L _ {C A}, \tag {1} +$$ + +where $L_{G_i}$ is the $i_{th}$ generator loss and $L_{CA}$ is conditioning augmentation [19] loss. The parameter $\lambda$ is a trade-off hyperparameter to balance the two losses. + +The generator loss consists of unconditional and conditional loss terms. The former loss is derived from discriminator in distinguishing between real and fake images. The latter term is to evaluate the degree-of-match between an generated image and its embedded feature initially extract- + +ed from $R^2 GAN$ . The $i_{th}$ generator loss is defined as: + +$$ +L _ {G _ {i}} = \frac {1}{2} \left(\underbrace {\mathbb {E} _ {\varphi_ {r} \sim p _ {r} , z \sim p _ {z}} \left[ \log \left(1 - D _ {i} \left(G _ {i} \left(\varphi_ {r} , z\right)\right) \right] + \right.} _ {\text {u n c o n d i t i o n a l l o s s}}\right) \tag {2} +$$ + +$$ +\underbrace {\mathbb {E} _ {\varphi_ {r} \sim p _ {r} , z \sim p _ {z}} [ \log \left( \right.1 - D _ {i} \big (G _ {i} (\varphi_ {r} , z) , \varphi_ {r}) \big) ] \bigr) .} _ {\text {c o n d i t i o n a l l o s s}}. +$$ + +The discriminator loss, similarly, contains two pairs of unconditional and conditional loss terms, as following: + +$$ +L _ {D _ {i}} = - \frac {1}{2} (\underbrace {\mathbb {E} _ {x _ {i} \sim p _ {d a t a _ {i}}} [ \log D _ {i} (x _ {i}) ]} _ {\text {u n c o n d i t i o n a l l o s s}} + +$$ + +$$ +\underbrace {\mathbb {E} _ {x _ {i} \sim p _ {d a t a _ {i} , \varphi_ {r} \sim p _ {r}}} \left[ \log D _ {i} \left(x _ {i} , \varphi_ {r}\right) \right]} _ {\text {c o n d i t i o n a l l o s s}} + \tag {3} +$$ + +$$ +\underbrace {\mathbb {E} _ {\varphi_ {r} \sim p _ {r} , z \sim p _ {z}} [ \log (1 - D _ {i} (G _ {i} (\varphi_ {r} , z))) ]} _ {\text {u n c o n d i t i o n a l l o s s}} + +$$ + +$$ +\underbrace {\mathbb {E} _ {\varphi_ {r} \sim p _ {r} , z \sim p _ {z}} [ \log \left(1 - D _ {i} (G _ {i} (\varphi_ {r} , z) , \varphi_ {r})) ] \right.} _ {\text {c o n d i t i o n a l l o s s}}, +$$ + +where $x_{i}$ is sampled from the $i_{th}$ scale of real food image distribution. Note that the $i_{th}$ discriminator is only responsible for distinguishing between real images $x_{i}$ and fake images $G_{i}(\varphi_{r},z)$ in $i_{th}$ scale. + +Inspired by the effectiveness of conditioning augmentation in StackGAN++ [19], $L_{CA}$ loss is employed as a regularizer to avoid overfitting and enforce smooth sampling from the recipe embedding manifold. To be specific, condition vectors are sampled from an independent Gaussian dis + +![](images/20fae28827e104550d149515d7246c0e063ecaa0ae1e6061339056b21002630f.jpg) +Figure 2. Cooking Simulator prepares image attended ingredient features and "cooked" features for upsampling of food image. The GRUs are initialized with the image attended ingredient features. At each step of cooking, a GRU cell turns the image attended ingredient features into a new hidden state, modeling the change in ingredients as a result of a cooking action. + +distribution $\mathcal{N}(\mu (\varphi_r),\Sigma (\varphi_r))$ , where mean $\mu (\varphi_r)$ and diagonal covariance matrix $\Sigma (\varphi_r)$ are parameterized by recipe features $\varphi_{r}$ $L_{CA}$ is defined as the Kullback-Leibler divergence between $\mathcal{N}(\mu (\varphi_r),\Sigma (\varphi_r))$ and Gaussian distribution $\mathcal{N}(0,I)$ .. + +$$ +L _ {C A} = D _ {K L} \left(\mathcal {N} \left(\mu \left(\varphi_ {r}\right), \Sigma \left(\varphi_ {r}\right)\right) \mid \mid \mathcal {N} (0, I)\right). \tag {4} +$$ + +# 3.2. Cooking Simulator + +The intuition of Cooking Simulator is to imitate real cooking scenario, where different cutting and cooking actions are incrementally imposed on ingredients over time. Each action transforms some ingredients into a new form with change in composition, color or shape. For examples, "carrot" is cut into slice, "spaghetti" turns into black when stir fried with "squid sauce". The next subsequent actions can additively make change on this form along the cooking process. + +Figure 2 depicts the network of Cooking Simulator. Denote $\varphi_{ing} = \{\varphi_{ing_m}\}_{m=1}^M \in \mathbb{R}^{M \times d_{ing}}$ as a list of ingredients, where $\varphi_{ing_m}$ represents the $d_{ing}$ -dimensional vector of $m_{th}$ ingredient in the list. Furthermore, the image features of $i_{th}$ scale are denoted as $V_i = \{v_j\}_{j=1}^C \in \mathbb{R}^{C \times L}$ , where $C$ is the channel depth and $L = W \times H$ is the resolution of a feature map. Initially, the image features $V_i$ are fused with the list of ingredient features $\varphi_{ing}$ to produce image attended ingredient feature maps, where the size of each map is $C \times L$ . The $j_{th}$ channel of $F_{i_{attend}}$ is computed by: + +$$ +F _ {i _ {\text {a t t e n d} _ {j}}} = \sum_ {m = 0} ^ {M - 1} \sigma \left(v _ {j} ^ {T} \cdot f \left(\varphi_ {\text {i n g} _ {m}}\right)\right) f \left(\varphi_ {\text {i n g} _ {m}}\right), \tag {5} +$$ + +where $f(\cdot)$ is a $1 \times 1$ convolution to map ingredient features to the same dimension as the $i_{th}$ scale hidden image features $V_{i}$ . The operator $\sigma(\cdot)$ is softmax function that outputs an attention map of size $L$ with probability values to indicate the spatial distribution of an ingredient. Through the softmax function, an attention map, i.e., $\sigma(v_{j}^{T} \cdot f(\varphi_{ing_{m}}))$ , is + +generated for each ingredient. The spatial location of the ingredient is attended by multiplying the map with the corresponding ingredient feature $f(\varphi_{ing})$ . Equation 5 performs weighted linear sum of the result for each ingredient to form the $j^{th}$ channel image attended ingredient feature map. + +Next, the cooking steps are sequentially encoded with Gated Recurrent Unit (GRU). The GRU cell is initialized with the image attended ingredient features $F_{i_{\text{attend}}}$ , as shown in Figure 2. This design aims to imitate the process of cooking, where the ingredients are "cooked" by one step at a time. The result of cooking in a step, i.e., the hidden state of a GRU, is fed into the next GRU cell for subsequent cooking actions. Denote $\varphi_{ins} = \{\varphi_{ins_n}\}_{n=1}^N \in \mathbb{R}^{N \times d_{ins}}$ as a sequence of cooking steps, where $\varphi_{ins_n}$ represents the $d_{ins}$ -dimensional vector of $n_{th}$ instruction in the sequence. The last hidden state of GRU for $j_{th}$ channel of cooked feature map is formalized as: + +$$ +F _ {i _ {\text {c o o k} j}} = G R U \left(F _ {i _ {\text {a t t e n d} j}}, \varphi_ {\text {i n s}}\right). \tag {6} +$$ + +where $F_{i_{cook_j}}$ denotes the $j_{th}$ channel of "cooked" feature map at $i_{th}$ scale. The final cooked feature maps share the same dimension as $V_i$ with $C$ number of channels and size equals to $W \times H$ . To this end, the three groups of feature maps, $V_i$ , $F_{i_{attend}}$ and $F_{i_{cook}}$ , are concatenated and fed into residual blocks [3]. The transformed feature maps become the input for next round of image upsampling. + +# 3.3. Implementation Details + +The initial embedded feature extracted from $R^2GAN$ [21] is in 1,024 dimensions, i.e., $\varphi_r \in \mathbb{R}^{1024}$ . The ingredient encoder employs word2vec embedding to transform an ingredient from word into a high dimensional vector, i.e., $\varphi_{ing} \in \mathbb{R}^{300}$ . The instructor encoder is based on skip-thoughts technique [8] as in [14], which encodes a step sentence into a fixed length vector. The resulting instruction feature is in 1,024 dimensions, i.e., $\varphi_{ins} \in \mathbb{R}^{1024}$ . The channel depth of hidden image features is set to be 32 (Figure 1 and Figure 2). Inspired by PatchGAN [5, 22] + +and local adversarial image loss [20], each feature map in the image attended ingredient features (Figure 2) is divided into $32 \times 32$ patches. Cooking Simulator processes up to 10 cooking steps. Instructions beyond ten steps are truncated in consideration of the computational time. + +Following [19, 16], Adam solver [7] with a learning rate of 0.0002 is adopted to train all the models. The balance factor in Equation 1 is set to be $\lambda = 1$ . All the models are trained from scratch for 50 epochs. + +# 4. Experiments + +We validate CookGAN by visual quality assessment (Section 4.2), semantic interpretation (Section 4.3) and content manipulatability (Section 4.4). Semantic interpretation includes the three tasks: (a) ingredient recognition on the CookGAN generated images, (b) retrieval of recipe using its generated image as query, and (c) retrieval of food image that is prepared with the same recipe as the generated query image. Content manipulatability is to test how a generated image reacts to change in cooking process, for example, by adding or removing ingredients in a recipe. + +# 4.1. Experimental Settings + +Dataset. The experiments are conducted on Recipe1M [14], which is the only publicly available large-scale dataset with paired recipes and images. The dataset provides 340,922 recipe-image pairs, with $70\%$ for training, $15\%$ for validation and $15\%$ for testing. As learning process of CookGAN for generating high resolution food images is slow and memory consuming, only validation set is used for model training. The $R^2$ GAN [21], which extracts the initial stage of recipe features, is trained and validated on the training and validation sets respectively. The average number of instructions per recipe is 9 in original validation set. + +Evaluation Metrics. Inception score (IS) is used to evaluate the visual quality of generated images. As studied in [12], IS is correlated with human perception. A higher value of IS indicates better visual diversity and quality. We randomly sample 30,000 recipes from the test set for image generation. Comparison is made against state-of-the-art techniques including StackGAN++ [19] and $R^2GAN$ [21]. The retrieval performance is based on median rank (MedR) among the true positives retrieved for testing queries. A lower value of MedR indicates better ability in retrieval. Following [21, 14], the retrieval dataset is formed by random sampling of 1,000 recipes from test set. All the 1,000 recipes take turn to generate images as testing queries. + +# 4.2. Visual Quality Assessment + +We compare CookGAN with StackGAN++ [19], the state-of-the-art text-to-image synthesis method, and + +$R^2$ GAN [21], a baseline that generates low-resolution image. Ablation study is also conducted to compare with two different versions of CookGAN with only ingredients (i.e., IngredientGAN) or cooking steps (i.e., StepGAN) being considered respectively. Note that, StepGAN still makes use of ingredient information. The major difference from CookGAN is that the input features to Residual blocks in Cooking Simulator do not involve image attended ingredient features $(F_{i_{\text{attend}}})$ , i.e., only image features $(V_i)$ and cooked features $(F_{i_{\text{cook}}})$ are used to produce images for next round. IngredientGAN, on the other hand, skips $F_{i_{\text{cook}}}$ and leverages only $V_i$ and $F_{i_{\text{attend}}}$ . + +The result is listed in the $2_{nd}$ column of Table 1. When comparing to the baseline, which linearly interpolates the $64 \times 64$ thumbnails generated by $R^2GAN$ [21] to the resolution of $256 \times 256$ , all other approaches show consistently higher inception score (IS). Among them, CookGAN significantly outperforms others, including StackGAN++, in a large margin. CookGAN is more capable in modeling the color and texture distribution of a dish when composing different ingredients. With reference to Figure 3, the images simulated by CookGAN show similar pattern of ingredient composition as the real sample images. Using the recipe "Picnic Caviar" as an example, the image is correctly presented with "corn kernels" in yellow and "pinto beans" in brown color. Furthermore, the simulated image vividly imitates the fuzzy composition of various ingredients in small size, resulting in a visually and structurally similar image as the original image. Although StackGAN++ manages to present the colors of some ingredients in red and yellow, the failure in simulating the original shapes and sizes of ingredients makes the generated image appear unnatural. In general, StackGAN++ is incapable of handling the recipes with relatively larger number of ingredients. The simulated images by StackGAN++ are often composed of only a few major ingredients. Thanks to image attended ingredient features, CookGAN is able to visually capture both major and supplementary ingredients. Further with Cooking Simulator to procedurally encode instructions, these ingredients are sometimes composed in way similar to food preparation in real world scenario. + +As shown in Table 1, the IS scores drop dramatically when leveraging only ingredients or cooking steps. The ablation studies indicate that both ingredients and cooking instructions play a significant role in food image generation. On the one hand, when comparing to the case when cooking steps are not considered, IngredientGAN shows much lower IS score, drops by $11.5\%$ compared with CookGAN. As shown in Figure 3, despite that IngredientGAN manages to generate images with relatively fine-grained texture pattern than StackGAN++, the dish colors are monotonic and lack of visual diversity, resulting in lower IS score. The monotone in color appearance is due to the fact that, in the + +
MethodInception score↑MedR (I2R)↓MedR (I2I)↓
R²GAN [21]4.54 ± .07500.0476.0
StackGAN++ [19]5.03 ± .09144.5147.0
IngredientGAN4.79 ± .0884.5115.5
StepGAN5.30 ± .0977.0123.0
CookGAN5.41 ± .1164.0108.0
+ +Table 1. Visual quality and semantics comparison in terms of inception score and median rank (MedR) respectively. “↑” indicates higher is better and “↓” indicates lower is better. + +
RecipeGTCookGANStepGANIngredientGANStackGAN++
Braised Country Style Pork Ribs
canola oil; vegetable oil; country-style pork ribs; salt; black pepper; tomato paste; red wine; fish sauce...
1. Heat oil in a Dutch oven over medium-high heat. +2. Season pork ribs with salt and pepper. +3. Working in two batches, sear the pork until light golden brown...
Picnic Caviar
rice vinegar; vegetable oil; garlic cloves; dried oregano; dried basil; black beans; red onion; corn kernels; pinto beans...
1. Whisk together vinegar, oil, sugar, garlic, oregano, and basil in large bowl. +2. Stir in black and pinto beans, corn, bell pepper, onion, chiles, and cilantro. +3. Season with salt and pepper...
Kiriboshi Daikon & Olive Oil Stir-Fry
kiriboshi daikon; carrot; soy beans; bacon; olive oil; black pepper; coarse salt.
1. Soak the kiriboshi daikon in water and squeeze it to remove the excess water. +2. If there is water in the canned soybeans, drain them well. +3. Julienne the carrots...
+ +Figure 3. Comparison of food images generated by CookGAN, StepGAN, IngredientGAN and StackGAN++. + +design of CookGAN, the ingredients are mainly to prioritize image regions of different important levels for upsampling. Without Cooking Simulator that changes the appearances of ingredients in stepwise manner, learning photo-realistic image is ineffective. + +Comparing to StepGAN, CookGAN boosts IS to 5.41 from 5.30 achieved by StepGAN. The result verifies the advantage of attending ingredient to regions for sequential upsampling of a small-size image to higher resolution versions. Based on the results, the image attended ingredient features indeed help to prevent ingredients in small size and quantity, which are usually supplementary ingredients, from being ignored during image upsampling. As shown in Figure 3, the images generated by StepGAN cannot capture the rich color and texture variations as in CookGAN. + +# 4.3. Semantic Interpretation + +We argue that a generated image should not only be visually appealing, but also semantically explainable. We design three tasks to measure the interpretability of generated images. + +Task 1: Ingredient recognition is to multi-label the ingredients in an food image. We employ the ingredient decoder [13] pre-trained on Recipe1M [14] for this task. Comparison is made between the images generated by CookGAN and the real images prepared by their corresponding recipes. Using Intersection of Union (IoU) between the predicted and ground-truth labels as a measure, both real and synthetic images show almost the same performance of IoU $= 0.29$ . The result basically verifies that the CookGAN synthesized images are as interpretable as the real images. Figure 4 lists the recognized ingredients of two sample images generated by CookGAN. Not only visible ingredients, but non-visible ingredients, such as "butter" for "Bajan sweet bread" and "pepper" for "Spanish pisto", can be recognized. The result is similar to that of original image. Limited by the accuracy of decoder, ingredients such as "chicken" and "potato" cannot be distinguished for both real and synthetic images. Similarly, "egg" and "baking soda", which commonly appear in recipes of cookies, are falsely detected for both kinds of images. + +![](images/1715be7b67df99b844c3b8f6a66293cd235e118182ab616f3d09eefb44e6fa2e.jpg) +Figure 4. Ingredient recognition results of the images generated by CookGAN. Ingredients appeared in ground truth are highlighted in red and blue otherwise. + +![](images/5711a8fe825f52fe4da9d87428b73f05bde9aa105a230e15f832dae099b0c92d.jpg) + +![](images/0e7c2d05a8ba762ebcbd7c12832a6af9de3b40789487df78f1838243bb841d23.jpg) +Figure 5. Examples of using food images generated by CookGAN to retrieve real images. Ground truth images are marked with red bounding box. + +Task 2: Image-to-recipe retrieval (I2R). This is a reverse engineering task, where a generated image is treated as a query to retrieve its recipe from a dataset composed of 1K recipe-image pairs. We employ $R^2GAN$ to extract the cross-modal features of images and recipes. Recipes are subsequently ranked in descending order of their similarities to a query image based on cosine similarity. The third columns of Table 1 shows the performances using images generated by different GANs. When directly using the thumbnails generated by $R^2GAN$ for retrieval, the performance is close to random ranking of recipes. In contrast, by learning to progressively upsample from low-resolution to high-resolution, all other GANs significantly boost the performance. + +Interestingly, the MedR performance is not necessarily correlated to visual quality based on IS. While IngredientGAN is lower in IS score than StackGAN++, its MedR is better by 60 ranks. The result clearly indicates the superior capability of CookGAN in encoding the semantic-s of food than StackGAN++. StepGAN shows slight im + +provement than IngredientGAN for being capable of disambiguating recipes with similar ingredients but different cutting and cooking methods. CookGAN, afterall, shows the best performance among all the approaches. Nevertheless, compared to using the original images as queries where the MedR can be as high as 1.0 [15], there is still a performance gap between using real and synthetic images for retrieval. + +Task 3: Image-to-image retrieval (I2I). This task is to retrieve the real food images using the generated images. The result is listed in the $4_{th}$ column of Table 1. Slightly different trends of performance than I2R is observed. Specifically, the performance of IngredientGAN is better than StepGAN. We believe that this is due to the composition of dataset, where most of the recipes are only associated to one food image. As a consequence, when StepGAN generates an image with visually different ingredient composition from the sample image in the dataset, their similarity might be decreased. IngredientGAN, which merely retrieves similar images based on ingredient content, bypasses the issue due to fuzzy variations in ingredient composition + +![](images/284fc6d65392577bef2bf2aadce0305f8397046780e1a3f9eafaabd4d56d447a.jpg) +Figure 6. Examples of generated images by CookGAN with different recipe manipulation operators. + +![](images/ba93d18d32cec1058a291a023a5429577c280e3ea0ebecff653a5c5302cf58e8.jpg) +Figure 7. Examples showing manipulability of CookGAN in dealing with (a) visibility of ingredient, (b) different cooking actions on an ingredient. + +and hence achieves lower MedR. Figure 5 shows the top-5 retrieved images by the queries generated by CookGAN. The retrieved images are not only visually but also semantically similar. + +# 4.4. Content Manipulability + +An advantage of CookGAN is that an image can be produced on-the-fly by incremental manipulation of a recipe, for example, through semantically changing ingredient list. In this section, we contrast the visual presentation of food images when they are prepared with slightly different ingredients from an original recipe. Figure 6 shows the examples of dishes when "carrot" is added, removed or replaced by "lettuce". In the case of addition, it can be seen that carrots (or items in orange color) are distributed throughout the dish. On the other hand, when "carrot" is removed, the dish + +becomes much less in orange color. In the case of replacement, the spaghetti is changed from orange to creamy white, and is covered with lettuce-like objects. More impressively, CookGAN manages to learn the visibility of ingredients in a dish. As shown in Figure 7 (a), the appearance of dish remains the same when "sugar" is added. On the contrary, the color changes when "tomato sauce" is added. Figure 7 (b) shows examples to demonstrate the bundle effect of ingredient + action. The appearance of "egg" varies dramatically depending on cooking method. + +# 5. Conclusion + +We have presented CookGAN for visual modeling of causality effect. Empirical results show that CookGAN is capable of synthesizing realistic visual scenario in depicting the cause-and-effect of cooking action. Comparing to StackGAN++, CookGAN manages to simulate proper color, shape and composition of ingredients due to cooking actions. Furthermore, CookGAN demonstrates commonsense response to manipulation operators, including dealing with transparency effect of ingredients and ingredient-action bundle effect. Compared to real images, similar performance is also reported when recognizing ingredients of synthetic images. While encouraging, CookGAN does not consider ingredient quantity and cooking style (e.g., home cooked style, sweet-and-sour), which will be our future work. + +# Acknowledgement + +The work described in this paper was fully supported by a grant from the Research Grants Council of the Hong Kong Special Administrative Region, China (CityU 11203517). + +# References + +[1] 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. +[2] Fangda Han, Ricardo Guerrero, and Vladimir Pavlovic. The art of food: Meal image synthesis from ingredients. arXiv preprint arXiv:1905.13149, 2019. +[3] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. +[4] Daichi Horita, Wataru Shimoda, and Keiji Yanai. Unseen food creation by mixing existing food images with conditional stylegan. In Proceedings of the 5th International Workshop on Multimedia Assisted Dietary Management, pages 19-24. ACM, 2019. +[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] Yoshifumi Ito, Wataru Shimoda, and Keiji Yanai. Food image generation using a large amount of food images with conditional gan: ramengan and recipegan. In Proceedings of the Joint Workshop on Multimedia for Cooking and Eating Activities and Multimedia Assisted Dietary Management, pages 71-74. ACM, 2018. +[7] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +[8] Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In Advances in neural information processing systems, pages 3294-3302, 2015. +[9] Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. arXiv preprint arXiv:1411.1784, 2014. +[10] Dim P Papadopoulos, Youssef Tamaazousti, Ferda Ofli, Ingmar Weber, and Antonio Torralba. How to make a pizza: Learning a compositional layer-based gan model. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8002-8011, 2019. +[11] Scott Reed, Zeynep Akata, Xinchen Yan, Lajanugen Logeswaran, Bernt Schiele, and Honglak Lee. Generative adversarial text to image synthesis. In International Conference on Machine Learning, pages 1060-1069, 2016. +[12] 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. +[13] Amaia Salvador, Michal Drozdzal, Xavier Giro-i Nieto, and Adriana Romero. Inverse cooking: Recipe generation from food images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10453-10462, 2019. +[14] Amaia Salvador, Nicholas Hynes, Yusuf Aytar, Javier Marin, Ferda Ofli, Ingmar Weber, and Antonio Torralba. Learning + +cross-modal embeddings for cooking recipes and food images. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3020-3028, 2017. +[15] Hao Wang, Doyen Sahoo, Chenghao Liu, Ee-peng Lim, and Steven CH Hoi. Learning cross-modal embeddings with adversarial networks for cooking recipes and food images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11572-11581, 2019. +[16] Tao Xu, Pengchuan Zhang, Qiuyuan Huang, Han Zhang, Zhe Gan, Xiaolei Huang, and Xiaodong He. Attngan: Finegrained text to image generation with attentional generative adversarial networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1316-1324, 2018. +[17] Guojun Yin, Bin Liu, Lu Sheng, Nenghai Yu, Xiaogang Wang, and Jing Shao. Semantics disentangling for text-to-image generation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2327-2336, 2019. +[18] Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaogang Wang, Xiaolei Huang, and Dimitris N Metaxas. S- 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. +[19] 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. +[20] Zizhao Zhang, Yuanpu Xie, and Lin Yang. Photographic text-to-image synthesis with a hierarchically-nested adversarial network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6199-6208, 2018. +[21] Bin Zhu, Chong-Wah Ngo, Jingjing Chen, and Yanbin Hao. R2GAN: Cross-modal recipe retrieval with generative adversarial network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11477-11486, 2019. +[22] 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. +[23] Minfeng Zhu, Pingbo Pan, Wei Chen, and Yi Yang. Dm-gan: Dynamic memory generative adversarial networks for text-to-image synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5802-5810, 2019. \ No newline at end of file diff --git a/cookgancausalitybasedtexttoimagesynthesis/images.zip b/cookgancausalitybasedtexttoimagesynthesis/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fb4f4093a483ac7f218fc7734e2ddb160a7c7c14 --- /dev/null +++ b/cookgancausalitybasedtexttoimagesynthesis/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f5cd0fc3c5d5cb9dd2fb8aa306587d6de40d31bd2d620a6e48c71318f928944 +size 562304 diff --git a/cookgancausalitybasedtexttoimagesynthesis/layout.json b/cookgancausalitybasedtexttoimagesynthesis/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..51ac218122545a31580844431c8f9d86f7cb19fc --- /dev/null +++ b/cookgancausalitybasedtexttoimagesynthesis/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83e31871c712c9440f45b4cb96afe1b4daa9699d64868f9fdcdec65ed10540dc +size 306256 diff --git a/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/73e3a562-eb2d-4928-87ee-c0c247a71896_content_list.json b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/73e3a562-eb2d-4928-87ee-c0c247a71896_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..08a042975633ac44e721aad7bb6288b7b580a1a7 --- /dev/null +++ b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/73e3a562-eb2d-4928-87ee-c0c247a71896_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e619a55ff65949a35211c1ca8607b17c55da87501f1696d7d695fcf4187d5a9 +size 71649 diff --git a/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/73e3a562-eb2d-4928-87ee-c0c247a71896_model.json b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/73e3a562-eb2d-4928-87ee-c0c247a71896_model.json new file mode 100644 index 0000000000000000000000000000000000000000..24d55cc4f8a677568c994b545b7623d7ca960145 --- /dev/null +++ b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/73e3a562-eb2d-4928-87ee-c0c247a71896_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c319ed69e52a6f6d412b64791a0cce1b6186b61397e4f58be273692e1c38f619 +size 91749 diff --git a/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/73e3a562-eb2d-4928-87ee-c0c247a71896_origin.pdf b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/73e3a562-eb2d-4928-87ee-c0c247a71896_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..34544d9ad18bb4478c4268aa88960891df6d8227 --- /dev/null +++ b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/73e3a562-eb2d-4928-87ee-c0c247a71896_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e34df4e96a6692c586ff2b602311edfb798d9b275815cba4a15a2285ca1866e8 +size 3033357 diff --git a/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/full.md b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c8651052ea98d66a46d1578e3285a1e981f7ee93 --- /dev/null +++ b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/full.md @@ -0,0 +1,287 @@ +# Cooling-Shrinking Attack: Blinding the Tracker with Imperceptible Noises + +Bin Yan $^{1}$ , Dong Wang $^{1*}$ , Huchuan Lu $^{1,2}$ and Xiaoyun Yang $^{3}$ + +$^{1}$ School of Information and Communication Engineering, Dalian University of Technology, China $^{2}$ Peng Cheng Laboratory + +3China Science IntelliCloud Technology Co., Ltd., + +yan_bin@mail.dlut.edu.cn, {wdice, lhchuan}@dlut.edu.cn, xiaoyun.yang@intellicloud.ai + +# Abstract + +Adversarial attack of CNN aims at deceiving models to misbehave by adding imperceptible perturbations to images. This feature facilitates to understand neural networks deeply and to improve the robustness of deep learning models. Although several works have focused on attacking image classifiers and object detectors, an effective and efficient method for attacking single object trackers of any target in a model-free way remains lacking. In this paper, a cooling-shrinking attack method is proposed to deceive state-of-the-art SiameseRPN-based trackers. An effective and efficient perturbation generator is trained with a carefully designed adversarial loss, which can simultaneously cool hot regions where the target exists on the heatmaps and force the predicted bounding box to shrink, making the tracked target invisible to trackers. Numerous experiments on OTB100, VOT2018, and LaSOT datasets show that our method can effectively fool the state-of-the-art SiameseRPN++ tracker by adding small perturbations to the template or the search regions. Besides, our method has good transferability and is able to deceive other top-performance trackers such as DaSiamRPN, DaSiamRPN-UpdateNet, and DiMP. The source codes are available at https://github.com/MasterBin-IIAU/CSA. + +# 1. Introduction + +Online single object tracking is a fundamental task in computer vision and has many important applications including intelligent surveillance, autonomous driving, human-machine interaction, to name a few. In recent years, as deep learning matures and large-scale tracking datasets [18, 7, 12] are introduced, the single object tracking field has developed rapidly. Current state-of-the-art trackers [16, 40, 15, 8, 17, 6, 3] can be grouped into two categories: deep discriminative trackers [6, 3, 4], and SiameseRPN-based trackers [16, 40, 39, 15]. Deep + +discriminative trackers decompose tracking into two subproblems: classification and state estimation. The first one is solved by an online-learning classifier and the second one is achieved by maximizing the overlap between candidates and the ground truth. SiameseRPN-based trackers formulate tracking as a one-shot detection problem, locating objects that have similar appearance with the initial template on the search region in each frame. Considering their balance between accuracy and speed, SiameseRPN-series trackers have attracted more attention than deep discriminative trackers. + +Adversarial attack is originated from [29], which has shown that state-of-the-art deep learning models can be fooled by adding small perturbations to original images. Research on adversarial attack is beneficial to understand deep neural networks and design robust models. Popular adversarial attack methods can be roughly summarized into two categories: iterative-optimization-based and deep-network-based attacks. The former method [9, 21, 35] applies many times of gradient ascent to maximize an adversarial objective function for deceiving deep networks and is usually time-consuming. However, the latter one [34, 31] applies tremendous data to train an adversarial perturbation-generator. The latter method is faster than the former method because only one-time forward propagation is needed for each attack after training. In recent years, adversarial attack has become a popular topic and has extended from image classification to more challenging tasks, such as object detection [35, 31] and semantic segmentation [35]. + +However, an effective and efficient adversarial attack method for single object tracking remains lacking. In this study, we choose the state-of-the-art SiamRPN++ [15] tracker as our main research object and propose a novel cooling-shrinking attack method. This method learns an efficient perturbation generator to make the tracker fail by simultaneously cooling down hot regions where the target exists on the heatmaps and forcing the predicted bounding box to shrink during online tracking. Our main contribution + +can be summarized as follows. + +- A novel and efficient cooling-shrinking attack method is proposed to effectively fool the SiamRPN++ tracker. Experiments on OTB100 [33], VOT2018 [14], and LasOT [7] show that our method can successfully deceive the state-of-the-art SiamRPN++ tracker. +- Numerous experiments show that a discriminator is unnecessary in this task because existing $L_{2}$ loss and fooling loss have already achieved our goal. +- Our attacking method has good transferability. Experimental results demonstrate that state-of-the-art trackers (such as DaSiamRPN and DiMP) can also be deceived by our method, even though this method is not specially designed for them. + +# 2. Related Works + +# 2.1. Single Object Tracking + +Given the tracked target in the first frame, single object tracking (SOT) aims at capturing the location of the target in the subsequent frames. Different from object detection that recognizes objects of predefined categories, the SOT task belongs to one-shot learning, requiring trackers to be capable of tracking any possible targets. Efficient and robust trackers are difficult to be designed because of challenges, such as occlusion, similar distractors, deformation, and motion blur, during tracking. Recently, with the prosperity of deep learning and the introduction of large-scale object tracking datasets [7, 12], the study of SOT has undergone a rapid development. Currently, state-of-the-art trackers can be divided into two categories. One is based on SiamRPN (including SiamRPN [16], DaSiamRPN [40], SiamRPN+ [39], SiamRPN++ [15], and SiamMask [30]), and the other is based on deep discriminative models (including ATOM [6] and DiMP [3]). + +SiamRPN [16] formulates SOT as a one-shot detection problem and is the first attempt to introduce RPN [24] in the tracking filed. With the help of RPN, SiamRPN removes heavy multi-scale correlation operations, running at a high speed and producing accurate results. DaSiamRPN [40] relieves the SiamRPN's weakness of being susceptible to distractors, by introducing challenging samples to the training set. However, the negative effect of image padding makes SiamRPN and DaSiamRPN only apply the shallow and padding-free AlexNet's variant as their backbone, which does not fully take advantage of the capability of modern deep neural networks [28, 10]. To overcome this problem, some studies have proposed the addition of a cropping-inside residual unit and a spatial-aware sampling strategy in SiamRPN+ [39] and SiamRPN++ [15]. These works relieve the center bias problem caused by image padding, making the SiameseRPN framework benefit from modern backbones and significantly improving the Siamese tracker's performance. SiamMask [30] proposes a unified framework + +for visual object tracking and semi-supervised video object segmentation, further increasing the accuracy of predicted bounding boxes. + +ATOM [6] proposes a tracking framework composed of the dedicated target estimation and classification components. The target estimation module is an IOU-Net's variant [13] that can produce an accurate bounding box of the target, given the initial appearance information. DiMP [3] inherits the ATOM's framework (making it end-to-end trainable) and proposes a more discriminative model predictor. DiMP achieves state-of-the-art performance on most tracking benchmarks, thereby serving a strong baseline in the tracking community. + +# 2.2. Adversarial Attack + +The adversarial attack in [29] indicates that CNN is highly vulnerable to attack and state-of-the-art classifiers can be easily fooled by adding visually imperceptible noises to original images. Since then, several works have focused on adversarial attacks. Early works [9, 21, 35, 34, 31] add perturbations in the digital world, directly changing pixel values which are fed into the networks. Latter works focus on creating physical adversarial objects, such as eyeglasses [26], posters [32], and animals [1], in the real world, further broadening the influence of adversarial attacks. + +Digitally adversarial attack methods can be roughly divided into two categories: iterative-optimization-based and deep-network-based algorithms. The former ones (including FGSM [9], Deepfool [21], and DAG [35]) optimize an adversarial objective function to fool deep networks and are usually time-consuming due to several iterations. However, deep-network-based methods (including advGAN [34] and UEA [31]) use tremendous data to train a generator for adding perturbations. The latter type is generally faster than the former type because the operation for transforming an image to an adversarial one does not need to be repeated. In specific, FGSM [9] hypothesizes that neural networks behave in very linear ways and proposes a "Fast Gradient Sign Method" to attack them. Deepfool [21] generates adversarial examples by pushing data points around the classification boundary past it with minimal perturbations. AdvGAN [34] is the first work to generate adversarial examples with GAN, which can run efficiently during the inference phase. Recent research on adversarial attack has extended from image classification to more challenging tasks, such as object detection. Two impressive works are iterative-optimization-based DAG [35] and deep-model-based UEA [31]. DAG [35] sets the difference of the classification score between adversarial and ground-truth classes as its objective function, and then optimizes it using gradient ascent. Although it achieves a high fooling rate, it is time-consuming because several iterations are needed. UEA [31] chooses GAN as a core component to generate + +perturbations and trains the generator with a carefully designed adversarial loss. UEA achieves comparative performance but is much faster than DAG, because only one-time forward propagation is needed during the inference phase after training. + +Adversarial objects in the physical world are more difficult to generate than digital adversarial examples because the literature [19, 20] has revealed that adversarial examples generated by standard methods are not robust to the common phenomena in the physical world, such as varying viewpoints and camera noises. To overcome this problem, the expectation over transformation (EOT) [1] method requires not only the original single example but also its augmented examples to be confusing. Combining with the 3D-printing technique, EOT can synthesize robust physical adversarial objects. Inheriting similar ideas, the method in [26] generates adversarial eyeglasses that can fool state-of-the-art face recognition systems, and the method in [32] creates an inconspicuous poster that can deceive the simple regression-based tracker GOTURN [11]. + +# 3. Cooling-Shrinking Attack + +In this work, we propose an adversarial perturbation-generator for deceiving the SiamRPN++ tracker. The goal of our method is to make the target invisible to trackers, thereby leading to tracking drift. To accomplish this goal, we train the generator with a carefully designed and novel cooling-shrinking loss. Considering that SiamRPN-based trackers [16, 40, 15, 39, 30] locate the target in a local search region based on the template given in the initial frame, we design two versions of perturbation-generators to attack the search regions and the template respectively. + +# 3.1. Overview of SiamRPN++ + +So far, SiamRPN++ [15] is the most powerful SiameseRPN-based tracker, achieving state-of-the-art performance on almost all tracking datasets. The network architecture of SiamRPN++ is shown in Figure 1. Given the template $\mathcal{T}$ in the initial frame, SiamRPN++ detects target in the search region $\mathcal{SR}$ from the current frame. + +To be specific, the template is an image patch cropped in the first frame, providing the target's appearance information for the tracker. The tracked target generally does not move too much between two adjacent frames. Most modern trackers only locate the target in a small search region centered in the position of the previous frame, rather than the whole image. The size of the search region in the current frame is proportional to the size of the target in the previous frame. In each frame, the template $\mathcal{T}$ and search region $\mathcal{SR}$ are first passed through a shared backbone network such as ResNet50 [10], and their features are processed by some non-shared neck layers and fused by depthwise correlation. Based on these features, the RPN head layers predict the classification maps $\mathcal{M}_{\mathcal{C}}$ and regression maps $\mathcal{M}_{\mathcal{R}}$ . Specifi + +cally, SiamRPN++ produces four regression factors, two of which are related to the center offset and the other two are responsible for the scale changes. Finally, the tracker considers the position with the highest classification score as the optimal target location, and then uses the corresponding regression factors to obtain an accurate bounding box as a result of the current frame. Thus, if the final classification maps $\mathcal{M}_{\mathcal{C}}$ or regression maps $\mathcal{M}_{\mathcal{R}}$ are interfered, the tracker may lose the ability to locate the target or produce inaccurate results, leading to tracking failure. + +![](images/25c0823e0e0885cf8a12c75e1025c1ee3aa6a6bf4665aa5668932a32d193d11a.jpg) +Figure 1. Network architecture of SiamRPN++ [15]. Better viewed in color with zoom-in. + +# 3.2. Overall Pipeline + +Since the pipelines of attacking the template and attacking the search regions are quite similar, we only discuss attacking search regions for simplicity. The overall pipeline of the training generator for attacking search regions is shown in Figure 2. During the training process, we first feed $N$ pre-cropped unperturbed search regions into the perturbation-generator, adding imperceptible noises to them. Together with a clean template, these perturbed search regions are fed into the SiamRPN++ tracker's Siamese network, which produces adversarial classification and regression maps of the corresponding search regions. The SiamRPN++ tracker considers regions with the highest response on the classification maps (heatmaps) as the target. Thus, regions, where the tracked target exists on the adversarial heatmaps, are expected to have low response values. To indicate these regions, we also feed originally unperturbed search regions into the Siamese network, producing clean heatmaps. Then, an adversarial cooling-shrinking loss and an $L_{2}$ loss are applied together to train our perturbation-generator. The detailed training algorithm of the generator for attacking search regions is shown in Algorithm 1. During the online-tracking phase, to deceive the tracker, we only need to pass a clean search region into the generator, obtaining a new adversarial one in each frame. + +# 3.3. Cooling-Shrinking Loss + +We propose a novel cooling-shrinking loss, composed of the cooling loss $L_{C}$ for interfering the heatmaps $M_H$ and + +Algorithm 1 Framework of training perturbation-generator to attack search regions + +Input: $R^c$ : clean search regions; $T^c$ : clean template; $g_0$ : randomly initialized generator + +Output: trained generator $g^{*}$ + +1: Initialize generator $g_0$ . Initialize siamese model $S$ and freeze its parameters; +2: repeat +3: Get a clean template $T^c$ and a batch of clean search regions $R^c$ ; +4: Feed $T^c$ into $S$ ; +5: Generate adversarial noises $P = g(R^c)$ for $R^c$ ; +6: Get adversarial search regions $R^a = R^c + P$ ; +7: Get adversarial heatmaps and regression maps $M_H^a, M_B^a = S(R^a, T^c)$ using $R^a$ ; +8: Get clean heatmaps $M_H^c = S(R^c, T^c)$ ; +9: Compute cooling loss $L_{C}$ and shrinking loss $L_{S}$ based on $M_H^a, M_R^a, M_H^c$ ; +10: Compute $L_{2}$ loss $L_{2} = \frac{1}{N} ||R^{a} - R^{c}||_{2};$ +11: Compute total loss $L = \alpha_{1}L_{C} + \alpha_{2}L_{S} + \alpha_{3}L_{2}$ +12: Compute gradient of $L$ to generator $g$ 's parameters and update with the Adam optimizer. +13: until model converges + +![](images/80c300858bad170e07035c34204041e8914e23c002cb2f7c99d06a45dd50b707.jpg) +Figure 2. Network architecture of perturbation-generator for search regions. Better viewed in color with zoom-in. + +the shrinking loss $L_{S}$ for interfering the regression maps $M_R$ . To determine the location of the target, we also introduce the clean heatmaps $M_H^c$ to the computation. In specific, the cooling loss $L_{C}$ is designed to cool down hot regions where the target may exist on the heatmaps, causing the tracker to lose the target. The shrinking loss $L_{S}$ is designed to force the predicted bounding box to shrink, leading to error accumulation and tracking failure. To compute these two losses conveniently, we reshape the clean heatmaps $M_H^c$ , adversarial heatmaps $M_H^a$ , and adversarial regression maps $M_R^a$ to 2D matrices $\widetilde{M_H^c}$ , $\widetilde{M_H^a}$ , $\widetilde{M_R^a}$ with shape (N,2), (N,2), (N,4) respectively. Then, $\widetilde{M_H^c}$ is activated with the softmax function, generating the probability + +of target $P_{+}$ and the probability of background $P_{-}$ . Based on the probability $P_{+}$ and a predefined threshold $\mathcal{T}$ , binary attention maps $\mathcal{A}$ are computed, indicating locations that we are interested in. After that, we define the cooling loss based on the difference between the confidence score of positive class $f_{+}$ and negative class $f_{-}$ on regions where $\mathcal{A} > 0$ . We also set a margin $m_c$ in this loss to avoid any unconstrained decrease of this loss, leading to difficulty in controlling noises' energy. Similarly, we set two scale factors $R_w, R_h$ as the core of the shrinking loss and also set margins $m_w$ and $m_h$ as we do in the cooling loss. The detailed mathematical formulas about the cooling-shrinking loss are shown in Algorithm 2. Figure 3 shows the effect of the cooling-shrinking loss. The second row represents the heatmaps produced by the clean template, and the third row represents heatmaps produced by the adversarial template. The adversarial heatmaps have low values on places where the target exists, making the tracker difficult to locate the tracked target. Figure 4 shows a comparison between the original results and adversarial results. After adding adversarial perturbations, the tracker becomes less scale-sensitive (Figure 4(a)), less discriminative (Figure 4(b)), and less target-aware (Figure 4(c)). To be specific, in Figure 4(a), the tracker produces shrinking boxes when the target actually grows larger, causing inaccurate results. In Figure 4(b), the tracker recognizes other distractors as the target. In addition, in Figure 4 (c), the tracker loses the target quickly and can only re-capture it when it accidentally returns to the previous location. + +# Algorithm 2 Cooling-Shrinking Loss + +Input: $M_H^c$ : clean heatmaps; $M_H^a$ : adversarial heatmaps; $M_R^a$ : adversarial regression maps; $\mathcal{T}$ : threshold for probability; $m_c$ : margin for classification; $m_w$ : margin for width regression factor; $m_h$ : margin for height regression factor; + +Output: cooling loss $L_{C}$ ; shrinking loss $L_{S}$ + +1: Reshape $M_H^c$ , $M_H^a$ , $M_R^a$ to 2D matrices: $\widetilde{M_H^c}$ , $\widetilde{M_H^a}$ , $\widetilde{M_R^a}$ ; +2: $P_{+}, P_{-} = \text{softmax}(\widetilde{M_H^c})$ ; +3: $\mathcal{A} = \left\{ \begin{array}{ll}1 & P_{+}\geq \mathcal{T}\\ 0 & P_{+} < \mathcal{T} \end{array} \right.$ +4: $f_{+},f_{-} = \widetilde{M}_{H}^{a}*A;$ +5: $R_{x}, R_{y}, R_{w}, R_{h} = \widetilde{M}_{R}^{a} * \mathcal{A}$ ; +6: $L_{C} = \frac{1}{N} \max(f_{+} - f_{-}, m_{c})$ ; +7: $L_{S} = \frac{1}{N}\max (R_{w},m_{w}) + \frac{1}{N}\max (R_{h},m_{h})$ + +# 3.4. Implementation Details + +Network Architectures: The perturbation-generator adopts the U-Net [25] architecture, which achieves superior performance in many pixel-level tasks. U-Net first downsamples feature maps multiple times and then upsamples them accordingly to make the input size being a power of 2, or the output size may mismatch with the in + +![](images/92d4b025aa8ab21ed97fc79f1dd69b8cac99fc1fd70048e2504000196d7329c1.jpg) +Figure 3. Search regions and their corresponding heatmaps. The first row shows search regions. The second row represents clean heatmaps generated by the clean template. The third row represents adversarial heatmaps generated by the adversarial template. + +input size. In our experiment settings, the input resolution also depends on whether to attack the template or search regions. Specifically, all SiamRPN-based trackers, including SiamRPN [16], DaSiamRPN [40], SiamRPN++ [15], and SiamMask [30], adopt the same template size as $127 \times 127$ . However, when working in long-term scenarios, they may use different search region sizes like $255 \times 255$ and $831 \times 831$ , because of switching between local and global states. Too large size may bring a heavy computational burden, and too small size may cause the loss of detailed information. Considering all these factors, we set the input resolution of the generator as $128 \times 128$ for attacking the template and $512 \times 512$ for attacking the search regions. The gap between different resolutions is bridged by padding-cropping or bilinear interpolation. For example, when attacking the template, the original template with a spatial size $127 \times 127$ is first padded to $128 \times 128$ with zero and passed through the generator to obtain the adversarial template. Then, the adversarial template is cropped back to $127 \times 127$ again and sent into the Siamese network. Similarly, when attacking search regions, clean search regions with a spatial size $255 \times 255$ are first interpolated to $512 \times 512$ and fed into the generator to get adversarial search regions. Then, adversarial search regions are interpolated back to $255 \times 255$ again and passed to the Siamese network. + +Training Dataset: We use GOT-10K [12] as our training set, to cover more types of the tracked target. To be specific, the GOT-10K dataset includes more than 10,000 sequences and more than 500 object classes, showing high tracking diversity. We expect that models learned on this dataset could have better generalization power rather than only work on a few limited situations. We only use the train split of GOT-10K and uniformly sample frames with an interval of 10 frames, and then crop search regions from these chosen frames. The template is cropped in the initial frame, and each search region is cropped based on the groundtruth of the last frame to simulate the situation in online track + +ing. In each training iteration, a template and $N$ search regions from the same video sequence are sent to our attacking model. In our experiments, $N$ is not larger than 15 due to the limited GPU memory. + +Training Loss Function: The generator is trained with the linear combination of the cooling loss, shrinking loss, and $L_{2}$ loss. The weights of these three losses can be tuned according to different biases. For example, we can increase the weight of the $L_{2}$ loss or decrease that of adversarial losses to make attack more recognizable. In our experiment setting, we choose the weights of cooling loss, shrinking loss and, $L_{2}$ loss as 0.1, 1, and 500 respectively. The three margins $m_{c}, m_{w}, m_{h}$ for preventing the unconstrained decrease of adversarial losses are all set to -5. + +# 4. Experiments + +In this work, we implement our algorithm with Pytorch [23] deep learning framework. The hardware platform is a PC machine with an intel-i9 CPU (64GB memory) and a RTX-2080Ti GPU (11GB memory). We evaluate the proposed adversarial attack method on three datasets: OTB100 [33], VOT2018 [14], and LaSOT [7]. To be specific, OTB100 [33] contains 100 sequences, providing a fair benchmark for single object tracking. VOT2018 [14] is another challenging tracking benchmark, which simultaneously measures the tracker's accuracy and robustness. This benchmark includes 60 videos and ranks the trackers' performance with the expected average overlap (EAO) rule. LaSOT [7] is a recent large-scale tracking dataset, which covers 1400 videos with much longer time slots. We denote SiamRPN++ as SiamRPNpp for concise descriptions in the experiment section. Numerous experimental results demonstrate that our method can fool the state-of-the-art SiamRP-Npp tracker with merely imperceptible perturbations on the search regions or template. We also test our perturbation-generator on another three top-performance trackers: DaSiamRPN [40], DaSiamRPN-UpdateNet [37], and DiMP [3]. Obvious performance drop can also be observed, which shows that our method has good transferability. The speed of our attacking algorithm is also extremely fast. It only takes our model less than 9 ms to transform a clean search region to the adversarial one, and less than 3 ms to transform a clean template to the adversarial one. + +# 4.1. Adversarial Attack to SiamRPNpp + +Attacking Search Regions Only: When attacking search regions, we leave the original template unchanged and only replace clean search regions with the adversarial ones in each frame. The detailed experimental results are shown in Table 1, and an obvious performance drop can be observed on all three datasets. + +Attacking the Template Only: When attacking the template, we only perturb the template once in the initial frame, replacing the original template with the adversarial one, and + +![](images/5735ade6ccd20ad55fea0aff192649006c27378d57c52b4a4dabff10c45660a6.jpg) + +![](images/436fca21245ead88feb66871598536ce1b8bae0b396db25706688e1671060d24.jpg) +(a) CarScale + +![](images/3697bc0dbb8537d419251acd9dd55d44551e9c92d1b1ed599092f115179798ca.jpg) + +![](images/b89c902b405dede2c85085d47c6120efafe7a4a5e2e9f5a48686c14ac033bd71.jpg) +(b) Bolt +Figure 4. Illustration of the effectiveness of generated perturbations. The green, blue and red boxes represent the groundtruth, original results and adversarial results, respectively. The blue and red lines represent the IoU's variation of the original results and adversarial results over time, respectively. Better viewed in color with zoom-in. + +![](images/241ae5cf51924aa70c8334ce2050d39a0a2757530f9b4dd7e6de1b382c97564f.jpg) + +![](images/fcf9e1419463444e376ff18f7ab8243522d69f95c95294e4973fc405817ad086.jpg) +(c) Doll + +Table 1. Effect of attacking search regions. The third column represents SiamRPNpp's original results. The fourth column represents results produced by attacking search regions. The last column represents the performance drop. + +
DatasetMetricOriginalAttack SRDrop
OTB100Success(↑)0.6960.3490.347
Precision(↑)0.9140.4910.423
VOT2018Accuracy(↑)0.6000.4860.114
Robustness(↓)0.2342.0741.840
EAO(↑)0.4140.0730.341
LaSOTNorm Precision(↑)0.5690.2190.350
Success(↑)0.4960.1800.316
+ +then leaving the rest of the tracking process undisturbed. The detailed experimental results are shown in Table 2. The performance drop in this scenario is not as much as that in attacking search regions, because the tracker is hard to deceive by only adding minimal noises to the initial template. + +Table 2. Effect of attacking the template. The third column represents SiamRPNpp's original results. The fourth column represents results produced by attacking the template. The last column represents the performance drop. + +
DatasetMetricOriginalAttack TDrop
OTB100Success(↑)0.6960.5270.169
Precision(↑)0.9140.7130.201
VOT2018Accuracy(↑)0.6000.5410.059
Robustness(↓)0.2341.1470.913
EAO(↑)0.4140.1230.291
LaSOTNorm Precision(↑)0.5690.4480.121
Success(↑)0.4960.3930.103
+ +Attacking Both Search Regions and the Template: We also design a strategy that simultaneously attacks both search regions and the template. In this setting, we use the same generator designed for search regions to interfere with the template and search regions together. The detailed results are shown in Table 3. It can be seen that this strategy + +brings a slightly higher performance drop than only attacking search regions. + +Table 3. Effect of attacking both search regions and the template. The third column represents SiamRPNpp's original results. The fourth column represents results produced by attacking both search regions and the template. The last column represents the performance drop. + +
DatasetMetricOriginalAttack BothDrop
OTB100Success(↑)0.6960.3240.372
Precision(↑)0.9140.4710.443
VOT2018Accuracy(↑)0.6000.4670.133
Robustness(↓)0.2342.0131.779
EAO(↑)0.4140.0730.341
LaSOTNorm Precision(↑)0.5690.2010.368
Success(↑)0.4960.1680.328
+ +We also compare the performance of SiamRPNpp [15] and its adversarial variants: SiamRPNpp+AT (attacking template), SiamRPNpp+AS (attacking search regions), and SiamRPNpp+ATS (attacking template and search regions) with other state-of-the-art trackers, such as MDNet [22], ECO [5], SPLT [36], VITAL [27], StructSiam [38], and SiamFC [2]. The results are shown in Figure 5 and Figure 6. Our adversarial attack algorithm drops the performance of SiamRPNpp significantly, making it obviously inferior to other top-performance trackers. + +# 4.2. Ablation Study + +Influence of Shrinking Loss: We discuss the influence of the shrinking loss on the adversarial success rate in different situations. As explained before, the cooling loss is used to attack the classification branch, making the target invisible to the tracker. In addition, the shrinking loss is designed to disable the tracker's ability of scale estimation, thereby forcing the tracker to predict inaccurate bounding boxes. To explore the effect of the shrinking loss, we design three groups of comparison experiments on OTB100 [33] and La + +![](images/b1880055d0de7aad299c471ca658eabd00240d6bdaa355923c1f07832c848cb0.jpg) +Figure 5. Quantitative comparison of state-of-the-art trackers on the LaSOT dataset. + +![](images/1a3b52fed8b2cdc49adcfcb604b27243aee7ea6ef88cfaf6b99cd5dabbc1448a.jpg) + +![](images/d3e1a29cd6144a580194a21ca640c53194138646bf605353c3f0132769024b71.jpg) +Figure 6. Quantitative analysis of different attributes on the VOT2018 dataset. + +SOT [7]: G-Template vs. G-Template-Regress, G-Search vs. G-Search-Regress, and G-Template-Search vs. G-Template-Search-Regress. The detailed results are shown in Figure 7 and Figure 8. The shrinking loss does play a significant part when attacking search regions only and when attacking both search regions and template, bringing obvious extra performance drop. However, the shrinking loss also plays a negative part when attacking the template only, because it may cause the misclassification task to be suboptimal. To be specific, it is much more difficult to deceive the tracker by only perturbing template once than perturbing search regions in all frames. Thus, the generator cannot easily balance between cooling loss and $L_{2}$ loss when attacking only the template. Adding an extra shrinking loss may lead to serious difficulty in training, causing worse attacking performance. In summary, the shrinking loss is helpful to attack search regions but somewhat harmful to attack the template. + +Influence of a Discriminator: We also discuss the influence of a discriminator. Most previous neural-network-based adversarial attack methods [34, 31] adopt GAN structure, using a discriminator to supervise the adversarial out + +![](images/b1c33588c9932303350cfb01b34fbcc9db94ed54855d3813df31df42c2002a69.jpg) +Figure 7. Quantitative comparisons between w/ and w/o shrinking loss on the OTB100 dataset. Results with the suffix "Regress" are ones with shrinking loss. + +![](images/69c4dd9f5ce3bdfa741ef22d2743f29876c8a9595dba22cc8844e5203540335a.jpg) + +![](images/e210dfb320e7a63db332bcc5afd61ddc70c7fab9cf6a370f505424db14509de9.jpg) +Figure 8. Quantitative comparisons between w/ and w/o shrinking loss on the LaSOT dataset. Results with the suffix "Regress" are ones with shrinking loss. + +![](images/c2ac14310df352c77432e1dde3a3df68f8cf4b5f9ba1e4734c7698cc71fd1133.jpg) + +put of the generator to be similar to the original input. However, we argue that the discriminator is not necessary. The reason why the $L_{2}$ loss and discriminator are applied is that we expect the perturbed image and original image to look similar. In other words, we hope that the perturbation is imperceptible. The $L_{2}$ loss can directly restrict the energy of noises and can be easily optimized. However, for the GAN's structure, the evolution of generator and discriminator has to be synchronized, which is hard to guarantee especially when the generator has many other tasks to learn. Thus, considering the instability of the GAN's architecture, we discard the discriminator and train the perturbation-generator only with the cooling-shrinking loss and $L_{2}$ loss. The visualization of clean and adversarial templates from the VOT2018 dataset is shown in Figure 9. Without the help of a discriminator, the perturbation generated by our method is also quite imperceptible. + +# 4.3. Further Discussions + +Speed: Our method also has extremely high efficiency. When attacking search regions, our method only needs less than 9 ms to process a frame, running in more than 100 FPS. When attacking the template, our method needs less than 3ms to process a whole video sequence. The speed of our algorithm is much faster than that of common video flow and that of most real-time trackers, indicating that it is also imperceptible in terms of time consumption. + +Noise Pattern: The adversarial search regions, the clean ones and their difference maps are shown in Figure 10. + +![](images/33780f46254246067ec92afe6a27bbaab4143fdf23590a3c9c2ec30874977cca.jpg) +Figure 9. Visualization of clean and perturbed templates of the VOT2018 dataset. Better viewed in color with zoom-in. + +It can be seen that the perturbation mainly focuses on the tracked target, leaving other regions almost not perturbed. + +![](images/8bc3cf63c02ee8719f75c36f60f3b374e7682a22238f6cb9b7169a75289a8558.jpg) +Figure 10. Adversarial search regions, clean ones and their difference maps. To observe pattern of difference maps clearly, the differences have been magnified by 10 times. + +Comparison with Other Noises: As shown in Figure 11 and Table 4, compared with impulse noises and gauss noises, our adversarial perturbation is far more imperceptible but causes much larger performance drop. + +![](images/3dfc14e34539811c9fb6eb76d575ea3d1e220c7236438941a345806740652f38.jpg) +MAE=0.98 MAE=12.72 MAE=25.61 MAE=19.76 MAE=37.47 Figure 11. Search regions with different kinds of noises. MAE represents mean absolute error. + +Table 4. Comparison with other kinds of noises. + +
DatasetMetricoriginaloursimpulse 0.1impulse 0.2gauss 0.1gauss 0.2
OTB100Success(↑)0.6960.3490.4860.3890.5530.389
Precision(↑)0.9140.4910.6560.5350.7270.542
VOT2018EAO(↑)0.4140.0730.1170.0840.1700.108
+ +Transferability: All aforementioned experiments are based on the SiamRPNpp [15] tracker. To test our method's transferability, we also apply our trained perturbation-generator to another three state-of-the-art trackers: DaSiamRPN [40], + +DaSiamRPN-UpdateNet [37], and DiMP [3]. Although all these trackers have templates and search regions, they are quite different from SiamRPNpp. To be specific, compared with SiamRPNpp, DaSiamRPN adopts a simpler backbone. DaSiamRPN-UpdateNet proposes a learnable way to update the template, further improving DaSiamRPN's performance. DiMP uses an online discriminative model to roughly determine the location of the target on the search region, and then applies a state estimation module to predict precise bounding boxes. We use these three trackers as the baseline algorithms and then add perturbations to their search region in each frame. We make experiments on the LaSOT [7] dataset. The detailed results about attacking DaSiamRPN, DaSiamRPN-UpdateNet, DiMP are shown in Table 5. Although our attacking algorithm is designed for and trained with SiamRPNpp, this method can also effectively deceive other state-of-the-art trackers, causing obvious performance drop, which demonstrates the transferability of our attacking method. + +Table 5. Adversarial effect on other state-of-the-art trackers. From top to bottom, three trackers are DaSiamRPN, DaSi- amRPN+UpdateNet and DiMP. + +
TrackerSuccess(↑)Norm Precision(↑)
DaSiamRPNOriginal0.4580.544
Adversarial0.4000.479
Drop0.0580.065
UpdateNetOriginal0.4650.549
Adversarial0.3990.478
Drop0.0660.071
DiMP50Original0.5590.642
Adversarial0.4920.567
Drop0.0670.075
+ +# 5. Conclusion + +In this study, we present an effective and efficient adversarial attacking algorithm for deceiving single object trackers. A novel cooling-shrinking loss is proposed to train the perturbation-generator. The generator trained with this adversarial loss and $L_{2}$ loss can deceive SiamRPN++ at a high success rate with imperceptible noises. We show that a discriminator is not necessary in adversarial attack of the tracker because the combination of the adversarial loss and $L_{2}$ loss has already achieved our goal. Besides SiamRPN++, our attacking method has impressive transferability and effectively attacks other recent trackers such as DaSiamRPN, DaSiamRPN-UpdateNet, and DiMP. Our algorithm is also quite efficient and can transform clean templates/search regions to adversarial ones in a short time interval. + +Acknowledgement. The paper is supported in part by the National Key R&D Program of China under Grant No. 2018AAA0102001 and National Natural Science Foundation of China under grant No. 61725202, U1903215, 61829102, 91538201, 61751212 and the Fundamental Research Funds for the Central Universities under Grant No. DUT19GJ201. + +# References + +[1] Anish Athalye, Logan Engstrom, Andrew Ilyas, and Kevin Kwok. Synthesizing robust adversarial examples. arXiv preprint arXiv:1707.07397, 2017. 2, 3 +[2] Luca Bertinetto, Jack Valmadre, João F Henriques, Andrea Vedaldi, and Philip H S Torr. Fully-convolutional siamese networks for object tracking. In ECCV 2016 Workshops, pages 850–865, 2016. 6 +[3] Goutam Bhat, Martin Danelljan, Luc Van Gool, and Radu Timofte. Learning discriminative model prediction for tracking. In ICCV, 2019. 1, 2, 5, 8 +[4] Kenan Dai, Yunhua Zhang, Dong Wang, Jianhua Li, Huchuan Lu, and Xiaoyun Yang. High-performance long-term tracking with meta-updater, 2020. 1 +[5] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. ECO: Efficient convolution operators for tracking. In CVPR, 2017. 6 +[6] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. ATOM: Accurate tracking by overlap maximization. In CVPR, 2019. 1, 2 +[7] Heng Fan, Liting Lin, Fan Yang, Peng Chu, Ge Deng, Sijia Yu, Hexin Bai, Yong Xu, Chunyuan Liao, and Haibin Ling. LaSOT: A high-quality benchmark for large-scale single object tracking. In CVPR, 2019. 1, 2, 5, 7, 8 +[8] Ruochen Fan, Fang-Lue Zhang, Min Zhang, and Ralph R Martin. Robust tracking-by-detection using a selection and completion mechanism. Computational Visual Media, 3(3):285-294, 2017. 1 +[9] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. arXiv preprint arXiv:1412.6572, 2014. 1, 2 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 2, 3 +[11] David Held, Sebastian Thrun, and Silvio Savarese. Learning to track at 100 fps with deep regression networks. In ECCV, 2016. 3 +[12] Lianghua Huang, Xin Zhao, and Kaiqi Huang. GOT-10k: A large high-diversity benchmark for generic object tracking in the Wild. arXiv preprint arXiv:1810.11981, 2018. 1, 2, 5 +[13] Borui Jiang, Ruixuan Luo, Jiayuan Mao, Tete Xiao, and Yun-ting Jiang. Acquisition of localization confidence for accurate object detection. In ECCV, 2018. 2 +[14] Matej Kristan, Ales Leonardis, Jiri Matas, Michael Felsberg, Roman Pfugfelder, Luka Cehovin Zajc, Tomas Vojir, Goutam Bhat, Alan Lukezic, Abdelrahman Eldesokey, Gustavo Fernandez, and et al. The sixth visual object tracking VOT2018 challenge results. In ECCV, 2018. 2, 5 +[15] Bo Li, Wei Wu, Qiang Wang, Fangyi Zhang, Junliang Xing, and Junjie Yan. SiamRPN++: Evolution of siamese visual tracking with very deep networks. In CVPR, 2019. 1, 2, 3, 5, 6, 8 +[16] Bo Li, Junjie Yan, Wei Wu, Zheng Zhu, and Xiaolin Hu. High performance visual tracking with siamese region proposal network. In CVPR, 2018. 1, 2, 3, 5 +[17] Junwei Li, Xiaolong Zhou, Sixian Chan, and Shengyong Chen. Object tracking using a convolutional network and + +a structured output svm. Computational Visual Media, 3(4):325-335, 2017. 1 +[18] Peixia Li, Dong Wang, Lijun Wang, and Huchuan Lu. Deep visual tracking: Review and experimental comparison. Pattern Recognition, 76:323-338, 2018. 1 +[19] Jiajun Lu, Hussein Sibai, Evan Fabry, and David Forsyth. No need to worry about adversarial examples in object detection in autonomous vehicles. arXiv preprint arXiv:1707.03501, 2017. 3 +[20] Yan Luo, Xavier Boix, Gemma Roig, Tomaso Poggio, and Qi Zhao. Foveation-based mechanisms alleviate adversarial examples. arXiv preprint arXiv:1511.06292, 2015. 3 +[21] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: A simple and accurate method to fool deep neural networks. In CVPR, 2016. 1, 2 +[22] Hyeonseob Nam and Bohyung Han. Learning multi-domain convolutional neural networks for visual tracking. In CVPR, 2016. 6 +[23] 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 +[24] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In NIPS, 2015. 2 +[25] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. arXiv preprint arXiv:1505.04597, 2015. 4 +[26] Mahmood Sharif, Sruti Bhagavatula, Lujo Bauer, and Michael K. Reiter. Adversarial generative nets: Neural network attacks on state-of-the-art face recognition. arXiv preprint arXiv:1801.00349, 2017. 2, 3 +[27] Yibing Song, Chao Ma, Xiaohe Wu, Lijun Gong, Linchao Bao, Wangmeng Zuo, Chunhua Shen, Rynson W.H. Lau, and Ming-Hsuan Yang. VITAL: Visual Tracking via Adversarial Learning. In CVPR, 2018. 6 +[28] 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. 2 +[29] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. 1, 2 +[30] Qiang Wang, Li Zhang, Luca Bertinetto, Weiming Hu, and Philip H. S. Torr. Fast online object tracking and segmentation: A unifying approach. In CVPR, 2019. 2, 3, 5 +[31] Xingxing Wei, Siyuan Liang, Ning Chen, and Xiaochun Cao. Transferable adversarial attacks for image and video object detection. arXiv preprint arXiv:1811.12641, 2018. 1, 2, 7 +[32] Rey Reza Wiyatno and Anqi Xu. Physical adversarial textures that fool visual object tracking. In ICCV, 2019. 2, 3 +[33] Yi Wu, Jongwoo Lim, and Ming Hsuan Yang. Object tracking benchmark. IEEE Transactions on Pattern Analysis and Machine Intelligence, 37(9):1834-1848, 2015. 2, 5, 6 + +[34] Chaowei Xiao, Bo Li, Jun-Yan Zhu, Warren He, Mingyan Liu, and Dawn Song. Generating adversarial examples with adversarial networks. arXiv preprint arXiv:1801.02610, 2018. 1, 2, 7 +[35] Cihang Xie, Jianyu Wang, Zhishuai Zhang, Yuyin Zhou, Lingxi Xie, and Alan Yuille. Adversarial examples for semantic segmentation and object detection. In ICCV, 2017. 1, 2 +[36] Bin Yan, Haojie Zhao, Dong Wang, Huchuan Lu, and Xiaoyun Yang. 'Skimming-Perusal' Tracking: A framework for real-time and robust long-term tracking. In ICCV, 2019. 6 +[37] Lichao Zhang, Abel Gonzalez-Garcia, Joost van de Weijer, Martin Danelljan, and Fahad Shahbaz Khan. Learning the model update for siamese trackers. In ICCV, 2019. 5, 8 +[38] Yunhua Zhang, Lijun Wang, Jinqing Qi, Dong Wang, Mengyang Feng, and Huchuan Lu. Structured siamese network for real-time visual tracking. In ECCV, 2018. 6 +[39] Zhipeng Zhang and Houwen Peng. Deeper and wider siamese networks for real-time visual tracking. In CVPR, 2019. 1, 2, 3 +[40] Zheng Zhu, Qiang Wang, Bo Li, Wei Wu, Junjie Yan, and Weiming Hu. Distractor-aware siamese networks for visual object tracking. In ECCV, 2018. 1, 2, 3, 5, 8 \ No newline at end of file diff --git a/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/images.zip b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d9dbe81531609e79a010b66154ea817676ee8af8 --- /dev/null +++ b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b9309f140910c823270607a0059802908305ee3cb211cde545744e333409251 +size 587464 diff --git a/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/layout.json b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1feb506542815d72fc84f0b21db1e609146e3bb3 --- /dev/null +++ b/coolingshrinkingattackblindingthetrackerwithimperceptiblenoises/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22cd4b5cad03a28f7f088c797b96b290453462bbde3245ce6445a0320724bf66 +size 404805 diff --git a/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/7610d573-7310-4f55-aa84-ab3137a95f6e_content_list.json b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/7610d573-7310-4f55-aa84-ab3137a95f6e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7d1fe5476e2d5bd8465b1a1db08f1c06967c7493 --- /dev/null +++ b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/7610d573-7310-4f55-aa84-ab3137a95f6e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ce7393eac5b18552cc98f4c77430764a7ccb7cd7b975fde74da91ce418ad5a9 +size 81968 diff --git a/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/7610d573-7310-4f55-aa84-ab3137a95f6e_model.json b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/7610d573-7310-4f55-aa84-ab3137a95f6e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fbc502047182c9659af051281db971c3d35dda7d --- /dev/null +++ b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/7610d573-7310-4f55-aa84-ab3137a95f6e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1428962ee37ffda952bd3874ae1dcf5599cc213be52f94384e715f28b0c0a5ed +size 99163 diff --git a/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/7610d573-7310-4f55-aa84-ab3137a95f6e_origin.pdf b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/7610d573-7310-4f55-aa84-ab3137a95f6e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..899937dcbc14e3ec1ad84c713fb35a42925d3627 --- /dev/null +++ b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/7610d573-7310-4f55-aa84-ab3137a95f6e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58a0a9ff71a780a2c5db97533ebca84f4a4095f0322b315c0bff7712fdecb7f5 +size 1534552 diff --git a/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/full.md b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b27336abbfb24b12bf997c15ab5ab4289b4bc337 --- /dev/null +++ b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/full.md @@ -0,0 +1,314 @@ +# Cops-Ref: A new Dataset and Task on Compositional Referring Expression Comprehension + +Zhenfang Chen $^{1*}$ Peng Wang $^{2}$ Lin Ma $^{3}$ Kwan-Yee K. Wong $^{1}$ Qi Wu $^{4\dagger}$ + +1The University of Hong Kong 2University of Wollongong + +$^{3}$ Tencent AI Lab $^{4}$ Australian Centre for Robotic Vision, University of Adelaide + +1{zfchen,kykwong}@cs.hku.hk 2pengw@uow.edu.au + +$^{3}$ forest.linma@gmail.com $^{4}$ qi.wu01@adelaide.edu.au + +Reasoning tree: cat (left, sleeping) resting towel (white) + +Expression: The cat on the left that is sleeping and resting on the white towel. + +![](images/154ac7e12e0d1eaa9cb36db91a2936792e37b13f4e3b32fa412a804ba2ef541a.jpg) +(a) The image with the target "cat" + +![](images/944fedc7cc3e88f33fa5a926d45847ecaf9ff8545917bc6322e6547800b69b6f.jpg) + +![](images/4ed5cee25cb66962f72f4e793f0c83b8e568b3abbe698e38d04bcf6baa951d9a.jpg) + +![](images/079e0224d6d2b9bca06d807ce9ed2b620c02f00c605bd56afd62ffd49dac2a29.jpg) + +![](images/9840e9d51713cb58552c863aa9c303f8463d8078fd45f8caf658d0d9ecbc8836.jpg) +(d) Distractors with "sleeping cat" + +![](images/e803a77cdfa44b8e1baf6d11b2d946e6d7185df8d0e94e257cc2b3ce25c8c51a.jpg) + +![](images/85c3b8f7609d87598da0f70c122d62bcd8f163cd5a67f1b93304e0ce12867812.jpg) + +![](images/6127d80dd8118baef6612154187f76d0d698f0021278f8631570ab71d354ca7a.jpg) +(b) Distractors of different categories +(c) Distractors with "cat" +Figure 1: An example from the new Cops-Ref dataset for compositional referring expression comprehension. The task requires a model to identify a target object described by a compositional referring expression from a set of images including not only the target image but also some other images with varying distracting factors as well. The target/related/distracting regions are marked by green/yellow/blue boxes, respectively. More details about the reasoning tree can be seen in Sec. 3.1. + +![](images/75999b8edc04aadc638717a7544dfce981a9b617210436accc857c87f4a8021a.jpg) + +![](images/f1b22750bb7f2e72927115453198e42c6fcaddad83726f925f453760ee611811.jpg) + +![](images/9d52ad5f5b4be5c9da5c118097ed4a06df878b90edf7e55d60d15d635aa74bb1.jpg) + +![](images/b28f165c9e7d234c49852dc63cc9cba10de83e5df5e29b3984db0126faaa4928.jpg) + +![](images/54b40610d30a46b08be9b4335928d5ca772e7c06f11a3c70785b1c8d104e739a.jpg) + +# Abstract + +Referring expression comprehension (REF) aims at identifying a particular object in a scene by a natural language expression. It requires joint reasoning over the textual and visual domains to solve the problem. Some popular referring expression datasets, however, fail to provide an ideal test bed for evaluating the reasoning ability of the models, mainly because 1) their expressions typically describe only some simple distinctive properties of the object and 2) their images contain limited distracting information. To bridge the gap, we propose a new dataset for visual reasoning in context of referring expression comprehension with two main features. First, we design a novel expression engine rendering various reasoning logics that can be flexibly combined with rich visual properties to generate expressions with varying compositionality. Second, to better exploit the full reasoning chain embodied in an expression, we propose a new test setting by adding additional distracting images containing objects sharing similar properties with the referent, thus minimising + +the success rate of reasoning-free cross-domain alignment. We evaluate several state-of-the-art REF models, but find none of them can achieve promising performance. A proposed modular hard mining strategy performs the best but still leaves substantial room for improvement. The dataset and code are available at: https://github.com/ zfchenUnique/Cops-Ref. + +# 1. Introduction + +In recent years, computer vision tasks that require high-level reasoning have attracted substantial interest. Visual question answering (VQA) [14, 8] and visual dialog (VD) [5, 20] are typical examples of such a trend, where the system answers free-form questions based on an image by jointly reasoning over the textual and visual domains. A prerequisite to achieve this ultimate goal of artificial intelligence is the ability to ground the rich linguistic elements embodied in the language onto the visual content of the image. Referring expression comprehension (REF) is such a visual grounding task, which targets at identifying a particular object in a scene by an expression phased in natural language. A number of datasets [17, 29, 45] have been constructed for this task, and on top of which various mod + +els [27, 35, 44] have been developed. + +Such popular datasets [17, 29, 45], however, cannot serve as ideal test beds to evaluate the reasoning ability of REF models. First, the expressions are typically simple and short, focusing mainly on some distinctive properties of the referent, such as object categories, attributes, or some simple relationships. For example, only some superficial reasoning is involved in expressions like 'the girl with glasses' and 'the man sitting next to a table'. Second, many images in the existing datasets contain only limited distracting information (e.g., containing only two or three objects of the same category) and do not necessitate complex reasoning. For example, although we are given a complex expression 'The cat on the left that is sleeping and resting on the white towel.' to localise the target cat in the example image shown in Fig. 1 (a), we can still have high chance to succeed even if we only use a simple expression 'The cat on the left' as the query. Another non-negligible issue is dataset bias. As stated by Cirik et al. [4], a system that ignores the expression but uses only the image as input can still outperform random guess by a large margin. Recently, a synthetic dataset for referring expression, called CLEVR-Ref+ [26], is proposed to facilitate the diagnosis of visual reasoning. However, this dataset sacrifices visual realism and semantic richness by only describing some simple shapes and attributes. + +To tackle the aforementioned problems, we propose a new challenging dataset for visual reasoning in context of referring expression comprehension. Our dataset is built on top of the real-world images in GQA [14] and therefore it pertains visual realism and semantic richness. The key novelty of our dataset lies in a new expression engine. We design six reasoning logics, namely, and, or, order, same, not, and chain, which can be flexibly combined with the rich visual information (e.g., object categories, visual attributes, location information, and object interactions) to generate expressions with varying compositionality levels. Moreover, to overcome the sparse emergence of object categories and dataset bias, we design a new test setting by adding distracting images that contain objects sharing similar visual properties with the referent (e.g., same object category and similar attributes). Along with the dataset, a new REF task named CoMPoSitional Referring expression comprehension (Cops-Ref) is proposed, which requires a model to localise a region described by a flowery expression from a set of visually similar images. With the new dataset and task, the success rate of reasoning-free cross-domain alignment can be minimised. + +We evaluate various state-of-the-art REF models on our proposed Cops-Ref dataset, but we find none of them can achieve a satisfactory performance. A modular hard-mining strategy is proposed to automatically mine hard negative ex + +amples embodying different visual properties. It achieves the best performance on the Cops-Ref task but still leaves much room for further improvement. + +The contributions of this paper can be summarised as follows: 1) We introduce a new challenging task named CopsRef, which requires a model to localise the referent from a set of images with objects sharing similar visual properties; 2) We build a new dataset on top of real images, which pertains visual realism and semantic richness, and can complement the synthetic reasoning dataset to evaluate models' reasoning ability more rigorously; 3) We design a novel expression engine, which supports various reasoning logics that can be flexibly combined with rich visual stimuli to generate expressions with varying compositionality; 4) We conduct comprehensive evaluation on the REF models, among which the proposed modular hard mining strategy performs best but still leaves much room for improvement. + +# 2. Related Work + +Referring Expression Datasets. Toward tackling the REF task, many datasets [17, 29, 33, 45, 3] have been constructed by asking annotators to provide expressions describing regions of images. However, it is labor-intensive and hard to control the annotation quality, and most of the queries in the datasets can be easily solved by simply reasoning on object categories, attributes and shallow relations. Inspired by the synthetic dataset CLEVR [15] for VQA [43, 28], Liu et al. [26] built a synthetic REF dataset, called CLEVR-Ref+, by synthesising both images and expressions. However, it has been noticed in [14] that images in CLEVR, with only a handful of object classes, properties and spatial relations, are too simple for VQA. It is doubtful whether such synthetic images are representative enough to reflect the complexity of real-world images. + +Recently, Hudson and Manning [14] proposed a new dataset GQA for VQA, which provides scene graph annotations for real-world images. By utilising the scene graph annotations and further data cleaning, we contribute a new dataset named Cops-Ref for referring expression, which contains not only region-expression pairs with complex reasoning chains but also visually similar distractors. It demands a much stronger reasoning ability to understand the whole expression and distinguish subtle visual differences in the images. Note that GQA also provides experiments localising related regions for questions but it is only regarded as a metric to evaluate the VQA task rather than targeting at the REF task. Neither expressions or distractors are considered in their setting. + +Referring Expression Models. Referring expression [7, 12, 13, 19, 29, 30, 36, 40, 41, 42, 6] has attracted great attention. Karpathy and Fei-Fei [16] learned visual alignments between text and regions by multiple instance learning. Rohrbach et al. [35] localised a region by reconstructing the sentence using an attention mechanism. [45, 32, 46] + +
IndexFormsReasoning treesExemplar templatesExpression examples
1chainobj0(att0) → rel0→ obj1(att1) → rel1→ obj2(att2)The <att0> that is <rel0> the <att1> <obj1> that is <rel1> the <att2> <obj2>.The young girl that is touching the glazed donut that is on the round table.
2andobj0(att0) { rel0→obj1(att1) → rel1→obj2(att2)The <att0> <obj0> <rel0> the <att1> <obj1> and <rel1> the <att2> <obj2>.The white fence near the building and behind the walking woman.
3orobj0(att0) { rel0→obj1(att1) → rel1→obj2(att2)The <att0> <obj0> <rel0> the <att1> <obj1> or <rel1> the <att2> <obj2>.The green suitcase behind the black suitcase or near the yellow suitcase.
4orderobj0(idx, dir, att0)The <idx> <obj0> from the <dir> that is <att0>.The first glass from the left that is red.
5sameobj0 → same cat → obj1The <obj0> that has the same <cat> as the <obj1>.The bag that has the same color as the sweater.
6notobj0 (not att0)The <obj0> that is not <att0>.The apple that is not red.
+ +Table 1: Examples of expression logic forms. Attributes of the objects are bounded with () and relations between objects are shown on $\rightarrow$ . obj0 denotes the target object, while obj1,2 denote the related objects. att0,1,2 and rel0,1,2 denote the corresponding attributes and relations, respectively. + +utilised context information to ground the expression. Yu et al. [44] and Liu et al. [25], respectively, used modular networks and neural module tree networks to match better structure semantics. Following [44], Wang et al. [39] and Liu et al. [27] increased the reasoning ability by watching neighbour regions and cross-modal attention-guided erasing. Different from these previous studies focusing on referring short expressions in a single image, we refer complex expressions in multiple similar images, which is more challenging and requires a stronger visual reasoning ability. + +Text based Image Retrieval. Text based image retrieval returns relevant images from the gallery that is described by the text description [1, 9, 22, 23, 24, 33, 37, 38, 11, 2]. Different from text based image retrieval, Cops-Ref focuses on fine-grained region-level matching. The distracting regions in Cops-Ref are more semantically similar to the relevant region in the target image with only subtle differences. Such fine-grained and region-level similarity requires models with much stronger reasoning ability to ground the flowery expressions. + +# 3. The Cops-Ref Dataset and Task + +Previous natural image referring expression datasets [17, 29, 45] typically only require the ability to recognise objects, attributes and simple relations. Apart from such shallow ability, Cops-Ref also measures deeper reasoning ability like logic and relational inference. Compared with previous datasets, it has two main features, namely 1) flowery and compositional expressions which need complex reasoning ability to understand, and 2) a challenging test setting that includes controlled distractors with similar visual properties to the referent. Fig. 1 shows a typical example of our dataset. In the following subsections, we first introduce the construction of the dataset, including generating expressions (Sec. 3.1), discovering distractors (Sec. 3.2), and postprocessing (Sec. 3.3). We then analyse the statistics of our dataset and formally define the task in Sec. 3.4 and Sec. 3.5. + +# 3.1. The Expression Engine + +The expression engine is the key to the construction of our dataset, responsible for generating grammatically correct, unambiguous and flowery expressions with various compositionality for each of the described regions. We propose to generate expressions from scene graphs based on some logic forms. Specifically, given a region to be described, we first choose a logic form from a predefined logic family and obtain a textual template for it. We then take the target object node in the scene graph as a root and expand it into a specific reasoning tree needed for the textual template. Finally, we fill the textual template with the content parsed from the reasoning tree and produce the expression. In the following paragraphs, we will describe the details of these three steps. + +Expression logic forms. Expression logic forms summarise the abstract logics and provide specific structures for the expressions. Each of them is associated with several textual templates. Specifically, we define six types of expression logic forms, namely chain, and, or, order, same, and not. These high-level logic forms provide different contexts for the target object. Specifically, chain, and and or describe the relationship between the target object and other related objects. The chain form considers a sequence of related objects connected by a chain, while the and form indicates the target object must have some specific relations with two other objects and the or form only requires fulfilling one of the two relations. The order form provides relative spatial location between the target object and other objects of the same category. The same form shows that the target object shares the same attributes as the related object. The not form indicates a certain attribute or relation being absent in the target object. These basic logic forms can be further composed with each other and generate more complex and compositional expressions. The logic forms and their templates are shown in table 1. + +Although these logic forms cannot fully reflect the com + +plexity of natural language, the basic logic units covered and their flexible compositions are sufficient to evaluate a model's reasoning ability. Moreover, experimental results show that knowledge learned from the Cops-Ref dataset can be directly applied to previous human-annotated datasets like refCOCO. + +Reasoning tree parsing. While expression logic forms define the structures for the expressions, the dense scene graphs provide the corresponding semantic content. We use the scene graphs provided in [14, 21] to represent the internal semantic structures of images. Each node represents an object and edges between nodes represent the relations between them. Textual templates of different expression logic forms require different semantic content as input, which can be represented by reasoning trees with different structures extracted from the scene graph. Table 1 shows an instantiation of the reasoning tree for each of the forms, their corresponding textual templates and expression examples. + +Specifically, for the chain, and and or forms, we simply parse the needed semantic reasoning trees from the scene graphs. For the order form, we sort all the regions that are of the same object category from left to right (vice versa) based on the coordinates of the centres of the bounding boxes. Since the order constraint is rather weak (e.g., 'the left glass' may also exist in the distracting images), we further add additional attributes and/or relations to make the expression unambiguous. Similarly, for the not form, we traverse the whole scene graph and collect the attributes/relations that present in all objects of the same category but not in the target object. For the same form, we find the attribute that only the target object and the related object have, and regard the category of that attribute as a relation between the two objects. The attribute categories used in the same form include colour, shape, material, gender and pattern. + +Expression Generation. With the expression logic forms and the parsed reasoning trees ready, the expression engine can generate flexible expressions by filling the textual templates of the expression logic forms with the content from the reasoning tree. For example, given the order form and a textual template like the from , the expression engine can generate 'the first glass from the left' for the reasoning tree, glass (first, left). It can also generate more flowery expressions by adding more attributes or nodes to the reasoning tree. For example, it can produce 'the first glass from the left that is clear and to the left of the gravity' by the expanded reasoning tree, glass (first, left, clear) $\xrightarrow{\text{to the left of}}$ gravity. + +# 3.2. Discovery of Distracting Images + +Introducing distracting images in the test phase is another important feature of our proposed dataset. It provides + +more complex visual reasoning context and reduces dataset bias. The inclusion of distracting images guarantees that good performance can only be achieved by REF models that are able to reason over the complete expression and distinguish subtle visual differences. We define four types of distracting images, namely: + +1. DiffCat: images that contain objects of different categories as the target object. +2. Cat: images that contain objects of the same category as the target object. +3. Cat&attr: images that contain objects of both the same category and attributes as the target object. +4. Cat&cat: images that contain all the objects in the reasoning tree but of different relations. + +These distractors can be used to evaluate different aspects of REF models such as object recognition, attribute identification and relation extraction, etc. They force the models to fully understand the flowery and compositional expressions to achieve good performance. For each expression in the validation set and test set, we provide 3 distracting images under each distracting factor, apart from the image containing the ground-truth target. We simply discard those region-expression pairs for which we cannot find enough distractors. Fig. 1 shows an example of distracting images of different types for a given expression. + +# 3.3. Post Processing and Balancing + +We use synonyms parsed from wordNet [31] to further improve the diversity of the expressions. Besides, we remove expressions that target at classes that are hard to be bounded by a regular rectangle box (e.g., 'sky' and 'cloud') and regions that are too small (i.e., regions whose area is smaller than $1\%$ of the whole image). We also notice that some of the scene graph annotations in GQA are incorrect or incomplete ( e.g., missing annotations for some objects/attributes/relations). They may make some regions in the distracting images also semantically match the expressions. To avoid such noise in the distractors, we manually check the expressions and images in the test set and discard these pairs with noise. + +We also find some simple relations like 'to the left of' being much more frequent than others in the scene graphs of GQA [14]. To address such bias issues, we adopt two strategies: 1) we sample relations for each node based on a probability that is directly proportional to the reciprocal of the frequency, downsampling most frequent relations and enriching diversity of expressions; 2) we abandon those expression-regions that only contain simple spatial relations. + +# 3.4. Statistics of the Dataset + +After the above processing and balancing, we have 148,712 expressions and 1,307,885 regions on 75,299 images, making our dataset the current largest real-world image dataset for referring expressions. The average length + +![](images/6797abbabf6937cbd08cb1315b5912384ae5db824fb67cea9253b905a6265fc0.jpg) +(a) The most frequent object names + +![](images/2dbd49473046721d1e92039eca37fb240229b1de66a3dc85fe5e53537a54b307.jpg) +(b) The most frequent attributes +Figure 2: The most frequent object names, attributes and relations of Cops-Ref. The size of words indicates frequency. + +![](images/1c391ae6365e724c6913f85a88c0c6246a64d76ae308d3beaf199001ef1e6000.jpg) +(c) The most frequent relations + +
Object Cat.Att. Num.Rel. Num.Exp. lengthCand Num.Cat Cand Num.
refCOCO801--3.510.64.9
refCOCOg80--8.58.22.6
CLEVR-Ref+312522.4--
Cops-Ref50860129914.4262.520.3
+ +Table 2: Statistic comparison of refCOCO [45], refCOCOg [29], CIEVR-Ref+ [26] and the Cops-Ref on number of object categories, number of attributes, number of relations, average length of expressions, average number of object candidates and average number of object candidates that are of the same categories for each expression. + +of the expressions is 14.4 and the size of the vocabulary is 1,596. Since the scene graph annotation of the test set of GQA dataset is not publicly released, we use the validation set of GQA to construct our test set. A new validation set is split out from the training data of GQA to monitor the model training process. There are 119,603/16,524/12,586 expressions for training/validation/test, respectively. + +Thanks to the dense annotations of the scene graphs, the proposed dataset contains fine-grained annotations for object categories, attributes and relations. The number of entry-level object categories, attributes and relations are 508, 601, and 299, respectively. We show the most frequent object names, attributes and relations in Fig. 2. We can see diverse object categories, with 'man', 'building' and 'tree' being the most frequent object names. The most frequent attributes are colours (e.g. 'black' and 'white') and sizes (e.g. 'small' and 'large') while the most frequent relations are spatial relations like 'to the left/right of'. We compare the statistics of the proposed Cops-Ref dataset with three widely-used referring dataset, refCOCO [45], refCOCOg [29] and CLEVR-Ref+ [26] in table $2^{1}$ . As shown in table 2, the proposed dataset enjoys diverse object categories, attributes and relations. Moreover, it provides reasonably long expressions and much more candidate objects of same/different categories as the target object. The average length of our expressions is shorter than that of CLEVR-Ref+, but we find it is not necessary to use longer expressions to distinguish the target object in the real-world images even when distractors exist. More analysis about dataset bias and baseline results + +can be found in Sec. 5 and we provide more data examples and detailed statistics in the supplementary material. + +# 3.5. Task + +Given a natural language referring expression and a set of similar images, the proposed Cops-Ref task requires a model to localise a target region described by the expression. Compared to the previous REF task [17, 29], the Cops-Ref demands a better understanding of longer and flowerier expressions, and the ability to distinguish the subtle differences of the distracting images. It requires REF models to have stronger reasoning ability for object detection, attribute recognition, and relation extraction. Formally, given $N$ images and a query expression $q$ , the Cops-Ref task identifies a target region $r_{i^{*},j^{*}}$ by + +$$ +r _ {i ^ {*}, j ^ {*}} = \underset {r _ {i, j}, i \in [ 1, N ], j \in [ 1, J _ {i} ]} {\arg \max } s \left(r _ {i, j} | q\right), \tag {1} +$$ + +where $I_{i}$ denotes the $i$ -th image, $r_{i,j}$ is the $j$ -th region from $I_{i}$ , $J_{i}$ is the number of the regions in $I_{i}$ , $s(r_{i,j}|q)$ denotes the matching score between $r_{i,j}$ and $q$ . + +Note that we do not use distracting images during training in our experimental setting because they are usually unavailable or hard-to-collect in the real world. Also, it is easier for us to follow the original training strategies in [22, 27, 44, 35] to re-train and evaluate the models. + +# 4. Model + +Although Cops-Ref is a new task that requires localising a region from a set of images instead of a single one, existing REF models can be directly applied to this new task by densely matching the query expression with each object in the image set and choosing the one with the highest matching score as the referring result. + +MattNet [44] is a popular backbone model for solving the REF task because of its extraordinary capability in modeling different modules of the query expressions, including subject (sub), location (loc) and relationship (rel). Specifically, MattNet estimates the matching score between an expression $q$ and the $j$ -th region $r_j$ by + +$$ +s \left(r _ {j} \mid q\right) = \sum_ {m d} w ^ {m d} s \left(r _ {j} \mid q ^ {m d}\right), \tag {2} +$$ + +where $md \in \{sub, loc, rel\}$ , $w^{md}$ is the learnt weight for the $md$ module and $q^{md}$ is the modular phrase embedding. More details about MattNet can be found in [44]. + +Given a positive pair $(r_m, q_m)$ , the whole model of Mat-Net is optimised by a ranking loss, given by + +$$ +\begin{array}{l} \mathcal {L} _ {\text {r a n k}} = \sum_ {m} ([ \Delta - s (r _ {m} | q _ {m}) + s (r _ {m} | q _ {n}) ] _ {+} + \tag {3} \\ [ \Delta - s (r _ {m} | q _ {m}) + s (r _ {o} | q _ {m}) ] _ {+}), \\ \end{array} +$$ + +where $r_o$ and $q_n$ are other random unaligned regions and expressions in the same image as $r_m$ and $q_m$ , $\Delta$ is a margin and $[x]_+ = \max(x, 0)$ . This loss function is suitable for the REF task and can successfully distinguish aligned region-expression pairs from unaligned ones within the same image. However, when it comes to the Cops-Ref task, it has the limitation on not being able to identify hard negative examples with similar visual properties in other images, because the training of MattNet does not consider hard negative regions and expressions in other images. To solve this problem, we propose a modular hard-mining training strategy based on MattNet. + +Modular Hard-mining Strategy. To increase the ability of MattNet to distinguish hard negative regions in distracting images, we need to sample distracting regions/expressions in other images as negative training examples. However, since there are 119,603 expressions and 797,595 regions in the training set of Cops-Ref, how to mine hard negative regions and expressions effectively and efficiently becomes a challenge. To handle this challenge, we propose to use the similarity of modular phrase embedding $q^{md}$ as a prior to sample the hard negative examples in other images, where $md \in \{sub, loc, rel\}$ . + +Specifically, for the $m$ -th region-expression pair, we first extract its modular expression features $\{q_m^{md}\}$ and calculate their similarity with those of the $n$ -th region-expression pair that has the same object category. We define the probability of sampling the $n$ -th region-expression pair to be the negative pair by + +$$ +\begin{array}{l} s _ {m, n} ^ {m d} = f \left(q _ {m} ^ {m d}, q _ {n} ^ {m d}\right), \\ p _ {m, n} ^ {m d} = \frac {\exp \left(s _ {m , n} ^ {m d}\right)}{\sum_ {n = 1 , m \neq n} ^ {n = N _ {C}} \exp \left(s _ {m , n} ^ {m d}\right)}, \tag {4} \\ \end{array} +$$ + +where $f$ is a function for estimating the similarity between two expression features and $N_{C}$ is the number of the region-expression pairs has the same object category as the $m$ -th region-expression pair in the training set. For simplicity, We use cosine similarity as an instantiation of $f$ . We mine hard distracting regions and expressions for each positive region-expression pair and send these distracting regions to a ranking loss as hard negative examples. + +Formally, our modular hard-mining loss is + +$$ +\begin{array}{l} \mathcal {L} _ {\text {m i n e}} = \sum_ {m} \sum_ {m d} \left(\left[ \Delta - s \left(r _ {m} \mid q _ {m}\right) + s \left(r _ {m} \mid q _ {n} ^ {m d}\right) \right] _ {+} + \right. \tag {5} \\ [ \Delta - s (r _ {m} | q _ {m}) + s (r _ {n} ^ {m d} | q _ {m}) ] _ {+}), \\ \end{array} +$$ + +where $r_n^{md}$ and $q_{n}^{md}$ are a region-expression pair sampled with $\{p_{m,n}^{md}\}_{n = 1,m\neq n}^{N_C}$ as a prior. + +Our total loss is $\mathcal{L} = \mathcal{L}_{\text{rank}} + \mathcal{L}_{\text{mine}}$ , where $\mathcal{L}_{\text{rank}}$ targets at distinguishing distracting negative regions and expressions within the same image, and $\mathcal{L}_{\text{mine}}$ targets at distinguishing similar negative regions and expressions in other images. + +Such a modular hard mining strategy is effective since it can mine hard negative region-expression pairs outside the image that contains the target region-expression pair. Besides, the mined regions have similar properties as the target, which demand stronger reasoning ability to distinguish. It is also efficient since it only requires the expressions as input without the need for loading images into memory. It enables the model to scan all the expressions in the training set in around 29 seconds with a naive implementation. During training, we update the sample probability $p_{i,j}^{md}$ every 50 iterations. We distinguish the proposed hard mining model from the original MattNet by calling it MattNet-Mine. + +# 5. Experiments + +In this section, we conduct extensive experiments to analyse the Cops-Ref dataset and compare our proposed model with SOTA REF models. We first study the bias impact and transfer performance. We then compare the performance of the proposed MattNet-Mine with the baselines. We also provide extensive analysis, including "retrieve" + "REF" to handle the task, performance against logic forms and lengths of the expressions. We finally provide an ablation study on our mining strategy for distractors. We introduce experimental settings before we start. + +# 5.1. Experimental Settings + +Implementation Details. Following MattNet [44] and CM-Att-Erase [27], we extract visual features by res101-based Faster-RCNN [10, 34] pre-trained on COCO [24]. For each word in the sentence, we initialise it with an one-hot word embedding. We train all the models with Adam optimiser [18] until the accuracy of the validation set stops improving. We set the maximum time step for the text encoder to be 30. Expressions with words less than 30 are padded. For other settings for hyper-parameters, we keep them the same as the original MattNet to avoid cumbersome parameter fine-tuning. For the proposed MattNet-Mine, we first pre-train it by the ranking loss $\mathcal{L}_{\text{rank}}$ to obtain reasonable modular attentive phrase embeddings and then finetune the model with both $\mathcal{L}_{\text{mine}}$ and $\mathcal{L}_{\text{rank}}$ . Following previous REF models like [27, 39, 44], we use ground-truth object bounding boxes as proposals. We consider it as a correct comprehension if the model successfully chooses the proposal pointed by the expression among all the proposals extracted from the similar image set. + +Evaluation Settings. Table 3 shows different experiments settings. Full denotes the case when all the distractors are added while WithoutDist denotes no distractor is added. DiffCat, Cat and Cat&attr, respectively, represent + +
MethodFullDiffCatCatCat&attrCat&catWithoutDist
Chance0.41.71.81.91.76.6
GroundeR [35]19.160.238.535.738.975.7
Deaf-GroundeR2.27.77.98.08.027.1
Shuffle-GroundeR13.141.828.627.227.658.5
Obj-Attr-GroundeR15.253.132.629.632.768.8
MattNet-refCOCO8.722.717.016.718.942.4
MattNet [44]26.369.145.242.545.877.9
CM-Att-Erase [27]28.071.347.143.448.480.4
SCAN [22]+MattNet18.8-----
MattNet-Mine33.870.554.446.852.078.4
+ +Table 3: Results of baselines and state-of-the-art models on the Cops-Ref dataset. MattNet-refCOCO is trained on refCOCO. + +the cases when certain type of distractors are added, including distracting images containing no object of the same category as the target object, images containing objects of the same category, images containing objects of the same category, and attributes and images containing all the objects in the reasoning tree but of different relations. + +# 5.2. Dataset Analysis + +Bias Analysis. Inspired by the bias analysis of Cirik et al. [4], we use similar ways to analyse the bias problem of Cops-Ref. To exclude the impact of specific models or mechanisms, we choose GroundeR [35], which is the simplest CNN-RNN baseline model for referring expression. We train several variants of GroundeR models, include deaf-GroundeR which masks out the language input of the GroundeR with an all-zero vector, shuffle-GroundeR which shuffles the order of the word sequence in the expression and Obj-Att-GroundeR which only keeps the nouns and adjectives of the text input. + +The upper section of table 3 shows the results of the bias experiments. Deaf-GroundeR, an image only model achieves better performance than the "Chance" model, which selects a region from the images by chance. We observe that Deaf-GroundeR can filter out some irrelevant regions by providing higher matching scores for those regions whose categories like 'woman' and 'shirt' frequently appear in both the training set and test set. This indicates that the statistics bias problem in previous datasets like refCOCOg [29] also exists in our dataset. However, comparing the results of WithoutDist and Full, we see that the biased performance becomes much lower when distractors are added. Moreover, the bias problem in Cops-Ref is less significant than in refCOCOg. Deaf-GroundeR only achieves an accuracy of 2.2 in the Full case, while a similar "image only" model achieves an accuracy of 40.1 in [4]. + +Cirik et al. [4] also pointed out that shuffling the order of expressions and masking out other words that are not nouns or adjectives have minor effect on the performance of refCOCOg, resulting in only a relative drop of $4\%$ and $3\%$ , respectively. This suggests that a model does not need very strong reasoning ability for the whole sentence to handle the task. However, in Cops-Ref, comparing + +Shuffle-GroundeR and Obj-Att-GroundeR with GroundeR under the Full case, we observe a relative drop of $31\%$ and $20\%$ , respectively. It indicates that the syntactic structure and relations play more significant roles in Cops-Ref regarding performance improvement. + +Transfer Performance. We directly apply a MattNet [44] model trained on refCOCO to our Cops-Ref and it only achieves an accuracy of 42.4 and 8.7 under the WithoutDist and Full cases, respectively. It shows our dataset and task are more complex and challenging. In contrast, a MattNet trained on Cops-Ref can achieve an accuracy of 56.5 and 64.5 on the testA and testB splits of refCOCO, which are about $65.7\%$ and $76.4\%$ of the performance of the original model trained on refCOCO, respectively. This demonstrates the realism of our synthetic expressions and that the knowledge learnt from Cops-Ref can be directly transferred to real datasets like refCOCO, while the reasoning ability gained from refCOCO cannot solve our Cops-Ref task. + +# 5.3. Overall Evaluation + +We evaluate the proposed Cops-Ref task with three baselines, namely GroundeR [35], MattNet [44] and CM-Att-Erase [27]. GroundeR is a simple CNN-RNN baseline. MattNet is one of the most popular REF models, and CM-Att-Erase was the best state-of-art in REF at the time of this submission. We densely ground the expressions on every image in the similar image set and choose the region with the highest score as the grounding result. + +Performance of the REF Models. Table 3 reports the accuracy of all the baselines and the proposed MattNet-Mine. We have the following observations. (1) The performance gradually increases from GroundeR [35] to MattNet [44] and from MattNet [44] to CM-Att-Erase [27]. This is consistent with their performance on the refCOCO, refCOCO+ and refCOCOg [17, 29]. (2) The performance of these REF models decreases dramatically when distracting images containing the objects of the same object category are added, especially under the Full case. Among the 4 types of distractors, DiffCat affects the performance least while Cat&Attr affects most. This implies that existing + +![](images/bb5bede9d9449f0d6c8a0d20dc8701e46f659b63a3dd58e4ef4df5871e00b33f.jpg) + +![](images/ca1cfb84f0216cd6c9a66920d599cdd7a6189ad24b94a26ff987ced3b222ac7c.jpg) +Figure 3: Accuracy of expressions of different logic form. +Figure 4: Accuracy of expressions of different lengths. + +REF models strongly rely on object and attribute recognition to localise the target region. (3) Comparing with the original MattNet [44], our MattNet-Mine show improved performance under all cases, especially for the cases that contain fine-grained similar distractors. This demonstrates the effectiveness of the proposed hard mining strategy. + +Performance of "Retrieve" + "REF" Strategy. We also evaluate another strategy to solve the problem in which we first use a text-based image retrieval model to select one image with the highest matching score and then ground the query expression in the selected image. We use SCAN (t2i) [22] as the retrieval model for its excellent performance, and we use MattNet to ground the expression in the returned image. We achieve an accuracy of 18.8 under the Full case. Compared with the other models in table 3, the "Retrieve" + "REF" strategy performs worse than densely referring the query expression in every image. We believe this may be caused by the fact that densely referring an expression in every image provides more fine-grained regional level matching than the retrieval model. + +Performance of Different Logic Forms. We show the performance of expressions of each logic form in Fig. 3. We can see that while expressions of chain, and, or and same forms have similar accuracy, order and not forms have the best and second best accuracy, respectively. We believe the reasons are 1) the reasoning logic trees of order and not forms are simpler than other forms like chain, and and or (see table 1), and 2) order form has provided specific relative spatial location between the target object and the related objects of the same category within the same image. + +Performance of Different Lengths of Expressions. We divide expressions into 3 kinds based on the number of the words in the expressions, namely short (less than 10 words), middle (10-20 words) and long (more than 20 words), and test them separately. As shown in Fig. 4, we find that expressions in the middle group have the best accuracy. We suspect that short expressions provide limited textual information for distinguishing distracting regions while long expressions usually contain complex logic or semantics that requires stronger reasoning ability. + +
MethodFullDiffCatCatCat&attrCat&cat
MattNet26.369.145.242.545.8
Random27.671.647.443.547.3
Class-aware32.270.353.246.151.4
Sentence-sim32.370.453.646.451.2
Module-specific33.870.554.446.852.0
+ +Table 4: Ablation study of different hard mining strategies. + +# 5.4. Ablation Study on Distractor Mining + +We conduct an ablation study to investigate different hard negative mining strategies for the Cops-Ref task. Specifically, we have the following solutions by replacing the $q_{n}^{md}$ and $r_{n}^{md}$ in Eq. 5 with features from different regions and expressions. "Random" means using regions and expressions that are randomly-selected from the whole dataset regardless the object category. "Class-aware" means using random-selected regions and expressions that has the same object category as the target region. "Sentence-sim" means a region-expression pair that is sampled based on the similarity of global expression features. We define the global expression features as the average embedding of all the words in the expression. "Module-Specific" means the proposed modular specific hard mining strategy based on the similarity of the modular expression features. + +Table 4 shows the ablation study results. Compared with the original MattNet, "Random" can provide an improvement under all cases. However, its improvement for the Full case is minor comparing with other mining strategy since it does not consider the similar distractors. "Class-aware" boosts the performance under the case where similar distractors are added, indicating the value of the distracting regions and expressions of the same category. "Sentence-sim" achieves only a comparable performance with "Class-aware", showing its inefficiency for hard negative mining. "Module-specific" achieves the best performance when similar distractors are added, showing its effectiveness to mine negative examples and distinguish similar distractors. + +# 6. Conclusion + +Expressions in existing referring expression datasets normally describe some simple distinguishing properties of the object which cannot fully evaluate a model's visual reasoning ability. In this paper, we proposed a new challenging dataset, named Cops-Ref, for referring expression comprehension. The new dataset covers various reasoning logics that can be flexibly combined with rich visual properties. Additionally, to better exploit the full reasoning chain embodied in the expression, we proposed a new test setting by adding some additional distracting images. This newly proposed dataset suffers less bias and we found existing state-of-the-art models fail to show promising results. We then proposed a modular based hard mining strategy that achieves the best performance but is still far from perfect. We wish this Cops-Ref dataset and task can attract more research attention and become a new benchmark in this area. + +# References + +[1] Kobus Barnard, Pinar Duygulu, David Forsyth, Nando de Freitas, David M Blei, and Michael I Jordan. Matching words and pictures. Journal of machine learning research, 2003. 3 +[2] Zhenfang Chen, Lin Ma, Wenhan Luo, Peng Tang, and Kwan-Yee K Wong. Look closer to ground better: Weakly-supervised temporal grounding of sentence in video. arXiv preprint arXiv:2001.09308, 2020. 3 +[3] Zhenfang Chen, Lin Ma, Wenhan Luo, and Kwan-Yee K Wong. Weakly-supervised spatio-temporally grounding natural sentence in video. In Proc. 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, July 2019. 2 +[4] Volkan Cirik, Louis-Philippe Morency, and Taylor Berg-Kirkpatrick. Visual referring expression recognition: What do systems actually learn? In *NAACL*, 2018. 2, 7 +[5] Abhishek Das, Satwik Kottur, Khushi Gupta, Avi Singh, Deshraj Yadav, José M.F. Moura, Devi Parikh, and Dhruv Batra. Visual Dialog. In CVPR, 2017. 1 +[6] Chaorui Deng, Qi Wu, Qingyao Wu, Fuyuan Hu, Fan Lyu, and Mingkui Tan. Visual grounding via accumulated attention. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7746-7755, 2018. 2 +[7] Pelin Dogan, Leonid Sigal, and Markus Gross. Neural sequential phrase grounding (seqground). In CVPR, 2019. 2 +[8] Chuang Gan, Yandong Li, Haoxiang Li, Chen Sun, and Boqing Gong. Vqs: Linking segmentations to questions and answers for supervised attention in vqa and question-focused semantic segmentation. In ICCV, 2017. 1 +[9] Yunchao Gong, Qifa Ke, Michael Isard, and Svetlana Lazebnik. A multi-view embedding space for modeling internet images, tags, and their semantics. International journal of computer vision, 2014. 3 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 6 +[11] Hexiang Hu, Ishan Misra, and Laurens van der Maaten. Binary Image Selection (BISON): Interpretable Evaluation of Visual Grounding. arXiv preprint arXiv:1901.06595, 2019. 3 +[12] Ronghang Hu, Marcus Rohrbach, Jacob Andreas, Trevor Darrell, and Kate Saenko. Modeling relationships in referential expressions with compositional modular networks. In CVPR, 2017. 2 +[13] Ronghang Hu, Huazhe Xu, Marcus Rohrbach, Jiashi Feng, Kate Saenko, and Trevor Darrell. Natural language object retrieval. In CVPR, 2016. 2 +[14] Drew A Hudson and Christopher D Manning. Gqa: a new dataset for compositional question answering over real-world images. In CVPR, 2019. 1, 2, 4 +[15] Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. In CVPR, 2017. 2 +[16] Andrej Karpathy and Li Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In CVPR, 2015. 2 + +[17] Sahar Kazemzadeh, Vicente Ordonez, Mark Matten, and Tamara Berg. Referitgame: Referring to objects in photographs of natural scenes. In EMNLP, 2014. 1, 2, 3, 5, 7 +[18] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[19] Chen Kong, Dahua Lin, Mohit Bansal, Raquel Urtasun, and Sanja Fidler. What are you talking about? text-to-image coreference. In CVPR, 2014. 2 +[20] Satwik Kottur, José M. F. Moura, Devi Parikh, Dhruv Batra, and Marcus Rohrbach. Visual coreference resolution in visual dialog using neural module networks. In ECCV, 2018. 1 +[21] Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. International Journal of Computer Vision, 2017. 4 +[22] Kuang-Huei Lee, Xi Chen, Gang Hua, Houdong Hu, and Xiaodong He. Stacked cross attention for image-text matching. In ECCV, pages 201-216, 2018. 3, 5, 7, 8 +[23] Kunpeng Li, Yulun Zhang, Kai Li, Yuanyuan Li, and Yun Fu. Visual semantic reasoning for image-text matching. 2019. 3 +[24] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. 3, 6 +[25] Daqing Liu, Hanwang Zhang, Zheng-Jun Zha, and Wu Feng. Learning to assemble neural module tree networks for visual grounding. In The IEEE International Conference on Computer Vision (ICCV), 2019. 3 +[26] Runtao Liu, Chenxi Liu, Yutong Bai, and Alan L Yuille. Clevr-ref+: Diagnosing visual reasoning with referring expressions. In CVPR, 2019. 2, 5 +[27] Xihui Liu, Zihao Wang, Jing Shao, Xiaogang Wang, and Hongsheng Li. Improving referring expression grounding with cross-modal attention-guided erasing. In CVPR, 2019. 2, 3, 5, 6, 7 +[28] Jiayuan Mao, Chuang Gan, Pushmeet Kohli, Joshua B. Tenenbaum, and Jiajun Wu. The Neuro-Symbolic Concept Learner: Interpreting Scenes, Words, and Sentences From Natural Supervision. In ICLR, 2019. 2 +[29] Junhua Mao, Jonathan Huang, Alexander Toshev, Oana Camburu, Alan L Yuille, and Kevin Murphy. Generation and comprehension of unambiguous object descriptions. In CVPR, 2016. 1, 2, 3, 5, 7 +[30] Cynthia Matuszek, Nicholas FitzGerald, Luke Zettlemoyer, Liefeng Bo, and Dieter Fox. A joint model of language and perception for grounded attribute learning. In ICML, 2012. 2 +[31] George A. Miller. Wordnet: A lexical database for english. COMMUNICATIONS OF THE ACM, 38:39-41, 1995. 4 +[32] Varun K Nagaraja, Vlad I Morariu, and Larry S Davis. Modeling context between objects for referring expression understanding. In ECCV, 2016. 2 + +[33] Bryan A Plummer, Liwei Wang, Chris M Cervantes, Juan C Caicedo, Julia Hockenmaier, and Svetlana Lazebnik. Flickr30k entities: Collecting region-to-phrase correspondences for richer image-to-sentence models. In ICCV, 2015. 2, 3 +[34] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NIPS, 2015. 6 +[35] Anna Rohrbach, Marcus Rohrbach, Ronghang Hu, Trevor Darrell, and Bernt Schiele. Grounding of textual phrases in images by reconstruction. In ECCV, 2016. 2, 5, 7 +[36] Mohammad Amin Sadeghi and Ali Farhadi. Recognition using visual phrases. In CVPR, 2011. 2 +[37] Richard Socher, Andrej Karpathy, Quoc V Le, Christopher D Manning, and Andrew Y Ng. Grounded compositional semantics for finding and describing images with sentences. Transactions of the Association for Computational Linguistics, 2014. 3 +[38] Mingzhe Wang, Mahmoud Azab, Noriyuki Kojima, Rada Mihalcea, and Jia Deng. Structured matching for phrase localization. In ECCV, 2016. 3 +[39] Peng Wang, Qi Wu, Jiewei Cao, Chunhua Shen, Lianli Gao, and Anton van den Hengel. Neighbourhood watch: Referring expression comprehension via language-guided graph attention networks. In CVPR, 2019. 3, 6 +[40] Sibei Yang, Guanbin Li, and Yizhou Yu. Cross-modal relationship inference for grounding referring expressions. In CVPR, 2019. 2 +[41] Zhengyuan Yang, Boqing Gong, Liwei Wang, Wenbing Huang, Dong Yu, and Jiebo Luo. A fast and accurate one-stage approach to visual grounding. In ICCV, 2019. 2 +[42] Linwei Ye, Mrigank Rochan, Zhi Liu, and Yang Wang. Cross-modal self-attention network for referring image segmentation. In CVPR, June 2019. 2 +[43] Kexin Yi, Jiajun Wu, Chuang Gan, Antonio Torralba, Pushmeet Kohli, and Joshua B Tenenbaum. Neural-Symbolic VQA: Disentangling Reasoning from Vision and Language Understanding. In NIPS, 2018. 2 +[44] Licheng Yu, Zhe Lin, Xiaohui Shen, Jimei Yang, Xin Lu, Mohit Bansal, and Tamara L Berg. Mattnet: Modular attention network for referring expression comprehension. In CVPR, 2018. 2, 3, 5, 6, 7, 8 +[45] Licheng Yu, Patrick Poirson, Shan Yang, Alexander C Berg, and Tamara L Berg. Modeling context in referring expressions. In ECCV, 2016. 1, 2, 3, 5 +[46] Hanwang Zhang, Yulei Niu, and Shih-Fu Chang. Grounding referring expressions in images by variational context. In CVPR, 2018. 2 \ No newline at end of file diff --git a/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/images.zip b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..50f3f3b9bc277b077d03dd176332d09d0b5dda4d --- /dev/null +++ b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad0285efaeffbe5bf21f02be62c20f3cdc9d1f22bb4dc8a91dbe9e651c57a26a +size 406565 diff --git a/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/layout.json b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..44ffd4c75f3f45a4f3d06362402d6c7b0ddf6970 --- /dev/null +++ b/copsrefanewdatasetandtaskoncompositionalreferringexpressioncomprehension/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a6b89d4e3180c8aa09c08e766fc95317e260a9ca819404e33730c7c7ef31dcb +size 370428 diff --git a/copyandpasteganfacehallucinationfromshadedthumbnails/48ef4047-2e69-4413-8ac9-8e0d1186797a_content_list.json b/copyandpasteganfacehallucinationfromshadedthumbnails/48ef4047-2e69-4413-8ac9-8e0d1186797a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7f55d4d5f2c38487338e9929ed2b49b3d33274c7 --- /dev/null +++ b/copyandpasteganfacehallucinationfromshadedthumbnails/48ef4047-2e69-4413-8ac9-8e0d1186797a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f78d29c49013d3d9dc16fb9ddf19bee8f0914f992c163d01ff1c7257ed323e74 +size 78254 diff --git a/copyandpasteganfacehallucinationfromshadedthumbnails/48ef4047-2e69-4413-8ac9-8e0d1186797a_model.json b/copyandpasteganfacehallucinationfromshadedthumbnails/48ef4047-2e69-4413-8ac9-8e0d1186797a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e8234c022df0b5d883848c1a8e778518f6d388c0 --- /dev/null +++ b/copyandpasteganfacehallucinationfromshadedthumbnails/48ef4047-2e69-4413-8ac9-8e0d1186797a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1240b9c55d6c60fbd63bd0122ce672f511a8ff5244032cc93ba13a54e9b4125d +size 100373 diff --git a/copyandpasteganfacehallucinationfromshadedthumbnails/48ef4047-2e69-4413-8ac9-8e0d1186797a_origin.pdf b/copyandpasteganfacehallucinationfromshadedthumbnails/48ef4047-2e69-4413-8ac9-8e0d1186797a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d37650bb3a5e1045123e2cae7e27a1b6364ab8a4 --- /dev/null +++ b/copyandpasteganfacehallucinationfromshadedthumbnails/48ef4047-2e69-4413-8ac9-8e0d1186797a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a08dc8585ddc4b9b13a31a5ecfde3a732189004204f98e1da7a65aec23198fbc +size 715927 diff --git a/copyandpasteganfacehallucinationfromshadedthumbnails/full.md b/copyandpasteganfacehallucinationfromshadedthumbnails/full.md new file mode 100644 index 0000000000000000000000000000000000000000..951932e849fbcf0aec7e43c5b5aa61f20c2afc23 --- /dev/null +++ b/copyandpasteganfacehallucinationfromshadedthumbnails/full.md @@ -0,0 +1,402 @@ +# Copy and Paste GAN: Face Hallucination from Shaded Thumbsails + +Yang Zhang $^{1,2,3}$ , Ivor W. Tsang $^{3}$ , Yawei Luo $^{4}$ , Changhui Hu $^{1,2,5}$ , Xiaobo Lu $^{1,2*}$ , Xin Yu $^{3,6}$ + +$^{1}$ School of Automation, Southeast University, China + +$^{2}$ Key Laboratory of Measurement and Control of Complex Systems of Engineering, Ministry of Education, Southeast University, China + +3 Centre for Artificial Intelligence, University of Technology Sydney, Australia + +$^{4}$ School of Computer Science and Technology, Huazhong University of Science and Technology, China + +$^{5}$ School of Automation, Nanjing University of Posts and Telecommunications, China + +$^{6}$ Australian Centre for Robotic Vision, Australian National University, Australia + +# Abstract + +Existing face hallucination methods based on convolutional neural networks (CNN) have achieved impressive performance on low-resolution (LR) faces in a normal illumination condition. However, their performance degrades dramatically when LR faces are captured in low or non-uniform illumination conditions. This paper proposes a Copy and Paste Generative Adversarial Network (CPGAN) to recover authentic high-resolution (HR) face images while compensating for low and nonuniform illumination. To this end, we develop two key components in our CPGAN: internal and external Copy and Paste nets (CPnets). Specifically, our internal CPnet exploits facial information residing in the input image to enhance facial details; while our external CPnet leverages an external HR face for illumination compensation. A new illumination compensation loss is thus developed to capture illumination from the external guided face image effectively. Furthermore, our method offsets illumination and upsamples facial details alternately in a coarse-to-fine fashion, thus alleviating the correspondence ambiguity between LR inputs and external HR inputs. Extensive experiments demonstrate that our method manifests authentic HR face images in a uniform illumination condition and outperforms state-of-the-art methods qualitatively and quantitatively. + +# 1. Introduction + +Human faces are important information resources since they carry information on identity and emotion + +![](images/92b51d85ffda7be647e0cb9277ce30c4ac66fa4fcc2e368e5a18c3762c79e3ea.jpg) +Figure 1: Motivation of CPGAN. Internal and external CPnets are introduced to mimic the Clone Stamp Tool. Internal CPnet copies good details to paste them on shadow regions. External CPnet further retouches the face using an external guided face from the UI-HR face dataset during the upsampling process to compensate for uneven illumination in the final HR face. + +changes in daily activities. To acquire such information, high-resolution and high-quality face images are often desirable. Due to spacing distance and lighting conditions between cameras and humans, captured faces may be tiny or in poor illumination conditions, thus hindering human perception and computer analysis (Fig.2(a)). + +Recently, many face hallucination techniques [32, 35, 41, 4, 5, 30, 37] have been proposed to visualize tiny face images by assuming uniform illuminations on face thumbnail databases, as seen in Fig.2(b) and Fig.2(c). However, facial details in shaded thumbnails become obscure in case of low/non-uniform illumination conditions, which leads to failures in hallucination due to inconsistent intensities. For instance, as Fig.2(d) shows, the hallucinated result generated by the state-of-the-art face hallucination method [33] is semantically and per + +ceptually inconsistent with the ground truth (GT), yielding blurred facial details and non-smooth appearance. + +Meanwhile, various methods are proposed to tackle illumination changes on human faces. The state-of-the-art methods of face inverse lighting [6, 39] usually fit the face region to a 3D Morphable Model [29] by facial landmarks and then render illumination. However, these methods are unsuitable to face thumbnails, because facial landmark cannot be detected accurately in such low-resolution images and erroneous face alignment leads to artifacts in the illumination normalized results. This will increase difficulty to learn the mappings between LR and HR faces. Image-to-image translation methods, such as [12, 40, 22], can be an alternative to transfer illumination styles between faces without detecting facial landmarks. Due to the variety of illumination conditions, the translation method [40] fails to learn a consistent mapping for face illumination compensation, thus distorting facial structure in the output (Fig.2(e)). + +As seen in Fig.2(f) and Fig.2(g), applying either face hallucination followed by illumination normalization or illumination normalization followed by hallucination produces results with severe artifacts. To tackle this problem, our work aims at hallucinating LR inputs under non-uniform low illumination (NI-LR face) while achieving HR in uniform illumination (UI-HR face) in a unified framework. + +Towards this goal, we propose a Copy and Paste Generative Adversarial Network (CPGAN). CPGAN is designed to explore internal and external image information to normalize illumination, and to enhance facial details of input NI-LR faces. We first design an internal Copy and Paste net (internal CPnet) to approximately offset non-uniform illumination features and enhance facial details by searching for similar facial patterns within input LR faces for subsequent upsampling procedure. Our external CPnet is developed to copy illumination from a HR face template, then pass the illumination information to the input. In this way, our network learns how to compensate for illumination of inputs. To reduce the illumination transferring difficulty, we alternately upsample and transfer the illumination in a coarse-to-fine manner. Moreover, Spatial Transformer Network (STN) [13] is adopted to align input NI-LR faces, promoting more effectively feature refinement as well as facilitating illumination compensation. Furthermore, an illumination compensation loss is proposed to capture the normal illumination pattern and transfer the normal illumination to the inputs. As shown in Fig. 2(h), the upsampled HR face is not only realistic but also resembles the GT with normal illumination. + +The contributions of our work are listed as follows: + +- We present the first framework, dubbed CPGAN, to address face hallucination and illumination compensation together, in an end-to-end manner, which is optimized by the conventional face hallucination loss and a new illumination compensation loss. + +- We introduce an internal CPnet to enhance the facial details and normalize illumination coarsely, aiding subsequent upsampling and illumination compensation. + +- We present an external CPnet for illumination compensation by learning illumination from an external HR face. In this fashion, we are able to learn illumination explicitly rather than requiring a dataset with the same illumination condition. + +- A novel data augmentation method, Random Adaptive Instance Normalization (RaIN), is proposed to generate sufficient NI-LR and UI-HR face image pairs. Experiments show that our method achieves photo-realistic UI-HR face images. + +# 2. Related work + +# 2.1. Face Hallucination + +Face hallucination methods aim at establishing the intensity relationships between input LR and output HR face images. The prior works can be categorized into three mainstreams: holistic-based techniques, part-based methods, and deep learning-based models. + +The basic principle of holistic-based techniques is to represent faces by parameterized models. The representative models conduct face hallucination by adopting linear mapping [27], global appearance [17], subspace learning techniques [15]. Then, part-based methods are proposed to extract facial regions and then upsample them. SIFT flow [26] and facial landmarks [28] are introduced to locate facial components of input LR images. + +Deep learning is an enabling technique for large datasets, and has been applied to face hallucination successfully. Huang et al. [10] introduce wavelet coefficients prediction into deep convolutional networks to super-resolve LR inputs with multiple upscaling factors. Zhu et al. [41] develop Cascade bi-network to hallucinate low-frequency and high-frequency parts of input LR faces, respectively. Several recent methods explore facial prior knowledge, such as facial attributes [31], parsing maps [5] and component heatmaps [30], for advanced hallucination results. + +However, existing approaches mostly focus on hallucinating tiny face images with normal illumination. + +![](images/6b1e38dc84a83c3903b300607ae9496f153152aa012ebb300217dfd5648f033e.jpg) +(a) Input + +![](images/677119e95ce01432e377929dce28a324f9349ccd2ce7a29c587d5a836172e69f.jpg) +(b) Guided HR + +![](images/25732e082a74dc1295964742089ede9c66518ac99bf83f361cc1bdcbc1e1d952.jpg) +(c) GT +Figure 2: Face hallucination and illumination normalization results of state-of-the-art methods and our proposed CPGAN. (a) Input NI-LR image $(16\times 16$ pixels); (b) Guided UI-HR image $(128\times 128$ pixels). (c) UI-HR image $(128\times 128$ pixels, not available in training). (d) Result of a popular face hallucination method, TDAE [33]; (e) Illumination normalization result on (a) by applying [40] after bicubic upsampling; (f) Face hallucination result on (e) by [34]; (g) Face hallucination and illumination normalization result on (a) by [34] and [23]; (h) Result of CPGAN $(128\times 128$ pixels). Above all, our CPGAN achieves a photo-realistic visual effect when producing authentic UI-HR face images. + +![](images/2c0181d0d4775ba33fd68e3d5f6afcf47cbf7b6060fdaa6251c73e375d90de4b.jpg) +(d) [33] + +![](images/178829757b4a7913b719f7a1942b22638589567c5d140fd9c76b1e630de30272.jpg) +(e) [40] + +![](images/a1e52d829ad4be75e254197f596db62fe0c1ce95646eabc5d8d1831686afd1c8.jpg) +(f) [40] + [34] + +![](images/2781f719473c197bc43f9c8303fec693e618867cd31e1ddc37470ff08051a986.jpg) +(g) [34] + [23] + +![](images/48f1de249a3203b065fdb1ef2df59c0a7679831cc0e54c7ae00118d93098acc9.jpg) +(h) Ours + +Thus, in case of non-uniform illuminations, they usually generate serious blurred outputs. + +# 2.2. Illumination Compensation + +Face illumination compensation methods are proposed to compensate for the non-uniform illumination of human faces and reconstruct face images in a normal illumination condition. + +Recent data driven approaches for illumination compensation are based on the illumination cone [2] or the Lambertian Reflectance theory [1]. These approaches learn the disentangled representations of facial appearance and mimic various illumination conditions based on the modeled illumination parameters. For instance, Zhou et al. [39] propose a lighting regression network to simulate various lighting scenes for face images. Shu et al. [24] propose a GAN framework to decompose face images into physical intrinsic components, geometry, albedo, and illumination base. Zhu et al. [40] propose a cycle consistent network to render a content image to an image with different styles. In this way, the illumination condition of the style image can be transferred to the content image. + +However, these methods only compensate for nonuniform illumination without well retaining the accurate facial details, especially when the input face images are impaired or low-resolution. Due to the above limitations, simply cascading face hallucination and illumination compensation methods is incompetent to attain high-quality UI-HR faces. + +# 3. Hallucination with "Copy" and "Paste" + +To reduce the ambiguity of the mapping from NI-LR to UI-HR caused by non-uniform illumination, we present a CPGAN framework that takes a NI-LR face as the input and an external HR face with normal illumination as a guidance to hallucinate a UI-HR one. In CPGAN, we develop Copy and Paste net (CPnet) to flexibly + +"copy" and "paste" the uniform illumination features according to the semantic spatial distribution of the input one, thus compensating for illumination of the input image. A discriminator is adopted to force the generated UI-HR face to lie on the manifold of real face images. The whole pipeline is shown in Fig. 3. + +# 3.1. Overview of CPGAN + +CPGAN is composed of the following components: internal CPnet, external CPnets, spatial transformer networks (STNs) [13], deconvolutional layers, stacked hourglass module [21] and discriminator network. Unlike previous works [5, 30] which only take the LR images as inputs and then super-resolve them with the facial prior knowledge, we incorporate not only input facial information but also an external guided UI-HR face for hallucination. An encoder module is adopted to extract the features of the guided UI-HR image. Note that, our guided face is different from the GT of the NI-LR input. + +As shown in Fig. 3, the input NI-LR image is first passed through the internal CPnet to enhance facial details and normalize illumination coarsely by exploiting the shaded facial information. Then the external CPnet resorts to an external guided UI-HR face for further illumination compensation during the upsampling process. Because input images may undergo misalignment, such as in-plane rotations, translations and scale changes, we employ STNs to compensate for misalignment [37, 36], as shown in the yellow blocks in Fig. 3. Meanwhile, inspired by [3], we adopt the stacked hourglass network [21] to estimate vital facial landmark heatmaps for preserving face structure. + +# 3.1.1 Internal CPnet + +Due to the shading artifacts, the facial details (high-frequency features) in the input NI-LR face image be + +![](images/2092a56727c7b526bb8442d076b7273c7cf5d6eae1fc69ead33cf369b23e7afe.jpg) + +![](images/d3eb97145e7f58383ad4725ee741dc39de53ed84210a0053e98a594a55b76e69.jpg) +(a) Internal CPnet + +![](images/0ebae8745389df8ca63c0bf094c489298dbc4bf3ffea0d0c36da6eb231fdf856.jpg) +(b) Internal Copy module + +come ambiguous. Therefore, we propose an internal CP-net to enhance the high-frequency features and perform a coarse illumination compensation. + +Fig. 4(b) shows the architecture of our internal CPnet, which consists of an input convolution layer, an Internal Copy module, a Paste block as well as a skip connection. Our Internal Copy module adopts the residual block and Channel-Attention (CA) module in [38] to enhance high-frequency features firstly. Then, our Copy block (Fig. 5(b)) is introduced to "copy" the desired internal uniform illumination features for coarsely compensation. Note that, Copy block here treats the output features of CA module as the both input features $(F_{C})$ and guided features $(F_{G})$ in Fig. 5(b). Meanwhile, the skip connection in internal CPnet bypasses the LR input features to the Paste block. In this way, the input NI-LR face is initially refined by the internal CPnet. + +To analyze the role of our proposed Internal Copy module, we can exploit the changes of the input and out- + +![](images/9a2cc0d63260a8f4a602e4b4653c984bb1477383a455f6a945544ee825612e75.jpg) +Figure 3: The pipeline of the proposed CPGAN framework. The upper and bottom symmetrical layers in the purple blocks share the same weights. + +![](images/6933fa4565b76cd383cf788d980854b88a1d524ca29a69127e7fb4cd60ba88ca.jpg) +Figure 4: The architecture of the internal CPnet. Copy block here treats the output features of Channel Attention module as the both input features and guided features. Paste block here represents the additive operation. +(a) External CPnet + +![](images/2824fada2ec3612e4be2946f6b3858544524bc27ac47e5b75049d335c63b6cba.jpg) + +![](images/4bee2fe5a6ad7387f9a5a887496736da89983e6b000e909f6ade343a22eaafdd.jpg) +1x1 Convs + +![](images/99c52b54e3b7332a0d714f2fbf6a0a07b14c05f61b5d5dcad875f26124ef178c.jpg) +Matrix Multiplication + +![](images/7b43c4a253e24c218469b5e0847f9a624f3328f1ad4a27266c3f3772e2dfe764.jpg) +Matrix Reshaping +Figure 5: The architecture of the external CPnet. External Copy module here is composed of one Copy block. Paste block represents the additive operation. + +![](images/ef6b3f10ef4b423cbea8b904808a324ef38a56ecdfde18c6d8fdb272658d3f4f.jpg) +Softmax Operation +(b) Copy block. + +put feature maps. The input feature maps estimate the frequency band of the input NI-LR face, which consists of low-frequency facial components. In this way, they are mainly distributed over the low-frequency band (in blue color). After our Internal Copy module, the output features spread in the direction of high-frequency band (in red color), and literally spans the whole band. + +Thus, we use the name "Internal Copy module" because its functionality resembles an operation that "copies" the high-frequency features to the low-frequency parts. Above all, the internal CPnet achieves effective feature enhancement, which benefits subse + +quent facial detail upsampling and illumination compensation processes. + +# 3.1.2 External CPnet + +CPGAN adopts multiple external CPnets and deconvolutional layers to offset the non-uniform illumination and upsample facial details alternately, in a coarse-to-fine fashion. This distinctive design alleviates the ambiguity of correspondences between NI-LR inputs and external UI-HR ones. The network of the external CPnet is shown in Fig. 5(a), and its core components are the Copy and Paste blocks. + +Fig. 5(b) performs the "copy" procedure of the Copy block. The guided features $F_{G}$ and input features $F_{C}$ are extracted from the external guided UI-HR image and the input NI-LR image, respectively. First, the guided features $F_{G}$ and input features $F_{C}$ are normalized and transformed into two feature space $\theta$ and $\psi$ to calculate their similarity. Then, the "copied" features $F_{CG}$ can be formulated as a weighted sum of the guided features $F_{G}$ that are similar to the corresponding positions on the input features $F_{C}$ . For the $i$ th output response: + +$$ +F _ {C G} ^ {i} = \frac {1}{M (F)} \sum_ {\forall j} \left\{\exp \left(W _ {\theta} ^ {T} \left(\bar {F _ {C} ^ {i}}\right) ^ {T} \bar {F _ {G} ^ {j}} W _ {\psi}\right) F _ {G} ^ {j} W _ {\zeta} \right\} \tag {1} +$$ + +where $M(F) = \sum_{\forall j} \exp \left( W_{\theta}^{T} \left( \overline{F_{C}^{i}} \right)^{T} \overline{F_{G}^{j}} W_{\psi} \right)$ is the sum of all output responses over all positions. $\overline{F}$ is a transform on $F$ based on the mean-variance channel-wise normalization. Here, the embedding transformations $W_{\theta}, W_{\psi}$ and $W_{\zeta}$ are learnt during the training process. + +As a result, the Copy block can flexibly integrate the illumination pattern of the guided features into the input features. Based on the Copy and Paste blocks, our proposed external CPnet learns the illumination pattern from the external UI-HR face explicitly. + +# 3.2. Loss Function + +To train our CPGAN framework, we propose an illumination compensation loss $(L_{ic})$ together with an intensity similarity loss $(L_{mse})$ , an identity similarity loss $(L_{id})$ [22], a structure similarity loss $(L_h)$ [3] and an adversarial loss $(L_{adv})$ [8]. We will detail the illumination loss shortly. For the rest, please refer to the supplementary material. + +The overall loss function $L_{G}$ is a weighted summation of the above terms. + +$$ +L _ {G} = \alpha L _ {m s e} + \beta L _ {i d} + \gamma L _ {h} + \chi L _ {i c} + \kappa L _ {a d v} \tag {2} +$$ + +Illumination Compensation Loss: CPGAN not only recovers UI-HR face images but also compensates for the non-uniform illumination. Inspired by the style loss + +![](images/cfbd1d0f14f3130ca6443173cd49780aab4e1dfa3f554e415024e734c6ee99cc.jpg) +Figure 6: The training process of RaIN model. + +in AdaIN [11], we propose the illumination compensation loss $L_{ic}$ . The basic idea is to constrain the illumination characteristics of the reconstructed UI-HR face is close to the guided UI-HR one in the latent subspace. + +$$ +\begin{array}{l} L _ {i c} = \mathbb {E} _ {\left(\hat {h} _ {i}, g _ {i}\right) \sim p (\hat {h}, g)} \left\{\sum_ {j = 1} ^ {L} \left\| \mu \left(\varphi_ {j} (\hat {h} _ {i})\right) - \mu \left(\varphi_ {j} (g _ {i})\right) \right\| _ {2} \right. \\ + \sum_ {j = 1} ^ {L} \left\| \sigma \left(\varphi_ {j} \left(\hat {h} _ {i}\right)\right) - \sigma \left(\varphi_ {j} \left(g _ {i}\right)\right) \right\| _ {2} \} \tag {3} \\ \end{array} +$$ + +where $g_{i}$ represents the guided UI-HR image, $\hat{h}_i$ represents the generated UI-HR image, $p(\hat{h},g)$ represents their joint distribution. Each $\varphi_j(\cdot)$ denotes the output of relu1-1, relu2-1, relu3-1, relu4-1 layer in a pre-trained VGG-19 model [25], respectively. Here, $\mu$ and $\sigma$ are the mean and variance for each feature channel. + +# 4. Data augmentation + +Training a deep neural network requires a lot of samples to prevent overfitting. Since none or limited NI/UI face pairs are available in public face datasets [9, 18], we propose a tailor-made Random Adaptive Instance Normalization (RaIN) model to achieve arbitrary illumination style transfer in real-time, generating sufficient samples for data augmentation (Fig. 6). + +RaIN adopts the encoder-decoder architecture, in which the encoder is fixed to the first few layers (up to relu4-1) of a pre-trained VGG-19 [25]. The Adaptive Instance Normalization (AdaIN) [11] layer is embedded to align the feature statistics of the UI face image with those of the NI face image. Specially, we embed Variational Auto-Encoder (VAE) [14] before the AdaIN layer. In this way, we can efficiently produce an unlimited plausible hypotheses for the feature statistics of the NI face image (limited NI face images are provided in public datasets). As a result, sufficient face samples with arbitrary illumination conditions are generated. + +Fig. 6 shows the training process of RaIN model. First, given an input content image $I_{c}$ (UI face) and a + +![](images/361c5bc7b1c30e453a00763a0e49fad1f733dcd6d6416baa3b44f2e8fd43bd11.jpg) +Figure 7: The generating stage of the RaIN model. A random noise in normal distribution can generate a new style sample. + +style image $I_{s}$ (NI face), the VAE in RaIN encodes the distributions of feature statistics (mean $(\mu)$ and variance $(\sigma)$ ) of the encoded style features $f_{s}$ . In this way, a low-dimensional latent space encodes all possible variants for style feature statistics. Then, based on the intermediate AdaIN layer, the feature statistics $(\mu$ and $\sigma$ ) of the $f_{c}$ are aligned with a randomly chosen style feature statistics, forming the transferred feature $t$ via + +$$ +t = \operatorname {A d a I N} \left(I _ {c}, I _ {s}\right) = \widetilde {\sigma \left(f _ {s}\right)} \left(\frac {f _ {c} - \mu \left(f _ {c}\right)}{\sigma \left(f _ {c}\right)}\right) + \widetilde {\mu \left(f _ {s}\right)} \tag {4} +$$ + +where $\mu$ and $\sigma$ are computed across each spatial dimension independently for each channel and each sample. + +Then, a randomly initialized decoder $g$ is trained to map $t$ back to the image space, generating the stylized image $I_{cs}$ : + +$$ +I _ {c s} = g [ t ] \tag {5} +$$ + +At training stage, RaIN is trained based on the setting of [11, 20, 19], followed by a fine-tuning procedure on the face dataset to encode the photo-realistic facial details. To generate the stylized image with a different illumination condition, we can just feed the content image along with a random noise, as shown in Fig. 7. + +# 5. Experiments + +In this section, we provide both qualitative and quantitative evaluations on the proposed framework. We conduct the comparisons in the following three scenarios: + +- FH: Face hallucination methods (SRGAN [16], TDAE [33], FHC [30]); +- IN+FH: Illumination compensation technique (CycleGAN [40]) + Face hallucination methods (SRGAN [16], TDAE [33], FHC [30]) (use bicubic interpolation procedure to adjust input size); +- FH+IN: Face hallucination methods (SRGAN [16], TDAE [33], FHC [30]) + Illumination compensation technique (CycleGAN [40]). + +For a fair comparison, we retrain all these methods using our training datasets. + +# 5.1. Datasets + +CPGAN is trained and tested on the Multi-PIE dataset [9] (indoor) and the CelebFaces Attributes dataset (CelebA) [18] (in the wild). + +The Multi-PIE dataset [9] is a large face dataset with $750\mathrm{K}+$ images for 337 subjects under various poses, illumination and expression conditions. We choose the NI/UI face pairs of the 249 identities under 10 illumination conditions in Session 1 among Multi-PIE dataset, i.e., $249\times 10 = 2.49\mathrm{K}$ face pairs in total. To enrich the limited illumination conditions, RaIN is adopted to perform data augmentation 10 times on the training set. + +Note that CelebA [18] dataset only provides faces in the wild without NI/UI face pairs. For the training purpose, we opt to generate synthesized NI faces from the UI face images. Similar to [7], Adobe Photoshop Lightroom is adopted to render various illumination conditions. We randomly select 18K NI faces from CelebA dataset to perform rendering. Then, 18K NI/UI face pairs are generated. + +For the GT images, we crop the aligned UI-HR faces and then resize them to $128 \times 128$ pixels. For the NI-LR faces, we resize the UI-HR face images to $128 \times 128$ pixels and then apply a sequence of manual transformations, including rotations, translations, scaling and downsampling processes to obtain images of $16 \times 16$ pixels. We choose 80 percent of the face pairs for training and 20 percent of the face pairs for testing. Specially, during the training process of CPGAN, we randomly select UI-HR images in the training set to serve as the external guided UI-HR images. + +# 5.2. Qualitative Comparison with the SoA + +A qualitative comparison with the benchmark methods is presented in Fig.8, which justifies the superior performance of CPGAN over the competing methods. Obviously, the image obtained by CPGAN is more authentic, identity-preserving, and having richer facial details. + +As illustrated in Fig.8(b), the combination of bicubic interpolation and CycleGAN cannot produce authentic face images. Due to the incapability of bicubic interpolation to generate necessary high-frequency facial details and the lack of GT, CycleGAN achieves image-to-image translation with deformed face shapes. + +SRGAN [16] provides an upscaling factor of $8 \times$ , but it is only trained on general patches. Thus, we retrain SRGAN on face images as well. As shown in Fig.8(c), the results of SRGAN are still blurred. + +![](images/b88bcfe40157e24c1a3f6462c3af42c4a0e1297aca74376c96f421810b6c3fc0.jpg) + +![](images/63958f0e209ae777716d334f31b150dda0b2aa9356c8b8b322b31b4d1cff4227.jpg) + +![](images/a9cf0c1520ab613ca8e1c3507aa4af774f52fbde4f7a269c849c12d6db83b661.jpg) + +![](images/e89d455d24bbed33fc9213e50b34c2ed72ffbe2bf559201ca59e18153c6e720e.jpg) + +![](images/0aa7454b9d77fae20db85799d700446bec69faa4478f7ac3ab3380ae1e806f6a.jpg) + +![](images/21b2cc1b932a8c24a56cd0ec15f0ba0eb6d35b3b377feec17aef56476082e935.jpg) +(a) +(b) +(c) +(d) +(e) +(f) +(g) +(h) +(1) +Figure 8: Comparison with state-of-the-art methods. Columns: (a) Unaligned NI-LR inputs. (b) Bicubic interpolation + CycleGAN [40]. (c) SRGAN [16]. (d) TDAE [33]. (e) FHC [30]. (f) CycleGAN [40] + SRGAN [16]. (g) TDAE [33] + CycleGAN [40]. (h) Ours. (i) GT. The first three columns: testing samples from Multi-PIE dataset (indoor). The last three columns: testing samples from CelebA dataset (in-the-wild). + +Table 1: Average PSNR [dB] and SSIM values of compared methods on the testing datasets. + +
MethodMulti-PIECelebAMulti-PIECelebAMulti-PIECelebA
FHIN+FHFH+IN
PSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIMPSNRSSIM
Bicubic12.8380.38512.790.48013.9600.38613.0180.49413.3150.39912.9450.352
SRGAN16.7690.39617.9510.53614.2520.40816.5060.48815.0440.43215.3150.398
TDAE19.3420.41119.8540.53015.4490.44518.0310.54015.3190.42715.7270.403
FHC20.6800.46721.1300.55217.5540.51219.5080.49918.2630.54516.5270.426
CPGAN24.6390.77823.9720.72324.6390.77823.9720.72324.6390.77823.9720.723
+ +TDAE [33] super-resolves very low resolution and unaligned face images. It employs deconvolutional layers to upsample LR faces and a discriminative network to promote the generation of sharper results. However, it does not take illumination into account, thus, the final outputs suffer from severe artifacts (Fig.8(d)). + +Yu and Porikli [30] exploit the FHC to hallucinate unaligned LR face images. As visualized in Fig.8(e), FHC fails to construct realistic facial details due to inaccurate facial prior prediction caused by shading artifacts. + +We provide results on the IN+FH and FH+IN com + +bination as well for completeness. However, due to the deteriorated super-resolved facial patterns caused by the misleading mappings, their generated results are contaminated with ghosting artifacts (see Figs.8(f) and (g)). + +In contrast, our method is able to reconstruct authentic facial details as shown in Fig.8(h). Albeit there exists non-uniform illumination in the input NI-LR faces, our method still produces visually pleasing UI-HR faces. For instance, we hallucinate the shading artifacts covered facial parts preciously, such as the jaw and mouth, as illustrated in the third and fourth rows in Fig.8(h). + +![](images/b6f259835701c298a1138e5b520db2299716d6497ba89dd9eb72df35203d0a1e.jpg) +(a) + +![](images/a2058bf15ffdbf7709790d6e86aa68701e256d303d029e93b6e009ae641a5603.jpg) +(b) + +![](images/a9dd42715ff2896ceea97dbedb99d4299d8d692fec4fd9d8a43c7814bd0e68dd.jpg) +(c) + +![](images/7416361630cd11d86c8c787f10cce6a21a5576b288cb312d50673d5ce22e73f4.jpg) +(d) + +![](images/08a329e4e356a83c48d7a614a1210a7882c5952517c940c2a60916ed47d80619.jpg) +(e) + +![](images/8a4a439ac13b40c1f775d52d012a51e20b08790015c80c89efea3c9e761e7212.jpg) +(f) + +![](images/d414fb4b222fbf4bdea5a52e869216ce1e5b7e4384e213fbcd3fbc7dcce06414.jpg) +(g) + +![](images/93a8bc06fdccc8b84051d6e1b243af9dd52ed7e2b095497bd60bd5b7edb20110.jpg) +(h) + +![](images/77693acaab046b684cff1ac86a67da97a7a229c1e5b67bbb21a628d1e4ded8c3.jpg) +Figure 9: Ablation Analysis. (a) $16 \times 16$ NI-LR image. (b) $128 \times 128$ GT image. (c) Result without using the internal CPnet, using a simple input convolution layer instead. (d) Result without using the external CPnets, connecting input and output features directly. (e) Result without using the identity similarity loss ( $L_{id}$ ). (f) Result without using structure similarity loss ( $L_h$ ). (g) Result without using adversarial loss ( $L_{adv}$ ). (h) CPGAN result. + +![](images/706246da0bb4ad0111b4a315984cc0d62ec955ba92bdeb58992a48b698698a1d.jpg) +NI-LR +Figure 10: Results on real NI-LR face images. + +![](images/a4f4b73d74eda7721e35fe29556b791575d2f20372772b46bd61a079f6589bd2.jpg) + +![](images/78d211803a7a48a506983be0dc1d1fc2aefe73d9b909fa7a7b6dffadefa0eaa7.jpg) +guided + +![](images/07acc4803b98f444903f21cf31960b4560c94c6755711faf94d74357b1495ac5.jpg) + +![](images/0c9f13fdd0d451817877b4e06677ffc4c15b768ea22ee2819ee771526c2b2104.jpg) +[33] + +![](images/b9e98f0c2129b1b329a30d5f6fdbff360e5d356e780520552d7cf18a9522e509.jpg) + +![](images/f059ce611bc021fc392b62127feacf2f7175c1689c342db7e85ef41ba0cf18e8.jpg) +ours + +# 5.3. Quantitative Comparison with the SoA + +The above qualitative performances are verified by the quantitative evaluations. From Table 1, the proposed CPGAN performs unarguably better than the rest in both indoor and in the wild datasets. For instance, in FH scenario, CPGAN outperforms the second best technique with a large margin of approximate $4\mathrm{dB}$ in PSNR on Multi-PIE dataset. Thanks to the deliberate design of the internal and external CPnets, the realistic facial details are well recovered from the shading artifacts. + +# 5.4. Performance on Real NI-LR faces + +Our method can also effectively hallucinate the real NI-LR faces beyond the synthetically generated face pairs. To demonstrate this, we randomly choose face images with non-uniform illumination from the CelebA dataset. As shown in Fig.10, our CPGAN can hallucinate such randomly chosen shaded thumbnails, demonstrating its robustness in various circumstances. + +# 5.5. Ablation Analysis + +Effectiveness of internal CPnet: As shown in Fig.9(c), it can be seen that the result without internal CPnet suffers from severe distortion and blur artifacts. This is because the distinctive designed internal CPnet enhances the facial details in the input NI-LR image, and it aids subsequent upsampling and illumination compensation. A quantitative study is reported in Table 2. + +Effectiveness of external CPnet: In our method, ex + +Table 2: Ablation study of CPnet + +
w/o CPnetMulti-PIECelebA
PSNRSSIMPSNRSSIM
internal CPnet22.1640.69321.4410.578
external CPnet21.9250.68021.0320.536
CPGAN24.6390.77823.9720.723
+ +ternal CPNet introduces a guided UI-HR image for illumination compensation. We demonstrate the effectiveness in Fig.9(d) and Table 2. Without external CPnet, the reconstructed face deviates from the GT appearance seriously, especially for the input part affected by shading artifacts. It implies that external CPnet learns the illumination pattern from the external UI-HR face explicitly. + +Loss Function Specifications: Fig.9 also illustrates the perceptual performance of different training loss variants. The effect of our illumination compensation loss $(L_{ic})$ is provided in the supplementary material. + +# 6. Conclusion + +This paper presents our CPGAN framework to jointly hallucinate the NI-LR face images and compensate for the non-uniform illumination seamlessly. With the internal and external CPNets, our method enables coarse-to-fine feature refinement based on the semantic spatial distribution of the facial features. In this spirit, we offset shading artifacts and upsample facial details alternately. Meanwhile, the RaIN model mimics sufficient face pairs under diverse illumination conditions to facilitate practical face hallucination. Experimental results validate the effectiveness of CPGAN, which yields photo-realistic visual quality and promising quantitative performance compared with the state-of-the-art. + +Acknowledgment. This work is supported by the National Natural Science Foundation of China (No.61871123 & No.61802203), Key Research and Development Program in Jiangsu Province (No.BE2016739) and NSF (No.BK20180761). This work is partially supported by ARC under Grant (DP180100106 & DP200101328) and ARC of Excellence for Robotic Vision (CE140100016). + +# References + +[1] Ronen Basri and David W Jacobs. Lambertian reflectance and linear subspaces. IEEE transactions on pattern analysis and machine intelligence, 25(2):218-233, 2003. +[2] Peter N Belhumeur and David J Kriegman. What is the set of images of an object under all possible illumination conditions? International Journal of Computer Vision, 28(3):245-260, 1998. +[3] Adrian Bulat and Georgios Tzimiropoulos. Superfan: Integrated facial landmark localization and superresolution 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. +[4] Qingxing Cao, Liang Lin, Yukai Shi, Xiaodan Liang, and Guanbin Li. Attention-aware face hallucination via deep reinforcement learning. In CVPR, pages 690-698, 2017. +[5] Yu Chen, Ying Tai, Xiaoming Liu, Chunhua Shen, and Jian Yang. Fsrnet: End-to-end learning face superresolution with facial priors. In CVPR, pages 2492-2501, 2018. +[6] Miguel Heredia Conde, Davoud Shahlaei, Volker Blanz, and Otmar Loffeld. Efficient and robust inverse lighting of a single face image using compressive sensing. In ICCV Workshops, pages 226-234, 2015. +[7] Xuanyi Dong, Yan Yan, Wanli Ouyang, and Yi Yang. Style aggregated network for facial landmark detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 379-388, 2018. +[8] 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. +[9] Ralph Gross, Iain Matthews, Jeffrey Cohn, Takeo Kanade, and Simon Baker. Multi-pie. Image and Vision Computing, 28(5):807-813, 2010. +[10] Huaibo Huang, Ran He, Zhenan Sun, and Tieniu Tan. Wavelet-srnet: A wavelet-based cnn for multi-scale face super resolution. In ICCV, pages 1689-1697, 2017. +[11] 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. +[12] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, pages 1125-1134, 2017. +[13] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In NIPS, pages 2017-2025, 2015. +[14] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. + +[15] Soheil Kolouri and Gustavo K Rohde. Transport-based single frame super resolution of very low resolution face images. In CVPR, pages 4876-4884, 2015. +[16] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photo-realistic single image super-resolution using a generative adversarial network. In CVPR, pages 4681-4690, 2017. +[17] Ce Liu, Heung-Yeung Shum, and William T Freeman. Face hallucination: Theory and practice. IJCV, 75(1):115-134, 2007. +[18] 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. +[19] Yawei Luo, Ping Liu, Tao Guan, Junqing Yu, and Yi Yang. Significance-aware information bottleneck for domain adaptive semantic segmentation. In ICCV, 2019. +[20] Yawei Luo, Liang Zheng, Tao Guan, Junqing Yu, and Yi Yang. Taking a closer look at domain shift: Category-level adversaries for semantics consistent domain adaptation. In CVPR, 2019. +[21] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In ECCV, pages 483-499, 2016. +[22] Fatemeh Shiri, Xin Yu, Fatih Porikli, Richard Hartley, and Piotr Koniusz. Identity-preserving face recovery from stylized portraits. International Journal of Computer Vision, 127(6-7):863-883, 2019. +[23] Zhixin Shu, Sunil Hadap, Eli Shechtman, Kalyan Sunkavalli, Sylvain Paris, and Dimitris Samaras. Portrait lighting transfer using a mass transport approach. ACM Transactions on Graphics (TOG), 37(1):2, 2018. +[24] Zhixin Shu, Ersin Yumer, Sunil Hadap, Kalyan Sunkavalli, Eli Shechtman, and Dimitris Samaras. Neural face editing with intrinsic image disentangling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5541-5550, 2017. +[25] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +[26] Marshall F Tappen and Ce Liu. A bayesian approach to alignment-based image hallucination. In ECCV, pages 236-249, 2012. +[27] Xiaogang Wang and Xiaou Tang. Hallucinating face by eigentransformation. IEEE Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews), 35(3):425-434, 2005. +[28] Chih-Yuan Yang, Sifei Liu, and Ming-Hsuan Yang. Hallucinating compressed face images. IJCV, 126(6):597-614, 2018. +[29] Fei Yang, Jue Wang, Eli Shechtman, Lubomir Bourdev, and Dimitri Metaxas. Expression flow for 3d-aware face component transfer. ACM transactions on graphics (TOG), 30(4):60, 2011. + +[30] Xin Yu, Basura Fernando, Bernard Ghanem, Fatih Porikli, and Richard Hartley. Face super-resolution guided by facial component heatmaps. In ECCV, pages 217-233, 2018. +[31] Xin Yu, Basura Fernando, Richard Hartley, and Fatih Porikli. Super-resolving very low-resolution face images with supplementary attributes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 908-917, 2018. +[32] Xin Yu and Fatih Porikli. Ultra-resolving face images by discriminative generative networks. In ECCV, pages 318-333, 2016. +[33] Xin Yu and Fatih Porikli. Face hallucination with tiny unaligned images by transformative discriminative neural networks. In AAAI, 2017. +[34] 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 (CVPR), pages 3760-3768, 2017. +[35] Xin Yu and Fatih Porikli. Imagining the unimaginable faces by deconvolutional networks. IEEE Transactions on Image Processing, 27(6):2747-2761, 2018. +[36] Xin Yu, Fatih Porikli, Basura Fernando, and Richard Hartley. Hallucinating unaligned face images by multiscale transformative discriminative networks. International Journal of Computer Vision, 128(2):500-526, 2020. +[37] Xin Yu, Fatemeh Shiri, Bernard Ghanem, and Fatih Porikli. Can we see more? joint frontalization and hallucination of unaligned tiny faces. IEEE transactions on pattern analysis and machine intelligence, 2019. +[38] Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image super-resolution using very deep residual channel attention networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 286-301, 2018. +[39] Hao Zhou, Jin Sun, Yaser Yacoob, and David W Jacobs. Label denoising adversarial network (ldan) for inverse lighting of face images. arXiv preprint arXiv:1709.01993, 2017. +[40] 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. +[41] Shizhan Zhu, Sifei Liu, Chen Change Loy, and Xiaou Tang. Deep cascaded bi-network for face hallucination. In ECCV, pages 614-630, 2016. \ No newline at end of file diff --git a/copyandpasteganfacehallucinationfromshadedthumbnails/images.zip b/copyandpasteganfacehallucinationfromshadedthumbnails/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7c6e1b27f1d04cbd147d00b4f4be0c4072a4e958 --- /dev/null +++ b/copyandpasteganfacehallucinationfromshadedthumbnails/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14d5237b417e76efc45d4ca09644386c92d3af9dbcbffbda3ce44a0b18e62326 +size 559040 diff --git a/copyandpasteganfacehallucinationfromshadedthumbnails/layout.json b/copyandpasteganfacehallucinationfromshadedthumbnails/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f2cc2c27ebf0f9edc83125ade340d7a11e47174a --- /dev/null +++ b/copyandpasteganfacehallucinationfromshadedthumbnails/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:078e3c98f214789f06a469e18e00e96fc99e94403f355785e50262fe34d60aeb +size 450735 diff --git a/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/d75c7e9d-2edc-4221-9b6e-abfdfdb185e4_content_list.json b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/d75c7e9d-2edc-4221-9b6e-abfdfdb185e4_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c75be89a4dbe7475be4db9c5863882b84efe0663 --- /dev/null +++ b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/d75c7e9d-2edc-4221-9b6e-abfdfdb185e4_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2341c7f24ac53a343369d088b419bcb1b631b9b5bc42d83a499d957f35b356a1 +size 80454 diff --git a/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/d75c7e9d-2edc-4221-9b6e-abfdfdb185e4_model.json b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/d75c7e9d-2edc-4221-9b6e-abfdfdb185e4_model.json new file mode 100644 index 0000000000000000000000000000000000000000..06f2ccaa2946f55460e8a897e34c267d2111355e --- /dev/null +++ b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/d75c7e9d-2edc-4221-9b6e-abfdfdb185e4_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dc66f1feb597158dadbdabdeaedc7b4cd119fec7e20a8919ba9fe1e5b0edcef +size 100934 diff --git a/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/d75c7e9d-2edc-4221-9b6e-abfdfdb185e4_origin.pdf b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/d75c7e9d-2edc-4221-9b6e-abfdfdb185e4_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..723227fd17d7970790fd1f1b5db45773979aa17b --- /dev/null +++ b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/d75c7e9d-2edc-4221-9b6e-abfdfdb185e4_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d76d40dc3309fc8e32f366fae2e8bcaf163ead7b4a41755f0f70f788bf387d93 +size 835452 diff --git a/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/full.md b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c2fa14565155b97fd51861c860db144095ac1598 --- /dev/null +++ b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/full.md @@ -0,0 +1,430 @@ +# Correction Filter for Single Image Super-Resolution: Robustifying Off-the-Shelf Deep Super-Resolvers + +Shady Abu Hussein +Tel Aviv University, Israel +shadya@mail.tau.ac.il + +Tom Tirer +Tel Aviv University, Israel +tomtirer@mail.tau.ac.il + +Raja Giryes +Tel Aviv University, Israel +raja@tauex.tau.ac.il + +# Abstract + +The single image super-resolution task is one of the most examined inverse problems in the past decade. In the recent years, Deep Neural Networks (DNNs) have shown superior performance over alternative methods when the acquisition process uses a fixed known downscaling kernel—typically a bicubic kernel. However, several recent works have shown that in practical scenarios, where the test data mismatch the training data (e.g. when the downscaling kernel is not the bicubic kernel or is not available at training), the leading DNN methods suffer from a huge performance drop. Inspired by the literature on generalized sampling, in this work we propose a method for improving the performance of DNNs that have been trained with a fixed kernel on observations acquired by other kernels. For a known kernel, we design a closed-form correction filter that modifies the low-resolution image to match one which is obtained by another kernel (e.g. bicubic), and thus improves the results of existing pre-trained DNNs. For an unknown kernel, we extend this idea and propose an algorithm for blind estimation of the required correction filter. We show that our approach outperforms other super-resolution methods, which are designed for general downscaling kernels. + +# 1. Introduction + +The task of Single Image Super-Resolution (SISR) is one of the most examined inverse problems in the past decade [11, 13, 37, 8]. In this problem, the goal is to reconstruct a latent high-resolution (HR) image from its low-resolution (LR) version obtained by an acquisition process that includes low-pass filtering and sub-sampling. In the recent years, along with the developments in deep learning, many SISR methods that are based on Deep Neural Networks (DNNs) have been proposed [7, 17, 21, 20, 41, 35, 15]. + +Typically, the performance of SISR approaches is evaluated on test sets with a fixed known acquisition process, e.g. a bicubic downscaling kernel. This evaluation method + +ology allows to prepare large training data, which are based on ground truth HR images and their LR counterparts synthetically obtained through the known observation model. DNNs, which have been exhaustively trained on such training data, clearly outperform other alternative algorithms, e.g. methods that are based on hand-crafted prior models such as sparsity or non-local similarity [8, 13, 37]. + +Recently, several works have shown that in practical scenarios where the test data mismatch the training data, the leading DNN methods suffer from a huge performance drop [38, 27, 31]. Such scenarios include a downscaling kernel which is not the bicubic kernel and is not available at the training phase. A primary example is an unknown kernel that needs to be estimated from the LR image at test time. + +Several recent SISR approaches have proposed different strategies for enjoying the advantages of deep learning while mitigating the restriction of DNNs to the fixed kernel assumption made in the training phase. These strategies include: modifying the training phase such that it covers a predefined set of downscaling kernels [39, 14]; using DNNs to capture only a natural-image prior which is decoupled from the SISR task [38, 5]; or completely avoid any offline training and instead train a CNN super-resolver from scratch at test time [32, 27]. + +Contribution. In this work we take a different strategy, inspired by the generalized sampling literature [9, 33], for handling LR images obtained by arbitrary downscaling kernels. Instead of completely ignoring the state-of-the-art DNNs that have been trained for the bicubic model, as done by other prior works, we propose a method that transforms the LR image to match one which is obtained by the bicubic kernel. The modified LR can then be inserted into existing leading super-resolvers, such as DBPN [15], RCAN [41], and proSR [35], thus, improving their performance significantly on kernels they have not been trained on. The proposed transformation is performed using a correction filter, which has a closed-form expression when the true (non-bicubic) kernel is given. + +In the "blind" setting, where the kernel is unknown, we extend our approach and propose an algorithm that esti + +![](images/b5b84fc28ae6edd61359f5dba8e6d688a2eaeea8c8deb1335a1f2a3bb269cddb.jpg) + +![](images/7c255f2951104c020918d06feb9fd46b8f06892bd5a3dd5acd3c9d954f5b1807.jpg) + +![](images/96534253fc4fb237756637f4fd9d087443c3734cf8fe4b28b84c4ecf2082a4be.jpg) +Original image (cropped) + +![](images/49777749107c1f5e8a2c80d7f6f16ffc9258e69c572600bc13f88800e07f5ffb.jpg) +LR image + +![](images/a62f307ff837840bf7158884a3fedbff3aeeca0538230407c7f22b6acff60447.jpg) + +![](images/ff032d2c0455c89f0fcae0456d772190ca4608e8e572a1a563dd1d21b94d7ac1.jpg) +Bicubic upsampling + +![](images/1d38c6da27dd52edfbc8eb535a248e7e22af10491b3d824e65f982261b1ea533.jpg) +SRMD [39] + +![](images/af569b079279b5568fbc31ae3f2a47105bb1334eaabfb3882b7f47e512b37f5d.jpg) +ZSSR [27] + +![](images/859604506f0be24f826372d3b4b1b11423faca6317e7efee8432be57f7007b5b.jpg) +ProSR [35] +ProSR with our correction +Figure 1: Non-blind super-resolution of image 223061 from BSD100, for scale factor 4 and Gaussian downscaling kernel with std $4.5 / \sqrt{2}$ . Our correction filter significantly improves the performance of DNNs trained on another SR kernel. + +![](images/d57d007a95075ed58281a48b9651fe9fe6408fe10d5be4c527a16659828b8669.jpg) +RCAN [41] +RCAN with our correction + +![](images/64671d6cfcb466dc06e107d2f758d73c57e527a875fb22198a605eaeea19d593.jpg) +DBPN [15] +DBPN with our correction + +mates the required correction. The proposed approach outperforms other super-resolution methods in various practical scenarios. See example results in Figure 1 for the non-blind setting. + +# 2. Related Work + +In the past five years many works have employed DNNs for the SISR task, showing a great advance in performance with respect to the reconstruction error [7, 15, 17, 21, 35, 41] and the perceptual quality [4, 20, 25, 34]. However, one main disadvantage of DNN-based SISR methods is their sensitivity to the LR image formation model. A network performance tends to drop significantly if it has been trained for one acquisition model and then been tested on another + +# [27, 31, 38]. + +Recently, different SISR strategies has been proposed with the goal of enjoying the advantages of deep learning while mitigating the restriction of DNNs to the fixed kernel assumption made in the training phase. One approach trains a CNN super-resolver that gets as inputs both the LR image and the degradation model, and assumes that the downscaling kernels belong to a certain set of Gaussian filters [14, 39]. Another approach builds on the structural prior of CNNs, which promotes signals with spatially recurring patterns (e.g. natural images) and thus allows to train a super-resolver CNN from scratch at test time [27, 32]. Another line of work recovers the latent HR image by minimizing a cost function that is composed of a fidelity term (e.g. least squares or back-projection [30]) and a prior term, where + +![](images/caff6a293a5f9b8df77922278526dff8a8c283348bf1714f5400ae2f8384ee2d.jpg) +(a) + +![](images/3fae006e362fcb0e95350fae2813b7837f46a3d8e06f20e7100797795081fa34.jpg) +(b) +Figure 2: Downsampling, correction, and upsampling operators for single image super-resolution: (a) Downsampling operator composed of convolution with a kernel $\mathbf{k}$ and sub-sampling by factor of $\alpha$ ; (b) Correction operator composed of convolution with a correction filter $\mathbf{h}$ ; (c) Upsampling operator composed of up-sampling by factor of $\alpha$ and convolution with a (flipped) kernel $\mathbf{k}_{bicub}$ . In our approach, $\mathcal{H}$ is computed for $S^{*}$ and $\mathcal{R}$ , but then we replace $\mathcal{R}$ with a pre-trained DNN super-resolver. + +![](images/3261a1a5ad4591b681f625a05aaaeb57300653eee7e199784c5914c912c7af73.jpg) +(c) + +only the latter is handled by a pre-trained CNN denoiser or GAN [38, 29, 5, 40]. Recently, the two last approaches have been incorporated by applying image-adaptation to denoisers [31] and GANs [1]. In all these methods the downscaling kernel is given as an input. In a blind setting (where the kernel is unknown) it is still possible to apply these methods after an initial kernel estimation phase. + +Our approach is inspired by the literature on generalized sampling [6, 33, 9], which generalizes the classical Whittaker-Nyquist-Kotelnikov-Shannon sampling theorem [36, 23, 19, 26], which considers signals that are band-limited in the frequency domain and sinc interpolations. The generalized theory provides a framework and conditions under which a signal that is sampled by a certain basis can be reconstructed by a different basis. In this framework, the sampled signal is reconstructed using a linear operator that can be decoupled into two phases, the first applies a digital correction filter and the second includes processing with a reconstruction kernel. The role of the correction filter is to transform the sampling coefficients, associated with the sampling kernel, to coefficients which fit the reconstruction kernel. + +Several works have used the correction filter approach for image processing [10, 12, 24]. These works typically propose linear interpolation methods, i.e. the correction filter is followed by a linear reconstruction operation, and do not use a strong natural-image prior. As a result, the recovery of fine details is lacking. + +In this work, we plan to use (very) non-linear reconstruction methods, namely—DNNs, whose training is difficult, computationally expensive, storage demanding, and cannot be done when the observation model is not known in advance. To tackle these difficulties, we revive the correction filter approach and show how it can be used with deep super-resolvers which have been already trained. + +The required correction filter depends on the kernel which is used for sampling. Therefore, in the blind setting, it needs to be estimated from the LR image. To this end, we propose an iterative optimization algorithm for estimat + +ing the correction filter. In general, only a few works have considered the blind SISR setting and developed kernel estimation methods [28, 22, 14, 3]. + +Finally, we would like to highlight major differences between this paper and the work in [14], whose "kernel correction" approach may be misunderstood as our "correction filter". In [14], three different DNNs (super-resolver, kernel estimator, and kernel corrector) are offline trained under the assumption that the downscaling kernel belongs to a certain family of Gaussian filters (similarly to [39]), and the CNN super-resolver gets the estimated kernel as an input. So, the first major difference is that contrary to our approach, no pre-trained existing DNN methods (other than SRMD [39]) can be used in [14]. Secondly, their approach is restricted by the offline training assumptions to very certain type of downscaling kernels, contrary to our approach. Thirdly, the concepts of these works are very different: The (iterative) correction in [14] modifies the estimated downscaling kernel, while our correction filter modifies the LR image. + +# 3. The Proposed Method + +The single image super resolution (SISR) acquisition model, can be formulated as + +$$ +\mathbf {y} = (\mathbf {x} * \mathbf {k}) \downarrow_ {\alpha}, \tag {1} +$$ + +where $\mathbf{x} \in \mathbb{R}^n$ represents the latent HR image, $\mathbf{y} \in \mathbb{R}^m$ represents the observed LR image, $\mathbf{k} \in \mathbb{R}^d$ ( $d \ll n$ ) is the (anti-aliasing) blur kernel, $*$ denotes the linear convolution operator, and $\downarrow_{\alpha}$ denotes sub-sampling operator with stride of $\alpha$ . Under the common fashion of dropping the edges of $\mathbf{x} * \mathbf{k}$ , such that it is in $\mathbb{R}^n$ , we have that $m = \lceil n / \alpha \rceil$ . + +Note that Equation (1) can be written in a more elegant way as + +$$ +\mathbf {y} = \mathcal {S} ^ {*} \mathbf {x}, \tag {2} +$$ + +where $S^{*}:\mathbb{R}^{n}\to \mathbb{R}^{m}$ is a linear operator that encapsulates the entire downsampling operation, i.e. $S^{*}$ is a composition of blurring followed by sub-sampling. The downsampling operator $S^{*}$ is presented in Figure 2(a). + +Most SISR deep learning methods, e.g. [7, 17, 21, 20, 41, 35, 15], assume that the observations are obtained using the bicubic kernel. Let us denote by $\mathcal{R}^*$ the associated downsampling operator (essentially, $\mathcal{R}^*$ coincides with the previously defined $S^*$ if $\mathbf{k}$ is the bicubic kernel $\mathbf{k}_{bicub}$ ). The core idea of our approach is to modify the observations $\mathbf{y} = S^{*}\mathbf{x}$ , obtained for an arbitrary downscaling kernel $\mathbf{k}$ , such that they mimic the (unknown) "ideal observations" $\mathbf{y}_{bicub} = \mathcal{R}^{*}\mathbf{x}$ , which can be fed into pre-trained DNN models. + +In what follows, we present a method to (approximately) achieve this goal using the correction filter tool, adopted from the generalized sampling literature. First, we consider the non-blind setting, where the downscaling kernel is known, and thus $S^{*}$ is known. In this case, we obtain a closed-form expression for the required correction filter, which depends on $\mathbf{k}$ (and on $\mathbf{k}_{bicub}$ ). Later, we extend the approach to the blind setting, where $\mathbf{k}$ is unknown. In this case, we propose a technique for estimating the correction filter from the LR image $\mathbf{y}$ . + +# 3.1. The non-blind setting + +In the non-blind setting, both the downscaling kernel $\mathbf{k}$ and the target kernel $\mathbf{k}_{bicub}$ are known. Therefore, the downsampling operators $S^{*}$ and $\mathcal{R}^*$ are known as well. Using common notations from generalized sampling literature [9], let us denote by $S$ and $\mathcal{R}$ the adjoint operators of $S^{*}$ and $\mathcal{R}^*$ , respectively. The operator $\mathcal{R}:\mathbb{R}^m\to \mathbb{R}^n$ is an upsampling operator that restores a signal in $\mathbb{R}^n$ from $m$ samples, associated with the downsampling operator $\mathcal{R}^*$ . In the context of our work, when $\mathcal{R}$ is applied on a vector it pads it with $n - m$ zeros ( $\alpha -1$ zeros between each two entries) and convolves it with a flipped version of $\mathbf{k}_{bicub}$ . The upsampling operator $\mathcal{R}$ is presented in Figure 2(c). A similar definition holds for $S:\mathbb{R}^m\rightarrow \mathbb{R}^n$ with the kernel $\mathbf{k}$ . + +The key goal of generalized sampling theory is to identify signal models and sampling systems that allow for perfect recovery. Therefore, to proceed, let us make the following assumption. + +Assumption 1. The signal $\mathbf{x}$ can be perfectly recovered from its samples $\mathcal{R}^*\mathbf{x}$ by the operator $\mathcal{R}(\mathcal{R}^*\mathcal{R})^{-1}$ , i.e. + +$$ +\mathbf {x} = \mathcal {R} \left(\mathcal {R} ^ {*} \mathcal {R}\right) ^ {- 1} \mathcal {R} ^ {*} \mathbf {x}. \tag {3} +$$ + +Assumption 1 essentially states that the latent image $\mathbf{x}$ resides in the linear subspace spanned by the bicubic kernel. Therefore, it can be perfectly recovered from the observations $\mathbf{y}_{bicub} = \mathcal{R}^*\mathbf{x}$ by applying the pseudoinverse of $\mathcal{R}^*$ on $\mathbf{y}_{bicub}$ , i.e. by the estimator $\hat{\mathbf{x}} = \mathcal{R}(\mathcal{R}^*\mathcal{R})^{-1}\mathbf{y}_{bicub}$ . Even though Assumption 1 does not hold for natural images, it is motivated by the fact that there are many DNN methods that can handle observations of the form $\mathcal{R}^*\mathbf{x}$ quite well. + +However, since we are given observations that are obtained by a different downscaling kernel, $\mathbf{y} = \mathcal{S}^{*}\mathbf{x}$ , let us propose a different estimator $\hat{\mathbf{x}} = \mathcal{R}\mathcal{H}\mathbf{y}$ , where $\mathcal{H}:\mathbb{R}^m\to \mathbb{R}^m$ is a correction operator. This recovery procedure is presented in Figures 2(b)+2(c). The following theorem presents a condition and a formula for $\mathcal{H}$ under which perfect recovery is possible under Assumption 1. + +Theorem 2. Let $\mathbf{y} = S^{*}\mathbf{x}$ , $\hat{\mathbf{x}} = \mathcal{R}\mathcal{H}\mathbf{y}$ , and assume that Assumption 1 holds. Then, if + +$$ +\operatorname {n u l l} \left(\mathcal {S} ^ {*}\right) \cap \operatorname {r a n g e} (\mathcal {R}) = \{0 \}, \tag {4} +$$ + +we have that $\hat{\mathbf{x}} = \mathbf{x}$ for + +$$ +\mathcal {H} = \left(\mathcal {S} ^ {*} \mathcal {R}\right) ^ {- 1}: \mathbb {R} ^ {m} \rightarrow \mathbb {R} ^ {m}. \tag {5} +$$ + +Proof: Note that + +$$ +\begin{array}{l} \hat {\mathbf {x}} = \mathcal {R H} \mathbf {y} \\ = \mathcal {R H S} ^ {*} \mathbf {x} \\ = \mathcal {R H S} ^ {*} \mathcal {R} \left(\mathcal {R} ^ {*} \mathcal {R}\right) ^ {- 1} \mathcal {R} ^ {*} \mathbf {x}, \tag {6} \\ \end{array} +$$ + +where the last equality follows from Assumption 1. Next, (4) implies that the operator $(S^{*}\mathcal{R})$ is invertible. Thus, setting $\mathcal{H}$ according to (5) is possible, and we get + +$$ +\begin{array}{l} \hat {\mathbf {x}} = \mathcal {R} \left(\mathcal {S} ^ {*} \mathcal {R}\right) ^ {- 1} \mathcal {S} ^ {*} \mathcal {R} \left(\mathcal {R} ^ {*} \mathcal {R}\right) ^ {- 1} \mathcal {R} ^ {*} \mathbf {x} \\ = \mathcal {R} \left(\mathcal {R} ^ {*} \mathcal {R}\right) ^ {- 1} \mathcal {R} ^ {*} \mathbf {x} = \mathbf {x}, \tag {7} \\ \end{array} +$$ + +where the last equality follows from Assumption 1. + +□ + +Theorem 2 is presented in operator notations to simplify the derivation. In the context of SISR (i.e. with the previous definitions of $S^*$ and $\mathcal{R}$ ), the operator $\mathcal{H} = (\mathcal{S}^*\mathcal{R})^{-1}$ can be applied simply as a convolution with a correction filter $\mathbf{h}_0$ , given by + +$$ +\mathbf {h} _ {0} = \operatorname {I D F T} \left\{\frac {1}{\operatorname {D F T} \left\{\left(\mathbf {k} * \operatorname {f l i p} \left(\mathbf {k} _ {b i c u b}\right)\right) \downarrow_ {\alpha} \right\}} \right\}, \tag {8} +$$ + +where $\mathrm{DFT}(\cdot)$ and $\mathrm{IDFT}(\cdot)$ denote the Discrete Fourier Transform and its inverse respectively. + +In practice, instead of using the weak estimator $\hat{\mathbf{x}} = \mathcal{R}\mathcal{H}\mathbf{y}$ that does not use any natural-image prior, we propose to recover the HR image by + +$$ +\hat {\mathbf {x}} = f (\mathbf {h} * \mathbf {y}), \tag {9} +$$ + +where $f(\cdot)$ is a DNN super-resolver that has been trained under the assumption of bicubic kernel and $\mathbf{h}$ is a modified + +Table 1: Non-blind super-resolution comparison on Set14. Each cell displays PSNR [dB] (left) and SSIM (right). + +
ScaleGaussian std = 1.5/√2Gaussian std = 2.5/√2Box of width = 4
ZSSR228.107 / 0.82927.954 / 0.80628.506 / 0.802
SRMD232.493 / 0.87829.923 / 0.81225.944 / 0.757
DBPN230.078 / 0.85026.366 / 0.73428.444 / 0.803
DBPN + our correction234.023 / 0.90433.288 / 0.89529.364 / 0.822
ProSR230.073 / 0.84926.371 / 0.73428.459 / 0.803
ProSR + our correction233.954 / 0.90333.273 / 0.89529.514 / 0.825
RCAN230.118 / 0.85126.389 / 0.73628.469 / 0.804
RCAN + our correction234.043 / 0.90433.251 / 0.89529.306 / 0.820
ScaleGaussian std = 3.5/√2Gaussian std = 4.5/√2Box of width = 8
ZSSR425.642 / 0.70125.361 / 0.68324.549 / 0.653
SRMD426.877 / 0.71825.350 / 0.67419.704 / 0.525
DBPN425.067 / 0.68523.890 / 0.64524.636 / 0.667
DBPN + our correction428.680 / 0.77528.267 / 0.76625.157 / 0.679
ProSR425.033 / 0.68323.882 / 0.64524.685 / 0.667
ProSR + our correction428.609 / 0.77228.220 / 0.76425.419 / 0.683
RCAN425.077 / 0.68523.904 / 0.64624.694 / 0.668
RCAN + our correction428.534 / 0.77128.110 / 0.76225.301 / 0.679
+ +correction filter, given by + +$$ +\begin{array}{l} \mathbf {h} = \mathrm {I D F T} \left\{\frac {\operatorname {D F T} \left\{\left(\mathbf {k} _ {b i c u b} * \operatorname {f l i p} \left(\mathbf {k} _ {b i c u b}\right)\right) \downarrow_ {\alpha} \right\}}{\operatorname {D F T} \left\{\left(\mathbf {k} * \operatorname {f l i p} \left(\mathbf {k} _ {b i c u b}\right)\right) \downarrow_ {\alpha} \right\}} \right\} \\ \triangleq \operatorname {I D F T} \left\{\frac {F _ {\text {n u m e r}}}{F _ {\text {d e n o m}}} \right\}. \tag {10} \\ \end{array} +$$ + +Let us explain the idea behind the estimator in (9). Since the inverse mapping $f(\cdot)$ assumes bicubic downscaling $(\mathcal{R}^*\mathbf{x})$ , it can be interpreted as incorporating $\mathcal{R}(\mathcal{R}^*\mathcal{R})^{-1}$ with a (learned) prior. Therefore, unlike $\mathbf{h}_0$ in (8) which is followed by $\mathcal{R}$ , here the correction filter should also compensate for the operation $(\mathcal{R}^*\mathcal{R})^{-1}$ which is implicitly done in $f(\cdot)$ . This explains the term in the numerator of $\mathbf{h}$ (compared to 1 in the numerator of $\mathbf{h}_0$ ). To ensure numerical stability, we slightly modify (10), and compute $\mathbf{h}$ using + +$$ +\mathbf {h} = \operatorname {I D F T} \left\{F _ {\text {n u m e r}} \cdot \frac {F _ {\text {d e n o m}} ^ {*}}{\left| F _ {\text {d e n o m}} \right| ^ {2} + \epsilon} \right\}, \tag {11} +$$ + +where $\epsilon$ is a small regularization parameter. Regarding the choice of $f(\cdot)$ , in our experiments we use DBPN [15], RCAN [41], and proSR [35], but in general any other method with state-of-the-art performance (for bicubic kernel) is expected to give good results. + +Note that the theoretical motivation for our strategy requires that the condition in (4) holds. This condition can be inspected by compaing the bandwidth of the kernels $\mathbf{k}$ and $\mathbf{k}_{bicub}$ in the frequency domain. As $\mathbf{k}$ is commonly a low-pass filter (and so is $\mathbf{k}_{bicub}$ ), the condition requires that the passband of $\mathbf{k}_{bicub}$ is contained in the passband of $\mathbf{k}$ . Yet, + +as shown in the experiments section, our approach yields a significant improvement even when the passband of $\mathbf{k}$ is moderately smaller than the passband of $\mathbf{k}_{bicub}$ . Furthermore, we observe that even for very blurry LR images performance improvement can be obtained by increasing the regularization parameter in (11). We refer the reader to the supplementary material for more details. + +# 3.2. The blind setting + +In the blind setting, the downscaling kernel $\mathbf{k}$ is unknown. Therefore, we cannot compute the correction filter $\mathbf{h}$ using (11), and extending our approach to this setting requires to estimate $\mathbf{k}$ and $\mathbf{h}$ from the LR image $\mathbf{y}$ . + +To this end, we propose to estimate $\mathbf{k}$ as the minimizer of the following objective function + +$$ +\xi (\mathbf {k}) = \| \mathbf {y} - \mathcal {S} ^ {*} f (\mathcal {H} \mathbf {y}) \| _ {\mathrm {H u b}} + \| \mathbf {m} _ {\mathrm {c e n}} \cdot \mathbf {k} \| _ {1} + \| \mathbf {k} \| _ {1}, \tag {12} +$$ + +where $\| \cdot \|_{\mathrm{Hub}}$ is Huber loss [16], the operator $\mathcal{H}$ is filtering with $\mathbf{h}$ given in (11), $S^{*}$ is the downsampling operator, $f(\cdot)$ is the given SR network, and $\mathbf{m}_{\mathrm{cen}}$ is given by + +$$ +\mathbf {m} _ {\mathrm {c e n}} (x, y) = 1 - \mathrm {e} ^ {- \frac {(x ^ {2} + y ^ {2})}{3 2 \alpha^ {2}}}, +$$ + +where $\alpha$ is the scale factor. Note that the two operators $\mathcal{H}$ and $S^{*}$ depend on the kernel $\mathbf{k}$ . The last two terms in (12) are regularizers: the last term promotes sparsity of $\mathbf{k}$ and the penultimate term centralizes its density. + +Inspired by [2, 3], we choose to parameterize the latent $\mathbf{k}$ by a linear CNN composed of 4 layers, i.e. $\mathbf{k} = \mathbf{k}_0*\mathbf{k}_1*\mathbf{k}_2*\mathbf{k}_3$ , where $\{\mathbf{k}_n\}_{n = 0}^2$ are of size $33\times 33$ and + +Table 2: Non-blind super-resolution comparison on BSD100. Each cell displays PSNR [dB] (left) and SSIM (right). + +
ScaleGaussian std = 1.5/√2Gaussian std = 2.5/√2ScaleGaussian std = 3.5/√2Gaussian std = 4.5/√2
ZSSR229.339 / 0.82226.415 / 0.715425.115 / 0.65124.348 / 0.625
SRMD226.591 / 0.80329.294 / 0.838425.735 / 0.70426.432 / 0.707
DBPN229.512 / 0.82726.371 / 0.711425.268 / 0.66224.357 / 0.628
DBPN + correction232.300 / 0.88431.875 / 0.878427.690 / 0.74027.474 / 0.733
ProSR229.513 / 0.82726.381 / 0.711425.237 / 0.66124.353 / 0.628
ProSR + correction232.276 / 0.88431.899 / 0.878427.645 / 0.73827.455/ 0.733
RCAN229.558 / 0.82926.397 / 0.713425.281 / 0.66324.373 / 0.629
RCAN + correction232.368 / 0.88631.876 / 0.878427.626 / 0.73927.399/ 0.732
+ +# Algorithm 1: Correction filter estimation + +Input: y, kbicub, $\alpha$ , $f(\cdot)$ . + +Output: $\hat{\mathbf{h}}$ an estimate for $\mathbf{h}$ + +Params.: $\mathbf{k}^{(0)} = \mathbf{k}_{bicub}, i = 0, \epsilon = 10^{-14}$ , + +$$ +\gamma = 1 0 ^ {- 4}, N _ {i t e r} = 2 5 0 +$$ + +while $i < N_{iter}$ do + +$$ +i = i + 1; +$$ + +Compute $\mathbf{h}^{(i)}$ using (11) (for $\mathbf{k}^{(i - 1)},\alpha$ and $\epsilon$ ); + +$$ +\mathbf {x} _ {h} ^ {(i)} = f \left(\mathbf {h} ^ {(i)} * \mathbf {y}\right); +$$ + +$$ +\hat {\mathbf {y}} ^ {(i)} = \left(\mathbf {x} _ {h} ^ {(i)} * \mathbf {k} ^ {(i - 1)}\right) \downarrow_ {\alpha}; +$$ + +$$ +\xi (\mathbf {k} ^ {(i - 1)}) = +$$ + +$$ +\begin{array}{l} \| \mathbf {y} - \hat {\mathbf {y}} ^ {(i)} \| _ {\mathrm {H u b}} + \| \mathbf {m} _ {\mathrm {c e n}} \cdot \mathbf {k} ^ {(i - 1)} \| _ {1} + \| \mathbf {k} ^ {(i - 1)} \| _ {1}; \\ \mathbf {k} ^ {(i)} = \operatorname {A d a m} (\text {f o r} \xi (\mathbf {k} ^ {(i - 1)}) \text {w i t h L R} \gamma); \\ \end{array} +$$ + +end + +$$ +\hat {\mathbf {h}} = \mathbf {h} ^ {(i)}; +$$ + +$\mathbf{k}_3$ is of size $32 \times 32$ . The minimization of (12) with respect to $\mathbf{k}$ is performed by 250 iterations of Adam [18] with learning rate of $10^{-4}$ , initialized with $\mathbf{k}^{(0)} = \mathbf{k}_{bicub}$ . The proposed procedure is described in Algorithm 1. Note that at each iteration we obtain estimates for both the downscaling kernel $\mathbf{k}$ and correction filter $\mathbf{h}$ . The final estimator of $\mathbf{h}$ is then used in (9) to reconstruct the HR image, similarly to the non-blind setting. + +# 4. Experiments + +In this section we examine the performance and improvement due to our correction filter approach in the non-blind and blind settings, using three different off-the-shelf DNN super-resolvers that serve as $f(\cdot)$ in (9): DBPN [15], RCAN [41], and proSR [35]. We compare our approach to other methods that receive the downscaling kernel $\mathbf{k}$ (or its estimation in the blind setting) as an input: ZSSR [27] and SRMD [39]. We also compare our method to DPSR [40], however, since its results are extremely inferior to the other strategies (e.g. about 10 dB lower PSNR) they are deferred + +![](images/e60af2e9ae60beaf1d811f1f510fddec557b8930ead1af99f09d256786773bea.jpg) + +![](images/6b00a61b02d2a049fa91fefd8c66ff7ad25c58527d408397b802a03c9b0d660d.jpg) +Observed LR (Gaussian kernel) +"Ideal" LR (bicubic kernel) +Figure 3: Comparison between observed, "ideal" and corrected LR images, for SR scale factor of 4 and Gaussian kernel of std $4.5 / \sqrt{2}$ . + +![](images/da322b13b1c27b09cafa6f88e1e6c0b27f6702aca5ecdda52758f529defe0480.jpg) +Corrected observed LR + +Table 3: Comparison of the filter-corrected (non-bicubic) LR to the bicubic LR on Set14. Each cell displays PSNR [dB] (left) and SSIM (right). + +
ScaleGauss. std 1.5/√2Gauss. std 2.5/√2Box, width 4
251.345 / 0.99945.456 / 0.99533.679 / 0.941
ScaleGauss. std 3.5/√2Gauss. std 4.5/√2Box, width 8
458.437 / 0.99946.917 / 0.99532.308 / 0.907
+ +to the supplementary material. All the experiments are performed with the official code of each method. We refer the reader to the supplementary material for more results. + +# 4.1. The non-blind setting + +In this section, we assume that the downscaling kernel $\mathbf{k}$ is known. Therefore, the correction filter $\mathbf{h}$ can be computed directly using (11). We examine scenarios with scale factors of 2 and 4. For scale factor of 2, we use Gaussian kernels with standard deviation $\sigma = 1.5 / \sqrt{2}$ and $\sigma = 2.5 / \sqrt{2}$ , and box kernel of size $4\times 4$ . For scale factor of 4, we use Gaussian kernels with standard deviation $\sigma = 3.5 / \sqrt{2}$ and $\sigma = 4.5 / \sqrt{2}$ , and box kernel of size $8\times 8$ . + +The results are presented in Tables 1 and 2 for the test + +![](images/57fa441ee462632e5aa13123c3821c218a75666446206fb3ae81aa209a299070.jpg) + +![](images/4f7b47647e6499b86f427899f2e961e0cd57a84566537e7eee3527153a01f23f.jpg) + +![](images/bbde6a10256338d5a42c781226484528d1d2e3169b2e8bf5fc634b1ef5efe76d.jpg) +Original image (cropped) + +![](images/2c49ddd10b45ce6893afbc3c40abcd293eb1a818968663379caf4e16f6c9b42b.jpg) + +![](images/cea29d674ddae1c367fd8e1ee96d89fe4bdd5ea2f251a01edac9b0aa38db2e70.jpg) +LR image + +![](images/0c7ce7439f988121eb5b1306877b2d97b13962511f80fa488df1849ce4b28a27.jpg) +Bicubic upsampling + +![](images/08d4c89adb87145dcdc91f7de2471a5751a5ecc4dad9499d3805c8964562478e.jpg) +SRMD + +![](images/35fbe566a0088a89a1d1b1b66914ceb8d1c3dd70eacce0bd6c4c7922781442c9.jpg) +ZSSR + +![](images/1d277f811f10ea7eddc070bececf9f7566c937088ecb6e2188ffc690dc578686.jpg) +ProSR +ProSR with our correction +Figure 4: Non-blind super-resolution of image 189080 from BSD100, for scale factor of 2 and Gaussian downscaling kernel with standard deviation 2.5. + +![](images/7c7b2e41dd707c2f8a347a87da5fdc309dda936e62e72633528974c77a64439f.jpg) +RCAN +RCAN with our correction + +![](images/c0105b12d332b21bacee80219f00128ee19273f7e57160632b09067fce13e95b.jpg) +DBPN +DBPN with our correction + +sets Set14 and BSD100, respectively. Figures 1 and 4 present several visual results. It can be seen that the proposed filter correction approach significantly improves the results of DBPN, RCAN, and proSR, which have been trained for the (incorrect) bicubic kernel. Moreover, note that the filter-corrected applications of DBPN, RCAN, and proSR, also outperform SRMD and ZSSR, while the plain applications of DBPN, RCAN, and proSR are inferior to SRMD. + +As explained in Section 3, the proposed approach is based on mimicking the (unknown) "ideal" LR image $\mathbf{y}_{bicub} = \mathcal{R}^{*}\mathbf{x}$ by the corrected LR image $\mathcal{H}\mathbf{y}$ . The high PSNR and SSIM results between such pairs of images, which are presented in Table 3 for Set14, verify that this + +indeed happens. Figure 3 shows a visual comparison. + +Inference run-time. Computing the correction filter requires a negligible amount of time, so it does not change the run-time of an off-the-shelf DNN. Using NVIDIA RTX 2080ti GPU, the per image run-time of all the methods except ZSSR is smaller than 1 second (because no training is done in the test phase), while ZSSR requires approximately 2 minutes per image. + +# 4.2. The blind setting + +In this section, we repeat previous experiments, but without the assumption that the downscaling kernel $\mathbf{k}$ is known. Therefore, to apply our approach we first estimate the correction filter using Algorithm 1, and then use this estimation + +Table 4: Blind super-resolution comparison on Set14. Each cell displays PSNR [dB] (left) and SSIM (right). + +
ScaleGaussian std = 1.5/√2Gaussian std = 2.5/√2Box of width = 4
KernelGAN226.381 / 0.78528.868 / 0.80728.221 / 0.802
DBPN230.078 / 0.8526.366 / 0.73428.444 / 0.803
DBPN + our estimated correction228.46 / 0.84228.037 / 0.79429.778 / 0.840
ScaleGaussian std = 3.5/√2Gaussian std = 4.5/√2Box of width = 8
KernelGAN424.424 / 0.67325.174 / 0.66923.575 / 0.634
DBPN425.067 / 0.68523.890 / 0.64524.636 / 0.667
DBPN + our estimated correction428.184 / 0.76425.542 / 0.69925.111 / 0.681
+ +Table 5: Blind super-resolution comparison on BSD100. Each cell displays PSNR [dB] (left) and SSIM (right). + +
ScaleGaussian std = 1.5/√2Gaussian std = 2.5/√2ScaleGaussian std = 3.5/√2Gaussian std = 4.5/√2
KernelGAN226.615 / 0.77328.244 / 0.780424.363 / 0.64725.238 / 0.652
DBPN229.512 / 0.82726.371 / 0.711425.268 / 0.66224.357 / 0.628
DBPN + est. correction227.784 / 0.82827.761 / 0.769427.103/ 0.72225.485 / 0.671
+ +to restore the HR image by (9). Note that Algorithm 1 exploits the pre-trained DNN to estimate the correction filter. Here we apply it only with DBPN, which has a more compact architecture than RCAN and proSR, and hence leads to faster inference. However, similar results can be obtained also for RCAN and proSR. In this setting we compare our method to kernelGAN [3], which estimates the downscaling kernel using adversarial training (in test-time) and then uses ZSSR to restore the HR image. + +The results for Set14 and BSD100 are presented in Tables 4 and 5, respectively, and visual examples are shown in Figure 5. More results and comparison on DIV2KRK are presented in the supplementary material. It can be seen that the proposed filter correction approach improves the results of DBPN compared to its plain application. It also outperforms kernelGAN, despite being much simpler. + +# 5. Conclusion + +The SISR task has gained a lot from the developments in deep learning in the recent years. Yet, the leading DNN methods suffer from a huge performance drop when they are tested on images that do not fit the acquisition process assumption used in their training phase—which is, typically, that the downscaling kernel is bicubic. In this work, we addressed this issue by a signal processing approach: computing a correction filter that modifies the low-resolution observations such that they mimic observations that are obtained with a bicubic kernel. (Notice that our focus in this work on the bicubic kernel is for the sake of simplicity of the presentation and due to its popularity. Yet, it is possible to use our developed tools also for other reconstruction kernels). The modified LR is then fed into existing state-of-the-art DNNs that are trained only under the assumption of bicubic kernel. Various experiments have + +![](images/6b9fb179a6f377330f0e7a358a19bbad035a2b041085369731403f5b205964ce.jpg) +Original image (cropped) + +![](images/2e3358fd8e0975b15b465390ec3a7a6d571d070c0824b24bd0603ffe81bd5170.jpg) +LR image + +![](images/7b7498068bef074f9c71a3534ceb4d547bce1d3b670aeb4f7d5dc25f8c803055.jpg) +Bicubic upsampling + +![](images/af3cfd50b3e9a6cda7e6bb55f31dbc4db325547daebbeed20515d7e30d7e82b3.jpg) +KernelGAN + +![](images/d41ee37381171133f37217c3a1104df753516aa4c1c3f292c75be6efc62ca9d5.jpg) +DBPN + +![](images/e5f40b6fd571589483686ff7da936d4fff4741c5b934cd2b38450f66bd34db99.jpg) +DBPN + est. correction +Figure 5: Blind SR of zebra image from Set14, for scale factor 4 and Gaussian downscaling kernel with std $3.5 / \sqrt{2}$ . + +shown that the proposed approach significantly improves the performance of the pre-trained DNNs and outperforms other (much more sophisticated) methods that are specifically designed to be robust to different kernels. + +Acknowledgment. The work is supported by the NSF-BSF (No. 2017729) and ERC-StG (No. 757497) grants. + +# References + +[1] Shady Abu Hussein, Tom Tirer, and Raja Giryes. Image-adaptive GAN based reconstruction. AAAI Conference on Artificial Intelligence, 2020. 3 +[2] Sanjeev Arora, Nadav Cohen, Noah Golowich, and Wei Hu. A convergence analysis of gradient descent for deep linear neural networks. *ICLR*, 2019. 5 +[3] Sefi Bell-Kligler, Assaf Shocher, and Michal Irani. Blind super-resolution kernel estimation using an internal-GAN. Advances in Neural Information Processing Systems, 2019. 3, 5, 8 +[4] Yochai Blau and Tomer Michaeli. The perception-distortion tradeoff. IEEE Conference on Computer Vision and Pattern Recognition, Jun. 2018. 2 +[5] Ashish Bora, Ajil Jalal, Eric Price, and Alexandros G Dimakis. Compressed sensing using generative models. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 537-546. JMLR.org, 2017. 1, 3 +[6] Paul Leo Butzer. A survey of the Whittaker-Shannon sampling theorem and some of its extensions. J. Math. Res. Expo., 1983. 3 +[7] Chao Dong, Chen Change Loy, Kaiming He, and Xiaou Tang. Learning a deep convolutional network for image super-resolution. In European conference on computer vision, pages 184-199. Springer, 2014. 1, 2, 4 +[8] Weisheng Dong, Lei Zhang, Guangming Shi, and Xin Li. Nonlocally centralized sparse representation for image restoration. IEEE transactions on Image Processing, 22(4):1620-1630, 2012. 1 +[9] Yonina C Eldar. Sampling theory: Beyond bandlimited systems. Cambridge University Press, 2015. 1, 3, 4 +[10] Yonina C Eldar and Tomer Michaeli. Beyond bandlimited sampling. IEEE signal processing magazine, 26(3):48-68, 2009. 3 +[11] William T Freeman, Thouis R Jones, and Egon C Pasztor. Example-based super-resolution. IEEE Computer graphics and Applications, (2):56-65, 2002. 1 +[12] CA Glasbey. Optimal linear interpolation of images with known point spread function. In Proceedings of the Scandinavian Conference on Image Analysis., pages 161-168, 2001. 3 +[13] Daniel Glasner, Shai Bagon, and Michal Irani. Superresolution from a single image. In 2009 IEEE 12th international conference on computer vision, pages 349-356. IEEE. 1 +[14] Jinjin Gu, Hannan Lu, Wangmeng Zuo, and Chao Dong. Blind super-resolution with iterative kernel correction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1604-1613, 2019. 1, 2, 3 +[15] Muhammad Haris, Gregory Shakhnarovich, and Norimichi Ukita. Deep back-projection networks for super-resolution. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1664-1673, 2018. 1, 2, 4, 5, 6 +[16] Peter J Huber. Robust estimation of a location parameter. The Annals of Mathematical Statistics, pages 73-101, 1964. 5 + +[17] 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. 1, 2, 4 +[18] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization, 2014. 6 +[19] Vladimir Aleksandrovich Kotelnikov. On the transmission capacity of the 'ether' and of cables in electrical communications. 1933. 3 +[20] Christian Ledig, Lucas Theis, Ferenc Huszár, Jose Caballero, Andrew Cunningham, Alejandro Acosta, Andrew Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, et al. Photorealistic single image super-resolution using a generative adversarial network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4681-4690, 2017. 1, 2, 4 +[21] Bee Lim, Sanghyun Son, Heewon Kim, Seungjun Nah, and Young Mu Lee. Enhanced deep residual networks for single image super-resolution. In Proceedings of the IEEE conference on computer vision and pattern recognition workshops, pages 136-144, 2017. 1, 2, 4 +[22] Tomer Michaeli and Michal Irani. Nonparametric blind super-resolution. In Proceedings of the IEEE International Conference on Computer Vision, pages 945-952, 2013. 3 +[23] Harry Nyquist. Certain topics in telegraph transmission theory. Transactions of the American Institute of Electrical Engineers, 47(2):617-644, 1928. 3 +[24] Sathish Ramani, Dimitri Van De Ville, and Michael Unser. Non-ideal sampling and adapted reconstruction using the stochastic matern model. In 2006 IEEE International Conference on Acoustics Speech and Signal Processing Proceedings, volume 2, pages II-II. IEEE, 2006. 3 +[25] Mehdi SM, Sajjadi, Bernhard Scholkopf, and Michael Hirsch. Enhancenet: Single image super-resolution through automated texture synthesis. In Proceedings of the IEEE International Conference on Computer Vision, pages 4491-4500, 2017. 2 +[26] Claude Elwood Shannon. Communication in the presence of noise. Proceedings of the IRE, 37(1):10-21, 1949. 3 +[27] Assaf Shocher, Nadav Cohen, and Michal Irani. “zero-shot” super-resolution using deep internal learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3118–3126, 2018. 1, 2, 6 +[28] Filip Sroubek, Gabriel Cristóbal, and Jan Flusser. A unified approach to superresolution and multichannel blind deconvolution. IEEE Transactions on Image Processing, 16(9):2322-2332, 2007. 3 +[29] Tom Tirer and Raja Giryes. Image restoration by iterative denoising and backward projections. IEEE Transactions on Image Processing, 28(3):1220-1234, 2018. 3 +[30] Tom Tirer and Raja Giryes. Back-projection based fidelity term for ill-posed linear inverse problems. arXiv preprint arXiv:1906.06794, 2019. 2 +[31] Tom Tirer and Raja Giryes. Super-resolution via image-adapted denoising CNNs: Incorporating external and internal learning. IEEE Signal Processing Letters, 2019. 1, 2, 3 + +[32] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9446-9454, 2018. 1, 2 +[33] Michael Unser. Sampling—50 years after shannon. Proceedings of the IEEE, 88(ArtICLE):569-587, 2000. 1, 3 +[34] 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. 2 +[35] Yifan Wang, Federico Perazzi, Brian McWilliams, Alexander Sorkine-Hornung, Olga Sorkine-Hornung, and Christopher Schroers. A fully progressive approach to single-image super-resolution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 864-873, 2018. 1, 2, 4, 5, 6 +[36] Edmund Taylor Whittaker. On the functions which are represented by the expansions of the interpolation-theory. Proceedings of the Royal Society of Edinburgh, 35:181-194, 1915. 3 +[37] Jianchao Yang, John Wright, Thomas S Huang, and Yi Ma. Image super-resolution via sparse representation. IEEE transactions on image processing, 19(11):2861-2873, 2010. +[38] Kai Zhang, Wangmeng Zuo, Shuhang Gu, and Lei 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. 1, 2, 3 +[39] Kai Zhang, Wangmeng Zuo, and Lei Zhang. Learning a single convolutional super-resolution network for multiple degradations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3262-3271, 2018. 1, 2, 3, 6 +[40] Kai Zhang, Wangmeng Zuo, and Lei Zhang. Deep plug-and-play super-resolution for arbitrary blur kernels. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1671-1681, 2019. 3, 6 +[41] Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image super-resolution using very deep residual channel attention networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 286-301, 2018. 1, 2, 4, 5, 6 \ No newline at end of file diff --git a/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/images.zip b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1ee052f7005ede83d4e35995ea9361bdc5c7445a --- /dev/null +++ b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60f10316c541cd7fc90df82f8616a767d02a90875a1657b80298da7c9241cd24 +size 724677 diff --git a/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/layout.json b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1a24acf5ccadc49a9fbebe594bb9f7869ac2bffc --- /dev/null +++ b/correctionfilterforsingleimagesuperresolutionrobustifyingofftheshelfdeepsuperresolvers/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fd5ac7b1c61d4d62dbc5df9182f2d254cf9364dbff7dc9d56f9b6db5d435750 +size 511476 diff --git a/correlatingedgeposewithparsing/51a2d6bb-ca9a-43e8-98a2-a340a792b8bf_content_list.json b/correlatingedgeposewithparsing/51a2d6bb-ca9a-43e8-98a2-a340a792b8bf_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..41e49763deeac16266e81dcabeef0a57a309005a --- /dev/null +++ b/correlatingedgeposewithparsing/51a2d6bb-ca9a-43e8-98a2-a340a792b8bf_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b16140f1c07d4909d95d68e4a9d1ae7341e85ae263cd6a00e478a7cbcbe7d33 +size 94487 diff --git a/correlatingedgeposewithparsing/51a2d6bb-ca9a-43e8-98a2-a340a792b8bf_model.json b/correlatingedgeposewithparsing/51a2d6bb-ca9a-43e8-98a2-a340a792b8bf_model.json new file mode 100644 index 0000000000000000000000000000000000000000..31988d31cd52c22526f8f63fa99aba1aac49cdea --- /dev/null +++ b/correlatingedgeposewithparsing/51a2d6bb-ca9a-43e8-98a2-a340a792b8bf_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e585a1d6ec1c96354a3004e0fce5c7df73361c461b145055064152adf9c80ec +size 115307 diff --git a/correlatingedgeposewithparsing/51a2d6bb-ca9a-43e8-98a2-a340a792b8bf_origin.pdf b/correlatingedgeposewithparsing/51a2d6bb-ca9a-43e8-98a2-a340a792b8bf_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ef114454b01cc2671909cf6c5237d9e89b4eeace --- /dev/null +++ b/correlatingedgeposewithparsing/51a2d6bb-ca9a-43e8-98a2-a340a792b8bf_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d11d51d620938f63ae090ac6493113a8da214f879d5924c5b147255c9dc10799 +size 885632 diff --git a/correlatingedgeposewithparsing/full.md b/correlatingedgeposewithparsing/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e0383ed9aa7c2c3c8b6f1cbbcf3af8cf9db1a67c --- /dev/null +++ b/correlatingedgeposewithparsing/full.md @@ -0,0 +1,395 @@ +# Correlating Edge, Pose with Parsing + +Ziwei Zhang $^{1}$ , Chi Su $^{2*}$ , Liang Zheng $^{3}$ , Xiaodong Xie $^{1}$ + +$^{1}$ School of Electronics Engineering and Computer Science, Peking University $^{2}$ Kingsoft Cloud, $^{3}$ Australian National University + +{ziwei.zh,donxie}@pku.edu.cn, suchi@kingsoft.com, liang.zheng@anu.edu.au + +# Abstract + +According to existing studies, human body edge and pose are two beneficial factors to human parsing. The effectiveness of each of the high-level features (edge and pose) is confirmed through the concatenation of their features with the parsing features. Driven by the insights, this paper studies how human semantic boundaries and keypoint locations can jointly improve human parsing. Compared with the existing practice of feature concatenation, we find that uncovering the correlation among the three factors is a superior way of leveraging the pivotal contextual cues provided by edges and poses. To capture such correlations, we propose a Correlation Parsing Machine (CorrPM) employing a heterogeneous non-local block to discover the spatial affinity among feature maps from the edge, pose and parsing. The proposed CorrPM allows us to report new state-of-the-art accuracy on three human parsing datasets. Importantly, comparative studies confirm the advantages of feature correlation over the concatenation. + +# 1. Introduction + +This paper studies human parsing, aiming to partition a human image into semantic regions including body parts and clothes. This problem is challenging due to the complicated textures and styles of clothes, the deformable human body, the scale diversity of different categories, etc. As such, directly applying general semantic segmentation methods to human parsing may lead to unsatisfying results, which are reflected in two aspects. First, the boundaries between adjacent parts may be inaccurately located. The system might get confused with pixels along the boundaries, especially when the neighboring parts have similar appearance. Second, semantics of segmented parts may be inconsistent with human body structure, if we don't consider the affinity among different parts. This leads to mislabeling + +![](images/b6a24b34b8d4fe7059c0b2a728a1d8a16ab2888e298df7be6407b6d0112cddd7.jpg) +age + +![](images/6ea37f7194ebee05350f66248853a937ac98622384f7eab7b2e45e9beec4a7b2.jpg) +(b) I +arsi +g ba +seline +Figure 1. Illustration of parsing errors and our motivation. (a) Given images. (b) Results of parsing baseline [4]. (c) Fusion of parsing and human body edge features. (d) Fusion of parsing and the human keypoint features. (e) Results of our method. (f) Groundtruth. From (b), we observe parsing errors happen due to boundary ambiguity (white box) and body structure inconsistency (red box), respectively. The fusion of boundary features (c) or keypoint features (d) may mitigate one of the two errors. The two types of errors are obviously mitigated in (e) because we take the advantage of both boundary and keypoints by learning their correlation with parsing. By comparison, the proposed strategy is superior to concatenation or post processing as commonly done. + +![](images/a7bfc3a6ce4c15c682e1ea1e157dd717145d2c32cb12185bbeb7c49b413e460e.jpg) +(c) Pa +sing a +nd ec +ge ( + +![](images/36c2e4171c1235d2a185f66c626b8c9ba9301a1e6afa3154ded82773482d7af3.jpg) +1) Pa +sing a +nd pose + +![](images/51bcd646561edbdb0e7d5e95c2a4a50b5b5bf86e2f679afc4020012a9ff511b1.jpg) +(e) Our +method +(f + +![](images/0492064a15f9c232264a80a0063ccd7df7135ae8b24a9b7553efa61a75a5c4f6.jpg) +GroundTruth + +or missing predictions when context clues are not obvious. + +Edge detection and pose estimation can potentially address the above two problems. For the first problem, i.e., boundary confusions, human body edge detection is beneficial to distinguish two adjacent categories [3, 33]. For the second problem, i.e., semantics inconsistency, pose estimation provides keypoints to enforce the parsing results to be semantically consistent with human body structure [38, 28, 34]. Therefore, current research [3, 33, 37, 29] identifies human edge and pose as complementary cues to improve parsing performance. As shown in Fig. 1(b), when directly using generic segmentation methods for human parsing, some pixels of upper clothes are predicted as pants: the network incorrectly locates the edges between the two categories. Moreover, due to the lack of human semantic constraints, the left and right arms, left and right shoes are incorrectly identified. In Fig. 1(c), after adding edge + +information to parsing, we observe that the boundary pixels are accurately located. Further, when utilizing body part cues provided by pose features in Fig. 1(d), the mistaken prediction of the left arm no longer exists, and the left shoe is clearly distinguished from the right shoe. + +In spite of the improvements so far, existing research utilising edge/pose to improve parsing has not leveraged them to the full potential. Usually a single factor, i.e. either pose or edge, is used, which might be beneficial to handle a single problem mentioned above. In addition, existing methods typically perform feature concatenation or post processing for parsing refinement. We point out that this practice might be inferior. As shown in Fig. 1(c) and (d), when only a single factor is concerned for parsing system, there still remain blurs and holes in arm and dress area, and left/right shoes are inexactly predicted. Therefore, simple fusion or post processing may not be enough to process fine regions, such as edges of different parts. To address this problem, we explore the correlations among edge and pose and find that it is preferable that edge, pose and parsing are simultaneously integrated. + +In this paper, we propose a Correlation Parsing Machine (CorrPM) to take advantage of both human semantic edge and pose features to benefit human parsing. Contrary to performing feature concatenation or post processing, we learn the correlation among the three tasks. The CorrPM has three encoders and is featured by a heterogeneous non-local (HNL) module. The encoders calculate vector representations of the human edge, pose and semantics, respectively. HNL mixes the three features into a hybrid representation and explores the spatial affinity between this hybrid feature and the parsing feature map at all positions. As such, our method can effectively perceive the human edges and maintains the integrity of a semantic region, addressing the inaccurate boundary localization problem. Meanwhile, by perceiving the body keypoints, our method improves the consistency of the body part geometry. For example, as shown in Fig. 1 (e), our method corrects the mislabeling of arm region and correctly segments the boundary between upper clothes and pants, and between dresses and arms. + +To summarize, our contribution is three-fold. 1) We propose to use a Heterogeneous Non-Local (HNL) structure to capture the correlations among three closely related factors. 2) We show that human edge and pose, when both integrated in the Correlation Parsing Machine (CorrPM), bring significant improvement to parsing task. 3) Using simple edge detection and pose estimation models, we report very competitive parsing accuracy on three human parsing datasets. + +# 2. Related Work + +Semantic Segmentation. Human parsing is a fine-grained semantic segmentation, which performs per-pixel prediction on all objects. Due to its great prospects in appli + +cation, semantic segmentation has gained much importance in the past few years. FCN [25, 5, 42] performs well on this task which applies fully convolution on the whole image to produce labels of every pixel. Inspired by this, many researchers [31, 1, 32] start to leverage the encoder-decoder structure which extracts features by downsampling and then use upsampling to recover them to the original resolution. Aiming to enlarge the receptive field, another structure, DeepLab [4], designs atrous convolution kernels to force the network to perceive larger area and reduce the prediction errors. Zhao et al. [41] propose a pyramid scene parsing network aggregating multi-scale object clues to make the segmentation more precise. In [36], Xia et al. propose the "Auto-zoom Nets" to automatically "zoom" the objects and parts which have diverse scales. + +Human Parsing. Following main approaches in semantic segmentation, early researches in human parsing contribute towards this topic mostly by hand-crafted features and post-processed by Conditional Random Field (CRF) [11, 23]. Dong et al. [9] use a variety of parselets assembled by "And-Or" sub-trees to jointly parse human body labels and keypoint locations. With the development of convolutional neural network (CNN), especially after the ResNet [17] is proposed, many deep learning approaches have achieved much progress in this area. In [22], Liang et al. propose a Co-CNN framework capturing cross-layer local and global context information to boost the parsing performance. Gong et al. [15] introduce a new large-scale benchmark LIP and a novel self-supervised structure-sensitive learning method. In [20], Li et al. tackle the human parsing problem by generating global parsing maps for person in a bottom-up way. + +Utilizing edge or pose for parsing. Aiming to get more accurate predictions in human parsing task, recent works [10, 29, 14, 15, 37, 13, 7, 19, 30] utilize edge or pose information as a guidance. Chen et al. [3] propose an edge-aware filtering method to capture accurate semantic contours between two adjacent parts. Ruan et al. [33] fuse the edge map with parsing feature which can reserve the boundary of person parts to benefit the human parsing. Gong et al. [14] conduct both semantic part parsing and edge detection in the way of sharing intermediate representation of both features. Xia et al. [37] train two FCNs to predict poses and parts separately and then fuse them through a fully-connected conditional random field (FCRF) as a refinement. Nie et al. [29] observe that pose and parsing can simultaneously boost the performance of each other by training two parallel models and adapt the mutual parameters. Despite the improvement, the existing methods simply perform feature concatenation or pose-processing to refine parsing results, which is inferior to guide parsing model to learn contextual cues. Our framework simultaneously integrates edge, pose and parsing representation and effectively + +![](images/98dfe5dec48e77800f9170668ef2c07ff586063843ed4ca2b790730c2eb764f0.jpg) +Figure 2. Overview of the proposed network. PaE: parsing encoder. EdE: edge encoder. PoE: pose encoder. HNL: heterogeneous non-local module. FA: feature aggregation. $f_{*}$ : parsing/edge/pose features. After extracted by three encoders, parsing, pose and edge features are fed into HNL to explore their correlation to benefit human parsing task. + +exploits the correlation among these three representation. + +Non-local Network. Human parsing is closely complementary to semantic edge information and human pose information. And the relationship among them is exploited and employed by HNL which is modified from non-local network. Originating from non-local means algorithm [2], the non-local network is leveraged in many approaches to capture long-range dependencies [43, 40]. Wang et al.[35] propose the non-local block as a weighted summation of relationships of every position and show good performance in video classification. Even though non-local network has been a great success in many tasks, existing methods seek the relationship with the feature itself. Different from the existing self-attention mechanism, the proposed heterogeneous non-local module aggregates parsing, edge and pose factors together and learns the correlation of parsing with the other two features. + +# 3. The Proposed Approach + +As illustrated in Fig. 2, the proposed Correlation Parsing Machine (CorrPM) leverages human body keypoint and semantic boundary information to benefit human parsing. We firstly introduce the overall formulation of our framework in Section 3.1. The three feature encoders are represented in Section 3.2 and we propose a heterogeneous non-local + +module (HNL) to correlate the three factors in Section 3.3. Then, Section 3.4 explains the difference between the proposed HNL and the traditional non-local networks. And the overall training objective is illustrated in Section 3.5. + +# 3.1. Formulation + +Given an input image $I \in \mathbb{R}^{3 \times M \times N}$ of size $M \times N$ , our task is to predict the label of every pixel and generate a segmentation mask $P \in \mathbb{R}^{M \times N}$ leveraging three kinds of information: human body part category $\mathcal{P} \in \{0,1,\dots,Q\}^{M \times N}$ , semantic boundary $\mathcal{B} \in \{0,1\}^{M \times N}$ and human body keypoint location $\mathcal{K} = \{(x_i,y_i)\}_{i=1}^J$ . $J$ and $Q$ are the number of body joints and part categories. $(x_i,y_i)$ are the coordinates of the point $i$ , and the pixels that belong to boundaries are labeled as 1 otherwise 0. We aim to design a unified framework that jointly utilizes these three factors and uncovers the correlation among them to better leverage the pivotal contextual cues. + +# 3.2. Feature Encoding + +Human parsing, pose estimation, edge detection are complementary and closely related, hence, their features can be learned by a shared base model $\Theta$ , e.g., ResNet101 [17]. The feature at the lower stage of the base model retains high resolution structure and is fed to edge encoder to capture the object edge boundaries $f_{b}$ . And the higher-stage feature keeps rich semantic information which is further used as parsing feature $f_{p}$ and keypoint feature $f_{k}$ . + +Parsing Encoder. We adopt a parsing pipeline to predict a coarse segmentation map firstly. Context information is leveraged in many previous work [41, 4] in semantic segmentation and it is also essential in human parsing. Given the parsing feature of the base model $\Theta$ , we observe that merely performing dense pixel-wise prediction on it will cause mislabeling. Therefore, we add the Atrous Spatial Pyramid Pooling (ASPP) [4] to enlarge the receptive fields and get more useful context cues. + +Meanwhile, some objects in human parsing have quite low resolution, e.g., sunglasses and socks, so the details might be lost in the process of downsampling. We employ the feature of Res2 of base model and upsample the output of ASPP module to the same scale as Res2 and concatenate them as $f_{p}$ . After extracted from the parsing encoder, the feature $f_{p}$ obtains a coarse semantic representation and will be further fed into the heterogeneous non-local module to obtain pose and edge guidance. + +Pose Encoder. In order to get human body structure cues, we design a pose encoder to get joint locations. Many existing approaches [37, 29, 28] in pose estimation adopt complicated CNNs to get more accurate keypoint locations. For instance, Hourglass [28] performs repeated downsampling and upsampling procedure to capture multi-scale keypoint information. Different from them, we only deploy two + +![](images/b19b81a27190529687b3f728fc596ab8e328686788ea58e5e3cfe0c935b0b39f.jpg) +Figure 3. Structure of the heterogeneous non-local (HNL) module. It aggregates parsing, edge and pose feature into a hybrid feature $f_{h}$ and calculates the correlation between $f_{h}$ and $f_{p}$ . + +transposed convolution layers [38] to extract human keypoint structure, since pose estimation task can also get benefits from the parsing task. As a result, the shared feature is upsampled by 4 times generating the pose feature $f_{k}$ . It is the same scale as the parsing feature $f_{p}$ . + +After the pose representation $f_{k}$ is captured, we regress the heatmap from it. Following [34], we apply 2D Gaussian filter centered on each annotated keypoint coordinate with standard deviation of 7 pixels, and generate the ground truth heatmap as the supervision of pose encoder. + +Edge Encoder. In human parsing task, semantic boundary ambiguity remains to be solved. The border pixels of two adjacent semantic parts may be inaccurately predicted, particularly when they have similar appearances. Hence, we propose an edge encoder to learn feature $f_{b}$ with boundary consciousness. It is observed that lower stages in neural network maintain high resolution and higher-stage feature obtains detailed semantic information. As shown in Fig. 2, we leverage the features of Res2, Res3 and Res4 which retain both large spatial details and semantic consistency. The feature maps are upsampled to the same size as Res2 by linear interpolation. Then, they are concatenated and fed into a $1 \times 1$ convolution layer to generate the edge feature map $f_{b}$ . The edge encoder is supervised by the edge information between two adjacent categories and the feature will be further fed into the heterogeneous non-local correlation block. + +# 3.3. Heterogeneous Non-Local + +Many existing researches prove that either edge or pose is a beneficial factor to parsing task. However, the fusion strategy they employ cannot fully leverage the two factors as discussed above. Recently, the correlation module is used to capture the long-range contextual information by self-attention [12, 18] or explore the relationship between the two features [43]. However, if we follow this operation, the correlation computation cost is high $(O(n^{2}), n$ is the number of feature maps) and the overall model is hard to converge. Therefore, we propose a Heterogeneous Non-Local (HNL) block to fully leverage the contextual cues provided by boundaries and poses, which we believe is more effective + +and more efficient. + +As shown in Fig. 3, we first aggregate the three factors by concatenating them in the channel dimension, and then a convolution layer parameterized by $W_{a}$ is conducted to transform it into a hybrid feature $f_{h}$ , whose dimension is the same as that of $f_{p} \in \mathbb{R}^{C \times H \times W}$ : + +$$ +f _ {h} = W _ {a} \left(f _ {p} \oplus f _ {b} \oplus f _ {k}\right), \tag {1} +$$ + +where $\oplus$ means concatenation. + +We exchange the self-attention in the standard non-local block with correlation between the hybrid feature $f_{h}$ and parsing feature $f_{p}$ . First, $f_{h}$ and $f_{p}$ are fed into two convolution layers to generate two new features $A$ and $B$ , then we reshape them into matrixes with size $N \times C$ and $C \times N$ , respectively, where $N = H \times W$ denotes the total number of pixels per channel. We compute the relationship map $S \in \mathbb{R}^{N \times N}$ by a matrix product of $A$ and $B$ , and normalize the relation map by a softmax operation. + +$$ +S = \operatorname {s o f t m a x} (A \cdot B) \tag {2} +$$ + +where a point $(i,j)$ in $\mathbf{S}$ measures the relation affinity between the $i^{th}$ pixel in hybrid feature $f_{h}$ and $j^{th}$ pixel in parsing feature $f_{p}$ . + +Then we feed the parsing feature $f_{p}$ into another convolution layer to generate $f_{p_1} \in \mathbb{R}^{C \times H \times W}$ and reshape it to $\mathbb{R}^{N \times C}$ , which is multiplied by $S$ to integrate the pixel correlation cues into parsing features. The resulting feature is fed into the final convolution layer parameterized by $W_{b}$ and added back to $f_{p}$ element-wise to get the final parsing feature $f_{p_2}$ . The overall procedure can be formulated as: + +$$ +f _ {p _ {2}} = W _ {b} \left(\mathbf {S} \cdot f _ {p _ {1}}\right) + f _ {p}, \tag {3} +$$ + +where $W_{b}$ is initialized as 0. In this way, the hybrid representation effectively aggregates parsing, edge and pose information together. And the refined parsing feature $f_{p_2}$ in Equation 3 is a weighted summation of every position in the hybrid feature and the parsing feature. Therefore, it obtains edge information between two bordered parts and retains semantic consistency with human body, thus getting more reasonable parsing results. + +# 3.4. Discussions + +The heterogeneous non-local block is an extension of non-local neural network [35]. However, different from the traditional non-local operation which only computes the relationship of one feature as a mechanism of self-attention, the proposed network has three advantages. First, it integrates human parsing, pose estimation and edge detection tasks into a unified model, and the correlation is calculated among three different feature representations. Second, HNL does not add much computation complexity compared with traditional non-local structure while maintains + +very competitive accuracy. Finally, for other tasks which are also related to human parsing, it has potential to integrate it into the hybrid representation and model the relationship among them with only little computation complexity increased (brought by the corresponding encoder). + +# 3.5. Training objectives + +In addition to the parsing supervision, human keypoint location and semantic edge information are utilized to train the whole model. The total training objective is: + +$$ +L = L _ {p _ {2}} + L _ {p} + \alpha L _ {b} + \beta L _ {k}, \tag {4} +$$ + +$L_{p_2}$ or $L_{p}$ is the loss between the parsing result $f_{p_2}$ or $f_{p}$ and the parsing annotations; $L_{b}$ denotes the loss between the predicted edge map $f_{b}$ and the edge annotation; $L_{k}$ is the loss between the body joints prediction $f_{k}$ and the ground truth coordinates. It is worth noting that the edge annotation is obtained by finding the borders of the mask between two different semantic parts, which needs no additional annotations. Cross Entropy loss is adopted as $L_{p_2}$ , $L_{p}$ and $L_{b}$ , and Mean Square Error loss is used for $L_{k}$ . The whole framework is trained end-to-end. + +# 4. Experiments + +# 4.1. Experimental Settings + +Datasets and metrics. We evaluate the performance of the proposed method on three human parsing datasets: + +LIP [15] is a large-scale benchmark dataset focusing on semantic understanding of human body parts and clothes labels. It contains coordinates of 16 body keypoints and pixel-level annotations of 20 semantic human parts (including one background label). There are totally 50,462 images which are further split into train/val/test sets containing 30,462/10,000/10,000 images, respectively. + +ATR [22] contains 18 categories of human part labels including face, sunglasses, hat, scarf, hair, upper-clothes, left/right arm, belt, pants, left/right leg, skirt, left/right shoe, bag, dress and background. Following [22], we use 16,000 images for training, 1,000 for testing and 700 for validation. + +CIHP [14] provides 38,280 images with 20 categories. It contains 28,280 training, 5,000 validation and 5,000 test images. On account of no human pose annotations in ATR and CIHP, we utilize the pose estimator [38] trained on COCO [24] to obtain human body keypoint locations as ground truth. During training, we first utilize Mask R-CNN[16] to generate the mask of every person, and apply it on multi-person images to generate single person images. We obtain 93,213 training images in total. During inference, single person is segmented from background in the same way as training and we conduct parsing with the proposed network and finally merge them into the original image. + +
MethodEABIFusion StrategyAccuracy
[33]✓Feature concatenation++
[14]✓Feature concatenation++
[29]✓Parameters mutual learning++
[15]✓Loss constraint+
[37]✓Post processing+
Ours✓✓Correlation+++
+ +Table 1. Comparison of different fusion methods. EA represents edge ambiguity and BI represents boundary inconsistency. Existing methods use either edge or pose to solve a single problem in parsing. Different from them, we aggregate parsing, edge and pose feature and explore the correlation among them which shows the superiority on Accuracy. + +We report Accuracy, mIoU, Precision, Recall and F-1 score to evaluate the parsing performance on the datasets. + +Training Details. We train CorrPM from scratch for 150 epochs, and adopt ResNet101 [17] pre-trained on ImageNet [8] as the base model $\Theta$ . During training, the $384 \times 384$ input images are randomly rotated (from $-60^{\circ}$ to $60^{\circ}$ ), flipped and resized (from 0.75 to 1.25). $f_{p}, f_{k}$ and $f_{b}$ are in the same size of $C \times H \times W$ , where $C = 512$ and $H = W = 96$ . We use SGD as the optimizer and the learning rate is initially set as 1e-3. Following previous works [44], we employ the "poly" learning rate policy, and the learning rate is multiplied by $(1 - \frac{iter}{total\_iter})^{0.9}$ . We set the momentum to 0.9 and weight decay to 5e-4. The edge loss weight $\alpha$ and pose loss weight $\beta$ are 2 and 70. + +Testing phase. During inference, the outputs of pose and edge branches are ignored, and $f_{p_2}$ is employed to predict the final parsing mask $P$ . The inference procedure is executed on a 12GB TITAN V for a fair speed comparison with other methods. Our model does not add too much complexity compared with direct concatenation, because the base model (ResNet-101) consumes a majority of computations. CorrPM achieves a speed of 11 fps which is faster than Attention+SSL [15] (2 fps) and MuLA [29] (5 fps). + +# 4.2. Comparison with related methods + +# 4.2.1 Fusion strategy comparison + +Tab. 1 lists some existing researches that utilize pose or edge information to assist human parsing task. For edge ambiguity issue, [14] and [33] extract edge feature and concatenate it with parsing feature to perceive useful cues of part boundaries. But this fusion strategy is not able to sufficiently obtain the semantic boundary completeness. Aiming to solve body inconsistency problem, [29] conducts two parallel human pose estimation and human parsing networks and mutually learns the parameters. However, the training process is somewhat complicated. Meanwhile, [37] adopts FCRF as a way of post-processing and [15] adds a joint loss utilizing the pose information to constrain part segments. Above fusion methods only employ a single factor and merely handle a single problem. In comparison, + +
MethodPixel Acc.Mean Acc.mIoU
DeepLabV2 [4]82.6651.6441.64
Attention [5]83.4354.3942.92
Attention+SSL [15]84.3654.9444.73
SS-NAN [42]87.5956.0347.92
MuLA(Hourglass) [29]88.5060.5049.30
JPPNet [21]86.3962.3251.37
CE2P [33]87.3763.2053.10
Ours†87.3666.3754.43
Ours87.6867.2155.33
+ +Table 2. Comparison of different methods on the validation set of the LIP dataset. $\dagger$ means removing $L_{p}$ in Equation 4. + +
MethodAccF.g.AccPreRecF-1 score
DeepLabV2 [4]94.4282.9369.2478.4873.53
Attention [5]95.4185.7181.3073.5577.23
CoCNN [22]96.0283.5784.5977.6680.14
TGPNet [26]96.4587.9183.3680.2281.76
Ours97.1290.4089.1883.9386.12
+ +our CorrPM combines parsing with pose and edge information, and the experiment also shows exploring the correlation among the three factors is a superior feature fusion strategy to other recent methods. + +# 4.2.2 Performance on single-person datasets + +LIP. We show the performance comparison of the proposed model and the other methods on LIP validation set. As shown in Tab. 2, the proposed CorrPM achieves the best performance of $55.33\%$ in terms of mIoU and significantly outperforms other methods. Specifically, JPPNet and MuLA add pose supervision as a constraint of human parsing. CE2P adds edge information to refine parsing results. Their experiment results show that pose and edge cues help achieve better performance. However, the pose or edge in formations are not fully exploited. By exploring the correlation between the three factors, the HNL brings a boost of $2.23\%$ mIoU to CE2P and $6.03\%$ mIoU to MuLA. Even when removing the loss $L_{p}$ , the $54.43\%$ mIoU is higher than others, which indicates the direct supervision of the parsing encoder is necessary and our framework effectively utilizes pose and edge features to assist human body parsing. Moreover, the pose encoder in our network only consists of two deconvolution layers, and it is much simpler than the hourglass which is adopted in MuLA [29]. Thus, the performance may get higher if utilizing more powerful network. + +ATR. Tab. 3 reports the results and comparisons with four recent approaches on ATR. The proposed method brings a significant performance gain in terms of every metric. Particularly, our model achieves $4.36\%$ boost for F-1 score. This increase confirms the effectiveness of the pose and edge factors to parsing, and the correlation module has a strong capability to incorporate pose and edge information with the parsing features. Although the F-1 score $90.89\%$ in + +Table 3. Comparison of Accuracy, Foreground Accuracy, Precision, Recall and F-1 score on the ATR test set. + +
MethodBackbonemIoU
PGN [14]ResNet10155.80
Parsing R-CNN (R50) [39]ResNet5057.50
Graphonomy [13]DeepLabV3+58.58
Parsing R-CNN (X101) [39]ResNeXt10159.80
OursResNet10160.18
+ +Table 4. Comparison of performance on the CIHP validation set. + +[13] is higher than ours, it adopts DeepLabV3+ as backbone which is more complicated than ResNet101, and the input size $512 \times 512$ is larger than our $384 \times 384$ . On the basis that the human joint labels are obtained from the output of the pose estimator [38], it illustrates that the proposed system is flexible and has a low-complexity to be deployed with no additional pose annotation cost. + +# 4.2.3 Performance on multi-person datasets + +CIHP. Experiment results are compared with the other approaches in Tab. 4 on the CIHP dataset. Our model outperforms the existing approaches and achieves 60.18 in terms of mIoU. The previous work [14] gets $55.80\%$ mIoU by jointly conducting human parsing and edge detection. Parsing R-CNN [39] gets $57.50\%$ mIoU using ResNet50 and its training images are in the size of $512 \times 864$ . Using smaller input size and backbone ResNet101, our performance is $0.38\%$ mIoU higher than Parsing R-CNN even when it changes the backbone to ResNeXt101. Our result is $1.6\%$ mIoU higher than Graphonomy [13], which uses a graph convolution model and adopts a strong backbone DeepLabV3+ [6]. This performance suggests the superiority of our parsing method with the assistance of pose and edge factors, and correlating parsing with pose and edge can introduce contextual cues into human parsing task. + +# 4.3. Evaluation of each component + +We analyze the parameter sensitivities of our model in Tab. 6 and validate the effect of each component in Tab. 5. + +The effect of different loss weights. The loss values in different branches are crucial to the model. In Tab. 6, we test four $\alpha$ values $\{0,1,2,10\}$ with six $\beta$ values $\{0,1,10,50,70,80\}$ . $\alpha = 0$ or $\beta = 0$ indicates the baseline that removes the edge branch or pose branch from our model. It is observed that adding either edge or pose information to the parsing network brings a significant boost to the baseline. And the model achieves the highest mIoU when $\alpha = 2$ and $\beta = 70$ , which we choose as the final loss weights. + +The effect of pose and edge cues. Firstly, we train a baseline model P which only contains parsing branch. In Tab. 5, without the contextual cues from pose and edge feature, the baseline model achieves $48.67\%$ mIoU. We then add an edge/pose branch to the baseline model and concatenate parsing with edge/pose feature to perform prediction, denoted as $\mathrm{P + B}$ and $\mathrm{P + K}$ . Compared with baseline model + +
Methodhathairgloveglassu-clotdresscoatsockpantsj-suitscarfskirtfacel-armr-arml-legr-legl-shoer-shoebkgAvg
Attention [5]58.8766.7823.3219.4863.2029.6349.7035.2366.0424.7312.8420.4170.5850.1754.0338.3537.7026.2027.0984.0042.92
DeepLabV2 [4]56.4865.3329.9819.6762.4430.3351.0340.5169.0022.3811.2920.5670.1149.2552.8842.3735.7833.8132.8984.5344.03
MMAN [27]57.6665.6330.0720.0264.1528.3951.9841.4671.0323.619.6523.2069.5455.3058.1351.9052.1738.5839.0584.7546.81
SS-NAN [42]63.8670.1230.6323.9270.2733.5156.7540.1872.1927.6816.9826.4175.3355.2458.9344.0141.8729.1532.6488.6747.92
JPPNan [21]63.5570.2036.1623.4868.1531.4255.6544.5672.1928.3918.7625.1473.3661.9763.8858.2157.9944.0244.0986.2651.37
CE2P [33]65.2972.5439.0932.7369.4632.5256.2849.6774.1127.2314.1922.5175.5065.1466.5960.1058.5946.6346.1287.6753.10
P63.6169.1836.2527.6867.2331.8053.6943.4571.7528.7614.3324.3972.3357.7660.7447.8047.3834.1834.9086.2248.67
PP62.6068.4735.7827.3665.1627.7851.5041.6070.4229.6017.1121.5071.6959.4662.1150.8050.7537.7640.0385.6948.86
P+B65.1170.7138.3830.0468.6532.6055.1346.3173.3731.9417.5128.3673.5160.6863.5251.5051.3739.7539.7887.0951.27
P+K64.3070.2439.1028.8568.0333.1055.1646.7472.9927.5716.5928.4473.0360.6063.3451.2251.4238.6839.4086.9050.79
P+B+K65.0171.1340.3029.1469.4733.9155.7847.8273.8531.9818.8128.9474.1261.9363.9552.3551.9940.1940.8187.2351.93
PB65.4371.7740.6926.0069.3232.8256.3346.6174.5230.8723.4627.5174.2864.2366.6857.6456.7244.8044.8087.7753.11
PK66.1672.0640.5231.1569.7433.9756.8149.2274.7432.5620.1927.8174.7865.4867.4559.4858.4145.4145.9587.7253.98
PBB66.1472.4241.0427.8170.1234.9157.0147.2175.0331.3822.9928.2174.3964.9267.5858.3357.6445.5146.1087.4653.82
PKK66.1572.2640.7831.3469.9434.0257.4049.4174.9132.1921.7728.1174.9865.3867.5559.6658.6245.5846.0187.3254.17
Ours (CorrPM)66.2071.5641.0631.0970.2037.7457.9548.4075.1932.3723.7929.2374.3666.5368.6162.8062.8149.0349.8287.7755.33
+ +Table 5. Comparison of per-class IoU on the LIP validation set. P: Only parsing feature; PP: Performing self-correlation on parsing feature; $\mathrm{P + B / P + K}$ : Concatenating parsing with edge/pose feature; $\mathrm{P + B + K}$ : Concatenating parsing, edge and pose feature; PB/PK: Correlating parsing with edge/pose feature; PBB/PKK: Correlating parsing with two edge/pose features. CorrPM outperforms existing methods and achieves $55.33\%$ mIoU. + +
αβ
0110507080
048.7252.0852.7753.1053.9853.59
150.9851.1552.0351.5453.7853.13
253.0853.5254.0854.0155.3354.45
1053.1253.4653.5753.2453.4553.53
+ +Table 6. Parameter discussion of $\alpha$ and $\beta$ values in Equation 4 on the LIP dataset. + +P, simple concatenation boosts $2.6\%$ and $2.12\%$ in terms of mIoU, respectively. Particularly, after fusing edge and parsing feature, the performances of some classes which are usually adjacent and have similar appearances (e.g., upper clothes and pants), gain nearly $1.5\%$ mIoU. These results demonstrate the effectiveness of edge and pose factors to parsing task. And the model $\mathrm{P + B + K}$ denotes concatenating both edge and pose feature with parsing feature. It only improves the performance by $0.66\%$ mIoU compared with $\mathrm{P + B}$ , which indicates that even pose and edge factors are necessary for parsing, concatenating all three factors is not an ideal method to sufficiently leverage contextual cues. + +The effect of self-correlation. To investigate the effect of the non-local operation, we add a traditional nonlocal self-attention module at the end of baseline model, denoted as PP. From Tab. 5, there is little improvement (0.09% mIoU) when calculating the relationship within parsing feature itself, and the performance of some classes is reduced such as hat, dress and upper-clothes. It shows that only exploiting the self-correlation of parsing feature is not enough and we need more pivotal factors from pose and edge to boost parsing performance. + +The effect of correlation among parsing, edge and pose. We conduct two heterogeneous non-local correlations experiments, one is between parsing and edge factor, denoted as PB, and the other is between parsing and pose factor, denoted as PK, to validate the benefits of correlation module to parsing task. The performance improvement is more significant if leveraging the proposed heterogeneous + +non-local module, yielding $4.44\%$ and $5.31\%$ increases in terms of mIoU to baseline model P. And compared with $\mathrm{P + B}$ and $\mathrm{P + K}$ , the correlation module brings $1.84\%$ and $3.19\%$ mIoU gains. And even if we only use either pose or edge features, the result is more than $1.18\%$ mIoU higher than the concatenation of all the three features, $\mathrm{P + B + K}$ . It is also observed that some categories which are closely related to human body joints are significantly improved by a large margin, which yields about $10\%$ improvement in terms of mIoU. It shows that our HNL can make sufficient use of edge and pose information to accurately locate the boundary of semantics and maintain the body part geometry. + +The effect of integration of multiple tasks. Aggregating the feature maps from multiple tasks will increase the channel number for fusion with parsing feature. Thus experiments are performed to study the efficacy of it. In Tab. 5, PBB (PKK) demonstrates the result of fusing two edge (pose) feature maps with parsing feature along channel dimension in HNL. PBB/PKK has the same channel number as CorrPM, while the mIoU is more than $1\%$ lower than it. It shows the improvements are from the integration of multiple tasks rather than the increased channel number. + +# 4.4. Qualitative Results + +The solution of pose and edge to two problems. As mentioned in Sec. 1, there are two problems in human parsing task: inaccurate boundary localization between two adjacent parts and semantics inconsistency of segmented categories. Several images and sub-relation maps are shown in Fig. 4 to demonstrate the benefits that the proposed HNL learns from pose and edge information. The size of relation map $S$ mentioned in Sec. 3.3 is $HW \times HW$ . Hence, for a certain position in the image (marked as red point in Fig 4), the size of its corresponding sub-relation map is $H \times W$ . As shown in the left half of Fig 4, some pixels in right arm are wrongly predicted as left arm, while there is no semantic boundary in this region. In the second row, + +![](images/fe0f9f096713b8981fa1ae79f395b12401619e10cb61ee29336384afa6e4cef1.jpg) +Image +map of red points +Figure 4. Visualization results of different fusion methods. These images show the benefits of edge/pose information to parsing task. The meaning of symbols is the same as Tab. 5. + +![](images/ccc1682d0920c7d2c28f6afec53605fc36d6aa5b8527609e04caaca809bd3bf1.jpg) +Sub-relation + +![](images/661fbfd3fe5b6db30b94fd69eb3af2252c87744f309f388e191e9421e65da155.jpg) +P + +![](images/a8bbef3718440f0c9033874693442710130de11410e9e0c44a01d24fe1663532.jpg) +P+B + +![](images/5390bf3b713a5365c3278b7477c67df06ce1730d5acfb0c1473db02acb486f4a.jpg) +PI + +![](images/f000f2b4395ea82a288ccfdd7ae918793f3fd65921ed52bbd894ce6be9a7bdac.jpg) +Cc + +![](images/3450a5fa51e35caf7beb6a0d877df7b9ae00eb0dfda0550020e0ba51f27f6564.jpg) +GroundTruth + +![](images/b3db8a0a6bcf8acc03d58d072dcaf94e3fa8978951f6a1c28c663d714ed81b74.jpg) +Image + +![](images/97e8014af03b2b44c6592d1659d29c30e259d57712dbde127bf48d33fdaae406.jpg) +Sub-relation + +![](images/e054da5f67724e1054a88a74da96d2f6da8b783a32a54e787f15cd88b87679e8.jpg) +P + +![](images/44d678491158b1288ef7de13edf59f2bc38a444190f09ea25f76e6b0e43b3e9d.jpg) +P+K + +![](images/08a0254559dbead249725a54e7bb765d32bce3c966a213b1aaab330a96d34788.jpg) +PK + +![](images/7f8cf68ac6249e4b44631290dcd2a696639979c95dcfa32faacaafef2995203f.jpg) +CorrPM +GroundTruth + +![](images/1558cf2408a3e616525710aaf8b7daf82fb31f4cc7370e6f847caed1e98d4a8f.jpg) + +![](images/4c7c44551b97cbd71b085942b73f1aaef5b2f06d715acadae8fd230a8d370279.jpg) +Input + +![](images/56389bdfea0e613ae25c3f4a3735e7ecd7c302f65c3bd6eb1073b9b5d2d54dd5.jpg) +GT + +![](images/a74e50bc27e2783a58f79ad44062778b46bd8e5a00aa97c10513f83784312e72.jpg) +Ours + +![](images/f8cee2b8892efcfa95cc0c071e779f791781257bd2be50ca055c2352153d5acf.jpg) +Backbone + +![](images/cb929f5b4cf94699cd9bf72c0623622544c5ce4d4796f76be8d533e5787f07bf.jpg) +DeepLabV2 + +![](images/e3245a50ee95494b50977ef1170658460f65679f6260b99c6ea177d2f47b23c7.jpg) +MMAN + +![](images/508f0013993dea2287b86dbcacc9bae2c49d6bb0b1aa1e4e3c04e20eebd312fa.jpg) + +![](images/39198ac68077b205b6230bd7110cfde01122c7d357ac938fa37a471b7b26c4e5.jpg) + +![](images/32eca665fed6888d0c7d894ddf9978233697ee4a796bce0a719ba30a20fbe918.jpg) + +![](images/68d732c854cafe7b7f014626800c10c7db45334a725c12fdece5456fb3c8b298.jpg) + +![](images/b2a3ec3c45054b481587b5a4b6cb91043fdb9b52fec0eb005c3bdcf8ac7e52d3.jpg) + +![](images/21b42f0b7de17e56365530f6e4fe589673b56c9880a8c03bf673d84e32d1026a.jpg) + +![](images/d3a131edd8a868b7ac86ef403ebcd42b064733bde1d254062345c5a7d5b60259.jpg) + +![](images/8cfc911f68e81e691b8d3668c9ba820ab75115d8c75d7f2f21ff2e2740a294cd.jpg) + +![](images/b097b0638100b7da63872f3d00ce096b8a3dc6afc65f3431f8aa3a54386bcf11.jpg) + +![](images/35fed702d0028a875ac2f2e2c89151be32d8ada5384d9761f56737e55267c92d.jpg) + +![](images/c090fd5b326f6bdd2e7270a17f66e391efc6e44d5ee11713f89763fe987139e4.jpg) + +![](images/b544820d70563026b1088244b22d853908309a86fbb7915e5821d81d65fc7fc2.jpg) + +![](images/6ab5464461fe953762ce0d9b1bfeb29ef4474fc2434e5ae337330a78b06241c2.jpg) +Figure 5. Visualization of different methods on the LIP dataset. The proposed CorrPM obtains smoother edge prediction and more reasonable body structure results. + +![](images/c54003e4ac6f1ee98d7fc83291ec7e26e8f7419a32312e3321e691f713d394bd.jpg) + +![](images/08385c528953ce6fd7d6c5512df5875c02d1aa7c1424ad4d8f70c29be72af854.jpg) + +![](images/fe166232c29bb05d21b1734524c23d0f8db744b4b0b3617d8725be3733086f68.jpg) + +![](images/0dd49266f5ff8d3e8b6efe3f94f78621894cad263f0b5df8faff535258335ac3.jpg) + +![](images/40793531957794d82f726c1d73d593b033200a48aaab8aff80e0a0e7afcf56fc.jpg) + +the appearances of the coat and bird are similar so that the baseline model cannot tell them apart. After concatenating edge with parsing feature, the number of error pixels reduces but the boundary is still not clear. When utilizing correlation module, all the semantic edges are rightly predicted. Hence correlating edge with parsing factor can solve inaccurate boundary localization problem. From the right part of Fig. 4, the shoes region loses much detail during downsampling process, thus is not correctly classified. Concatenating pose with parsing feature can mitigate this problem. After correlating with parsing feature, the model obtains the awareness of the position of foot and shoe, hence the shoes classes are segmented correctly. Therefore, correlating pose with parsing factor can settle the semantics inconsistency matter. + +Comparison with the previous methods. We show the quality results in Fig. 5 compared with DeepLabV2 [4], MMAN [27]. Our model outperforms other methods and + +the predictions are more precise. For example, on the first row, the head and right arms of the person are missing in other methods, while our model correctly predicts them despite the complexity of the background. Besides, with the help of edge information, our framework successfully locates the semantic boundary of the clothes and the legs shown in the second row, and keeps the semantics consistent among upper clothes category. We also observe from the third row that by adding pose information, the model can learn the global body structure of human and accurately identifies the left and right shoes, not legs. Consequently, the proposed HNL effectively employs the relationship of edge, pose and parsing features, and outputs more reasonable and precise results on the human parsing task. + +# 5. Conclusion + +In this paper, we propose a Correlation Parsing Machine (CorrPM) to take advantage of both semantic edge and human body keypoint features. For the two problems in human parsing task, our approach utilizes semantic edge to distinguish the boundary of two adjacent categories and human keypoint to enforce segmented classes to be consistent with body parts. With the heterogeneous non-local (HNL) module, the proposed model explores the relationship of edge, pose and parsing factors, and provides the contextual cues for human parsing task. The whole model is end-to-end learnable. Experiments on three benchmarks demonstrate the effectiveness of the proposed method. Moreover, the proposed system is flexible and easy to be deployed even without pose annotation. + +Acknowledgments. This work is partially supported by the Beijing Major Science and Technology Project under contract No. Z191100010618003 and National Key Research and Development Program of China under contract No. 2016YFB0402001. We acknowledge Kingsoft Cloud for the helpful discussion and free GPU cloud computing resource support. We are also grateful to Dr Liang Zheng who is the recipient of an Australian Research Council Discovery Early Career Award (DE200101283) funded by the Australian Government. + +# References + +[1] Vijay Badrinarayanan, Ankur Handa, and Roberto Cipolla. Segnet: A deep convolutional encoder-decoder architecture for robust semantic pixel-wise labelling. Computer Science, 2015. +[2] A. Buades, B. Coll, and J. M. Morel. A non-local algorithm for image denoising. In IEEE Computer Society Conference on Computer Vision & Pattern Recognition, 2005. +[3] Liang-Chieh Chen, Jonathan T Barron, George Papandreou, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with task-specific edge detection using cnns and a discriminatively trained domain transform. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4545-4554, 2016. +[4] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE transactions on pattern analysis and machine intelligence, 40(4):834-848, 2017. +[5] Liang-Chieh Chen, Yi Yang, Jiang Wang, Wei Xu, and Alan L Yuille. Attention to scale: Scale-aware semantic image segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3640-3649, 2016. +[6] Liang-Chieh Chen, Yukun Zhu, George Papandreou, Florian Schroff, and Hartwig Adam. Encoder-decoder with atrous separable convolution for semantic image segmentation. In Proceedings of the European conference on computer vision, pages 801-818, 2018. +[7] Jifeng Dai, Kaiming He, and Jian Sun. Instance-aware semantic segmentation via multi-task network cascades. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3150-3158, 2016. +[8] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248-255. IEEE, 2009. +[9] Jian Dong, Qiang Chen, Wei Xia, Zhongyang Huang, and Shuicheng Yan. A deformable mixture parsing model with parselets. In IEEE International Conference on Computer Vision, 2014. +[10] Hao-Shu Fang, Guansong Lu, Xiaolin Fang, Jianwen Xie, Yu-Wing Tai, and Cewu Lu. Weakly and semi supervised human body part parsing via pose-guided knowledge transfer. arXiv preprint arXiv:1805.04310, 2018. +[11] Clement Farabet, Camille Couprie, Laurent Najman, and Yann LeCun. Learning hierarchical features for scene labeling. IEEE transactions on pattern analysis and machine intelligence, 35(8):1915-1929, 2012. +[12] Jun Fu, Jing Liu, Hajjie Tian, Yong Li, Yongjun Bao, Zhiwei Fang, and Hanqing Lu. Dual attention network for scene segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3146-3154, 2018. +[13] Ke Gong, Yiming Gao, Xiaodan Liang, Xiaohui Shen, Meng Wang, and Liang Lin. Graphonomy: Universal human parsing via graph transfer learning. In Proceedings of the IEEE + +Conference on Computer Vision and Pattern Recognition, pages 7450-7459, 2019. +[14] Ke Gong, Xiaodan Liang, Yicheng Li, Yimin Chen, Ming Yang, and Liang Lin. Instance-level human parsing via part grouping network. In Proceedings of the European Conference on Computer Vision, pages 770-785, 2018. +[15] Ke Gong, Xiaodan Liang, Dongyu Zhang, Xiaohui Shen, and Liang Lin. Look into person: Self-supervised structure-sensitive learning and a new benchmark for human parsing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 932-940, 2017. +[16] 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. +[17] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. +[18] Zilong Huang, Xinggang Wang, Lichao Huang, Chang Huang, Yunchao Wei, and Wenyu Liu. Ccnet: Criss-cross attention for semantic segmentation. In The IEEE International Conference on Computer Vision, October 2019. +[19] Dong Jian, Chen Qiang, Xiaohui Shen, Jianchao Yang, and Shuicheng Yan. Towards unified human parsing and pose estimation. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, 2014. +[20] Jianshu Li, Jian Zhao, Yunchao Wei, Congyan Lang, Yidong Li, Terence Sim, Shuicheng Yan, and Jiashi Feng. Multiple-human parsing in the wild. arXiv preprint arXiv:1705.07206, 2017. +[21] Xiaodan Liang, Gong Ke, Xiaohui Shen, and Lin Liang. Look into person: Joint body parsing and pose estimation network and a new benchmark. IEEE Transactions on Pattern Analysis and Machine Intelligence, PP(99):1-1, 2018. +[22] Xiaodan Liang, Chunyan Xu, Xiaohui Shen, Jianchao Yang, Si Liu, Jinhui Tang, Liang Lin, and Shuicheng Yan. Human parsing with contextualized convolutional neural network. In Proceedings of the IEEE international conference on computer vision, pages 1386-1394, 2015. +[23] Guosheng Lin, Chunhua Shen, Anton Van Den Hengel, and Ian Reid. Efficient piecewise training of deep structured models for semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3194-3203, 2016. +[24] Tsungyi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European Conference on Computer Vision, pages 740-755, 2014. +[25] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3431-3440, 2015. +[26] Xianghui Luo, Zhuo Su, Jiaming Guo, Gengwei Zhang, and Xiangjian He. Trusted guidance pyramid network for human parsing. In 2018 ACM Multimedia Conference on Multimedia Conference, pages 654-662. ACM, 2018. + +[27] Yawei Luo, Zhedong Zheng, Zheng Liang, Guan Tao, Junqing Yu, and Yang Yi. Macro-micro adversarial network for human parsing. In European Conference on Computer Vision, 2018. +[28] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In European conference on computer vision, pages 483-499. Springer, 2016. +[29] Xuecheng Nie, Jiashi Feng, and Shuicheng Yan. Mutual learning to adapt for joint human parsing and pose estimation. In Proceedings of the European Conference on Computer Vision, pages 502-517, 2018. +[30] Xuecheng Nie, Jiashi Feng, Yiming Zuo, and Shuicheng Yan. Human pose estimation with parsing induced learner. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2018. +[31] Hyeonwoo Noh, Seunghoon Hong, and Bohyung Han. Learning deconvolution network for semantic segmentation. In IEEE International Conference on Computer Vision, 2015. +[32] 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. +[33] Tao Ruan, Ting Liu, Zilong Huang, Yunchao Wei, Shikui Wei, and Yao Zhao. Devil in the details: Towards accurate single and multiple human parsing. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 4814-4821, 2019. +[34] Ke Sun, Bin Xiao, Dong Liu, and Jingdong Wang. Deep high-resolution representation learning for human pose estimation. arXiv preprint arXiv:1902.09212, 2019. +[35] 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. +[36] Fangting Xia, Peng Wang, Liang-Chieh Chen, and Alan L Yuille. Zoom better to see clearer: Human and object parsing with hierarchical auto-zoom net. In European Conference on Computer Vision, pages 648-663. Springer, 2016. +[37] Fangting Xia, Peng Wang, Xianjie Chen, and Alan L Yuille. Joint multi-person pose estimation and semantic part segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6769-6778, 2017. +[38] Bin Xiao, Haiping Wu, and Yichen Wei. Simple baselines for human pose estimation and tracking. In Proceedings of the European Conference on Computer Vision, pages 466-481, 2018. +[39] Lu Yang, Qing Song, Zhihui Wang, and Ming Jiang. Parsing r-cnn for instance-level human analysis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 364-373, 2019. +[40] Yulun Zhang, Kunpeng Li, Kai Li, Bineng Zhong, and Yun Fu. Residual non-local attention networks for image restoration. arXiv preprint arXiv:1903.10082, 2019. +[41] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In + +Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2881-2890, 2017. +[42] Jian Zhao, Jianshu Li, Xuecheng Nie, Fang Zhao, Yunpeng Chen, Zhecan Wang, Jiashi Feng, and Shuicheng Yan. Self-supervised neural aggregation networks for human parsing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 7-15, 2017. +[43] Zhen Zhu, Mengde Xu, Song Bai, Tengteng Huang, and Xiang Bai. Asymmetric non-local neural networks for semantic segmentation. In The IEEE International Conference on Computer Vision, October 2019. +[44] Yueqing Zhuang, Fan Yang, Li Tao, Cong Ma, Ziwei Zhang, Yuan Li, Huizhu Jia, Xiaodong Xie, and Wen Gao. Dense relation network: Learning consistent and context-aware representation for semantic image segmentation. In International Conference on Image Processing, pages 3698-3702, 2018. \ No newline at end of file diff --git a/correlatingedgeposewithparsing/images.zip b/correlatingedgeposewithparsing/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f1f1b35d0410c243f11411702b1fccad3320add9 --- /dev/null +++ b/correlatingedgeposewithparsing/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3ece9d793ce45d3431cdd061639c46830350f3c71fbc4d72e048b9fbad7f9cc +size 566472 diff --git a/correlatingedgeposewithparsing/layout.json b/correlatingedgeposewithparsing/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d1f472283811d689e7a5313ca88c1a6ca16c53a5 --- /dev/null +++ b/correlatingedgeposewithparsing/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc8bac7c747053cb16f6fb5f4b4348b9d4f5efbda4a3ea872d2d8fb5b7afa93e +size 528175 diff --git a/correlationguidedattentionforcornerdetectionbasedvisualtracking/3f4e4870-5d80-40ff-adc0-df7fd63f8ae2_content_list.json b/correlationguidedattentionforcornerdetectionbasedvisualtracking/3f4e4870-5d80-40ff-adc0-df7fd63f8ae2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2a07a545718a63b69ecedc3f7d4d74649b73dd59 --- /dev/null +++ b/correlationguidedattentionforcornerdetectionbasedvisualtracking/3f4e4870-5d80-40ff-adc0-df7fd63f8ae2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74e980b92eccc0478e8b5836d11b579e7b2acd13e03af9858b69bd9b03c12098 +size 77307 diff --git a/correlationguidedattentionforcornerdetectionbasedvisualtracking/3f4e4870-5d80-40ff-adc0-df7fd63f8ae2_model.json b/correlationguidedattentionforcornerdetectionbasedvisualtracking/3f4e4870-5d80-40ff-adc0-df7fd63f8ae2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..bd348fe93484fc8cde4e7825d1d7e8f385baba8a --- /dev/null +++ b/correlationguidedattentionforcornerdetectionbasedvisualtracking/3f4e4870-5d80-40ff-adc0-df7fd63f8ae2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5b21dc0b009a447e3afa232df23543d217ced4feda4fc7b9e78598e94a0d089 +size 92691 diff --git a/correlationguidedattentionforcornerdetectionbasedvisualtracking/3f4e4870-5d80-40ff-adc0-df7fd63f8ae2_origin.pdf b/correlationguidedattentionforcornerdetectionbasedvisualtracking/3f4e4870-5d80-40ff-adc0-df7fd63f8ae2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f345e1195c3dcbd69a5ac5261fac1749d4e3aa38 --- /dev/null +++ b/correlationguidedattentionforcornerdetectionbasedvisualtracking/3f4e4870-5d80-40ff-adc0-df7fd63f8ae2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56ec0f8f63fc5e1d4f95391241561b122fa75ec5c7de45c947e1f8f045fb6ca0 +size 356812 diff --git a/correlationguidedattentionforcornerdetectionbasedvisualtracking/full.md b/correlationguidedattentionforcornerdetectionbasedvisualtracking/full.md new file mode 100644 index 0000000000000000000000000000000000000000..cec2b90e765df8a8a2d0adbd67f4be346f279201 --- /dev/null +++ b/correlationguidedattentionforcornerdetectionbasedvisualtracking/full.md @@ -0,0 +1,302 @@ +# Correlation-Guided Attention for Corner Detection Based Visual Tracking + +Fei Du Peng Liu Wei Zhao Xianglong Tang + +School of Computer Science and Technology, Harbin Institute of Technology, China + +{feiaxyt, pengliu, zhaowei, tangxl}@hit.edu.cn + +# Abstract + +Accurate bounding box estimation has recently attracted much attention in the tracking community because traditional multi-scale search strategies cannot estimate tight bounding boxes in many challenging scenarios involving changes to the target. A tracker capable of detecting target corners can flexibly adapt to such changes, but existing corner detection based tracking methods have not achieved adequate success. We analyze the reasons for their failure and propose a state-of-the-art tracker that performs correlation-guided attentional corner detection in two stages. First, a region of interest (RoI) is obtained by employing an efficient Siamese network to distinguish the target from the background. Second, a pixel-wise correlation-guided spatial attention module and a channel-wise correlation-guided channel attention module exploit the relationship between the target template and the RoI to highlight corner regions and enhance features of the RoI for corner detection. The correlation-guided attention modules improve the accuracy of corner detection, thus enabling accurate bounding box estimation. When trained on large-scale datasets using a novel RoI augmentation strategy, the performance of the proposed tracker, running at a high speed of 70 FPS, is comparable with that of state-of-the-art trackers in meeting five challenging performance benchmarks. + +# 1. Introduction + +Visual object tracking is one of the fundamental problems in computer vision, and it has attracted increasing attention in recent years. The goal of object tracking is to locate a target at any point in a video based on the state of the target in the first frame. The ability to do this online would have multiple applications in human-computer interactions, video surveillance, and unmanned control systems. Although significant progress has been made, factors such as occlusion, deformation, and scale variation still pose formidable challenges. + +A tracker is normally required both to locate the target robustly and to estimate its state (frequently represented by a bounding box) accurately. Most trackers focus on target location through the construction of robust classifiers, ignoring target-state estimation. As a result, most trackers cannot handle severe target deformation, because they rely on a multi-scale search strategy [25, 7] to obtain the bounding box. Estimating the bounding box would solve this problem, and a number of ways to do this have been proposed, including the linear regression model [32], the region proposal network (RPN) [24], and the intersection over union (IoU) overlap prediction network [6]. As a bounding box is determined by its top-left and bottom-right corners, one straightforward way to estimate it is to predict the coordinates of these two points. GOTURN [15] directly estimates the corner coordinates using a fully connected network. SATIN [12] employs a corner pooling strategy [22] in a Siamese network [1] to predict heatmaps and location offsets for target corners. By detecting corners, the tracker can flexibly adapt to deformations and scale changes in the target. However, approaches based on corner detection have not yet achieved a level of performance comparable to that of the other state-of-the-art trackers [46, 23, 6]. + +Existing corner detection-based tracking methods have several limitations. First, methods that directly detect corners are complicated by the need to resolve ambiguities: objects in the background also have corners, and the tracker may have difficulty distinguishing them from the corners of the target being tracked. Second, existing methods do not effectively explore the relationship between the template and the test image. As the target is unknown beforehand, template appearance information is often integrated into the test image representations through an integration component. In recent Siamese trackers [1, 37], a cross-correlation operation is used to calculate similarity between the template and the test image. The target center is located by finding the maximum response. However, spatial information about the corners is not explicitly encoded in the correlation results. Third, existing methods do not benefit from the powerful representation capacities of deeper networks (like ResNet [14]), using either a shallow backbone network [15] + +or a light-weight hourglass network [12] instead. + +In view of these limitations, we propose to learn correlation-guided attention, including pixel-wise correlation-guided spatial attention and channel-wise correlation-guided channel attention, in a two-stage corner detection network for accurate visual tracking. In the first stage, the target is distinguished from the background by using a light-weight Siamese tracking module. An RoI that is expected to contain the target is constructed at this stage. In the second stage, the bounding box is accurately estimated by detecting target corners in the constructed RoI. Such two-stage detection significantly mitigates the ambiguous corner localization problem. + +The key innovation of this work is exploiting the relationship between the template and the RoI for improved accuracy in corner detection. To achieve this, we propose using a pixel-wise correlation-guided spatial attention module and a channel-wise correlation-guided channel attention module. Instead of the traditional cross-correlation, we employ pixel-wise correlation to calculate the similarity between each pixel of the template feature maps and all pixels of the RoI feature maps, thereby encoding spatial information about the corners in pixel-wise similarity maps. A spatial attention module is employed to learn spatial maps that highlight regions corresponding to the corners by taking the pixel-wise similarity maps as input. As discussed in [23], some channels have a high response to targets in a specific category, while other channels have negligible responses. We employ channel-wise correlation to calculate the channel-wise similarity maps, which encode the importance information of the various channels. A channel attention module is then employed to learn a channel descriptor that emphasizes informative channels and suppresses the useless ones by taking the channel-wise similarity maps as input. Through attentional learning, the relationship of the template and the RoI can be better exploited to help in locating the corners and enhancing the features of the RoI. In addition, target-specific information is incorporated via the proposed attention module, further helping to distinguish the target from the background in the RoI. + +During training, the Siamese network generates several RoIs in all defined positive positions to train the attention module and corner-detection network extensively. To boost accuracy, we add some RoI augmentation during training. This is similar to the data augmentation used in training samples; however, our augmentation is conducted on RoIs. Our results show that RoI augmentation further increases the accuracy of bounding box estimation. + +Using ResNet-50 [14] as the backbone, we train our tracker end-to-end on large-scale datasets. Extensive experiments on five large tracking benchmarks, including OTB2015 [43], VOT2018 [21], UAV123 [30], LaSOT [10], and TrackingNet [31], show that the performance of our tracker + +is comparable with that of the recent state-of-the-art trackers, while running at a high speed of 70 FPS. + +# 2. Related work + +We provide a brief review of recent developments in visual tracking, and discuss bounding box estimation strategies and attention mechanisms used in this field. + +# 2.1. Visual tracking + +There are two main kinds of tracker in current use: correlation filter (CF)-based trackers [4, 16, 9, 5] and Siamese network-based trackers [1, 37, 24]. CF-based trackers learn the correlation filters by solving a ridged regression problem. Many other techniques, such as multi-scale search [25, 7], boundary effects mitigation [8], multiple feature integration [9, 5], and multi-kernel training [36], have been proposed to improve the performance of CF-based trackers. However, these complex models and deep features have an adverse impact on efficiency, and practical applications often require the tracker to be highly efficient. + +Siamese network based methods have recently attracted much attention in the tracking community. A Siamese tracker learns a similarity matching function by performing cross-correlation between feature representations learned from template and test images [1]. These trackers are usually very efficient, since they utilize the target in the first frame as the template and do not perform online updates. The Siamese architecture is widely used in the literature[37, 38, 13, 24, 46]. + +# 2.2. Bounding box estimation strategy + +Tracking results are often represented by a rectangular bounding box. Most trackers fix the aspect ratio of the target, and resort to multi-scale search to estimate its state. This strategy is feasible in situations where targets only undergo scale changes. However, the pose and viewpoint of the object may also change with time. It is therefore desirable that trackers should be able to estimate a tight bounding box for the target. SiamRPN [24] and ATOM [6], using respectively an offline trained bounding box regression network and Intersection over Union (IoU) overlap maximization architecture, have both shown the ability to estimate accurate bounding boxes. GOTURN [15] and SATIN [12] detect corners using, respectively, a fully connected network and the cross-correlation operation, but these straightforward methods of tracking via corner detection have not performed competitively. We analyze the reasons for their inferior performance, and develop a high performance corner detection-based tracking method by learning correlation-guided attention in a two-stage corner detection network. + +![](images/ac134dd8530c8f6d62ef71d0e643eec72dd965f7f3fc3092ec83370c47404a7f.jpg) +Figure 1. Framework of the proposed method. An RoI is first constructed from the result of a Siamese tracking module. Features of the template and the RoI are then extracted by two PrPool layers. The pixel-wise correlation-guided spatial attention module and channel-wise correlation-guided channel attention module are exploited to highlight corner regions and obtain enhanced features. Feature maps are then upsampled to obtain heatmaps for the two corners. Finally, two soft-argmax functions are employed to calculate corner coordinates. + +# 2.3. Attentional mechanism + +Attentional mechanisms are frequently suggested as a means of improving classification-task performance. Hu et al. [17] proposed a Squeeze-and Excitation module to learn channel-wise attention. Woo et al. [42] proposed learning spatial and channel attention simultaneously in a convolutional block attention module. In the specific field of visual tracking, CSR-DCF [28] constructs a foreground spatial map to constrain correlation filter learning and calculates the channel reliability values of weighted sum correlation response maps. RASNet [39] proposed learning spatial and channel-wise attention in a Siamese network. The purpose of attentional learning in visual tracking is usually to emphasize especially informative channels or spatial regions, so features are usually weighted in a channel-wise or a spatial manner. Most attention modules are self-contained, meaning that attention is learned only from the features to be weighted. In contrast, we learn attention from the correlation result of the template and the RoI, and use this learned attention to enhance features of the RoI. This strategy effectively exploits the relationship between the template and the RoI to highlight corner regions and to improve the discriminative power of features. + +# 3. Proposed method + +The framework of the proposed tracker is illustrated in figure 1. We take inspiration from the Grid R-CNN [27], which utilizes a top-down two-stage detector for object detection, first obtaining several RoIs though an RPN module and then extracting features from each RoI to predict grid points. As we only track one target, we use a Siamese tracking module to estimate one RoI expected to contain the target. We then employ a corner detection module to predict the top-left and bottom-right corners of this RoI. By this procedure, the target is distinguished from the + +background, so corner detection is less affected by background distractors. For detecting corners, we propose a two-fold correlation-guided attention module, consisting of a pixel-wise correlation-guided spatial attention module and a channel-wise correlation-guided channel attention module. The two-fold module is able to integrate target-specific information and enhance features by highlighting corner regions and informative channels, significantly improving the accuracy of corner detection. The coordinates of each corner are obtained by applying a soft-argmax function [29] on an estimated heatmap. The Siamese tracking module and the corner detection module share the same backbone network (ResNet-50) and are trained end-to-end on large-scale datasets. + +# 3.1. Siamese tracking + +In our two-stage tracker, the target is first distinguished from the background with the help of a Siamese tracking module. This module employs a light-weight Siamese architecture to estimate the initial state of the target. The target state is then utilized to construct the RoI for corner detection. Without the tracking module, the tracker would have to search the whole image for the target, and could easily drift away from the correct location because of the ambiguous corner localization problem. One simple way to construct the RoI is to locate the target using the SiamFC [1] network and draw an RoI based on its previously estimated size, but this will lead to accumulating errors if the estimate is not accurate. Thus, we also perform bounding box estimation in the first stage. The bounding box regression branch is similar to that of [20], in which the distance offset is directly mapped to the ground truth box with the coordinates of the offset value. The detailed architecture of the Siamese tracking module is shown in the supplementary material. Given a ground truth bounding box $G = (x_{1},y_{1},x_{2},y_{2})$ , the expected network outputs of an + +offset-map cell $(x_{c},y_{c})$ are: + +$$ +t _ {x _ {1}} = \left(s \cdot x _ {c} - x _ {1}\right) / k, \quad t _ {y _ {1}} = \left(s \cdot y _ {c} - y _ {1}\right) / k, \tag {1} +$$ + +$$ +t _ {x _ {2}} = (x _ {2} - s \cdot x _ {c}) / k, \quad t _ {y _ {2}} = (y _ {2} - s \cdot y _ {c}) / k, +$$ + +where $s$ denotes the stride of the network, $k = s \cdot s$ is a normalization factor, and $t_{x_1}, t_{y_1}, t_{x_2}, t_{y_2}$ respectively denote the expected outputs of the cell $(x_c, y_c)$ in the four offset maps. This function maps the coordinates of the cell to the test image, then finds the normalized distance offset between $G$ and the projected coordinates. During training, the widely used smooth $L_1$ loss function [24] is chosen to calculate the loss $L_{reg}$ between the expected and true network outputs. Note that only cells in the positive area contribute to the calculation of the regression loss. Denoting the projection of the ground truth bounding box on the distance offset maps as $G' = (x_1 / s, y_1 / s, x_2 / s, y_2 / s)$ , the positive area $R^{pos} = (x_1^p, y_1^p, x_2^p, y_2^p)$ within $G'$ is given by: + +$$ +\begin{array}{c} x _ {1} ^ {p} = c _ {x} - 0. 5 \alpha_ {p} w _ {t}, \quad y _ {1} ^ {p} = c _ {y} - 0. 5 \alpha_ {p} h _ {t}, \\ p \end{array} \tag {2} +$$ + +$$ +x _ {2} ^ {p} = c _ {x} + 0. 5 \alpha_ {p} w _ {t}, y _ {2} ^ {p} = c _ {y} + 0. 5 \alpha_ {p} h _ {t}, +$$ + +where $(c_x, c_y)$ is the center of $G'$ , $w_t$ and $h_t$ are respectively the width and height of $G'$ , and $\alpha_p$ is the shrunk factor. To train the similarity learning branch, we use another shrunk factor $\alpha_n$ to define a negative area $R^{neg}$ . Cells on the similarity map that are outside the negative area are defined as negative cells; any cells that are not defined are ignored during training. With both positive and negative cells, we use the conventional logistic loss $L_{sim}$ [1] to train the similarity learning branch. + +We do not have feature pyramid representations as in [20], so the bounding box estimation is not very accurate (see section 4.1). In spite of this, it is effective at distinguishing the target from surrounding distractors. Although a more sophisticated tracking model can be used, we employ this light-weight model for efficient tracking. Because the estimated bounding box may not cover the entire target, we construct an RoI by enlarging the box. Let $w_{r}$ and $h_{r}$ denote the width and height of the estimated box; we construct a square RoI with a side of length $l = \sqrt{(w_{r} + t_{r}) \times (h_{r} + t_{r})}$ , where $t_{r} = (w_{r} + h_{r}) / 2$ . + +# 3.2. Correlation-guided attention for corner detection + +The bounding box of the target is obtained by predicting the target corners of the initially estimated RoI. The architecture of the correlation-guided attentional corner detection module is illustrated in figure 1. The network has two branches: the template branch and the test branch. The test branch takes as input the test image $x$ , which contains the target we want to detect, and extracts general appearance representations through a ResNet-50 backbone network. This is followed by a PrPool (Precise RoI Pooling [19]) + +layer with the estimated RoI bounding box to extract feature $\phi_g(x)$ for this RoI. In object detection, $\phi_g(x)$ is directly used to predict target corners, as in [27]. However, this is infeasible in generic visual tracking, because without the supervision of the target template we lack information about the nature of the tracked object. In some Siamese trackers, concatenation and cross-correlation of features from the two branches are employed to integrate the template with the test image. However, our experiments show that these naive integration approaches for corner detection are suboptimal (see section 4.1). We attribute this suboptimal performance to the lack of effective features that not only have discriminative power but also encode spatial information about corners. Thus, we argue, better exploitation of the relationship between the template and the test image is the key to corner detection-based tracking. In this paper, we propose a novel correlation-guided attention architecture to achieve this. Before involving the test image, however, the template appearance representations are extracted from a template image $z$ in the template branch. The architecture (ResNet-50 backbone followed by a PrPool layer) that has already been described is employed to extract generic template features $\phi_g(z)$ . + +Channel-wise correlation-guided channel attention: A convolutional feature channel is often activated by a certain type of visual pattern. Some channels are of little importance when learning semantic features. Channel attention can be viewed as a tool to recalibrate channel-wise feature responses [17], making the features more discriminative. We first adopt a channel-wise correlation operation to learn the similarity between the template and different regions of the RoI in a channel-wise manner, and then learn channel attention from the similarity maps. If one channel of the similarity maps has a high response, it is useful in distinguishing the tracked target and should receive a higher weight. Given $\phi_g(x) \in \mathbb{R}^{C \times H_x \times W_x}$ and $\phi_g(z) \in \mathbb{R}^{C \times H_z \times W_z}$ , the result of channel-wise correlation is + +$$ +f _ {c} (z, x) = \phi_ {g} (z) \star_ {c} \phi_ {g} (x), \tag {3} +$$ + +where $\star_{c}$ denotes channel-wise correlation and $f_{c} \in \mathbb{R}^{C \times (H_{x} - H_{z} + 1) \times (W_{x} - W_{z} + 1)}$ is the correlation result. After calculating $f_{c}(z, x)$ , we squeeze the spatial dimension of the result through a global max-pooling layer and a global average-pooling layer, generating two different channel descriptors: the max-pooling feature $f_{c}^{max}$ and the average-pooling feature $f_{c}^{avg}$ . As suggested in [42], max-pooling and average-pooling gather different clues about the channel importance. The pooled features are further fed into a shared multi-layer perceptron (MLP) to capture channel-wise dependencies, increasing the effectiveness of the resulting channel descriptors. The learned descriptors are merged using element-wise summation, and the final output of the channel-wise attention is obtained by normalizing + +the output range to [0, 1] with a sigmoid activation function. The learning process can be expressed by + +$$ +A _ {c} = \sigma \left(M L P \left(f _ {c} ^ {\text {m a x}}\right) + M L P \left(f _ {c} ^ {\text {a v g}}\right)\right), \tag {4} +$$ + +where $\sigma$ denotes the sigmoid function and $A_{c}\in \mathbb{R}^{C\times 1\times 1}$ is the channel-wise attention. + +Pixel-wise correlation-guided spatial attention: Spatial attention is learned to focus attention on informative spatial regions. For corner detection, the network should focus on the top-left and bottom-right regions of the target. However, it is not easy to learn such an attentional map just by backpropagation using the detection loss. In our work, we adopt a pixel-wise correlation between the template and the RoI to first calculate pixel-wise similarity. Before adopting the correlation, we reshape the template feature $\phi_g(z)$ to size $(H_zW_z) \times C \times 1 \times 1$ . The template consists of $H_z \times W_z$ pixels and the feature for each pixel has size $C \times 1 \times 1$ . Each feature is correlated with the feature maps $\phi_g(x)$ of the test image, resulting in $H_z \times W_z$ similarity maps with size $H_x \times W_x$ . The pixel-wise correlation is given by + +$$ +f _ {p} (z, x) = \phi_ {g} (z) \star_ {p} \phi_ {g} (x), \tag {5} +$$ + +where $\star_{p}$ denotes the pixel-wise correlation operation and $f_{p} \in \mathbb{R}^{(H_{z}W_{z}) \times H_{x} \times W_{x}}$ is the correlation result. Each similarity map of $f_{p}$ represents the similarity between the corresponding pixel in the template feature maps and all pixels in the RoI feature maps. The most similar regions will be highlighted in each map, and the entire set of similarity maps provides prior information on the outline of the target [41]. Unlike traditional cross-correlation [1], pixel-wise correlation separately highlights different parts of the target in different similarity maps. Thus, regions corresponding to the top-left and bottom-right corners can be highlighted in some of the similarity maps. Although the corners are sometimes outside the target, the prior information of the target outline can help guide the learning of the spatial attention maps, which highlight informative regions corresponding to the corners. + +After pixel-wise correlation, we separately learn spatial attention maps for each corner via two hourglass-like structures [33]. (An hourglass structure first downsamples features to capture global information and increase the receptive field, then upsamples them to increase the resolution.) The network learns spatial attention maps from the pixelwise similarity maps, which adaptively attend to the top-left and bottom-right corners. The spatial attention maps are obtained by applying a sigmoid activation function to normalize the network output: + +$$ +A _ {s} ^ {i} = \sigma \left(\mathcal {H} ^ {i} \left(f _ {p}\right)\right) \tag {6} +$$ + +where $i \in \{t, b\}$ is the index distinguishing the two corners, $\mathcal{H}$ denotes the hourglass network, and $A_{s}$ is the spatial attention map. + +After the channel-wise and spatial attentions are obtained, feature $\phi_g(x)$ of the RoI is enhanced by sequential multiplication with the channel-wise attention descriptor and the spatial attention maps. The enhanced features are separately given by + +$$ +\phi_ {e} ^ {t} (x) = \phi_ {g} (x) \otimes A _ {c} \otimes A _ {s} ^ {t}, \tag {7} +$$ + +$$ +\phi_ {e} ^ {b} (x) = \phi_ {g} (x) \otimes A _ {c} \otimes A _ {s} ^ {b}, \tag {8} +$$ + +where $\otimes$ denotes broadcasting element-wise multiplication, and $\phi_e^t (x)$ and $\phi_e^b (x)$ denote the features for the detection of the top-left and bottom-right corners, respectively. + +Our version of correlation-guided attention has two advantages. First, target-specific information is incorporated to enhance features, which improves discriminative power. Second, corner regions are highlighted, which helps to detect the corners accurately. + +**Corner detection:** After feature enhancement, we detect the target corners by predicting a heatmap for each corner and then calculating the corner coordinates by a Soft-argmax function [29]. The corner detection network employs an upsample structure to learn heatmaps for the two corners. (As the network architecture is the same for the two corners, we will describe only one of them.) We use several convolutional networks and nearest interpolation layers to continuously upsample the features and decrease the channel number. The heatmap for the corner is obtained from the output of the final convolutional layer. Then a Soft-argmax function is applied, which first normalizes the heatmap through a Softmax function and then calculates the expected value. The normalized heatmap can be viewed as a map of the probability that the corner is at position $(x,y)$ . The expected value of the position of the corner is obtained by + +$$ +\hat {\mathbf {p}} = \left(\sum_ {m = 1} ^ {W _ {h}} \sum_ {n = 1} ^ {H _ {h}} m h _ {n, m}, \sum_ {n = 1} ^ {H _ {h}} \sum_ {m = 1} ^ {W _ {h}} n h _ {n, m}\right) ^ {T}, \tag {9} +$$ + +where $h$ is the normalized heatmap of size $W_{h} \times H_{h}$ and $\hat{\mathbf{p}} = (\hat{p}_x, \hat{p}_y)$ is the position of the corner. The Soft-argmax function enables efficient sub-pixel localization. During training, we adopt the commonly used elastic net loss function [29] $L_{cdet}$ . + +# 3.3. Implementation + +Network structure: We use ResNet-50 [14] pre-trained on the ImageNet dataset as our backbone network and extract generic feature representations from the last layer of the conv4 block. The backbone is the same as in [23]. Detailed information about the network can be found in the supplementary material. + +Training: The network is end-to-end trained by optimizing the loss function: + +$$ +L = \lambda_ {1} L _ {\text {s i m}} + \lambda_ {2} L _ {\text {r e g}} + \lambda_ {3} L _ {\text {c d e t}}, \tag {10} +$$ + +where $\lambda_{1},\lambda_{2}$ and $\lambda_{3}$ are respectively set to 1, 1 and 0.125 to balance the three losses. The shrunk factors $\alpha_{p}$ and $\alpha_{n}$ are empirically set to 0.3 and 0.4. + +The SGD optimizer is used to train the network. There are a total of 20 epochs. We use a warmup strategy with the learning rate increasing from 0.0005 to 0.001 in the first 5 epochs. In order to initialize the Siamese tracking module, only parameters in this module are trained in the first epoch. For the last 15 epochs, the learning rate decays exponentially from 0.001 to 0.0001. A weight decay of 0.0005 and momentum of 0.9 are used. During the first 10 epochs, the parameters of the backbone are frozen; during the last 10 epochs, the conv4 and conv3 blocks are unfrozen and fine-tuned with a learning rate 10 times smaller than other parameters. + +We sample image pairs from the Youtube-BB [34], VID [35] and GOT-10k [18] datasets to train our network. Some still images are sampled from the COCO [26] and DET [35] datasets, as in [46]. To take into account a variety of target changes, we add various data augmentations, including random color jittering, random grayscale conversion, random translation within 64 pixels, and random resizing in the range [0.82, 1.18]. + +RoI augmentation During training, we construct several RoIs based on the results of the Siamese tracking module, which predicts one bounding box in each positively defined cell. During the training procedure, the target is ordinarily located in the center of the RoI. The result of the corner detection module in this situation is reliable. However, in the tracking process, the target is not always in the center of the RoI, since the Siamese tracking module may be distracted. Thus, we propose an RoI augmentation strategy of randomly augmenting half of the RoIs in every batch. Random translation within 8 pixels and resizing in the range [0.9, 1.1] are applied. This strategy effectively improves corner detection accuracy (see section 4.1). + +Tracking: During tracking, the template image is cropped from the first frame, and the features extracted from the template image are fixed during the whole tracking process. As in [24], a cosine window and a scale change penalty are employed to select the best proposal from the output of the Siamese tracking module. This proposal is used to construct one RoI for corner detection in each frame. The tracking result is obtained from the output of the correlation-guided attentional corner detection module. + +# 4. Experiments + +In this section, we perform a detailed analysis of the proposed tracker and compare our results with state-of-the-art trackers on OTB2015 [43], VOT2018 [21], UAV123 [30], LaSOT [10], and TrackingNet [31]. Our tracker is implemented in Python using PyTorch. On a PC with a 3.5 GHz CPU and Nvidia RTX 2080Ti GPU, the proposed tracker + +
MethodIntegration methodPS (%)AUC (%)
W/o template-81.862.0
ConcatInteconcatenation83.162.5
SiamIntecross-correlation85.364.9
ConcatAttconcatenation attention84.063.7
SiamAttcross-correlation attention85.265.1
ChannelAttour channel attention83.863.5
SpatialAttour spatial attention85.465.3
Oursour full attention86.766.3
+ +Table 1. Comparison of different approaches to integrating template and test image on the combined OTB2015 and UAV123 datasets. Our proposed template-guided attention module achieves the best results. + +achieves an average tracking speed of 70 FPS. The code will be made publicly available. + +# 4.1. Method analysis + +Here, we describe extensive experiments to analyze the impact of different components in the proposed tracker. Experiments are conducted on the combined OTB2015 [43] and UAV123 [30] datasets. There are a total of 223 challenging videos in this combined dataset, which enables a thorough method analysis. We use the precision score (P-S) and area-under-the-curve (AUC) score [43] as evaluation metrics to compare different configurations of the proposed tracker. + +Exploitation of Relationship: Our goal is to exploit the relationship between the template and the RoI to improve detection accuracy. We achieve this by employing our correlation-guided attention module as the integration method. We compare the proposed attention module with other integration methods to show its effectiveness. The results of different integration methods are shown in table 1. Except for the integration method, other components are kept the same. + +First, we consider the case where integration of the template is not performed at all; compared to our method, performance drops by $4.9\%$ in terms of PS and $4.3\%$ in terms of AUC. This indicates the importance of relationship exploitation. We also compare our method with concatenation and cross-correlation, the integration methods respectively used in [15] and [12]. In table 1, ConcatInte represents the case in which we concatenate features from the template and the constructed RoI in the channel dimension; the template is cropped to a size similar to that of the RoI, and the feature maps of both have the same resolution. SiamInte represents the case in which we use a channel-wise cross-correlation operation to integrate the template and the RoI. In both of these methods, the features lack sufficient discriminative power, and spatial information about corners is not explicitly explored; consequently, both show inferior performances compared to our method. + +Structure of attention module: The proposed attention module involves both spatial and channel-wise attention, learned from the pixel-correlation and channel-wise correlation results, respectively. We now compare our method with different structures to show the effectiveness of our attention module. As concatenation and cross-correlation by themselves do not achieve high performance, we compare our method to two alternative methods that respectively use concatenation and cross-correlation results to guide spatial and channel attention learning, as in our own method. As shown in table 1, ConcatAtt improves the ConcatInte by $0.9\%$ in PS and $1.2\%$ in AUC. However, ConcatAtt is still inferior to our method by $2.7\%$ and $2.6\%$ in PS and AUC, respectively. Similarly, SiamAtt achieves a slight performance improvement over SiamInte, while being outperformed by our method: $1.5\%$ lower in PS and $1.2\%$ lower in AUC. These results validate our choice of structure for the correlation-guided attention module. + +To analyze the combined contribution of our channel and spatial modules, we show the results of using only channel-wise attention (ChannelAtt) and only spatial attention (SpatialAtt). The results in table 1 show that SpatialAtt achieves better performance (85.4% and 65.3%) than ChannelAtt (83.8% and 63.5%), and that they both improve the performance of W/o template. These results indicate that both spatial and channel-wise attention play significant roles in our method, but that spatial attention is the more important of the two; this is reasonable since corner detection requires rich spatial information. The combination of channel-wise and spatial attention, however, leads to even better performance (86.7% and 66.3%). + +Siamese tracking module: The Siamese tracking module can be solely trained without the corner detection module to achieve a performance of $82.7\%$ in PS and $61.5\%$ in AUC, which provides a good initial target state and achieves the goal of effectively distinguishing the target from background distractors. However, our corner detection module improves it by $4.0\%$ in PS and $4.8\%$ in AUC. The Siamese tracking module can be replaced by a more efficient model (SiamFC [1]). Without the regression branch, we use the target size in the previous frame to construct the RoI during tracking. The resulting tracker achieves $85.5\%$ in PS and $64.3\%$ in AUC, a performance superior to that achieved with the baseline SiamFC $(80.9\%$ and $55.9\%)$ , which shows the effectiveness of our corner detection module. + +Feature from different layers: We compare the performance of trackers based on features from different layers of the backbone network. Results in table 2 show that using features from conv4 block achieves the best performance. + +Impact of RoI augmentation: We propose that RoI augmentation can further improve tracking accuracy. The results in table 2 show that our tracker using RoI augmentation achieves a gain of $0.5\%$ in PS and $0.5\%$ in AUC over + +
Conv3Conv4Conv5RoI Aug. (Conv4)
PS (%)83.586.783.887.2
AUC (%)63.866.362.966.8
+ +Table 2. Comparison of features from different layers on the combined OTB2015 and UAV123 datasets. Using features from the conv4 block, our method obtains the best result, which is further improved by our RoI augmentation strategy. + +
SATIN [12]UPDT [3]DaSiamRPN [46]MFT [21]LADCF [45]ATOM [46]SiamRPN++ [23]SiamMask [40]DiMP-50 [2]CGACD [2]
EAO↑0.2820.3780.3830.3850.3890.4010.4140.4230.4400.449
Accuracy↑0.4900.5360.5860.5050.5030.5900.6000.6150.5970.615
Robustness↓-0.1840.2760.1400.1590.2040.2340.2480.1530.173
+ +Table 3. Comparison with state-of-the-art trackers on VOT2018. Our approach achieves the best EAO and accuracy. + +![](images/fa2f1c7e2f6a57d1588bcd71cd2bbcf0e21d19a9347a8aa02708280e068defa8.jpg) +Figure 2. Comparison results of trackers on OTB2015. + +![](images/45b3c84082db844e2eeab2a079700cdb8d5a4aed304af6516ee3bdd3b8cdca6d.jpg) + +the un-augmented case. + +In summary, the above experiments verify the effectiveness of our proposed architecture. + +# 4.2. State-of-the-art comparison + +We compare the proposed Correlation-Guided Attentional Corner Detection-based tracker (CGACD) to state-of-the-art trackers on five challenging tracking datasets. + +VOT2018 dataset [21]: This dataset includes 60 videos for evaluating short-term object trackers in terms of accuracy (average overlap), robustness (average number of tracking failures), and expected average overlap (EAO), a combination of the other two metrics that is used to rank the trackers. We show the comparison results in table 3. Our CGACD achieves the best EAO (0.449) and accuracy (0.615). Compared with the best tracker in the VOT2018 challenge (LADCF [45]), CGACD achieves a performance gain of $6.0\%$ . The superior accuracy of CGACD relative to ATOM [6] and SiamRPN++ [23] (which estimate bounding boxes but do not detect corners) shows the importance of corner detection. SATIN [12] does detect the corners of the target, but its performance is significantly lower than that of our tracker. Finally, although CGACD does not perform online updates, it can still achieve a robustness comparable to that of methods relying on online adaptation (MFT [21], LADCF [45], ATOM [6], and DiMP-50 [2]). + +OTB2015 dataset [43]: This dataset consists of 100 videos; performance is evaluated using PS and AUC s- + +![](images/85c696523269f511a981cd4ba9ad3a145516dfdfcf3a43c5cee9572dd3da66cd.jpg) +Figure 3. Comparison results of trackers on UAV123. + +![](images/47dad918da856aef023ddd980154b9b1793cf416e1d01fd15ef6a657dfbb1ca2.jpg) + +![](images/54c9a79531e67ae5ef67478ef621893645e45fd7480749ef7b732b71c3aa40b9.jpg) +Figure 4. Comparison results of trackers on LaSOT. + +![](images/82914a905c009784d1a80942db292df1715483791f2e66840d54b61c4a2981ee.jpg) + +cores. Figure 2 displays the comparison results. Our CGACD achieves the best performance in both metrics (92.2% and 71.3%). CGACD outperforms recent top-performer SiamRPN++ [23] by 0.7% in PS and 1.7% in AUC; ATOM [6] by 4.0% in PS and 4.2% in AUC, and DiMP-50 [2] by 2.3% in PS and 2.7% in AUC. + +UAV123 dataset [30]: This dataset consists of 123 videos captured by unmanned aerial vehicles; the average sequence length is 915 frames. As in OTB2015, PS and AUC scores are employed to evaluate different trackers, but the videos in UAV123 are longer. Figure 3 shows the comparison results. Our CGACD achieves a PS of $83.3\%$ and an AUC of $63.3\%$ . Compared with the recent state-of-the-art tracker SiamRPN++ [23], we achieve a performance gain of $3.0\%$ in PS and $2.3\%$ in AUC. Although our tracker lacks online adaptation, it still achieves a performance comparable to that of ATOM [6] or DiMP-50 [2]. + +LaSOT dataset [10]: This is a recent large-scale and high-quality dataset. The average sequence length of a video is more than 2500 frames, which is very challenging for short-term trackers. In figure 4, we show normalized precision and success plots for 280 videos in the testing set. Our CGACD achieves $62.6\%$ in normalized precision and $51.8\%$ in AUC score. Our tracker outperforms the best tracker reported in the paper (MDNet [32]), by $16.6\%$ and $12.1\%$ in terms of normalized precision and AUC, respectively. Compared with SiamRPN++ [23], our tracker achieves a gain of $5.7\%$ in normalized precision and $2.2\%$ in AUC score. Although ATOM [6] employs online adaptation, it achieves a performance lower than that of our method by $5.0\%$ in normalized precision and $0.3\%$ in AUC. These results show that our method generalizes well to large-scale and challenging videos. + +
ECO SiamFCGFS-DCFDaSiamRPNSPM-TrackerATOM SiamRPN++DiMP-50
[5][1][44][46][11][38][6][23][2]
PS (%)49.253.356.659.161.966.164.869.468.769.3
PSnorm(%)61.866.671.873.374.677.877.180.080.180.0
AUC (%)55.457.160.963.866.971.270.373.374.071.1
+ +Table 4. Comparison with state-of-the-art trackers on the TrackingNet test set. + +TrackingNet dataset [31]: This large-scale dataset consists of real-world videos sampled from YouTube. We evaluate our tracker on the test set of 511 videos. Table 4 shows the results of our method compared with recent state-of-the-art trackers. Precision, normalized precision, and AUC scores are used to evaluate these trackers. Our CGACD obtains a precision of $69.3\%$ , a normalized precision of 80.0, and an AUC score of $71.1\%$ . The results achieved by our tracker are comparable with those achieved by other state-of-the-art trackers on all the metrics. + +In summary, comparative testing on five datasets shows that our corner detection-based tracker achieves state-of-the-art performance. + +# 5. Conclusion + +We propose a novel corner detection-based tracking method that learns correlation-guided attention in a two-stage corner detection network. In the first stage, a lightweight Siamese network is exploited to distinguish the target from the background; in the second stage, it is used to construct an RoI for corner detection. The relationship between the template and the RoI is exploited to enhance features for corner detection by a correlation-guided attention module. The pixel-wise correlation result encoding the spatial information about the corners is exploited to guide the learning of spatial attention, while the channel-wise correlation result encoding the channel importance information is exploited to guide the learning of channel-wise attention. Target-specific information and spatial information about the corners are encoded in the enhanced features with the attention module, enabling accurate corner detection. The whole network is trained end-to-end on large-scale data sets, using an RoI augmentation strategy. Comprehensive experiments on five benchmark datasets show that the proposed tracker performs competitively with state-of-the-art trackers. In the future, we plan to explore efficient online adaptation method to improve the robustness of the proposed tracker. + +# Acknowledgement + +This paper is supported in part by the National Natural Science Foundation of China (Grant No. 61671175), in part by the State Key Program of National Natural Science Foundation of China (Grant No. 51935005), and in part by the Sichuan Science and Technology Program (Grant No. 2019YFS0069). + +# References + +[1] Luca Bertinetto, Jack Valmadre, João F. Henriques, Andrea Vedaldi, and Philip H. S. Torr. Fully-convolutional siamese networks for object tracking. In ECCV Workshops, 2016. 1, 2, 3, 4, 5, 7, 8 +[2] Goutam Bhat, Martin Danelljan, Luc Van Gool, and Radu Timofte. Learning discriminative model prediction for tracking. In ICCV, 2019. 7, 8 +[3] Goutam Bhat, Joakim Johnander, Martin Danelljan, Fahad Shahbaz Khan, and Michael Felsberg. Unveiling the power of deep tracking. In ECCV, 2018. 7 +[4] David S. Bolme, J. Ross Beveridge, Bruce A. Draper, and Yui Man Lui. Visual object tracking using adaptive correlation filters. In CVPR, 2010. 2 +[5] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. ECO: efficient convolution operators for tracking. In CVPR, 2017. 2, 8 +[6] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. ATOM: accurate tracking by overlap maximization. In CVPR, 2019. 1, 2, 7, 8 +[7] Martin Danelljan, Gustav Hager, Fahad Shahbaz Khan, and Michael Felsberg. Accurate scale estimation for robust visual tracking. In BMVC, 2014. 1, 2 +[8] Martin Danelljan, Gustav Hager, Fahad Shahbaz Khan, and Michael Felsberg. Learning spatially regularized correlation filters for visual tracking. In ICCV, 2015. 2 +[9] Martin Danelljan, Andreas Robinson, Fahad Shahbaz Khan, and Michael Felsberg. Beyond correlation filters: Learning continuous convolution operators for visual tracking. In EC-CV, 2016. 2 +[10] Heng Fan, Liting Lin, Fan Yang, Peng Chu, Ge Deng, Sijia Yu, Hexin Bai, Yong Xu, Chunyuan Liao, and Haibin Ling. LaSOT: A high-quality benchmark for large-scale single object tracking. In CVPR, 2019. 2, 6, 8 +[11] Heng Fan and Haibin Ling. Siamese cascaded region proposal networks for real-time visual tracking. In CVPR, 2019. 8 +[12] Peng Gao, Yipeng Ma, Ruyue Yuan, Liyi Xiao, and Fei Wang. Siamese attentional keypoint network for high performance visual tracking. arXiv preprint arXiv: 1904.10128, 2019. 1, 2, 6, 7 +[13] Anfeng He, Chong Luo, Xinmei Tian, and Wenjun Zeng. A twofold siamese network for real-time object tracking. In CVPR, 2018. 2 +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 1, 2, 5 +[15] David Held, Sebastian Thrun, and Silvio Savarese. Learning to track at 100 FPS with deep regression networks. In ECCV, 2016. 1, 2, 6 +[16] João F. Henriques, Rui Caseiro, Pedro Martins, and Jorge Batista. High-speed tracking with kernelized correlation filters. TPAMI, 37(3):583-596, 2015. 2 +[17] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, 2018. 3, 4 + +[18] Lianghua Huang, Xin Zhao, and Kaiqi Huang. GOT-10k: A large high-diversity benchmark for generic object tracking in the wild. arXiv preprint arXiv: 1810.11981, 2018. 6 +[19] Borui Jiang, Ruixuan Luo, Jiayuan Mao, Tete Xiao, and Yun-ting Jiang. Acquisition of localization confidence for accurate object detection. In ECCV, 2018. 4 +[20] Tao Kong, Fuchun Sun, Huaping Liu, Yuning Jiang, and Jianbo Shi. FoveaBox: Beyond anchor-based object detector. arXiv preprint arXiv: 1904.03797, 2019. 3, 4 +[21] Matej Kristan et al. The sixth visual object tracking VOT2018 challenge results. In ECCV Workshops, 2018. 2, 6, 7 +[22] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In ECCV, pages 765-781, 2018. 1 +[23] Bo Li, Wei Wu, Qiang Wang, Fangyi Zhang, Junliang Xing, and Junjie Yan. SiamRPN++: Evolution of siamese visual tracking with very deep networks. arXiv preprint arXiv: 1812.11703, 2018. 1, 2, 5, 7, 8 +[24] Bo Li, Junjie Yan, Wei Wu, Zheng Zhu, and Xiaolin Hu. High performance visual tracking with siamese region proposal network. In CVPR, 2018. 1, 2, 4, 6 +[25] Yang Li and Jianke Zhu. A scale adaptive kernel correlation filter tracker with feature integration. In ECCV, 2014. 1, 2 +[26] 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 +[27] Xin Lu, Buyu Li, Yuxin Yue, Quanquan Li, and Junjie Yan. Grid R-CNN. In CVPR, 2019. 3, 4 +[28] Alan Lukežić, Tomáš Vojíř, Luka Čehovin, Jíří Matas, and Matej Kristan. Discriminative correlation filter with channel and spatial reliability. In CVPR, 2017. 3 +[29] Diogo C. Luvizon, Hedi Tabia, and David Picard. Human pose regression by combining indirect part detection and contextual information. Comput. Graph., 85:15-22, 2019. 3, 5 +[30] Matthias Mueller, Neil Smith, and Bernard Ghanem. A benchmark and simulator for UAV tracking. In ECCV, 2016. 2, 6, 8 +[31] Matthias Müller, Adel Bibi, Silvio Giancola, Salman Al-Subaihi, and Bernard Ghanem. TrackingNet: A large-scale dataset and benchmark for object tracking in the wild. In ECCV, 2018. 2, 6, 8 +[32] Hyeonseob Nam and Bohyung Han. Learning multi-domain convolutional neural networks for visual tracking. In CVPR, 2016. 1, 8 +[33] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In ECCV, 2016. 5 +[34] Esteban Real, Jonathon Shlens, Stefano Mazzocchi, Xin Pan, and Vincent Vanhoucke. YouTube-BoundingBoxes: A large high-precision human-annotated data set for object detection in video. In CVPR, 2017. 6 +[35] 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, 115(3):211–252, 2015. 6 + +[36] Ming Tang, Bin Yu, Fan Zhang, and Jinqiao Wang. High-speed tracking with multi-kernel correlation filters. In CVPR, 2018. 2 +[37] Jack Valmadre, Luca Bertinetto, João F. Henriques, Andrea Vedaldi, and Philip H. S. Torr. End-to-end representation learning for correlation filter based tracking. In CVPR, 2017. 1, 2 +[38] Guangting Wang, Chong Luo, Zhiwei Xiong, and Wenjun Zeng. SPM-Tracker: series-parallel matching for real-time visual object tracking. In CVPR, 2019. 2, 8 +[39] Qiang Wang, Zhu Teng, Junliang Xing, Jin Gao, Weiming Hu, and Stephen J. Maybank. Learning attentions: Residual attentional siamese network for high performance online visual tracking. In CVPR, 2018. 3 +[40] Qiang Wang, Li Zhang, Luca Bertinetto, Weiming Hu, and Philip H. S. Torr. Fast online object tracking and segmentation: A unifying approach. In CVPR, 2019. 7 +[41] Ziqin Wang, Jun Xu, Li Liu, Fan Zhu, and Ling Shao. Ranet: Ranking attention network for fast video object segmentation. In ICCV, 2019. 5 +[42] Sanghyun Woo, Jongchan Park, Joon-Young Lee, and In So Kweon. CBAM: convolutional block attention module. In ECCV Workshops, 2018. 3, 4 +[43] Yi Wu, Jongwoo Lim, and Ming-Hsuan Yang. Object tracking benchmark. TPAMI, 37(9):1834-1848, 2015. 2, 6, 7 +[44] Tianyang Xu, Zhen-Hua Feng, Xiao-Jun Wu, and Josef Kittler. Joint group feature selection and discriminative filter learning for robust visual object tracking. In ICCV, 2019. 8 +[45] Tianyang Xu, Zhen-Hua Feng, Xiao-Jun Wu, and Josef Kittler. Learning adaptive discriminative correlation filters via temporal consistency preserving spatial feature selection for robust visual object tracking. TIP, 2019. 7 +[46] Zheng Zhu, Qiang Wang, Bo Li, Wei Wu, Junjie Yan, and Weiming Hu. Distractor-aware siamese networks for visual object tracking. In ECCV, 2018. 1, 2, 6, 7, 8 \ No newline at end of file diff --git a/correlationguidedattentionforcornerdetectionbasedvisualtracking/images.zip b/correlationguidedattentionforcornerdetectionbasedvisualtracking/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2ed1328f856d6ee0d14948f566475009513856a8 --- /dev/null +++ b/correlationguidedattentionforcornerdetectionbasedvisualtracking/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af424a202f64305aa789bdc9198b234db3eee25ec3022d3469907510b3456814 +size 339188 diff --git a/correlationguidedattentionforcornerdetectionbasedvisualtracking/layout.json b/correlationguidedattentionforcornerdetectionbasedvisualtracking/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4b95d7b2bbcd73c98e265d90ac7c1e4a07b84a10 --- /dev/null +++ b/correlationguidedattentionforcornerdetectionbasedvisualtracking/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1253d091745aeceddf6fc3a128dd8a1f7aefe2c8a2c77a790f47baaedc38213 +size 362129 diff --git a/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/a03964a3-3cd7-4d9c-bb05-31674cc4e1bd_content_list.json b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/a03964a3-3cd7-4d9c-bb05-31674cc4e1bd_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5c183fef3b2bf4888464ecc8c20c41df072f18df --- /dev/null +++ b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/a03964a3-3cd7-4d9c-bb05-31674cc4e1bd_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:563bd8b54de5aad4aa83a26ed000835276595f0f45599627ca80a8008b513dd9 +size 78458 diff --git a/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/a03964a3-3cd7-4d9c-bb05-31674cc4e1bd_model.json b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/a03964a3-3cd7-4d9c-bb05-31674cc4e1bd_model.json new file mode 100644 index 0000000000000000000000000000000000000000..31806add6a7c42e74b85ae404e28ccea162b4c30 --- /dev/null +++ b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/a03964a3-3cd7-4d9c-bb05-31674cc4e1bd_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a564a7a66f56f20103ee85f0e7f9a3874312274fbb5319b18224e16a9268f0ab +size 95572 diff --git a/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/a03964a3-3cd7-4d9c-bb05-31674cc4e1bd_origin.pdf b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/a03964a3-3cd7-4d9c-bb05-31674cc4e1bd_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b23c024ffd01787d9e6a1b593a396ba947860637 --- /dev/null +++ b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/a03964a3-3cd7-4d9c-bb05-31674cc4e1bd_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46b88ede67900448a47fbd42ed82c8ad7daf15bcd4e61bcc811d12ba4ec0a63c +size 4759736 diff --git a/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/full.md b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ef4298ac271e71780aa37194b6ff31e12d000571 --- /dev/null +++ b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/full.md @@ -0,0 +1,355 @@ +# Correspondence-Free Material Reconstruction using Sparse Surface Constraints + +Sebastian Weiss + +sebastian13.weiss@tum.de + +Robert Maier + +robert.maier@tum.de + +Daniel Cremers + +cremers@tum.de + +Rüdiger Westermann + +westermann@tum.de + +Nils Thuerey + +nils.thuerey@tum.de + +All authors are with Technical University of Munich, Germany + +# Abstract + +We present a method to infer physical material parameters and external boundaries from the scanned motion of a homogeneous deformable object via the solution of an inverse problem. Parameters are estimated from real-world data sources such as sparse observations from a Kinect sensor without correspondences. We introduce a novel Lagrangian-Eulerian optimization formulation, including a cost function that penalizes differences to observations during an optimization run. This formulation matches correspondence-free, sparse observations from a single-view depth image with a finite element simulation of deformable bodies. In a number of tests using synthetic datasets and real-world measurements, we analyse the robustness of our approach and the convergence behavior of the numerical optimization scheme. + +# 1. Introduction + +Our goal is to reconstruct material parameters of real-world objects in scenarios where we cannot rely on complex multi-camera setups, but instead only have access to single RGB-D scans from handheld devices. In this setting, we assume that the object's initial shape is known a-priori, and we aim for reconstructing this object with collisions by finding the parameterization of an elasticity simulation that best explains the observations. The central parameters that describe the object's physical behaviour are the Young's modulus, Poisson ratio, as well as damping parameters and boundary conditions, e.g., gravity, initial velocity, and collision planes. While previous works have likewise targeted reconstructing materials from measured deformations and visual observations, they typically rely either on carefully controlled lab settings [2, 28, 50], or on dense observations [9, 44, 19]. In contrast, we focus on real-world interactions, such as falling and colliding objects, that are recorded from a single viewpoint without an explicit feature tracking step. + +To match observations with the simulated object without pre-computed correspondences, we propose a novel formulation of implicit constraints that we combine with a differentiable simulation method for soft bodies. We introduce a fully differentiable physics solver that provides gradients for solving a non-linear inverse problem using the adjoint method, to match the depth measurements over time with a physical simulation. Due to the regularization properties of the adjoint optimization, improved robustness wrt to measurement noise over, e.g., the finite difference method, can be achieved. In addition, the adjoint method allows optimizing for multiple parameters with a negligible increase in computations, as only a single backward pass is required to simultaneously compute gradients for all parameters. We further shed light on the inclusion of observed collisions into the optimization via an implicit formulation. To reconstruct collision events even if the actual point of impact is obstructed from view, we leverage the recorded collision response of materials and use it for the inference of a suitable object parameterization. + +Specifically, our work targets the image-based reconstruction of material parameters via inverse elasticity problems. In this context, we propose: + +- A novel formulation for sparse and correspondence-free surface constraints, e.g. measurements from RGB-D cameras. +- A hybrid Lagrangian-Eulerian formulation that yields gradients for solving an inverse elasticity problems via the adjoint method. +- A detailed robustness and convergence analysis of the proposed optimization scheme using observed real-world deformations and synthetic deformations of objects with ground truth behavior. + +We see our work as a step towards improved computational schemes for estimating material parameters and boundary conditions in real-world situations using simple hardware setups. We also believe that this approach can be an interesting alternative to incorporate soft body + +![](images/df97ff187ce188e478062247c7023615959561e50a8b853e1e69566d39a77e27.jpg) +Figure 1: We jointly match a sparse sequence of single-view depth observations (left) with a simulation model and perform an end-to-end gradient-based optimization, to estimate a wide range of material parameters and collision geometries (shown here is a material and damping reconstruction for a plush toy). Ground truth images are shown in the insets. + +physics into network-based inference methods, by employing the differentiability of the solver for unsupervised backpropagation1. + +# 2. Related Work + +For reconstructing deforming objects geometrically, a variety of powerful methods were proposed to align templates with measured data [3, 36, 5], or to obtain static reconstructions of scenes [8, 34, 46]. It is also possible to rely on visual information to compute geometry, e.g., via shape from shading [47, 25], or alternatively to estimate surface reflectance models [20, 27, 1]. Deforming objects and characters are inherently difficult to capture, and methods were proposed to capture characters via locally rigid parts [37], or via template based capturing of freely deforming objects [22]. Template-free reconstruction algorithms employing formulations with space-time optimizations were also proposed [29, 51, 10]. + +Many non-rigid reconstruction algorithms make use of depth data in the form of a video stream to obtain geometric representations [32, 42, 52, 31, 19]. More recent approaches propose level set evolutions for handling topology changes [40, 41], employ articulated skeletons [49], or compute a dense 3D flow around the object [33]. Combinations of such algorithms to capture geometry, motions and surface properties were, e.g., proposed by Guo et al. [14]. A thorough overview of 3D reconstruction algorithms can, e.g., be found in Zollhöfer et al. [53]. While many of these works share our goal to capture deforming objects, they target recovering geometric information, while our method focuses on the reconstruction of physical material parameters. + +For modeling an object's behavior, inverse elasticity simulation has been used to compute an alignment between an elastic FE-mesh and the captured point cloud [44]. The alignment procedure is split into the computation of a reference shape that best matches the observed shape, and the + +estimation of the deformation parameters of the captured shape. In our approach, instead of using a gradient-free downhill simplex method, we formulate the inverse problem as a constrained minimization problem that is solved using the adjoint method [26]. For this, we demonstrate the efficient calculation of the gradient of the cost function with respect to the optimization parameters, which allows us to use only a single camera and include effects such as collisions. Inverse elasticity simulation has also been used in medical imaging to estimate single physical parameters like stiffness and elastic properties[12, 21]. Yet these approaches require dense constraints and rely on full correspondences between observations and the geometry. + +We employ an Eulerian FEM model for the elasticity simulation. As an alternative, the Material Point Method recently gained interest for simulating physical models using a Lagrangian object representation [18, 17]. + +In recent years, also first attempts have been made to replace the elasticity model itself by neural networks [43, 23], an avenue that would yield interesting benefits in conjunction with algorithms for object reconstruction. E.g., several methods employ physical data sets [45, 11], for which our approach could provide additional information in the form of gradients. + +# 3. Overview and Physical Model + +At the core of our method, we iteratively optimize the physical parameters that govern the object's deformation behavior, starting from a known reference configuration $\Omega^r\subset \mathbb{R}^3$ and a displacement at time $t$ given by $u:\Omega^r\times t\to \mathbb{R}^3$ . The linear Green strain tensor $E(u)\coloneqq \frac{1}{2}\left(\nabla u + (\nabla u)^T\right)$ is used to compute the second order Piola-Kirchhoff stress tensor as + +$$ +P (u) := 2 \mu E (u) + \lambda \operatorname {t r} (E (u)) \mathbf {1} \tag {1} +$$ + +with the Lamé coefficients $\mu$ and $\lambda$ derived from the Young's modulus $k$ and the Poisson ratio $\rho$ . The dynamic behavior + +![](images/19de50471d78e0395d2f57735af7b63291a009923f994254134e1ef983e44ff4.jpg) +Figure 2: Method overview: Given an object in rest pose and sparse point observations, elastic displacements are computed in a Lagrangian framework and resampled to an Eulerian grid. For each observation, the inverse displacement is computed, and displaced observations are matched to grid cells. A cost function penalizes the distances of displaced observations to the object's surface. Finally, the gradient of this function is transferred to the object surface via the adjoint of the extension step. + +![](images/6faf923b82cbcb0b992163af85806f996ff0f1ad40088332064c6e0d2f6d565f.jpg) + +![](images/440fdd4363ee3e62376964476c704bd260d10c5926997c0a99bdfbc098b481c7.jpg) + +![](images/5aea818c1d5fbcd3d3c3c92369d81434e5eda9bf633aa2561922108646a40ba4.jpg) + +![](images/d90ead496ecbabb1e1782d4a391b6cdcf6defc895a1904114d3caf5b9903de6c.jpg) + +of the deformable object is then governed by the system of ordinary differential equations + +$$ +m \ddot {u} - \operatorname {d i v} P (u) = f _ {B} \text {i n} \Omega^ {r} \times \mathbb {R} _ {0} ^ {+} \tag {2a} +$$ + +$$ +u = u _ {D} \text {o n} \Gamma_ {D} ^ {r} \times \mathbb {R} _ {0} ^ {+} \tag {2b} +$$ + +$$ +P (u) \cdot n = f _ {S} \text {o n} \Gamma_ {N} ^ {r} \times \mathbb {R} _ {0} ^ {+}. \tag {2c} +$$ + +with mass $m$ , unit outer normal $n$ , including body forces such as gravity in $f_{B}$ , as well as Dirichlet and Neumann boundary conditions that prescribe respectively the displacement on the boundary $\Gamma_D^r$ by $u_{D}$ and external surface forces on $\Gamma_N^r$ by $f_{S}$ . + +For the dynamic case, this leads to an initial value problem, using the initial shape $\Omega^r$ and material parameters. To discretize problem (2) in space, we use a hexahedral simulation grid [39, 48] with implicitly embedded boundaries [15] and a rotational invariant formulation of the strain tensor using the corotated strain formulation [30, 16]. A Newmark scheme is used for time integration [13]. + +As input to the reconstruction, we utilize the depth images of an RGB-D camera, giving rise to sparse points in world space. Color information is omitted for simplicity. Furthermore, we assume that a scanned representation of the observed object in the rest pose exists, e.g., from an initial scan. + +In a forward step, a Lagrangian elasticity simulation is performed with the current parameter estimates. Consistent with the forward simulation, this step utilizes a Cartesian grid as Eulerian representation. The subsequent matching step, constrained by the physical deformation properties, provides a cost function as similarity measure and enables the calculation of gradients of this function that is to be minimized. These gradients are back-propagated through the simulation using the adjoint method, to obtain updates for the physical parameters via a gradient-based optimization. The reconstruction process is illustrated in Fig. 2. + +For the reference configuration of the observed object, a signed distance function (SDF) $\phi^{(0)}:\mathbb{R}^3\to \mathbb{R}$ is computed. In the object's interior, $\phi^{(0)}$ is negative: $\Omega^r\coloneqq \{\mathbf{x}\in \mathbb{R}^3:$ + +$\phi^{(0)}\mathbf{x}) < 0\}$ . For given displacements of material points at time $t \geq 0$ ( $t \in \mathbb{R}_0^+$ ), $u: \Omega^r \times t \to \mathbb{R}^3$ , the dynamic behavior of the deformable object is simulated. + +The deformed configuration $\phi^{(t)}$ is obtained via an advection step $\phi^{(t)}(x' + u^{(t)}(x')) = \phi^{(0)}(x') \forall x' \in \Omega^r$ , i.e. $u^{(t)}$ gives the displacement from the point $x'$ in reference configuration to the displaced point $x$ , $x := x' + u^{(t)}(x')$ . We define the inverse displacement field $u^{(t)}(x)^{-1}$ as the mapping from the displaced point $x$ to the reference point $x'$ : + +$$ +u ^ {(t)} (x) ^ {- 1} := x - x ^ {\prime} \Longleftrightarrow x ^ {\prime} = x - u ^ {(t)} (x) ^ {- 1}. \tag {3} +$$ + +This allows us to compute the deformed configuration as $\phi^{(t)}(x) = \phi^{(0)}(x - u^{(t)}(x)^{-1})$ . + +# 4. Sparse Surface Constraints + +To estimate unknown material parameters from observed object deformations with an optimization algorithm, we need to use a cost function $J$ that can reliably and efficiently penalize differences between the observed and simulated object. We propose an SDF-based formulation of $J$ that is able to incorporate sparse constraints without requiring any explicit feature matching. This is different to cost functions considering squared differences of per-vertex displacements and derivatives over time [7, 35], which require ground truth vertex displacements that are not available in our case. Feature tracking methods [38, 44] can circumvent this requirement by explicitly matching observations to vertices in the simulation mesh. However, the matching step does not provide derivatives, and as such cannot be used in combination with gradient-based optimization schemes. Furthermore, explicit matching approaches typically only couple to a simulation via external force estimates, and are thus decoupled from the actual parameter estimation step. + +Another cost function variant uses squared differences of the SDF values per domain point [26]. This approach, however, requires a full SDF representation, and while guesses about the complete 3D shape of the observation could be + +made, erroneous estimates can easily mislead the optimization procedure. Furthermore, the current SDF needs to be calculated with an advection step from the last to the current timestep, requiring highly non-linear gradient evaluations for inverting the displacement field (see (3)). This often leads to diverging optimizations in practice. + +In our setting, we assume that in time step $t$ , $N^{(t)}$ points—with world space positions $\mathbf{x}_{t,i} \in \mathbb{R}^3$ —are observed via depth images. Since observed points are located at the object boundary where $\phi = 0$ , our sparse surface constraint (SSC) cost function aims for minimizing the SDF values at these locations via + +$$ +J _ {\mathrm {S S C}} (\phi) := \sum_ {t = 1} ^ {T} \sum_ {i = 0} ^ {N ^ {(t)}} \frac {1}{2} \left(\phi^ {(t)} \left(\mathbf {x} _ {t, i}\right)\right) ^ {2}. \tag {4} +$$ + +To avoid advecting the full SDF, the SSC formulation encapsulates the underlying sparseness assumption by solving for a point-wise inversion of the body motion. We build upon the assumption that the simulated displacements $u^{(t)}$ do not destroy the signed distance property of $\phi$ . Then, the deformed SDF $\phi^{(t)}$ can be computed by evaluating the initial SDF at the images of displaced locations, i.e., by moving along the inverse displacement field (3): $\phi^{(t)}(\mathbf{x}) \approx \phi^{(0)}\big(\mathbf{x} - u^{(t)}(\mathbf{x})^{-1}\big)$ . However, this requires the inverse displacement field, which cannot be computed by simple back-tracing. Since every point $\mathbf{x}$ of the deformed object can be associated with a matching point $\mathbf{x}'$ of the undeformed object, the problem can be reformulated in the following way: Since we know the point $\mathbf{x}$ with $\mathbf{x} = \mathbf{x}' + u^{(t)}(\mathbf{x}')$ (and hence $\mathbf{x}' = \mathbf{x} - u^{(t)}(\mathbf{x})^{-1}$ ), we can compute the (yet unknown) index $(i,j,k)$ of the hexahedral simulation cell containing $\mathbf{x}'$ . With $\mathcal{N} = \{i + [0,1], j + [0,1], k + [0,1]\}$ denoting the eight corners of the cell $(i,j,k)$ , and $\mathbf{x}_{l\in \mathcal{N}}'$ their reference locations, let $\mathbf{x}_{l\in \mathcal{N}}$ be the displaced locations of these corners, i.e., $\mathbf{x}_l = \mathbf{x}_l' + \mathbf{u}_l^{(t)}$ . Then, the location of point $\mathbf{x}'$ can be computed by tri-linear interpolation of the eight reference corner locations, with the cell-wise interpolation weights $\alpha, \beta, \gamma$ . + +By further assuming that the interpolation weights don't change during the advection, i.e., $\mathbf{x}^{\prime}$ is interpolated from $\mathbf{x}_l^\prime$ with the same weights as $\mathbf{x}$ is interpolated from $\mathbf{x}_l$ , the same weights for interpolating positions can be used to interpolate the SDF values. This allows us to formulate Alg. 1 for computing $\phi^{(t)}(\mathbf{x})$ : + +The key step here is solving for the unknown tri-linear interpolation weights. This requires finding a solution within the cell space $[0,1]^3$ of a non-linear system of equation in three variables. For this, we employ a Newton solve (see Supp. B) that typically converges within a few iterations. + +# 4.1. Extension of Displacements + +To ensure that $J_{SSC}$ can be evaluated for all cells that possibly contain an observed point, the displacements that + +Algorithm 1 Compute $\phi^{(t)}(\mathbf{x})$ based on $\phi^{(0)}$ and $u^{(t)}$ +Input: The observed point $\mathbf{x}$ +1: for each cell $i,j,k$ do +2: Compute $\alpha ,\beta ,\gamma$ with Newton solve of +3: $\mathbf{x} =$ interpolate $(\mathbf{x}_{l\in \mathcal{N}},\alpha ,\beta ,\gamma)$ +4: if $(\alpha ,\beta ,\gamma)\in [0,1]^3$ then +5: return $\phi^{(t)}(\mathbf{x}) =$ interpolate $(\phi_{l\in \mathcal{N}}^{(0)},\alpha ,\beta ,\gamma)$ +6: end if +7: end for + +are provided by the FE solver only at locations covered by the object, need to be extended into the ambient space around the object. For this purpose, the displacements around the rest pose on the Eulerian grid are extended via a Poisson-based diffusion process. All cells that receive displacements are implicitly matched with observations via the SSC. Once observations and displacements are brought together, the adjoint method ensures that the information travels back to the relevant nodes in the FE mesh. This process is illustrated in Fig. 2 c) to e). + +For the SDF extension, we restrict to a narrow band around the surface. The width of the narrow band $\phi_{\mathrm{max}}$ naturally defines an upper bound per point for the value of the cost function. The width specifies the maximum allowed distance of a matched point to the surface. Thus, points that are further away from the surface can be ignored and induce a constant cost of $\frac{1}{2}\phi_{\mathrm{max}}^2$ . A detailed quantitative evaluation of how this parameter influences the accuracy of the solutions can be found in Supp. E.3. + +To summarize, with one pass over the computational grid, we can compute the inverse mappings (as interpolation weights) for all observed points $\mathbf{x}$ , so that $J_{\mathrm{SSC}}$ can be evaluated. All steps in the evaluation of $J_{\mathrm{SSC}}$ , as well as the extension step, can be efficiently differentiated and incorporated into an inverse elasticity solver for optimizing the material parameters. + +# 5. Inverse Elasticity Solver + +By using a forward solver for the elasticity PDE, Eq. (3) in Supp. A, in combination with our proposed cost function $J_{\mathrm{SSC}}$ , the adjoint method [26] can be used to optimize for the unknown material parameters. Let $\mathbf{u} \in \mathbb{R}^U$ be the $U \in \mathbb{N}$ states of the system, i.e., the output variables such as the computed displacements $u^{(t)}$ and velocities $\dot{u}^{(t)}$ for each timestep. Let $\mathbf{p} \in \mathbb{R}^P$ be the $P$ control parameters of the system, i.e., the estimated material parameters that are used as input variables in the forward pass. The general optimization problem is then defined as + +$$ +\text {m i n i m i z e} J (\mathbf {u}, \mathbf {p}), J: \mathbb {R} ^ {U} \times \mathbb {R} ^ {P} \rightarrow \mathbb {R} \tag {5a} +$$ + +$$ +\text {s u b j e c t} \mathbf {E} (\mathbf {u}, \mathbf {p}) = \mathbf {0}, \mathbf {E}: \mathbb {R} ^ {U} \times \mathbb {R} ^ {P} \rightarrow \mathbb {R} ^ {U} \tag {5b} +$$ + +![](images/a903b6a2511fa50a6f72cbe8b581ba4f9a61916212f6fc80253fec9b42d7988e.jpg) +Figure 3: Outline of the forward and adjoint steps. + +with a problem-specific function $\mathbf{E}(\mathbf{u},\mathbf{p})$ that relates the control parameters to the state variables and a cost function $J(\mathbf{u},\mathbf{p})$ . The gradient $\frac{dJ}{dp}$ , which is needed in the optimization, is computed by solving for the adjoint state $y$ and using it in the chain rule: + +$$ +\frac {\partial \mathbf {E}}{\partial \mathbf {u}} y = \frac {\partial J}{\partial \mathbf {u}}, \quad \frac {d J}{d \mathbf {p}} = - y ^ {T} \frac {\partial \mathbf {E}}{\partial \mathbf {p}} + \frac {\partial J}{\partial \mathbf {p}}. \tag {6} +$$ + +The advantage of the adjoint method is that only a single linear system needs to be solved initially for $y$ . Then, arbitrary control parameters can be added to the final vector-matrix multiplication, making the computational cost of a single gradient evaluation mostly independent of the number of control parameters. + +An overview of the different steps that are considered in the adjoint method is shown in Fig. 3. In each time step, the system matrix $E$ in Eq. (5b) captures collision handling (Sect. 5.1), stiffness matrix assembly with corotation (Supp. A.1), stiffness solve via a Conjugate Gradient solver and displacement extension. In the adjoint pass, the order of operations is reversed. Starting from the last frame, the adjoint variables of the displacements and velocities are computed with the derivatives of the operations $\frac{\partial \mathbf{E}}{\partial \mathbf{u}}$ , see Supp. C. This gives the adjoint state $y$ in Eq. (6). To improve the performance, we assemble the gradients of the control parameters directly within the respective adjoint operations. + +# 5.1. Collision Embedding + +To include collisions in the inverse solver framework, we employ the penalty method [4, 7] (see the accompanying video for the interplay between collisions and the dynamic simulation). Wherever the object penetrates another object, a virtual spring is attached to it that generates a repulsive force that is added as a Neumann boundary in the next timestep. + +Let $x = \mathrm{dist}(\mathbf{x})$ be the penetration depth of point $\mathbf{x}$ . Then, the force of a spring is described by Hooke's Law: $\mathbf{f} = -kx\mathbf{n}$ with the stiffness factor $k$ and outer normal vector $\mathbf{n}$ . In our case, the spring must not exert an attractive force towards the surface when the objects + +are not penetrating. Therefore, the force is clamped with $\mathbf{f}_c = -k\min (0,x)\mathbf{n}$ + +To obtain a stable simulation, we replace the hard minimum by a soft minimum [6, 24] + +$$ +\mathbf {f} _ {c} = - k \operatorname {s o f t m i n} (0, x) \mathbf {n} +$$ + +$$ +\text {w i t h} \operatorname {s o f t m i n} _ {\alpha} (a, b) := - \ln \left(e ^ {- a \alpha} + e ^ {- b \alpha}\right) / \alpha . \tag {7} +$$ + +This makes the minimum differentiable, which is necessary to consider the collision response in the adjoint method. Furthermore, the collision forces have to be included implicitly in the Newmark time integrator. Since the collision force at the next timestep $\mathbf{f}_c^{(n)}$ is not known, it is approximated using the time derivative of Eq. (7) as + +$$ +\mathbf {f} _ {c} ^ {(n)} \approx \mathbf {f} _ {c} ^ {(n - 1)} + \Delta t \frac {\partial}{\partial t} \mathbf {f} _ {c} ^ {(n - 1)}. \tag {8} +$$ + +# 6. Results and Evaluation + +We analyze the accuracy, robustness and performance of our approach. All experiments were performed on a desktop system equipped with an Intel Xeon W-2123 CPU, 64 GB RAM and a Nvidia RTX 2070 GPU. We analyze both synthetic datasets, to compare to ground truth material parameters, as well as several live captures. We first demonstrate robust reconstructions for a bouncing ball made from a homogeneous material, before estimating material parameters of a bending plate, a falling teddy bear and a pillow. Setup parameters as well as concrete timings and model statistics for all experiments are given in Table 4 in the Supplemental Material. For all of our examples, both the forward and backward solve take less than one second per timestep, resulting in a total runtime of roughly 40 minutes for objects comprised of 4000/3000 active nodes/simulation elements. Additional tests are given in Supp. E and F. + +# 6.1. Synthetic Datasets + +We consider a bouncing ball with prescribed gravity, Young's modulus and stiffness damping (Fig. 4). The ball's dynamics is forward simulated using the finite-element solver (Fig. 4a), and depth images at resolution $50 \times 50$ pixels are rendered and provided as sparse constraints. Multiple optimization runs using different initial conditions (Fig. 4b,d) are performed to reconstruct the material parameters. They are then used in forward simulations to validate against the ground truth simulation (Fig. 4c,e). As shown, the ground truth dynamics is extremely well captured. Gravity optimization converges for all start values, yet this doesn't seem to hold for Young's modulus and stiffness damping. However, Fig. 4f reveals that a hyperbolic relation between these parameters for dynamic motion is in fact exactly reconstructed. + +The cost function can also effectively handle complex geometry (see Fig. 5). The soft body Stanford dragon is + +![](images/683a5f0788b1d268b8234a8be60a2ec9609cf9d9841d6d5c4fcd08a75247ef0a.jpg) + +![](images/c7930f3d39c70cfd5f66d98b849738703f58b41697ff88056c70a5443e7cfe8a.jpg) + +![](images/79f673e6bcfdb0466b706058a4d86a2846fe5c9946a47ac4215b760fc9639ba6.jpg) + +![](images/aebde6756ef2a0bfa231ea208a89a1bcea8744c8875f7637500fe9a2aa104b16.jpg) + +![](images/f1c4e7617cf96786df5863e6d668fe6d5b28db006de13e58a99ddc1a6b8683a8.jpg) + +![](images/259691a83a57d73d7e9afd4c0346c82397dde3a3a97403be537b36a54fe6d17a.jpg) +Figure 4: Our algorithm robustly reconstructs material parameters which explain the dynamics of the ground truth (a) very well (c,e), even when starting from very different initial conditions (b,d). Convergence plots show a single optimum for the gravity, and indicate perfect adherence of physical dependency between Young's modulus and stiffness damping. Each line of the same color represents an optimization run. + +![](images/7607a853d539f3787ae09885693e6e839ac788739153f8a1c1f81783f8d5e253.jpg) + +![](images/dfd1b80c88ce1bff04f4e0cd29d890f938ed8a7bd13eefa08b1470f4039ae963.jpg) + +![](images/36a87a429096df4e3f462e021300c99d9ea2707f927fdcfde23700601528379a.jpg) + +![](images/67489f62045b2b343c41af8887314ed7b14116084fc9f965838c2f7cf1a0d882.jpg) + +fixed at its head and pulled down due to gravity. From the observed forward simulation, the Young's modulus is reconstructed and then used in a new simulation which accurately mimics the observed one. + +![](images/80793575113fc30803e24b430a9ea19ead9b918f4070d04a7499419311911e41.jpg) +Figure 5: Observed forward simulation (a) and simulation using reconstructed material parameters (b) for the hanging deformable dragon. + +![](images/f532b2f92071244f44095a98f4cc72688123d6d357aba056f1cf5a2d302c8786.jpg) + +To evaluate whether the optimization improves when more cameras or higher camera resolutions are used, different configurations, each with 20 different initial conditions, are tested (Table 1). The adjoint method can robustly reconstruct the parameters, almost always converging with an error of less than $5\%$ . If finite differences are used, the reconstruction quality degrades substantially, with more than $50\%$ of the runs not converging. + +# 6.2. Real-World Scans + +We evaluate our approach on a number of live captures from a commodity RGB-D camera, an Asus Xtion ProLive. The reconstruction is performed in a virtual, unit-less system, and results are later scaled to physical units using the object's size and mass (see Supp. D). + +Single-Parameter Reconstruction A thin plate made of acoustic foam is fixed at one edge and bends due to gravity. Optimization is for the Young's modulus, the simulation is calibrated with the real-world mass, object size and gravity, and low stiffness damping. The experiment is performed three times with slightly different positions of the plate (Fig. 6), 100 timesteps are recorded each and used in the optimization. The convergence plots indicate that the optimizer always converges quickly to a single optimum, + +
Increasing # camerasIncreasing resolution
r = 502n = 1
nerrorconv.rerrorconv.
12.888%95.00%2022.709%90.00%
28.646%70.00%5024.621%95.00%
45.084%95.00%10023.046%100.00%
84.104%95.00%20022.763%95.00%
Gradient computation
n = 1, r = 502
methoderrorconv.
Adjoint Method2.621%100.00%
FD (Δx = 5)2.499%8.33%
FD (Δx = 100)9.238%41.67%
+ +Table 1: Statistics for a falling torus (Supp. E.4) for varying numbers of cameras and camera resolutions, and using finite differences versus the adjoint method for gradient computation. Young's modulus is reconstructed. "error": average $L_{1}$ error of converged runs (< 10% error), relative to the ground truth, "conv": percentage of converged runs. + +i.e., $11327\mathrm{Pa}$ , $8960\mathrm{Pa}$ , and $9488\mathrm{Pa}$ even for far-off initial conditions. Due to the approximation of the initial shape and the Dirichlet boundaries, as well as camera noise, an exact match of the reconstructed values cannot be expected. + +Multi-Parameter Reconstruction We use a plush teddy, with a high-quality initial pose obtained from a 3D scanner, and record a depth image sequence of the falling teddy (Fig. 7a,b). From 18 random initial configuration, the optimizer estimates gravity, the Young's modulus, the mass- and stiffness damping parameters. Each optimization run performs 50 iterations with 80 timesteps each (see plots in Fig. 7d). The material parameters estimated by the five runs with the lowest reconstruction costs closely match the bouncing behaviour of the teddy. However, the teddy tilts to the side after the first bounce. We attribute this behaviour to inhomogeneities in the material composition, which our solver approximates by assuming homogeneous material. For the Young's modulus, the initial value is several magnitudes higher than the reconstructed values, showing that the optimization is stable over a wide range of values. + +![](images/9f35d534253364e7e6a238fe95d9474da1745543eb6d97365b6e4013cca9f4de.jpg) +Figure 6: Reconstruction of Young's modulus for recordings of a bending plate made of acoustic foam, starting from different positions. Original and reconstruction are shown side by side. + +![](images/14c699cc52c8217dea380286ca93863c25056143ed86ec0c26cbab298c95846d.jpg) + +![](images/79268529c295043b01e01f636780b26c872db0025491af6cc9ee12aa08858a18.jpg) + +![](images/ddaedfe0034e67715cddfcd4507961fcf26ae8c516fb31cc0bc9502f620de3b0.jpg) + +![](images/cd1d67bee703737fffb18efd67e169793aaa3d68e2ccdeaaddc33aacb417cc7a.jpg) + +![](images/f9e1fe405641c44a8ffe6b7f1f9d5b86a1e5a6cb8b1c120104d7704b31650e71.jpg) + +For the best run, Table 2 shows the reconstructed values with physical units (see Table 1 in the Supplemental Material for all recorded parameter values), and Fig. 7c shows the reconstructed configuration. The gravity is plausible but slightly too high with $11.64\mathrm{m / s^2}$ , presumably due to effects of the Rayleigh damping. The reconstructed Young's modulus $(590\mathrm{Pa})$ indicates about five times softer material than e.g. polystyrene foam $(2500\mathrm{Pa})$ , which seems in good agreement with the observed dynamics. + +
TestcaseTeddyPillow-FlatPillow-Ramp
Initial Cost143.9249.9589.3
Recon. Cost8.46121.259.816
camera framerate60Hz60Hz60 Hz
object size0.33x0.22x0.18m0.46x0.46x0.15m0.46x0.46x0.15m
object mass0.256kg0.340kg0.340kg
grid resolution29x28x2227x47x1830x38x18
Gravity11.9 m/s26.98 m/s25.68 m/s2
Young's Modulus590Pa151Pa3430Pa
Mass Damping0.2400.0780.068
Stiffness Damping0.0270.0150.044
Ground Height--0.127m
Ground Theta--21.9°
Ground Phi--4.8°
+ +Table 2: Estimated parameters in real-world units. + +Lastly, for a falling pillow bouncing off a skewed ramp, we use 20 perturbed initial configurations (Fig. 8) to let the optimizer simultaneously reconstruct gravity, Young's modulus, mass- and stiffness damping parameters, as well as the collision geometry. (In Supp. F we show this for collisions with a flat surface.) We reconstruct the ground plane height, and its orientation in polar and azimuthal angle. Reconstructed values are given in Table 2. Our method recovers both a plausible orientation of the ramp and the object's material parameters solely from the sequence of depth images. To our knowledge, this is the first simultaneous physical reconstruction of a deformable object and its environment from a single depth video. Since we do not consider friction in the underlying physical model, however, the simulation cannot accurately match the speed of the sliding pillow, and it underestimates gravity. The plots in Fig. 8d indicate the difficulties arising in the current scenario. The parametric ambiguities, e.g., the same contact point can be obtained with high/steep or low/flat ground planes, lead to noticeable differences in the reconstructions. The reconstructed values indicate that the optimizer tries to compensate for the miss + +ing physical phenomena by increasing the material stiffness significantly. Nonetheless, the final result yields a realistic reconstruction of the initial impact and partially matches the observed sliding behavior. + +# 7. Discussion and Outlook + +Our formulation provides a method for gradient-based inverse parameter estimation using sparse constraints and physical priors. We see huge potential of this formulation for computer vision tasks to improve unseen or occluded motion, such as the backside of an object, via physical priors. It will also be particularly interesting to investigate the incorporation of soft body physics into deep learning methods via our differentiable formulation. By shifting the workload to a physics-based training process, it is potentially possible to train neural networks in a fully or partially unsupervised manner. + +In the real-world experiments, the accuracy of the estimated material parameters is affected by measurement noise as well as the non-physical damping distribution that is assumed in the simulation. Especially the latter introduces forces that reduce the gravity. Similarly, since the soft collision model repulses the object already before the contact point is reached, it can require a stronger gravity force to compensate this effect. Hence, the estimated material parameters are typically less accurate than those obtained from more specialized laboratory experiments [28, 50]. + +In contrast to previous work [44], we require an initial object pose. It will be interesting to combine our method with the estimation of the rest pose proposed there. Furthermore, we consider the extension region only in proximity to the domain covered by the object. Thus, the cost function cannot be evaluated at points that are observed far outside this region. To handle such cases, we will investigate multi-scale approaches that can efficiently propagate deformations into a wider region around the object. To avoid multiple solutions with different parameter values, it will be interesting to introducing additional priors or domain-specific knowledge about the observed materials. + +![](images/4ddda8f6bc4cc531fffcb2bd156732c68c843c52fe379aa1fedf42827f465ff6.jpg) +Figure 7: First three rows from top to bottom: Observed colors, observed depths, reconstructed model (purple dots indicate observations). Each row shows a sequence of steps over time. Last row shows the convergence plots for teddy, using 18 randomly selected initial parameter sets. Plots of best 5 runs drawn in color, plot of best run thickened. + +![](images/f3aa4db0659fd0aa67984e285f9b0a9a72f07cb13d38f64cfc008ee8f950171c.jpg) +Figure 8: First three rows from top to bottom: Observed colors, observed depths, reconstructed model (purple dots indicate observations). Each row shows a sequence of steps over time. The last row shows the plots of the optimization runs. + +# References + +[1] D. Azinovic, T.-M. Li, A. Kaplanyan, and M. Nießner. Inverse path tracing for joint material and lighting estimation. In CVPR, 2019. +[2] Bernd Bickel, Moritz Bächer, Miguel A Otaduy, Wojciech Matusik, Hanspeter Pfister, and Markus Gross. Capture and modeling of non-linear heterogeneous soft tissue. In ACM Transactions on Graphics (TOG), volume 28(3), page 89. ACM, 2009. +[3] Volker Blanz, Thomas Vetter, et al. A morphable model for the synthesis of 3d faces. In Siggraph, volume 99, pages 187-194, 1999. +[4] Robert Bridson, Ronald Fedkiw, and John Anderson. Robust treatment of collisions, contact and friction for cloth animation. Proc. Conf. Computer Graphics and Interactive Techniques, pages 594-603, 2002. +[5] Alexander M Bronstein, Michael M Bronstein, and Ron Kimmel. Generalized multidimensional scaling: a framework for isometry-invariant partial surface matching. Proceedings of the National Academy of Sciences, 103(5):1168-1172, 2006. +[6] John. D. Cook. Soft maximum function. HTTPS://WWW.JOHNDCOOK.COM/BLOG/2010/01/13/SOFT-MAXIMUM/, 2010. Accessed 07/26/2018. +[7] Stelian Coros, Sebastian Martin, Bernhard Thomaszewski, Christian Schumacher, Robert Sumner, and Markus Gross. Deformable objects alive! ACM Transactions on Graphics, 31(4):1-9, 2012. +[8] Brian Curless and Marc Levoy. A volumetric method for building complex models from range images. 1996. +[9] Edilson de Aguiar, Carsten Stoll, Christian Theobalt, Naveed Ahmed, Hans-Peter Seidel, and Sebastian Thrun. Performance capture from sparse multi-view video. ACM Trans. Graph., 27(3):98:1-98:10, 2008. +[10] Mingsong Dou, Jonathan Taylor, Henry Fuchs, Andrew Fitzgibbon, and Shahram Izadi. 3d scanning deformable objects with a single rgbd sensor. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 493-501, 2015. +[11] Lawson Fulton, Vismay Modi, David Duvenaud, David IW Levin, and Alec Jacobson. Latent-space dynamics for reduced deformable simulation. In Computer Graphics Forum, volume 38, pages 379-391, 2019. +[12] Nachiket H Gokhale, Paul E Barbone, and Assad A Oberai. Solution of the nonlinear elasticity imaging inverse problem: the compressible case. Inverse Problems, 24(4):045010, 2008. +[13] Chris Greenough. Newmark's method of direct integration. HTTP://WWW.SOFTENG.RL.AC.UK/ST/PROJECTS/FELIB3/DOCS/HTML/INTRO/INTRO-NODE52.HTML, 2001. Accessed: 05/17/2018. +[14] K. Guo, F. Xu, T. Yu, X. Liu, Q. Dai, and Y. Liu. Real-time geometry, albedo, and motion reconstruction using + +a single RGB-D camera. ACM ToG, 36(3):32, 2017. +[15] Peter Hansbo, Mats G. Larson, and Sara Zahedi. A cut finite element method for a stokes interface problem. Applied Numerical Mathematics, 85:90 - 114, 2014. +[16] Michael Hauth and Wolfgang Strasser. Corotational simulation of deformable solids. Journal of WSCG, 12(1-3), 2003. +[17] Yuanming Hu, Luke Anderson, Tzu-Mao Li, Qi Sun, Nathan Carr, Jonathan Ragan-Kelley, and Frédo Durand. Difftaichi: Differentiable programming for physical simulation. arXiv:1910.00935, 2019. +[18] Yuanming Hu, Jiancheng Liu, Andrew Spielberg, Joshua B Tenenbaum, William T Freeman, Jiajun Wu, Daniela Rus, and Wojciech Matusik. Chainqueen: A real-time differentiable physical simulator for soft robotics. In 2019 International Conference on Robotics and Automation (ICRA), pages 6265–6271, 2019. +[19] Matthias Innmann, Michael Zollhöfer, Matthias Niessner, Christian Theobald, and Marc Stamminger. Volumedeform: Real-time volumetric non-rigid reconstruction. volume 9912, pages 362-379. +[20] K. Kim, J. Gu, S. Tyree, P. Molchanov, M. Nießner, and J. Kautz. A lightweight approach for on-the-fly reflectance estimation. In ICCV, 2017. +[21] Martin Kroon and Gerhard A Holzapfel. Estimation of the distributions of anisotropic, elastic properties and wall stresses of saccular cerebral aneurysms by inverse analysis. In Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 2008. +[22] Hao Li, Bart Adams, Leonidas J Guibas, and Mark Pauly. Robust single-view geometry and motion reconstruction. ACM Transactions on Graphics (TOG), 28(5):175, 2009. +[23] Ran Luo, Tianjia Shao, Huamin Wang, Weiwei Xu, Kun Zhou, and Yin Yang. Deepwarp: Dnn-based nonlinear deformation. arXiv:1803.09109, 2018. +[24] Martin Mächler. Accurately computing $\log(1 - \exp(.))$ . HTTPS://CRAN.R-PROJECT.ORG/webPACKAGES/RMPFR/VIGNETTES/LOG1MEXP-NOTE.PDF, 2012. Accessed: 07/15/2019. +[25] R. Maier, K. Kim, D. Cremers, J. Kautz, and M. Nießner. Intrinsic3D: High-quality 3D reconstruction by joint appearance and geometry optimization with spatially-varying lighting. In ICCV, 2017. +[26] Antoine McNamara, Adrien Treuille, Zoran Popovic, and Jos Stam. Fluid control using the adjoint method. ACM Trans. Graph., 23(3):449-456, Aug. 2004. +[27] A. Meka, M. Maximov, M. Zollhoefer, A. Chatterjee, H.-P. Seidel, C. Richardt, and C. Theobalt. LIME: Live Intrinsic Material Estimation. In CVPR, 2018. +[28] Eder Miguel, David Miraut, and Miguel A Otaduy. Modeling and estimation of energy-based hyperelastic objects. In Computer Graphics Forum, volume 35(2), pages 385-396. Wiley Online Library, 2016. + +[29] Niloy J Mitra, Simon Flóry, Maks Ovsjanikov, Natasha Gelfand, Leonidas J Guibas, and Helmut Pottmann. Dynamic geometry registration. In Symposium on geometry processing, pages 173-182, 2007. +[30] Matthias Müller, Julie Dorsey, Leonard McMillan, Robert Jagnow, and Barbara Cutler. Stable real-time deformations. In Proceedings of the 2002 ACM SIGGRAPH/Eurographics symposium on Computer animation, pages 49-54. ACM, 2002. +[31] R.A. Newcombe, D. Fox, and S.M. Seitz. DynamicFusion: Reconstruction and tracking of non-rigid scenes in real-time. In CVPR, pages 343-352, 2015. +[32] R. A. Newcombe, S. Izadi, O. Hilliges, D. Molyneaux, D. Kim, A. J. Davison, P. Kohi, J. Shotton, S. Hodges, and A. Fitzgibbon. Kinectfusion: Real-time dense surface mapping and tracking. In 2011 10th IEEE International Symposium on Mixed and Augmented Reality, pages 127-136. IEEE, 26.10.2011 - 29.10.2011. +[33] Michael Niemeyer, Lars Mescheder, Michael Oechsle, and Andreas Geiger. Occupancy flow: 4d reconstruction by learning particle dynamics. In International Conference on Computer Vision, 2019. +[34] M. Nießner, M. Zollhöfer, S. Izadi, and M. Stamminger. Real-time 3D reconstruction at scale using voxel hashing. ACM ToG, 32(6):169, 2013. +[35] Zherong Pan and Dinesh Manocha. Active animations of reduced deformable models with environment interactions. ACM Transactions on Graphics (TOG), 37(3):36, 2018. +[36] Mark Pauly, Niloy J Mitra, Joachim Giesen, Markus H Gross, and Leonidas J Guibas. Example-based 3d scan completion. In Symposium on Geometry Processing, number CONF, pages 23-32, 2005. +[37] Yuri Pekelny and Craig Gotsman. Articulated object reconstruction and markerless motion capture from depth video. In Computer Graphics Forum, volume 27(2), pages 399-408. Wiley Online Library, 2008. +[38] John Schulman, Alex Lee, Jonathan Ho, and Pieter Abbeel. Tracking deformable objects with point clouds. In Proceedings - IEEE International Conference on Robotics and Automation, pages 1130-1137, 2013. +[39] Eftychios Sifakis and Jernej Barbic. Finite element method simulation of 3d deformable solids. Synthesis Lectures on Visual Computing: Computer Graphics, Animation, Computational Photography, and Imaging, 1(1):1-69, 2015. +[40] Miroslava Slavcheva, Maximilian Baust, Daniel Cremers, and Slobodan Ilic. Killingfusion: Non-rigid 3d reconstruction without correspondences. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1386-1395, 2017. +[41] M. Slavcheva, M. Baust, and S. Ilic. SobolevFusion: 3D reconstruction of scenes undergoing free non-rigid motion. In CVPR, pages 2646-2655, 2018. + +[42] Jing Tong, Jin Zhou, Ligang Liu, Zhigeng Pan, and Hao Yan. Scanning 3d full human bodies using kinetics. IEEE transactions on visualization and computer graphics, 18(4):643-650, 2012. +[43] Bin Wang, Paul G. Kry, Yuanmin Deng, Uri M. Ascher, Hui Huang, and Baoquan Chen. Neural material: Learning elastic constitutive material and damping models from sparse data. arXiv, 1808.04931, 2018. +[44] Bin Wang, Longhua Wu, KangKang Yin, Uri Ascher, Libin Liu, and Hui Huang. Deformation capture and modeling of soft objects. ACM Transactions on Graphics (TOG), 34(4):94, 2015. +[45] Z. Wang, S. Rosa, B. Yang, S. Wang, N. Trigoni, and A. Markham. 3d-physnet: Learning the intuitive physics of non-rigid object deformations. In *IJCAI*, 2018. +[46] T. Whelan, S. Leutenegger, R.F. Salas-Moreno, B. Glocker, and A.J. Davison. Elasticfusion: Dense slam without a pose graph. In RSS, 2015. +[47] C. Wu, M. Zollhöfer, M. Nießner, M. Stamminger, S. Izadi, and C. Theobalt. Real-time shading-based refinement for consumer depth cameras. ACM Transactions on Graphics (TOG), 2014. +[48] Jun Wu, Rüdiger Westermann, and Christian Dick. A survey of physically based simulation of cuts in deformable bodies. Computer Graphics Forum, 34(6):161-187, 2015. +[49] Tao Yu, Kaiwen Guo, Feng Xu, Yuan Dong, Zhaoqi Su, Jianhui Zhao, Jianguo Li, Qionghai Dai, and Yebin Liu. Bodyfusion: Real-time capture of human motion and surface geometry using a single depth camera. In Proceedings of the IEEE International Conference on Computer Vision, pages 910-919, 2017. +[50] Jonas Zehnder, Espen Knoop, Moritz Bächer, and Bernhard Thomaszewski. Metasilicone: design and fabrication of composite silicone with desired mechanical properties. ACM Transactions on Graphics (TOG), 36(6):240, 2017. +[51] Ming Zeng, Jiaxiang Zheng, Xuan Cheng, and Xinguo Liu. Templateless quasi-rigid shape modeling with implicit loop-closure. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 145-152, 2013. +[52] M. Zollhöfer, M. Nießner, S. Izadi, C. Rehmann, C. Zach, M. Fisher, C. Wu, A. Fitzgibbon, C. Loop, C. Theobalt, and M. Stamminger. Real-time non-rigid reconstruction using an RGB-D camera. ACM Transactions on Graphics (TOG), 33(4):156, 2014. +[53] Michael Zollhöfer, Patrick Stotko, Andreas Görtlitz, Christian Theobalt, Matthias Nießner, Reinhard Klein, and Andreas Kolb. State of the art on 3d reconstruction with rgb-d cameras. In Computer graphics forum, volume 37, pages 625-652, 2018. \ No newline at end of file diff --git a/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/images.zip b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..cab730be8cac37c97147bc96d5feed30f43db617 --- /dev/null +++ b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2857e8ad6e7907c5f49260961438ee4c9e1358416e0cb315a3eadd17121668f8 +size 559534 diff --git a/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/layout.json b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..fe7817f69f1798d957476faf044914456d86d92c --- /dev/null +++ b/correspondencefreematerialreconstructionusingsparsesurfaceconstraints/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9782053679a1227b44200aea4fb083c8db895983032e03b11d15beb3a4489543 +size 423446 diff --git a/correspondencenetworkswithadaptiveneighbourhoodconsensus/41366461-163b-4585-b149-d95807ff5652_content_list.json b/correspondencenetworkswithadaptiveneighbourhoodconsensus/41366461-163b-4585-b149-d95807ff5652_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4cdead6143c85cda4dc04894f561234afccc773a --- /dev/null +++ b/correspondencenetworkswithadaptiveneighbourhoodconsensus/41366461-163b-4585-b149-d95807ff5652_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a9f171cfa76d6eb93b74b2504d409490ae97808dffca1bcb4a26532e6509737 +size 74230 diff --git a/correspondencenetworkswithadaptiveneighbourhoodconsensus/41366461-163b-4585-b149-d95807ff5652_model.json b/correspondencenetworkswithadaptiveneighbourhoodconsensus/41366461-163b-4585-b149-d95807ff5652_model.json new file mode 100644 index 0000000000000000000000000000000000000000..dc4b95694074e5fc3bb998929047bc435eac0b44 --- /dev/null +++ b/correspondencenetworkswithadaptiveneighbourhoodconsensus/41366461-163b-4585-b149-d95807ff5652_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30ff9a47c3d7cedefec55898d0c8fb49257433fb4beee4fe87413fe8608eb77b +size 90232 diff --git a/correspondencenetworkswithadaptiveneighbourhoodconsensus/41366461-163b-4585-b149-d95807ff5652_origin.pdf b/correspondencenetworkswithadaptiveneighbourhoodconsensus/41366461-163b-4585-b149-d95807ff5652_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8ecc11a622602c7e29c4ff71c12657202c684816 --- /dev/null +++ b/correspondencenetworkswithadaptiveneighbourhoodconsensus/41366461-163b-4585-b149-d95807ff5652_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb988535d36e05f108dbf51d3d39991f0e77e5204e6639471ec781c71c470197 +size 1575608 diff --git a/correspondencenetworkswithadaptiveneighbourhoodconsensus/full.md b/correspondencenetworkswithadaptiveneighbourhoodconsensus/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8a8d5851ce35f0564d1081babaec902ae07c2bd6 --- /dev/null +++ b/correspondencenetworkswithadaptiveneighbourhoodconsensus/full.md @@ -0,0 +1,280 @@ +# Correspondence Networks with Adaptive Neighbourhood Consensus + +Shuda $\mathbf{Li}^{1*}$ + +Kai Han $^{2*}$ + +Theo W. Costain1 + +Henry Howard-Jenkins1 + +Victor Prisacariu1 + +$^{1}$ Active Vision Lab & $^{2}$ Visual Geometry Group Department of Engineering Science, University of Oxford {shuda, khan, costain, henryhj, victor}@robots.ox.ac.uk + +# Abstract + +In this paper, we tackle the task of establishing dense visual correspondences between images containing objects of the same category. This is a challenging task due to large intra-class variations and a lack of dense pixel level annotations. We propose a convolutional neural network architecture, called adaptive neighbourhood consensus network (ANC-Net), that can be trained end-to-end with sparse keypoint annotations, to handle this challenge. At the core of ANC-Net is our proposed non-isotropic 4D convolution kernel, which forms the building block for the adaptive neighbourhood consensus module for robust matching. We also introduce a simple and efficient multi-scale self-similarity module in ANC-Net to make the learned feature robust to intra-class variations. Furthermore, we propose a novel orthogonal loss that can enforce the one-to-one matching constraint. We thoroughly evaluate the effectiveness of our method on various benchmarks, where it substantially outperforms state-of-the-art methods. + +# 1. Introduction + +Establishing visual correspondences has long been a fundamental problem in computer vision. It has seen variety of applications in areas such as 3D reconstruction [1, 33], image editing [6], scene understanding [24], and object detection [4]. + +Earlier works mainly focused on estimating correspondences for images of the same scene or object (i.e. instance-level correspondences) using hand-crafted features such as SIFT [26] or HOG [3]. Recently, finding correspondences for different instances from the same category (i.e. semantic correspondences) has attracted more and more attention[2, 9, 32, 10, 27]. In this paper, we focus on the problem of establishing dense correspondences for a pair of images depicting different instances from the same cate + +gory. This task is extremely challenging due to large intraclass variation in properties such as colour, scale, pose, and illumination. Further, it is unreasonably expensive, if not impossible, to provide dense annotations for such image pairs. + +To deal with the challenges mentioned above, we introduce a convolutional neural network (CNN), called Adaptive Neighbourhood Consensus Network (ANC-Net), which can produce reliable semantic correspondences without requiring dense human annotations. ANC-Net takes a pair of images as input and predicts a 4D correlation map, containing the matching scores for all possible matches between the two images. The most likely matches can then be retrieved by finding the matches giving the maximum matching scores. + +ANC-Net consists of a CNN feature extractor, a multiscale self-similarity module, and an adaptive neighbourhood consensus module. At the core of ANC-Net is our proposed non-isotropic 4D convolution, which incorporates an adaptive neighbourhood consensus constraint for robust matching, and our proposed multi-scale self-similarity module, which aggregates multiple self-similarity features, which are insensitive to intra-class appearance variation[17]. + +CNN features have been very popular for the task of correspondence estimation due to their promising performance, and most state-of-the-art methods are based on CNN features [32, 27, 10, 17, 2]. Like other methods, ANC-Net also extracts features with a pre-trained CNN. However, instead of directly using the CNN features to calculate matching scores, we introduce the multi-scale self-similarity. Self-similarity has been introduced in existing methods [10, 17]. Unlike other methods that either use self-similarity as an extra feature alongside raw CNN features [10], or use computationally expensive irregular self-similarity patterns [17], our self-similarity features are both computationally cheap to obtain, and do not need combining with raw CNN features, whilst still capturing the complex self-similarity patterns. + +![](images/a9e9049d1657ce7cd59d42340809060b2b9c8463ce3d984415a62615d80ac803.jpg) +Figure 1: An overview of ANC-Net. Given a pair of images $(\mathbf{I}^s, \mathbf{I}^t)$ , ANC-Net can predict their pixel-wise semantic correspondences. A CNN backbone $\mathcal{F}$ first extracts features $\mathbf{F}^s$ and $\mathbf{F}^t$ . Our multi-scale self-similarity module then captures the self-similarity features $\mathbf{S}^s$ and $\mathbf{S}^t$ based on $\mathbf{F}^s$ and $\mathbf{F}^t$ . We can then obtain $\mathbf{C}_s$ from $\mathbf{S}^s$ and $\mathbf{S}^t$ , and $\mathbf{C}_f$ from $\mathbf{F}^s$ and $\mathbf{F}^t$ . Taking $\mathbf{C}_f$ and $\mathbf{C}_s$ as input, our ANC module $\mathcal{N}$ will predict a refined $\bar{\mathbf{C}}$ , from which the pixel-wise correspondences can be retrieved with interpolation. + +With reliable feature representation, the matching scores for each individual feature pair can then be calculated. However, as the individual feature pairs do not contain any matching validity information, matching by direct feature comparison can be rather noisy. To mitigate this, correspondence validity constraints should be applied to obtain reliable matching scores. Neighbourhood consensus, which measures how many pairs are matched in the neighbourhoods of the two points under consideration, turns to be one of the most effective correspondence validity constraints, and has been successfully introduced in recent work [32, 10]. However, [32] and [10] assume neighbourhoods of the same size for the two points in consideration. Unfortunately, this assumption does not hold in practice, as objects in real images typically have different scales and shapes. Therefore, adopting neighbourhoods of the same size is very likely to be affected by unrelated neighbours (e.g. background parts). To address this issue, we propose an adaptive neighbourhood consensus module, which can select the correct neighbourhoods. + +As mentioned earlier, the cost of labelling ground truth means fully supervised learning with dense annotations is not feasible. Instead, our model can effectively make use of sparse key-point annotations. To enforce the one-to-one mapping constraint, which is crucial for plausible correspondences, we further propose a novel one-to-one mapping loss, called orthogonal loss, to regularise the training. + +To summarise, our contributions are four fold: + +- We introduce ANC-Net for the task of dense semantic correspondence estimation, which can be trained with sparse key-point annotations. +- We propose a non-isotropic 4D convolutional kernel, which forms the building block for the adaptive neighbourhood consensus module for robust matching. + +- We propose a simple and efficient multi-scale self-similarity to make the feature matching robust to intraclass variation. +- We propose a novel orthogonal loss that can enforce the one-to-one matching constraint, encouraging plausible matching results. + +We thoroughly evaluate the effectiveness of our method on various benchmarks, where it substantially outperforms state-of-the-art methods. Our code can be found at https://ancnet.avlcode.org/. + +# 2. Related work + +The semantic correspondence estimation problem is often considered as either a pixel-wise matching problem, an image alignment problem, or a flow estimation problem. Earlier works used hand-crafted features, such as SIFT [26] or HOG [3], to establish semantic correspondences [24, 15, 11, 8, 7, 35]. Here, we briefly review recent CNN based methods. + +Pixel-wise matching. Long et al. [25] transferred the features pre-trained on an image classification task to pixelwise correspondence estimation. Choy et al. [2] introduced a method to learn a feature embedding for the correspondence problem, by pulling positive features pairs close and pushing negative feature pairs away. Han et al. [9] proposed a CNN model that tries to match image patches considering both appearance and geometry information, and obtains the pixel-wise correspondences by interpolation. Novotny et al. [28] introduced a method to learn geometrically stable features with self-supervised learning by applying a synthetic warp to the images. More recently, Rocco et al. [32] proposed to construct a CNN model that incorporates neighbourhood consensus information to refine the 4D tensor storing all the matching scores, which are obtained from + +pre-trained CNN features. Huang et al. [10] introduced a method to incorporate self-similarity based on [32] and fuse different features with an attention mechanism. Min et al. [27] showed that effectively combining features extracted from different layers can provide significant benefits for the dense semantic correspondence estimation task. + +Image alignment. Rocco et al. [30] developed a CNN architecture that can predict the global geometric transformation between two images by training on synthetically warped data. Seo et al. [34] improved [30] by introducing attention based offset-aware correlation kernels. Rocco et al. [31] presented an end-to-end trainable CNN architecture that uses weak image-level supervision, which is trained by a soft inlier counting loss in a similar spirit to RANSAC. Jeon et al. [13] introduced a hierarchical learning procedure to progressively learn affine transformations to align the images in a chaos-to-fine manner. Kim et al. [16] introduced to a recurrent transformer network, which is trained with an iterative process and can predict the transformations between a pair of images. + +Flow estimation. Fischer et al. [5] introduced an end-to-end trainable model called FlowNet, which is trained on synthetic data to predict optical flow. FlowNet is further improved by Ilg et al. [12] in several aspects. Kim et al. [17] proposed a learnable self-similarity feature, which is then used to estimate an dense affine transformation flow for each feature location. The semantic correspondences can then be obtained by applying such transformations. Lee et al. [22] introduced a method to use images annotated with binary foreground masks, and subjected to synthetic geometric deformations, to train a CNN model with a mask consistency loss and a flow consistency loss. Besides these, there are also some methods that learn the flow using videos [36, 20] by considering temporal consistency. + +# 3. Method + +Given a pair of images $(\mathbf{I}^s, \mathbf{I}^t)$ , our objective is to find pixel-wise correspondences between the two images. We propose a CNN, ANC-Net, which takes $(\mathbf{I}^s, \mathbf{I}^t)$ as input and produces a 4D correlation map containing the matching scores for all possible pairs in the feature space of the two images. Pixel-wise correspondence then can be extracted by interpolation among the most likely matches in the feature space. The model can be trained with a supervised loss on sparse key-point annotations in an end-to-end manner. To encourage one-to-one matching, we propose using a novel loss, called the orthogonal loss, together with the supervised loss on sparse key-point annotations, for training our model. + +Figure 1 illustrates the main architecture of our network. It consists of a feature extractor $\mathcal{F}$ , a multi-scale self-similarity module, and an adaptive neighbourhood consensus (ANC) module $\mathcal{N}$ . The feature extractor $\mathcal{F}$ is composed of a sequence of standard convolutional layers. We first feed + +the two images into $\mathcal{F}$ , and get a pair of feature maps $\mathbf{F}^s$ and $\mathbf{F}^t$ . The multi-scale self-similarity module $\mathcal{S}$ consists of two convolutional layers followed by a concatenation operation to fuse them into the multi-scale features. With $\mathbf{F}^s$ and $\mathbf{F}^t$ , $\mathcal{S}$ will produce the multi-scale self-similarity feature maps $\mathbf{S}^s$ and $\mathbf{S}^t$ which capture the complex self-similarity patterns. We can then obtain the 4D correlation map $\mathbf{C}_s$ from $\mathbf{S}^s$ and $\mathbf{S}^t$ , and the 4D correlation map $\mathbf{C}_f$ from $\mathbf{F}^s$ and $\mathbf{F}^t$ . However, $\mathbf{C}_s$ and $\mathbf{C}_f$ are often noisy as they lack the constraints to enforce the correspondence validity, and thus are unreliable for directly extracting correspondences. Our proposed ANC module $\mathcal{N}$ , which is realised with a stack of non-isotropic 4D convolutions, takes $\mathbf{C}_s$ and $\mathbf{C}_f$ as input, refining them by considering neighbourhoods with varying sizes. Finally, the ANC module combines the refined correlation maps by simply summing up the two, producing a single 4D correlation map $\bar{\mathbf{C}}$ , from which reliable correspondences can be retrieved. $\mathbf{C}_s$ is introduced to capture the second order (and higher) cues derived from the raw features. $\mathbf{C}_s$ shares a similar structure to $\mathbf{C}_f$ , allowing both to be refined using a neighbourhood consensus module without introducing extra learnable parameters. Experiments show that the proposed self-similarity module outperforms similar methods [17, 10]. + +In this section, we will first introduce the multi-scale self-similarity module in Section 3.1. We then, in Section 3.2, describe the adaptive neighbourhood consensus matching validity module. Section 3.3 will discuss the approach to enforcing global constraints over the output of the neighbourhood consensus by maximising an a posteriori estimation. Finally, we describe the learning objectives for training our network in Section 3.4. + +# 3.1. Multi-scale self-similarity + +Self-similarity has been shown to be effective for the task of semantic correspondence estimation [17, 10]. Given a feature map $\mathbf{F} \in \mathbb{R}^{h_f \times w_f \times d}$ established by the backbone feature extractor, a self-similarity map measures the local similarity pattern at each feature location. One way to extract the self-similarity feature for the feature vector $\mathbf{f}_{ij}$ at $(i,j)$ in $\mathbf{F}$ is to calculate the cosine distance between itself and its neighbours. Figure 2 illustrates the self-similarity module when considering the $3 \times 3$ neighbours of a given feature vector. This approach results in 9 self-similarity scores for each $\mathbf{f}_{ij}$ . We further vectorise each of the $3 \times 3$ self-similarity scores into a 9-vector, which makes up the self-similarity feature map $\mathbf{S}_0 \in \mathbb{R}^{h_f \times w_f \times 9}$ . + +To further capture the correlations among different self-similarity features, we apply two 2D convolutional layers with zero padding on $\mathbf{S}_0$ . Given the output feature maps for the two layers are $\mathbf{S}_1$ and $\mathbf{S}_2$ , we then concatenate the 3-scales $\mathbf{S}_0$ , $\mathbf{S}_1$ , and $\mathbf{S}_2$ together to form an enhanced feature map $\mathbf{S}$ , which will serve as the input to the later layers. + +![](images/669b80f61c67c0351a7dbb6a7af19f4f4d5bb52c2eea5609a4a39ce3b28a1880.jpg) +Figure 2: Self-similarity module. The top left figure illustrates the calculation of a self-similarity score over the $3 \times 3$ window. Specifically, the cosine distances between each of the 9 features and the centre feature are calculated and then vectorised into the $\mathbf{S}_0$ . In the bottom, we first calculate the $\mathbf{S}_0$ from the feature map $\mathbf{F}$ , and then perform two levels of 2D convolutions, each followed by an activation function (ReLU) to produce $\mathbf{S}_1$ and $\mathbf{S}_2$ . Finally, the initial similarity score $\mathbf{S}_0$ , its first scale filtered features $\mathbf{S}_1$ , and second filtered features $\mathbf{S}_2$ are concatenated together to form final feature map $\mathbf{S}$ . + +With the feature maps $\mathbf{S}^s$ and $\mathbf{S}^t$ of source and target images respectively, we can obtain the 4D correlation map $\mathbf{C}_s$ . + +Unlike DCCNet [10], where the self-similarity of a single scale is considered, and the self-similarity scores are then concatenated with $\mathbf{F}$ and convolved using a point-wise convolution which is intended to use the self-similarity to re-weight the raw features, our method avoids fusing with $\mathbf{F}$ to reduce redundancy, as the features in $\mathbf{F}$ have already been implicitly included in $\mathbf{S}_0$ . Further, we extract more complex self-similarities than DCCNet and make use of multi-scale self-similarities to bootstrap the features. Thus, we capture more complex features from a much larger local window as well as second order (and higher) information. + +As will be shown in the experiments, our multi-scale self-similarity module performs better than that of DCCNet. It is also worth noting that FCSS [17] proposes a similar design, however their self-similarity score is defined using a set of irregular point pairs within the local window which is more complex to implement. In contrast, we adopt the design of correlating the centre feature with neighbours for simplicity and computation efficiency, and as a result, our simplified self-similarity module outperforms FCSS in all benchmarks. + +Both $\mathbf{C}_f$ and $\mathbf{C}_s$ are complementary to each other as we hypothesise they are dominated by first order and higher order cues respectively. They will be refined by the following ANC module independently and then combined. + +# 3.2. Adaptive neighbourhood consensus + +Neighbourhood consensus has been shown to be effective for filtering the noisy 4D correlation map [32, 10]. Multiple layers of the isotropic 4D convolutional kernels, i.e. kernels with identical size in each dimension, are applied on the 4D correlation map to refine it. The isotropic 4D convolution with size $5 \times 5 \times 5 \times 5$ is illustrated in top left of Figure 3. It can be seen that the kernel establishes two neighbourhoods with the same size for both images. However, objects in real images often have varying scales and shapes, therefore, two neighbourhoods depicting the same semantic meaning are very likely to have different sizes. Thus, using neighbourhoods of the same size for both images may introduce noise (e.g. unrelated background) when determining a match. + +To deal with the problem, we introduce the adaptive neighbourhood consensus (ANC) module which contains a set of non-isotropic 4D convolutional layers. As illustrated in the top right of Figure 3, the non-isotropic 4D convolution has dimensions of $3 \times 3 \times 5 \times 5$ , defining the neighbourhood of $3 \times 3$ and $5 \times 5$ . + +To handle objects in real images with varying scales and shapes, we can combine our non-isotropic 4D kernels with isotropic 4D kernels so that the model can dynamically determine which set of convolutions should be activated to handle objects of various sizes. We consider 3 candidate architectures (shown in Figure 3) in our experiments with each non-isotropic 4D convolution using zero padding. Unless stated otherwise, we use (d) in our experiments, as it gives the best performance in our evaluation. This is possibly because (d) allows for more scale variation than the others. This choice might ignore better designs than (d), but the main point in this work is to demonstrate the effectiveness of the ANC module. + +It is also worth noting that it is unnecessary to have both $p \times p \times q \times q$ and $q \times q \times p \times p$ kernels in the model where $p$ and $q$ are the sizes of some kernel dimensions, as the bidirectional neighbourhood consensus filter in Eq. 1 (which will be explained next) effectively tries both the configurations of small vs large neighbourhood and large vs small by reversing the matching direction, and the effect of both filters are equivalent due to the bidirectional matching. + +Let $\mathcal{N}$ be the module of our adaptive neighbourhood consensus. It takes a 4D correlation map $\mathbf{C}_s$ or $\mathbf{C}_f$ as input and refining them. Their refined counterparts can then be combined to form $\bar{\mathbf{C}}$ . We apply $\mathcal{N}$ to both matching directions (i.e. matching $\mathbf{I}^s$ to $\mathbf{I}^t$ and matching $\mathbf{I}^t$ to $\mathbf{I}^s$ ), so that our model is invariant to the order of the images. More importantly, this allows $\mathcal{N}$ to only include one $p \times p \times q \times q$ non-isotropic kernel to handle the small to large as well as the large to small neighbourhood. In particular, the refined 4D correlation map can be obtained by + +![](images/37349075dcc333cea28b676f4b8d47e51f71e907839abab0a2aec783a5c9c16f.jpg) +Figure 3: Adaptive neighbourhood consensus. The top row illustrates an isotropic and a non-isotropic 4D convolutional kernel. The bottom row illustrates the architecture of (a) the non-isotropic in NC-Net [32] and (b-d) three ANC candidates. $\oplus$ denotes concatenation of feature maps. The numbers $\{1,16,16,1\}$ denote the input and output channels for the 4D kernels. The non-isotropic 4D convolutions are always zero padded so that the size of the 4D correlation remains the same size after each convolution. + +$$ +\bar {\mathbf {C}} = \mathcal {N} (\mathbf {C} _ {s}) + \left(\mathcal {N} \left(\mathbf {C} _ {s} ^ {\top}\right)\right) ^ {\top} + \mathcal {N} (\mathbf {C} _ {f}) + \left(\mathcal {N} \left(\mathbf {C} _ {f} ^ {\top}\right)\right) ^ {\top}, \tag {1} +$$ + +where $\top$ denotes the swapping of the matching direction given an image pair, i.e., $(C^{\top})_{ijkl} = C_{klij}$ . + +# 3.3. Most likely matches + +After obtaining the refined 4D correlation map $\bar{\mathbf{C}}$ , we follow [32] to apply soft mutual nearest neighbour filtering, i.e., for each $\bar{c}_{ijcd}$ in $\bar{\mathbf{C}}$ , we replace it by $\hat{c}_{ijcd} = r_{ijkl}^{s}r_{ijkl}^{t}\bar{c}_{ijkl}$ where $r_{ijkl}^{s} = \frac{\bar{c}_{ijkl}}{\max_{ab}\bar{c}_{abkl}}$ and $r_{ijkl}^{t} = \frac{\bar{c}_{ijkl}}{\max_{cd}\bar{c}_{cd}}$ , which downweights the scores of matches that are not mutual nearest neighbours. Next, we perform softmax normalisation to the scores $\hat{c}_{ijkl}$ . The normalised scores can be interpreted as the matching probabilities. In particular, the probability of a given point at $(i,j)$ in $\mathbf{I}^s$ being matched with an arbitrary point $(k,l)$ in $\mathbf{I}^t$ is + +$$ +v _ {i j k l} ^ {t} = \frac {\exp (\hat {c} _ {i j k l})}{\sum_ {c d} \exp (\hat {c} _ {i j c d})}. \tag {2} +$$ + +Similarly, the probability of a given point at $(k,l)$ in $\mathbf{I}^t$ being matched with an arbitrary point $(i,j)$ in $\mathbf{I}^s$ is + +$$ +v _ {i j k l} ^ {\mathrm {s}} = \frac {\exp (\hat {c} _ {i j k l})}{\sum_ {a b} \exp (\hat {c} _ {a b k l})}. \tag {3} +$$ + +For a given position $(i,j)$ in $\mathbf{I}^s$ , the most likely match $(k,l)$ in $\mathbf{I}^t$ can be found by + +$$ +(k, l) = \underset {c d} {\arg \max } v _ {i j c d} ^ {t}. \tag {4} +$$ + +Similarly, for a given position $(k,l)$ in $\mathbf{I}^t$ , the most likely match $(i,j)$ in $\mathbf{I}^s$ can be found by + +$$ +(i, j) = \underset {a b} {\arg \max } v _ {a b k l} ^ {s}. \tag {5} +$$ + +After retrieving the correspondences in the feature space with Eq. 4 and Eq. 5, the pixel-wise correspondences can be obtained by interpolation. + +# 3.4. Learning objective + +For the tasks of establishing dense semantic correspondences, it is impossible to obtain dense ground-truth labelling for all training image pairs due to the huge amount of human labour required. In practice, one can easily label only a few key-points of the objects in an image. These key-points often indicate the objects parts with concrete semantic meaning (e.g. eyes, mouths, body joints, etc.). Sparse key-point annotations are included in many existing datasets including PF-PASCAL [8], Spair-71k [27], CUB [37] and others. There are also other forms of alternative annotations, such as image level pairwise annotations [32, 10], or object masks [22]. In this paper, we are interested in the sparse key-point annotations, as they are more directly linked to our objective to learn semantic correspondences. + +The sparse key-point annotations provide a straightforward way to train a CNN model for semantic matching, in which we minimise the distances between features of matched key-points (e.g. [2]). However, this is not applicable to ANC, because the feature space ANC operates is a 4D correlation map, rather than a 3D feature map consisting of per pixel feature vectors. Therefore, we introduce a simple but effective supervised loss on 4D correlation maps to train our model. + +For each key-point $(x,y)$ in the image (e.g. Figure 4(a)), we first re-scale $(x,y)$ to the same resolution as the feature map, giving the re-scaled coordinates $(x_{c},y_{c})$ . Since $(x_{c},y_{c})$ is a sub-pixel coordinate, it can not be used as the target in the feature map directly. Instead, we can simply pick the nearest neighbour $(x_{n},y_{n})$ of $(x_{c},y_{c})$ in the feature map to be the target (see Figure 4(b)). However, this will introduce errors caused by ignoring the offset between the $(x_{n},y_{n})$ and $(x_{c},y_{c})$ . As the resolution of the feature map is much smaller than that of the image, small offsets in the feature map will cause large errors in the image. To compensate for the offset, we take the four nearest neighbours into consideration (see Figure 4(c)), rather than the single nearest neighbour. In particular, we pick the + +![](images/34e39f597b7d4e1f4808d6cbfe973b7d0c8d857164d43b06ced12cdd4c46d938.jpg) +(a) + +![](images/39d968d05d65df385a5419264b128673ef2f33690b54dcfd2d2bd7a92a34ae83.jpg) +(b) + +![](images/2eace057ced1eedd72f888c0b5d78566dea9c11682cab1c14c4997398eca0017.jpg) +(c) +Figure 4: Generating the ground-truth probability map for each key point. (a) The key point $(x,y)$ is a key point in the image coordinates. (b) $(x_{n},y_{n})$ is the nearest neighbour of $(x_{c},y_{c})$ which is re-scaled coordinate $(x,y)$ to the feature map resolution. (c) $(x_{n}^{1},y_{n}^{1}),(x_{n}^{2},y_{n}^{2}),(x_{n}^{3},y_{n}^{3})$ , and $(x_{n}^{4},y_{n}^{4})$ are the four nearest neighbours to $(x_{c},y_{c})$ . + +four nearest neighbours $(x_{n}^{1},y_{n}^{1})$ , $(x_{n}^{2},y_{n}^{2})$ , $(x_{n}^{3},y_{n}^{3})$ , and $(x_{n}^{4},y_{n}^{4})$ , and set scalar values $t_1$ , $t_2$ , $t_3$ , and $t_4$ to them representing the probability of being the considered as target. $t_1$ , $t_2$ , $t_3$ , and $t_4$ are proportional to their distances to $(x_c,y_c)$ , and $\sum_{j = 1}^{4}t_{j} = 1$ . We then apply 2D Gaussian smoothing on the four nearest neighbour probability map obtained above. We found that such smoothing can effectively enhance the performance. In this way, each key-point location annotation is converted into a 2D probability map. Next, we reshape the smoothed 2D probability map into a $(h_c\times w_c)$ -vector for the key-point $(x,y)$ , followed by $L_{2}$ normalisation. For the source image $\mathbf{I}^s$ containing $n$ key-points, we can therefore construct its target as a matrix $\mathbf{M}_{gt}\in \mathbb{R}^{n\times (h_c\times w_c)}$ with each row being a probability vector of a ground truth matching key-point in the target image $\mathbf{I}^t$ . Let $\mathbf{M}_{gt}$ and $\mathbf{M}$ be the ground truth and prediction. Note that $\mathbf{M}$ can be obtained by flattening the first two and last two dimensions of $\bar{\mathbf{C}}$ (after mutual nearest neighbour filtering), and taking the same $n$ rows corresponding to $\mathbf{M}_{gt}$ . The loss function is then the Frobenius Norm between them for both matching directions: + +$$ +\mathcal {L} _ {k} = \left\| \mathbf {M} ^ {s} - \mathbf {M} _ {g t} ^ {s} \right\| _ {F} + \left\| \mathbf {M} ^ {t} - \mathbf {M} _ {g t} ^ {t} \right\| _ {F}, \tag {6} +$$ + +where $\mathbf{M}^s$ denotes target probability map from $\mathbf{I}^s$ to $\mathbf{I}^t$ and $\mathbf{M}^t$ denotes inverse direction. + +# 3.5. Enforcing one-to-one matching + +The one-to-one mapping (i.e. one point can be only matched to one other point) turns out to be a useful clue for improve the matching accuracy in classic graph matching (GM)[38, 14], which aims to match two given point sets (graphs) in two images. Ideally, for our semantic correspondence estimation task, the result should also agree with the one-to-one mapping constraint. This is especially helpful when there exist some repetitive patterns in the image (e.g. a building with multiple identical windows). GM methods always assume that the number of key-points in two images + +are exactly the same. However, this is often not the case in real applications. For example, due to pose variation, some key-points may be visible in one image, but not in the other. In this case, there exist one-to-none mappings in both images. A plausible one-to-one matching constraint should be able to ignore the one-to-none matches in the data automatically. To handle this problem, we introduce a novel loss, named the orthogonal loss, as it was inspired by the nonnegative orthogonal GM algorithm [14]. The idea is that when $\mathbf{MM}^{\top}$ is an identity matrix $\mathbf{I}$ , each row of $\mathbf{M}$ contains only one element, and the rest are zero, so we include a difference between $\mathbf{MM}^{\top}$ and $\mathbf{I}$ in the loss. However, in reality, $\mathbf{M}$ may contain zero rows for one-to-none case. Therefore, our orthogonal loss term can be defined as + +$$ +\mathcal {L} _ {o} = \left\| \mathbf {M} \mathbf {M} ^ {\top} - \mathbf {M} _ {g t} \mathbf {M} _ {g t} ^ {\top} \right\| _ {F}, \tag {7} +$$ + +where $\| .\| _F$ is a Frobenius norm. It is worth noting that $\mathbf{M}_{gt}\mathbf{M}_{gt}^{\top}$ has zeros on its diagonal that allows both one-to-one and one-to-none matches to be accurately penalised. The orthogonal loss has to be combined with Eq. 6 as it has no impact over the prediction accuracy. It simply regularises the model by encouraging one-to-one predictions. The overall loss of our model can be written as + +$$ +\mathcal {L} = \mathcal {L} _ {k} + \alpha \mathcal {L} _ {o} ^ {m}, \tag {8} +$$ + +where $\alpha$ is a weight balancing term, which is set to 0.001 in all our experiments, and $\mathcal{L}_o^m = \| \mathbf{M}^s\mathbf{M}^{s^\top} - \mathbf{M}_{gt}^s\mathbf{M}_{gt}^s^\top \| _F + \| \mathbf{M}^t\mathbf{M}^{t^\top} - \mathbf{M}_{gt}^t\mathbf{M}_{gt}^t^\top \| _F$ by considering both matching directions. + +# 4. Experimental results + +# 4.1. Datasets and implementation details + +Datasets. We evaluate our method on four public datasets, namely, PF-PASCAL [8], Spair-71k [27], and CUB [37]. PF-PASCAL contains 1351 image pairs, which is approximately divided into 700 pairs for training 300 pairs for validation and 300 pairs for testing [9, 32]. Spair-71k dataset is much more challenging than the others as it contains both large view point differences and scale differences. We use the 12,234 pairs of testing pairs. Spair-71k is only used to evaluate the transferrability of the models trained on the PF-PASCAL training split. The CUB dataset contains 11,788 images of various species of birds with large variation of appearance, shape and pose. We randomly sample about 10,000 pairs from the CUB training data and test using the 5,000 pairs selected by [19]. + +Implementation details. Our ANC-Net is implemented in the PyTorch [29] framework. We experiment with three convolutional networks as feature backbones, namely, ResNet-50, ResNet-101 and ResNeXt-101. All of them are pre-trained on ImageNet [23], and the parameters are fixed + +during the training of our ANC-Net. The size of the self-similarity window is set to $5 \times 5$ , and channels of ANC module are set to $\{1, 16, 16, 1\}$ . The model is initially trained for 10 epochs using an Adam optimiser [18] with a learning rate of 0.001 and applying Gaussian smoothing with a kernel size of 5 for ground truth probability map generation. The model is then fine-tuned for 5 epochs applying Gaussian smoothing with a kernel size of 3 followed by another 5 epochs with a kernel size of 0. To compare with DCC-Net [10], we implemented it based on the publicly available official implementation of NC-Net [32]. Our implementation slightly surpassed the reported accuracy in [10]. We also implemented $\mathrm{UCN}_{\mathrm{ResNet - 101}}$ based on the publicly available official code [2]. + +Evaluation metric. Following common practice, we use the percentage of correct key-points (PCK@α) as our evaluation metric. We report the results under PCK threshold $\alpha = 0.1$ . $\alpha$ is set w.r.t. $\max(w_r, h_r)$ where $w_r$ and $h_r$ are the width and height of either the image or the object bounding box. Following existing works [9, 32, 21, 27], we use $\alpha$ w.r.t. the image size on PF-PASCAL, and w.r.t. the object bounding box on CUB and Spair-71k. + +Table 1: Comparison with state-of-the-art methods. + +
MethodsPF-PASCALCUBSpair-71k
Identity mapping37.014.63.7
UCNGoogLeNet [2]55.648.315.1
UCNResNet-101 [2]75.152.117.7
SCNetVGG-16 [9]72.2--
WeakalignResNet-101 [31]74.8-21.1
RTNetResNet-101 [16]75.9--
NC-NetResNet-101 [32]78.964.726.4
DCCNetResNet-101 [10]82.666.126.7
SFNetResNet-101 [21]81.9-26.0
HPFResNet-101 [27]84.8-28.2
HPFResNet-101-FCN [27]88.3--
ANCResNet-5083.769.627.1
ANCResNet-10186.172.428.7
ANCResNeXt-10188.774.130.1
+ +# 4.2. Benchmark comparisons + +We compare our method with recent state-of-the-art methods, and present our results in Table 1. For results on PF-PASCAL and Spair-71k, all methods are trained on PF-PASCAL. For results on CUB, the methods are trained and tested on CUB. We used three different feature backbones, i.e. ResNet-50, ResNet-101, and ResNext-101 for our method. When using an identical feature backbone (ResNet-101) with other methods, our ANC-Net achieves the best performance on all the datasets. For example, we achieve $86.1\%$ and $28.7\%$ on PF-PASCAL and Spair-71k respectively. Note that even with the ResNet-50 feature backbone, our model outperforms NC-Net and DCC + +Net with the more powerful ResNet-101 feature backbone on all datasets. Further, when we replace our feature backbone with ResNext-101, the performance of our method can be further boosted on all datasets (86.1% to 88.7% on PF-PASCAL, 72.4% to 74.1% on CUB, and 28.7% to 30.1% on Spair-71k). Our results are also better than the previous best results achieved HPF with ResNet-101-FCN. The results clearly demonstrate the effectiveness of our approach. + +Unbiased evaluation on FP-PASCAL. As discussed in [21], there are 302 images in the training split overlapping with either target or source images in the testing split. In terms of images pairs, there are 95 target-to-source pairs in the training split overlapping with the source-to-target pairs in the testing split. Hence, we further conduct an unbiased evaluation by excluding the 302 images and the 95 image pairs respectively. The results are shown in Table 2. Our method consistently outperforms NC-Net and DCCNet. + +Table 2: Unbiased evaluation on PF-PASCAL. + +
MethodsOriginalw/o 95w/o 302
NC-NetResNet-101 [32]78.978.880.3
DCCNetResNet-101 [10]82.678.775.7
ANC-NetResNet-10186.184.284.5
+ +# 4.3. Ablation study + +In the ablation experiments, we analyse the effectiveness of all the proposed modules of ANC-Net on PF-PASCAL, with ResNet-101 as the feature backbone. We experiment on four variants of our ANC-Net, namely, ANC-Net (our model with all components), ANC-Net w/o ANC (our model without ANC, i.e. replacing our non-isotropic 4D kernels with the isotropic counterparts), ANC-Net w/o MS (our model with out the multi-scale self-similarity), and ANC-Net w/o Orth (our model trained without orthogonal loss). We also evaluate the three ANC module candidates, denoted as, $\mathrm{ANC_b}$ , $\mathrm{ANC_c}$ and $\mathrm{ANC_d}$ in Figure 3. We also compare with NC-Net and DCCNet. For a fair comparison with them, we also retrain them with the same sparse annotations. The retrained NC-Net is the plain baseline of our method, and the retrained DCCNet can be compared with ANC-Net w/o ANC module for evaluating our multi-scale self-similarity module against the self-similarity module of DCCNet. The results are reported in Table 3. As can be seen, when we remove each of our proposed modules, the performance drops, showing that all our proposed modules are effective. However, ANC-Net and all its variants perform consistently better than the retrained NC-Net and DCCNet as well as the original NC-Net and DCCNet. Among the three ANC architectures in Figure 3, $\mathrm{ANC_d}$ performs better than the other two by a noticeable margin. This might be explained by the fact that $\mathrm{ANC_d}$ contains more flexible + +feature combination paths to deal with objects having more severe scale variations. + +Table 3: Ablation study experimental results. + +
MethodPCK@0.1
NC-Net [32] (original/retrain)78.9/81.9
DCCNet [10] (original/retrain)82.6/83.7
ANC-Net w/o ANC84.1
ANC-Net w/o MS84.3
ANC-Net w/o Orth85.9
ANC-Net w/ ANCb82.7
ANC-Net w/ ANCc83.8
ANC-Net w/ ANCd86.1
+ +# 4.4. Qualitative evaluations + +![](images/c25112f7e182be864ef1e559c6875eab30f57c985e35bd8eb105092243f903b9.jpg) +Figure 5: Predicted correspondence and correlation map for a query key-point. The first column shows the source images with a query key-point marked with cyan cross. The remaining columns show the correlation maps superimposed with the target image. The red and cyan crosses represent the prediction and the ground truth respectively. ANC-Net predicts single-peak correlation maps, avoiding catastrophic failure between distant, but ambiguous keypoints, such as the legs of the dog in the first row. Best viewed in electronic form. + +We show two sets of qualitative experiments. The first set of qualitative experiments is shown in Figure 5. It includes examples of key-points with some degree of ambiguity, such as the limbs of an animal or a table. With both NC-Net and DCCNet, it can be seen that there are often multiple peaks in the correlation maps. In some cases, this can lead to failures where, although the key-points look alike, they are far from the true correspondence. In contrast, ANC-Net tends to produce correlation maps with a single dominant peak. This drastically reduces the occurrence of these failures due to the ambiguous nature of a key-point. + +![](images/d540f221b21e1a7abbe89cf1e8b2f86599b714bc4da7bd7434171ffee2884e66.jpg) +Figure 6: Dense correspondence prediction. Given the correlation map predicted by the model, we compute a dense flow field to warp the source image to the target image. ANC-Net can capture the scale of the objects better than other methods. Best viewed in electronic form. + +We qualitatively evaluate the dense correspondence prediction of ANC-Net in Figure 6. From a correlation map predicted by the network, we compute a dense flow field, which maps pixel locations from the source to the target image. In general, ANC-Net and NC-Net preserve more details in the warping than DCCNet, and ANC-Net is able to capture the scale of the target more accurately. + +# 5. Conclusion + +In this paper, we have proposed a convolutional neural network, called ANC-Net, for dense semantic matching. ANC-Net takes a pair of images depicting different objects from the same category as input, and produces a dense 4D correlation map containing all the pair-wise matches in the feature space. Pixel-wise semantic correspondences can then be extracted from the 4D correlation map. ANC-Net can be trained end-to-end with sparse key-point annotations. At the core of ANC-Net is our proposed 4D nonisotropic convolution kernels, which incorporates an adaptive neighbourhood consensus constraint for robust matching, and our proposed multi-scale self-similarity module, which aggregates multiple self-similarity features that are insensitive to intra-class appearance variation. We also proposed a novel loss, called orthogonal loss, that can enforce a one-to-one matching constraint, encouraging plausible matching results. We have thoroughly evaluated the effectiveness of our method on various benchmarks, and it substantially outperforms state-of-the-art methods. + +Acknowledgements. We gratefully acknowledge the support of the European Commission Project Multiple-actOrs Virtual EmpathicCARegiver for the Elder (MoveCare) and the EPSRC Programme Grant Seebibyte EP/M013774/1. + +# References + +[1] Sameer Agarwal, Noah Snavely, Ian Simon, Steven M Seitz, and Richard Szeliski. Building Rome in a day. In Proceedings of Intl. Conf. on Computer Vision (ICCV), pages 72-79, 2009. 1 +[2] Christopher B Choy and Silvio Savarese. Universal Correspondence Network. In NIPS, pages 1-9, 2016. 1, 2, 5, 7 +[3] Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2005, 1, 2 +[4] Olivier Duchenne, Armand Joulin, and Jean Ponce. A graph-matching kernel for object categorization. In Proceedings of Intl. Conf. on Computer Vision (ICCV), 2011. 1 +[5] Philipp Fischer, Alexey Dosovitskiy, Eddy Ilg, Philip Häusser, Caner Hazirbaş, Vladimir Golkov, Patrick van der Smagt, Daniel Cremers, and Thomas Brox. Flownet: Learning optical flow with convolutional networks. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2015. 3 +[6] Yoav HaCohen, Eli Shechtman, Dan B. Goldman, and Dani Lischinski. Non-rigid dense correspondence with applications for image enhancement. In Proceedings of ACM Special Interest Group on GRAPHICS (SIGGRAPH), 2011. 1 +[7] Bumsub Ham, Minsu Cho, Cordelia Schmid, and Jean Ponce. Proposal flow. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2016. 2 +[8] Bumsub Ham, Minsu Cho, Cordelia Schmid, and Jean Ponce. Proposal flow: Semantic correspondences from object proposals. In IEEE Trans. Pattern Anal. Machine Intell. (PAMI), 2018. 2, 5, 6 +[9] Kai Han, Rafael S. Rezende, Bumsub Ham, Kwan-Yee K. Wong, Minsu Cho, Cordelia Schmid, and Jean Ponce. Scnet: Learning semantic correspondence. In Proceedings of Intl. Conf. on Computer Vision (ICCV), 2017. 1, 2, 6, 7 +[10] Shuaiyi Huang, Qiuyue Wang, Songyang Zhang, Shipeng Yan, and Xuming He. Dynamic Context Correspondence Network for Semantic Alignment. In Proceedings of Intl. Conf. on Computer Vision (ICCV), 2019. 1, 2, 3, 4, 5, 7, 8 +[11] Junhwa Hur, Hwasup Lim, Changsoo Park, and Sang Chul Ahn. Generalized deformable spatial pyramid: Geometry-preserving dense correspondence estimation. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2015. 2 +[12] Eddy Ilg, Nikolaus Mayer, Tonmoy Saikia, Margret Keuper, Alexey Dosovitskiy, and Thomas Brox. Flownet 2.0: Evolution of optical flow estimation with deep networks. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2017. 3 +[13] Sangryul Jeon, Seungryong Kim, Dongbo Min, and Kwanghoon Sohn. Parn: Pyramidal affine regression networks for dense semantic correspondence. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. 3 +[14] Bo Jiang, Jin Tang, Chris Ding, and Bin Luo. Nonnegative Orthogonal Graph Matching. In Proceedings of AAAI Con- + +ference on Artificial Intelligence(AAAI), pages 4089-4095, 2017.6 +[15] Jaechul Kim, Ce Liu, Fei Sha, and Kristen Grauman. Deformable spatial pyramid matching for fast dense correspondences. In Proceedings of the 2013 IEEE Conference on Computer Vision and Pattern Recognition, Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2013. 2 +[16] Seungryong Kim, Stephen Lin, Sangryul Jeon, Dongbo Min, and Kwanghoon Sohn. Recurrent transformer networks for semantic correspondence. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 6129-6139. Curran Associates Inc., 2018. 3, 7 +[17] Seungryong Kim, Dongbo Min, Bumsub Ham, Sangryul Jeon, Stephen Lin, and Kwanghoon Sohn. Fcss: Fully convolutional self-similarity for dense semantic correspondence. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2017. 1, 3, 4 +[18] Diederik P. Kingma and Jimmy Lei Ba. Adam: a Method for Stochastic Optimization. In Proceedings of Intl. Conf. on Learning Representations (ICLR), 2015. 7 +[19] Jonathan Krause, Hailin Jin, Jianchao Yang, and Fei Fei Li. Fine-grained recognition without part annotations. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), pages 5546-5555, 2015. 6 +[20] Zihang Lai and Weidi Xie. Self-supervised Learning for Video Correspondence Flow. In Proceedings of British Machine Vision Conference (BMVC), 2019. 3 +[21] Junghyup Lee, Dohyung Kim, Wonkyung Lee, Jean Ponce, and Bumsub Ham. Learning semantic correspondence exploiting an object-level prior. arXiv:1911.12914, 2019. 7 +[22] Junghyup Lee, Dohyung Kim, Jean Ponce, and Bumsub Ham. Sfnet: Learning object-aware semantic flow. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 3, 5 +[23] Li-Jia Li, Kai Li, Fei Fei Li, Jia Deng, Wei Dong, Richard Socher, and Li Fei-Fei. ImageNet: a Large-Scale Hierarchical Image Database Shrimp Project View project hybrid intrusion detection systems View project ImageNet: A Large-Scale Hierarchical Image Database. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), pages 248–255, 2009. 6 +[24] Ce Liu, Jenny Yuen, and Antonio Torralba. Sift flow: Dense correspondence across scenes and its applications. IEEE Trans. Pattern Anal. Machine Intell. (PAMI), 33(5):978-994, 2011. 1, 2 +[25] Jonathan L Long, Ning Zhang, and Trevor Darrell. Do convnets learn correspondence? In Proceedings of IEEE Conf. on Neural Information Processing Systems-Natural and Synthetic (NIPS), 2014. 2 +[26] David G. Lowe. Distinctive image features from scale-invariant keypoints. Intl. Journal of Computer Vision (IJCV), 2004. 1, 2 +[27] Juhong Min, Jongmin Lee, Jean Ponce, and Minsu Cho. Hyperpixel flow: Semantic correspondence with multi-layer neural features. In Proceedings of Intl. Conf. on Computer Vision (ICCV), 2019. 1, 3, 5, 6, 7 + +[28] David Novotny, Samuel Albanie, Diane Larlus, and Andrea Vedaldi. Self-supervised learning of geometrically stable features through probabilistic introspection. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[29] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in PyTorch. In NIPS Autodiff Workshop, 2017. 6 +[30] Ignacio Rocco, Relja Arandjelović, and Josef Sivic. Convolutional neural network architecture for geometric matching. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2017. 3 +[31] Ignacio Rocco, Relja Arandjelovic, and Josef Sivic. End-to-End Weakly-Supervised Semantic Alignment. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), pages 6917–6925, 2018. 3, 7 +[32] Ignacio Rocco, Mircea Cimpoi, Relja Arandjelović, Akihiko Torii, Tomas Pajdla, and Josef Sivic. Neighbourhood Consensus Networks. In Proceedings of IEEE Conf. on Neural Information Processing Systems-Natural and Synthetic (NIPS), 2018. 1, 2, 3, 4, 5, 6, 7, 8 +[33] Torsten Sattler, Will Maddern, Akihiko Torii, Josef Sivic, Tomas Pajdla, Marc Pollefeys, and Masatoshi Okutomi. Benchmarking 6DOF Urban Visual Localization in Changing Conditions. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2017. 1 +[34] Paul Hongsuck Seo, Jongmin Lee, Deunsol Jung, Bohyung Han, and Minsu Cho. Attentive semantic alignment with offset-aware correlation kernels. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. 3 +[35] Tatsunori Taniai, Sudipta N Sinha, and Yoichi Sato. Joint recovery of dense correspondence and cosegmentation in two images. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2016. 2 +[36] Xiaolong Wang, Allan Jabri, and Alexei A. Efros. Learning Correspondence from the Cycle-consistency of Time. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 3 +[37] Peter Welinder, Steve Branson, Takeshi Mita, Catherine Wah, Florian Schroff, Serge Belongie, and Pietro Perona. Caltech-UCSD Birds 200. Technical Report CNS-TR-2010-001, California Institute of Technology, 2010. 5, 6 +[38] Andrei Zanfir and Cristian Sminchisescu. Deep learning of graph matching. In Proceedings of IEEE Intl. Conf. on Computer Vision and Pattern Recognition (CVPR), pages 2684-2693, 2018. 6 \ No newline at end of file diff --git a/correspondencenetworkswithadaptiveneighbourhoodconsensus/images.zip b/correspondencenetworkswithadaptiveneighbourhoodconsensus/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..1fdb0271e3a5b3e03105b545ef2d005fabdd591c --- /dev/null +++ b/correspondencenetworkswithadaptiveneighbourhoodconsensus/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f379fea98b6e66bc468f4488e51349f8804df0636251e3b5c3bfb2d614311285 +size 379175 diff --git a/correspondencenetworkswithadaptiveneighbourhoodconsensus/layout.json b/correspondencenetworkswithadaptiveneighbourhoodconsensus/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..bb6d394c66a1accae05a43db3f495be60d29644b --- /dev/null +++ b/correspondencenetworkswithadaptiveneighbourhoodconsensus/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7077b622ed8f7a2c5acccf44a27b274b117e4a980ba272fafd6bb27286957a6c +size 450539 diff --git a/costvolumepyramidbaseddepthinferenceformultiviewstereo/fcd8850d-e2b0-4fec-b431-04fb51979e6c_content_list.json b/costvolumepyramidbaseddepthinferenceformultiviewstereo/fcd8850d-e2b0-4fec-b431-04fb51979e6c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a22b2009cb8232177cc8d26b8dddf8ca5e306aff --- /dev/null +++ b/costvolumepyramidbaseddepthinferenceformultiviewstereo/fcd8850d-e2b0-4fec-b431-04fb51979e6c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ecada369a57b57f5de69b1e0be593526a776217a8e8b4a9b4eb74c2800556828 +size 77899 diff --git a/costvolumepyramidbaseddepthinferenceformultiviewstereo/fcd8850d-e2b0-4fec-b431-04fb51979e6c_model.json b/costvolumepyramidbaseddepthinferenceformultiviewstereo/fcd8850d-e2b0-4fec-b431-04fb51979e6c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..0f46bc3c0681a2c2d507c35c29a465cad3b12168 --- /dev/null +++ b/costvolumepyramidbaseddepthinferenceformultiviewstereo/fcd8850d-e2b0-4fec-b431-04fb51979e6c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb0296318dcedea4ba0d5947c69580dd6f312d36bee0615c5501bea69d7c6763 +size 95906 diff --git a/costvolumepyramidbaseddepthinferenceformultiviewstereo/fcd8850d-e2b0-4fec-b431-04fb51979e6c_origin.pdf b/costvolumepyramidbaseddepthinferenceformultiviewstereo/fcd8850d-e2b0-4fec-b431-04fb51979e6c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b35e80ddb414d57086d7923bb8793cc1c5ff5383 --- /dev/null +++ b/costvolumepyramidbaseddepthinferenceformultiviewstereo/fcd8850d-e2b0-4fec-b431-04fb51979e6c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dcaa9a846b8dde6966e028ed2630e0c7cd32731d16e4ecd479a157ee4d469ae +size 4312016 diff --git a/costvolumepyramidbaseddepthinferenceformultiviewstereo/full.md b/costvolumepyramidbaseddepthinferenceformultiviewstereo/full.md new file mode 100644 index 0000000000000000000000000000000000000000..aaa9ebf01dcad3dda49f9d9ba56cc3ba9704dc02 --- /dev/null +++ b/costvolumepyramidbaseddepthinferenceformultiviewstereo/full.md @@ -0,0 +1,351 @@ +# Cost Volume Pyramid Based Depth Inference for Multi-View Stereo + +Jiayu Yang $^{1}$ , Wei Mao $^{1}$ , Jose M. Alvarez $^{2}$ , Miaomiao Liu $^{1,3}$ $^{1}$ Australian National University, $^{2}$ NVIDIA, $^{3}$ Australian Centre for Robotic Vision {jiayu.yang, wei.mao, miaomiao.liu}@anu.edu.au, josea@nvidia.com + +![](images/2f10c0653f94a7ff5de8491c4cf27821069e706bf070146ed6d0e170ecb35d8d.jpg) +Figure 1: Point clouds reconstructed by state-of-the-art methods [5, 43] and our CVP-MVSNet. Best viewed on screen. + +![](images/6610c561509299ef22050f3b4a561d590367de842732f9e5b01632650d69d125.jpg) + +![](images/fc45b6e3d409f11029d443bf3a113c1a32720ed2a394c187ae1f9ce592b35298.jpg) + +# Abstract + +We propose a cost volume-based neural network for depth inference from multi-view images. We demonstrate that building a cost volume pyramid in a coarse-to-fine manner instead of constructing a cost volume at a fixed resolution leads to a compact, lightweight network and allows us inferring high resolution depth maps to achieve better reconstruction results. To this end, we first build a cost volume based on uniform sampling of fronto-parallel planes across the entire depth range at the coarsest resolution of an image. Then, given current depth estimate, we construct new cost volumes iteratively on the pixelwise depth residual to perform depth map refinement. While sharing similar insight with Point-MVSNet as predicting and refining depth iteratively, we show that working on cost volume pyramid can lead to a more compact, yet efficient network structure compared with the Point-MVSNet on 3D points. We further provide detailed analyses of the relation between (residual) depth sampling and image resolution, which serves as a principle for building compact cost volume pyramid. Experimental results on benchmark datasets show that our model can perform 6x faster and has similar performance as state-of-the-art methods. Code is available at https://github.com/JiayuYANG/CVP-MVSNet. + +# 1. Introduction + +Multi-view stereo (MVS) aims to reconstruct the 3D model of a scene from a set of images captured by a cam + +era from multiple viewpoints. It is a fundamental problem for computer vision community and has been studied extensively for decades [35]. While traditional methods before deep learning era have great achievements on the reconstruction of a scene with Lambertian surfaces, they still suffer from illumination changes, low-texture regions, and reflections resulting in unreliable matching correspondences for further reconstruction. + +Recent learning-based approaches [5, 42, 43] adopt deep CNNs to infer the depth map for each view followed by a separate multiple-view fusion process for building 3D models. These methods allow the network to extract discriminative features encoding global and local information of a scene to obtain robust feature matching for MVS. In particular, Yao et al. propose MVSNet [42] to infer a depth map for each view. An essential step in [42] is to build a cost volume based on a plane sweep process followed by multiscale 3D CNNs for regularization. While effective in depth inference accuracy, its memory requirement is cubic to the image resolution. To allow handling high resolution images, they then adopt a recurrent cost volume regularization process [43]. However, the reduction in memory requirements involves a longer run-time. + +In order to achieve a computationally efficient network, Chen et al. [5] work on 3D point clouds to iteratively predict the depth residual along visual rays using edge convolutions operating on the $k$ nearest neighbors of each 3D point. While this approach is efficient, its run-time increases almost linearly with the number of iteration levels. + +In this work, we propose a cost volume pyramid based Multi-View Stereo Network (CVP-MVSNet) for depth inference. In our approach, we first build an image pyramid for each input image. Then, for the coarsest resolution of the reference image, we build a compact cost volume by sampling the depth across the entire depth-range of a scene. After that, at the next pyramid level, we perform residual depth search from the neighbor of the current depth estimate to construct a partial cost volume using multi-scale 3D CNNs for regularization. As we build these cost volumes iteratively with a short search range at each level, it leads to a small and compact network. As a result, our network performs 6x faster than current state-of-the-art networks on benchmark datasets. + +While it is noteworthy that we share the similar insight with [5] as predicting and refining the depth map in a coarse-to-fine manner, our work differs from theirs in the following four main aspects. First, the approach in [5] performs convolutions on 3D point cloud. Instead, we construct cost volumes on a regular grid defined on the image coordinates, which is shown to be faster in run-time. Second, we provide a principle for building a compact cost volume pyramid based on the correlation between depth sampling and image resolution. As third main difference, we use a multi-scale 3D-CNN regularization to cover large receptive field and encourage local smoothness on residual depth estimates which, as shown in Fig. 1, leads to a better accuracy. Finally, in contrast to [5] and other related works, our approach can output depth of small resolution with small resolution image. + +In summary, our main contributions are + +- We propose a cost-volume based, compact, and computational efficient depth inference network for MVS. +- We build a cost volume pyramid in a coarse-to-fine manner based on a detailed analysis of the relation between the depth residual search range and the image resolution, +- Our framework can handle high resolution images with less memory requirement, is 6x faster than the current state-of-the-art framework, i.e. Point-MVSNet [5], and achieves a better accuracy on benchmark datasets. + +# 2. Related Work + +Traditional Multi-View Stereo. Multi-view stereo has been extensively studied for decades. We refer to algorithms before deep learning era as traditional MVS methods which represent the 3D geometry of objects or scene using voxels [7, 23], level-sets [9, 31], polygon meshes [8, 10] or depth maps [18, 22]. In the following, we mainly focus on + +discussions about volumetric and depth-based MVS methods which have been integrated to learning-based framework recently. + +Volumetric representations can model most of the objects or scenes. Given a fixed volume of an object or scene, volumetric-based methods first divide the whole volume into small voxels and then use a photometric consistency metric to decide whether the voxel belongs to the surface or not. These methods do not impose constraints on the shape of the objects. However, the space discretisation is memory intensive. By contrast, depth-map based MVS methods have shown more flexibility in modeling the 3D geometry of scene [28]. Readers are referred to [35] for detailed discussions. Similar to other recent learning-based approaches, we adopt depth map representation in our framework. + +Deep learning-based MVS. Deep CNNs have significantly advanced the progress of high-level vision tasks, such as image recognition [15, 36], object detection [13, 32], and semantic segmentation [4, 25]. As for 3D vision tasks, learning-based approaches have been widely adopted to solve stereo matching problems and have achieved very promising results [2, 27, 44]. However, these learning-based approaches cannot be easily generalized to solve MVS problems as rectifications are required for the multiple view scenario which may cause the loss of information [42]. + +More recently, a few approaches have proposed to directly solve MVS problems [14, 24, 29]. For instance, Ji et al. [17] introduce the first learning based pipeline for MVS. This approach learns the probability of voxels lying on the surface. Concurrently, Kar et al. [19] present a learnable system to up-project pixel features to the 3D volume and classify whether a voxel is occupied or not by the surface. These systems provide promising results. However, they use volumetric representations that are memory expensive and therefore, these algorithms can not handle large-scale scenes. + +Large-scale scene reconstruction has been approached by Yao et al. in [42]. The authors propose to learn the depth map for each view by constructing a cost volume followed by 3D CNN regularization. Then, they obtain the 3D geometry by fusing the estimated depth maps from multiple views. The algorithm uses cost volume with memory requirements cubic to the image resolution. Thus, it can not leverage all the information available in high-resolution images. To circumvent this problem, the algorithm adopts GRUs [43] to regularize the cost volume in a sequential manner. As a result, the algorithm reduces the memory requirement but leads to increased run-time. + +Closely related work to ours is Point-MVSNet [5]. Point-MVSNet is a framework to predict the depth in a coarse-to-fine manner working directly on point cloud. It allows the aggregation of information from its $k$ nearest neighbors in 3D space. Our approach shares similar insight + +![](images/ec8759aa5b999a70b3c1ce63b5751ee3fe24517d25b4a95d91b0c435cfc9524c.jpg) +Figure 2: Network Structure. Reference and source images are first downsampled to form an image pyramid. We apply feature extraction network to all levels and images to extract feature maps. We then build the cost volume pyramid in a coarse-to-fine manner. Specifically, we start with the construction of a cost volume corresponding to coarsest image resolution followed by building partial cost volumes iteratively for depth residual estimation in order to achieve depth map $\mathbf{D} = \mathbf{D}^{0}$ for I. Please refer to Fig. 3 for details about re-projection, feature fetching and building cost volume. + +as predicting and refining depth maps iteratively. However, we differ from Point-MVSNet in a few key aspects: Instead of working on 3D, we build the cost volume on the regular image grid. Inspired by the idea of partial cost volume used in PWC-Net [37] for optical flow estimation, we build partial cost volume to predict depth residuals. We compare the memory and computational efficiency with [5]. It shows that our cost-volume pyramid based network leads to more compact and accurate models that run much faster for a given depth-map resolution. + +Cost volume. Cost volume is widely used in traditional methods for dense depth estimation from unrectified images [6, 41]. However, most recent learning-based works build cost volume at a fixed resolution [16, 42, 43], which leads to high memory requirement for handling high resolution images. Recently, Sun et al. [37] introduced the idea of partial cost volume for optical flow estimation. In short, given an estimate of the current optical flow, the partial cost volume is constructed by searching correspondences within a rectangle around its position locally in the warped source view image. Inspired by such strategy, in this paper, we propose cost volume pyramid as an algorithm to progressively estimate the depth residual for each pixel along its visual ray. As we will demonstrate in our experiments, constructing cost volumes at multiple levels leads to a more effective and efficient framework. + +# 3. Method + +Let us now introduce our approach to depth inference for MVS. The overall system is depicted in Fig. 2. As existing works, we assume the reference image is denoted as $\mathbf{I}_0\in \mathbb{R}^{H\times W}$ , where $H$ and $W$ define its dimensions. + +Let $\{\mathbf{I}_i\}_{i=1}^N$ be its $N$ neighboring source images. Assume $\{\mathbf{K}_i, \mathbf{R}_i, \mathbf{t}_i\}_{i=0}^N$ are the corresponding camera intrinsics, rotation matrix, and translation vector for all views. Our goal is to infer the depth map $\mathbf{D}$ for $\mathbf{I}_0$ from $\{\mathbf{I}_i\}_{i=0}^N$ . The key novelty of our approach is using a feed-forward deep network on cost volume pyramid constructed in a coarse-to-fine manner. Below, we introduce our feature pyramid, the cost volume pyramid, depth map inference and finally provide details of the loss function. + +# 3.1. Feature Pyramid + +As raw images vary with illumination changes, we adopt learnable features, which has been demonstrated to be crucial step for extracting dense feature correspondences [42, 38]. The general practice in existing works is to make use of high resolution images to extract multi-scale image features even for the output of a low resolution depth map. By contrast, we show that a low resolution image contains enough information useful for estimating a low resolution depth map. + +Our feature extraction pipeline consists of two steps, see Fig. 2. First, we build the $(L + 1)$ -level image pyramid $\{\mathbf{I}_i^l\}_{j = 0}^L$ for each input image, $i\in \{0,1,\dots ,N\}$ , where the bottom level of the pyramid corresponds to the input image, $\mathbf{I}_i^0 = \mathbf{I}_i$ . Second, we obtain feature representations at the $l$ -th level using a CNN, namely feature extraction network. Specifically, it consists of 9 convolutional layers, each of which is followed by a leaky rectified linear unit (LeakyReLU). We use the same CNN to extract features for all levels in all the images. We denote the feature maps for a given level $l$ by $\{\mathbf{f}_i^l\}_{i = 0}^N$ , $\mathbf{f}_i^l\in \mathbb{R}^{H / 2^l\times W / 2^l\times F}$ , where $F = 16$ is the number of feature channels used in our experiments. + +![](images/3dee87a14a1344447b51c2ec38b51bbb0052130a4c57e907845e974cfb923298.jpg) +Figure 3: Reprojection, feature fetching and building cost volume. Left: We define $M$ depth hypotheses for each pixel $(u,v)$ in the reference view. By projecting them to each source view, we can fetch $M$ corresponding features. Right: For each depth hypothesis, the matching cost is the variance of fetched features across source views and the reference view. The cost volume $\mathbf{C}^{l + 1}$ defines matching costs for all depth hypotheses of all pixels in the reference view. + +We will show that, compared to existing works, our feature extraction pipeline leads to significant reduction in memory requirements and, at the same time, improve performance. + +# 3.2. Cost Volume Pyramid + +Given the extracted features, the next step is to construct cost volumes for depth inference in the reference view. Common approaches usually build a single cost volume at a fixed resolution [16, 42, 43], which incurs in large memory requirements and thus, limits the use of high-resolution images. Instead, we propose to build a cost volume pyramid, a process that iteratively estimates and refines depth maps to achieve high resolution depth inference. More precisely, we first build a cost volume for coarse depth map estimation based on images of the coarsest resolution in image pyramids and uniform sampling of the fronto-parallel planes in the scene. Then, we construct partial cost volumes based on coarse estimation and depth residual hypotheses iteratively to achieve depth maps with higher resolution and accuracy. We provide details about these two steps below. + +Cost Volume for Coarse Depth Map Inference. We start building a cost volume at the $L$ th level corresponding to the lowest image resolution $(H / 2^L, W / 2^L)$ . Assume depth measured at the reference view of a scene ranges from $d_{\mathrm{min}}$ to $d_{\mathrm{max}}$ . We construct the cost volume for the reference view by sampling $M$ fronto-parallel planes uniformly across entire depth range. A sampled depth $d = d_{\mathrm{min}} + m(d_{\mathrm{max}} - d_{\mathrm{min}}) / M, m \in \{0,1,2,\dots ,M - 1\}$ represents a plane where its normal $\mathbf{n}_0$ is the principal axis of the reference camera. + +Similar to [42], we define the differentiable homography + +$\mathbf{H}_i(d)$ between the $i$ th source view and the reference view at depth $d$ as + +$$ +\mathbf {H} _ {i} (d) = \mathbf {K} _ {i} ^ {L} \mathbf {R} _ {i} (\mathbf {I} - \frac {\left(\mathbf {t} _ {0} - \mathbf {t} _ {i}\right) \mathbf {n} _ {0} ^ {T}}{d}) \mathbf {R} _ {0} ^ {- 1} \left(\mathbf {K} _ {0} ^ {L}\right) ^ {- 1}, \tag {1} +$$ + +where $\mathbf{I}$ is the identity matrix, and $\mathbf{K}_i^L$ and $\mathbf{K}_0^L$ are the scaled intrinsic matrices of $\mathbf{K}_i$ and $\mathbf{K}_0$ at level $L$ . + +Each homography $\mathbf{H}_i(d)$ suggests a possible pixel correspondence between $\tilde{\mathbf{x}}_i$ in source view $i$ and a pixel $\mathbf{x}$ in the reference view. This correspondence is defined as $\lambda_i\tilde{\mathbf{x}}_i = \mathbf{H}_i(d)\mathbf{x}$ , where $\lambda_{i}$ represents the depth of $\tilde{\mathbf{x}}_i$ in the source view $i$ . + +Given $\tilde{\mathbf{x}}_i$ and $\{\mathbf{f}_i^L\}_{i = 1}^N$ , we use differentiable bilinear interpolation to reconstruct the feature map warped to the reference view $\{\tilde{\mathbf{f}}_{i,d}^{L}\}_{i = 1}^{N}$ . The cost for all pixels at depth $d$ is defined as its variance of features from $N + 1$ views, + +$$ +\mathbf {C} _ {d} ^ {L} = \frac {1}{(N + 1)} \sum_ {i = 0} ^ {N} \left(\tilde {\mathbf {f}} _ {i, d} ^ {L} - \bar {\mathbf {f}} _ {d} ^ {L}\right) ^ {2}, \tag {2} +$$ + +where $\tilde{\mathbf{f}}_{0,d}^{L} = \mathbf{f}_{0}^{L}$ is the feature map of the reference image and $\bar{\mathbf{f}}_d^L$ is the average of feature volumes across all views $(\{\tilde{\mathbf{f}}_{i,d}^{L}\}_{i = 1}^{N}\cup \mathbf{f}_{0}^{L})$ for each pixel. This metric encourages that the correct depth for each pixel has the smallest feature variance, which corresponds to the photometric consistency constraint. We compute the cost map for each depth hypothesis and concatenate those cost maps to a single cost volume $\mathbf{C}^L\in \mathbb{R}^{W / 2^L\times H / 2^L\times M\times F}$ . + +A key parameter to obtain good depth estimation accuracy is the depth sampling resolution $M$ . We will show in Section 3.3 how to determine the interval for depth sampling and coarse depth estimation. + +Recall that our ultimate goal is to obtain $\mathbf{D} = \mathbf{D}^{0}$ for $\mathbf{I}_0$ . We iterate starting from $\mathbf{D}^{l + 1}$ , a given depth estimate for the $(l + 1)$ th level, to obtain a refined depth map for the next level $\mathbf{D}^l$ until reaching the bottom level. More precisely, we first upsample $\mathbf{D}^{l + 1}$ to the next level $\mathbf{D}_{\uparrow}^{l + 1}$ via bicubic interpolation and then, we build the partial cost volume to regress the residual depth map defined as $\Delta \mathbf{D}^l$ to obtain a refined depth map $\mathbf{D}^l = \mathbf{D}_{\uparrow}^{l + 1} + \Delta \mathbf{D}^l$ at the $l$ th level. + +While we share the similar insight with [5] to iteratively predict the depth residual, we argue that instead of performing convolutions on a point cloud [5], building the regular 3D cost volume on the depth residual followed by multiscale 3D convolution can lead to a more compact, faster, and higher accuracy depth inference. Our motivation is that depth displacements for neighboring pixels are correlated which indicates that regular multi-scale 3D convolution would provide useful contextual information for depth residual estimation. We therefore arrange the depth displacement hypotheses in a regular 3D space and compute the cost volume as follows. + +Assume we are given camera parameters $\{\mathbf{K}_i^l,\mathbf{R}_i,\mathbf{t}_i\}_{i = 0}^N$ for all camera views and the upsam + +![](images/1523ecf6b9d05e96bc4d8c6d8b3d13c1b67d9e2255f1c539bfb358852d73f53c.jpg) +(a) + +![](images/8035a5f8cb9b20294629f5077712867a89e0fe92779b97ff8c9fbcdf887400a2.jpg) +(b) + +![](images/4da2dbd1c3d7016cdf04eb0447fa6dab9ac15e74f46d4ee9528fdf6a6d169df7.jpg) +Feature Map + +![](images/bfa8853c0789e11b7ad9fed13025224fc2e9830ce41851cfe41a181797623612.jpg) +Feature Point + +![](images/dd0530e691d5e1be01ece0e635bb9992f622382dfc1e1714be154a62b5c715c6.jpg) +Interpolated Feature +Figure 4: Interpolation of two sampling points from four feature points in source view. (a) Densely sampled depth will result in very close ( $< 0.5$ pixel) locations which have similar feature. (b) Points projected using appropriate depth sampling carry distinguishable information. + +pled depth estimate $\mathbf{D}_{\uparrow}^{l + 1}$ . Current depth estimate for each pixel $\mathbf{p} = (u,v)$ is defined as $d_{\mathbf{p}} = \mathbf{D}_{\uparrow}^{l + 1}(u,v)$ . Let each depth residual hypothesis interval be $\Delta d_{\mathbf{p}} = s_{\mathbf{p}} / M$ , where $s_{\mathbf{p}}$ represents the depth search range at $\mathbf{p}$ and $M$ denotes the number of sampled depth residual. We consider the projection of corresponding hypothesized 3D point with depth $(\mathbf{D}_{\uparrow}^{l + 1}(u,v) + m\Delta d_{\mathbf{p}})$ into view $i$ as + +$$ +\lambda_ {i} \mathbf {x} _ {i} ^ {\prime} = \mathbf {K} _ {i} ^ {l} \left(\mathbf {R} _ {i} \mathbf {R} _ {0} ^ {- 1} \left(\left(\mathbf {K} _ {0} ^ {l}\right) ^ {- 1} (u, v, 1) ^ {T} \left(d _ {\mathbf {p}} + m \Delta d _ {\mathbf {p}}\right) - \mathbf {t} _ {0}\right) + \mathbf {t} _ {i}\right), \tag {3} +$$ + +where $\lambda_{i}$ denotes the depth of corresponding pixel in view $i$ , and $m \in \{-M/2, \dots, M/2 - 1\}$ (see Fig. 3). Then, the cost for that pixel at each depth residual hypothesis is similarly defined based on Eq. 2, which leads to a partial cost volume $\mathbf{C}^{l} \in \mathbb{R}^{H/2^{l} \times W/2^{l} \times M \times F}$ . + +In the next section, we introduce our solution to determine the depth search intervals and range for all pixels, $s_{\mathbf{p}}$ , which is essential to obtain accurate depth estimates. + +# 3.3. Depth Map Inference + +In this section, we first provide details to perform depth sampling at the coarsest image resolution and discretisation of the local depth search range at higher image resolution for building the cost volume. Then, we introduce depth map estimators on cost volumes to achieve the depth map inference. + +Depth Sampling for Cost Volume Pyramid We observe that the depth sampling for virtual depth planes is related to the image resolution. As shown in Fig. 4, it is not necessary to sample depth planes densely as projections of those sampled 3D points in the image are too close to provide extra information for depth inference. In our experiments, to determine the number of virtual planes, we compute the mean depth sampling interval for a corresponding 0.5 pixel distance in the image. + +For determining the local search range for depth residual around the current depth estimate for each pixel, we first project its 3D point into source views, find points that are two pixels away from the its projection along the epipolar + +line in both directions (see Fig. 3 "2 pixel length"), and back project those two points into 3D rays. The intersection of these two rays with the visual ray in the reference view determines the search range for depth refinement on current level. + +Depth Map Estimator Similar to MVSNet [42], we apply 3D convolution to the constructed cost volume pyramid $\{\mathbf{C}^l\}_{l = 0}^L$ to aggregate context information and output probability volumes $\{\mathbf{P}^l\}_{l = 0}^L$ , where $\mathbf{P}^l\in \mathbb{R}^{H / 2^l\times W / 2^l\times M}$ . Detailed 3D convolution network design is in Supp. Mat. Note that $\mathbf{P}^L$ and $\{\mathbf{P}^l\}_{l = 0}^{L - 1}$ are generated on absolute and residual depth, respectively. We therefore first apply soft-argmax to $\mathbf{P}^L$ to obtain the coarse depth map. Then, we iteratively refine the obtained depth map by applying soft-argmax to $\{\mathbf{P}^l\}_{l = 1}^{L - 1}$ to obtain the depth residual for higher resolutions. + +Recall that sampled depth is $d = d_{\min} + m(d_{\max} - d_{\min}) / M, m \in \{0,1,2,\dots ,M - 1\}$ at level $L$ . Therefore, the depth estimate for each pixel $\mathbf{p}$ is computed as + +$$ +\mathbf {D} ^ {L} (\mathbf {p}) = \sum_ {m = 0} ^ {M - 1} d \mathbf {P} _ {\mathbf {p}} ^ {L} (d). \tag {4} +$$ + +To further refine the current estimate which is either the coarse depth map or a refined depth at $(l + 1)$ th level, we estimate the residual depth. Assume $r_{\mathbf{p}} = m\cdot \Delta d_{\mathbf{p}}^{l}$ denotes the depth residual hypothesis. We compute the updated depth at the next level as + +$$ +\mathbf {D} ^ {l} (\mathbf {p}) = \mathbf {D} _ {\uparrow} ^ {l + 1} (\mathbf {p}) + \sum_ {m = - M / 2} ^ {(M - 2) / 2} r _ {\mathbf {p}} \mathbf {P} _ {\mathbf {p}} ^ {l} \left(r _ {\mathbf {p}}\right) \tag {5} +$$ + +where $l \in \{L - 1, L - 2, \dots, 0\}$ . In our experiments, we observe no depth map refinement after our pyramidal depth estimation is further required to obtain good results. + +# 3.4. Loss Function + +We adopt a supervised learning strategy and construct the pyramid for ground truth depth $\{\mathbf{D}_{GT}^{l}\}_{l = 0}^{L}$ as supervisory signal. Similar to existing MVSNet framework [42], we make use of the $l_{1}$ norm measuring the absolute difference between the ground truth and the estimated depth. For each training sample, our loss is + +$$ +L o s s = \sum_ {l = 0} ^ {L} \sum_ {\mathbf {p} \in \Omega} \| \mathbf {D} _ {\mathrm {G} T} ^ {l} (\mathbf {p}) - \mathbf {D} ^ {l} (\mathbf {p}) \| _ {1}, \tag {6} +$$ + +where $\Omega$ is the set of valid pixels with ground truth measurements. + +# 4. Experiments + +In this section, we demonstrate the performance of our framework for MVS with a comprehensive set of experiments in standard benchmarks. Below, we first describe the datasets and benchmarks and then analyze our results. + +# 4.1. Datasets + +DTU Dataset [1] is a large-scale MVS dataset with 124 scenes scanned from 49 or 64 views under 7 different lighting conditions. DTU provides 3D point clouds acquired using structured-light sensors. Each view consists of an image and the calibrated camera parameters. To train our model, we generate a $160 \times 128$ depth map for each view by using the method provided by MVSNet [42]. We use the same training, validation and evaluation sets as defined in [42, 43]. + +Tanks and Temples [21] contains both indoor and outdoor scenes under realistic lighting conditions with large scale variations. For comparison with other approaches, we evaluate our results on the intermediate set. + +# 4.2. Implementation + +Training We train our CVP-MVSNet on DTU training set. Unlike previous methods [42, 43] that take high resolution image as input but estimate a depth map of smaller size, our method produces the same size depth map as the input image. For training, we match the ground-truth depth map by downsampling the high resolution image into a smaller one of size $160 \times 128$ . Then, we build the image and ground truth depth pyramid with 2 levels. To construct the cost volume pyramid, we uniformly sample $M = 48$ depth hypotheses across entire depth range at the coarsest (2nd) level. Then, each pixel has $M = 8$ depth residual hypotheses at the next level for the refinement of the depth estimation. Following MVSNet [42], we adopt 3 views for training. We implemented our network using Pytorch [30], and we used ADAM [20] to train our model. The batch size is set to 16 and the network is end-to-end trained on a NVIDIA TI-TAN RTX graphics card for 27 epochs. The learning rate is initially set to 0.001 and divided by 2 iteratively at the $10^{th}, 12^{th}, 14^{th}$ and $20^{th}$ epoch. + +Metrics. We follow the standard evaluation protocol as in [1, 42]. We report the accuracy, completeness and overall score of the reconstructed point clouds. Accuracy is measured as the distance from estimated point clouds to the ground truth ones in millimeter and completeness is defined as the distance from ground truth point clouds to the estimated ones [1]. The overall score is the average of accuracy and completeness [42]. + +Evaluation As the parameters are shared across the cost volume pyramid, we can evaluate our model with different number of cost volumes and input views. For the evaluation, we set the number of depth sampling, $M = 96$ for the coarsest depth estimation (same as [5]. We also provide results of $M = 48$ in the Supp. Mat.) and $M = 8$ for the following depth residual inference levels. Similar to previous methods [5, 42, 43], we use 5 views and apply the same depth map fusion method to obtain the point clouds. We + +
MethodAcc.Comp.Overall (mm)
GeometricFuru[11]0.6130.9410.777
Tola[39]0.3421.1900.766
Camp[3]0.8350.5540.695
Gipuma[12]0.2830.8730.578
Colmap[33, 34]0.4000.6640.532
LearningSurfaceNet[17]0.4501.0400.745
MVSNet[42]0.3960.5270.462
P-MVSNet[26]0.4060.4340.420
R-MVSNet[43]0.3830.4520.417
MVSCRF[40]0.3710.4260.398
Point-MVSNet[5]0.3420.4110.376
Ours0.2960.4060.351
+ +Table 1: Quantitative results of reconstruction quality on DTU dataset (lower is better). Our method outperforms all methods on Mean Completeness and Overall reconstruction quality and achieved second best on Mean Accuracy. + +evaluate our model with images of different size and set the pyramid levels accordingly to maintain a similar size as the input image $(80 \times 64)$ at coarsest level. For instance, for an input size of $1600 \times 1184$ , the pyramid has 5 levels and 4 levels for an input size of $800 \times 576$ and $640 \times 480$ . + +# 4.3. Results on DTU dataset + +We first compare our results to those reported by traditional geometric-based methods and other learning-based baseline methods. As summarized in Table 1, our method outperforms all current learning-based methods in terms of accuracy, completeness and overall score. Compared to geometric-based approaches, only the method proposed by Galliani et al. [12] provides slightly better results in terms of mean accuracy. + +We now compare our results to related learning based methods in terms of GPU memory usage and runtime for different input resolution. The summary of these results is listed in Table 2. As shown, our network, with a similar memory usage (bottom row), is able to produce better point clouds with lower runtime. In addition, compared to Point-MVSNet [5] on the same size of depth map output (top rows), our approach is six times faster and consumes six times less memory with similar accuracy. We can output high resolution depth map with better accuracy, less memory usage and shorter runtime than Point-MVSNet [5]. + +Figures 5 and 6 show some qualitative results. As shown, our method is able to reconstruct more details than Point-MVSNet [5], see for instance, the details highlighted in blue box of the roof behind the front building. Compared to R-MVSNet [43] and Point-MVSNet [5], as we can see in the normal maps, our results are smoother on the surfaces while capturing more high-frequency details in edgy areas. + +# 4.4. Results on Tanks and Temples + +We now evaluate the generalization ability of our method. To this end, we use the model trained on DTU + +![](images/5c3b9f50177497201253a508751986f0a607ed235145ecdf92cc5c29b83d17df.jpg) + +![](images/e216d7ef489a4cf01ff7b2f41e81f8c3d48bb9b216a794c12fda87bdfe532639.jpg) +R-MVSNet [43] + +![](images/0f2517c9f11d918fa43b511d659af59c24ac3c9884ebb9dd16a4e30048d3eabd.jpg) + +![](images/31fcd88da6f98907876fae04b03217c25d5b64681fb9b7ac04a1669ac182ae69.jpg) +Point-MVSNet [5] + +![](images/d914cfd3ad55ed1231e3ce46f277e60e7da402a3cb56224e8df61017693e48a1.jpg) + +![](images/61ce3329301aaaaa745727944ba6bdfde50b777a906ccac64389229709d8748f.jpg) +Ours +Figure 5: Qualitative results of scan 9 of DTU dataset. The upper row shows the point clouds and the bottom row shows the normal map corresponding to the orange rectangle. As highlighted in the blue rectangle, the completeness of our results is better than those provided by Point-MVSNet[5]. The normal map (orange rectangle) further shows that our results are smoother on surfaces while maintaining more high-frequency details. + +![](images/41cfb4bb2bb2585a848c4d3262398ed7cf66157d81a0e18ecd362a077fbbb953.jpg) + +![](images/739a50fa6dc1d83b93985696e00f7034e0ef9ba2002aceb74786b511de9206ca.jpg) +Ground truth + +
MethodInput SizeDepth Map SizeAcc.(mm)Comp.(mm)Overall(mm)f-score(0.5mm)GPU Mem(MB)Runtime(s)
Point-MVSNet[5]1280x960640x4800.3610.4210.39184.2789892.03
Ours-640640x480640x4800.3720.4340.40382.4414160.37
Point-MVSNet[5]1600x1152800x5760.3420.4110.376-130813.04
Ours-800800x576800x5760.3400.4180.37986.8222070.49
MVSNet[42]1600x1152400x2880.3960.5270.46278.10225112.76
R-MVSNet[43]1600x1152400x2880.3830.4520.41783.9669155.09
Point-MVSNet[5]1600x1152800x5760.3420.4110.376-130813.04
Ours1600x11521600x11520.2960.4060.35188.6187951.72
+ +Table 2: Comparison of reconstruction quality, GPU memory usage and runtime on DTU dataset for different input sizes. GPU memory usage and runtime are obtained by running the official evaluation code of baselines on a same machine with a NVIDIA Titan RTX graphics card. For the same size of depth maps (Ours-640, Ours-800) and a performance similar to Point-MVSNet [5], our method is 6 times faster and consumes 6 times smaller GPU memory. For the same size of input images (Ours), our method achieves the best reconstruction with the shortest time and a reasonable GPU memory usage. + +
MethodRankMeanFamilyFrancisHorseLighthouseM60PantherPlaygroundTrain
P-MVSNet [26]11.7255.6270.0444.6440.2265.2055.0855.1760.3754.29
Ours12.7554.0376.547.7436.3455.1257.2854.2857.4347.54
Point-MVSNet[5]29.2548.2761.7941.1534.2050.7951.9750.8552.3843.06
R-MVSNet[43]31.7548.4069.9646.6532.5942.9551.8848.8052.0042.38
MVSNet[42]42.7543.4855.9928.5525.0750.7953.9650.8647.9034.69
+ +Table 3: Performance on Tanks and Temples [21] on November 12, 2019. Our results outperform Point-MVSNet [5], which is the strongest baseline on DTU dataset, and are competitive compared to P-MVSNet [26]. + +without any fine-tuning to reconstruct point clouds for scenes in Tanks and Temples dataset. For fair comparison, we use the same camera parameters, depth range and view selection of MVSNet [42]. For comparison, we consider four baselines [5, 26, 42, 43] and evaluate the $f$ -score on Tanks and Temples. Table 3 summarizes these results. As shown, our method yielded a mean $f$ -score $5\%$ higher than Point-MVSNet [5], which is the best baseline on DTU dataset, and only $1\%$ lower than P-MVSNet [26]. Note that P-MVSNet [26] applies more depth filtering process for point cloud fusion than ours which just follows the simple fusion process provided by MVSNet [42]. Qualitative re + +sults of our point cloud reconstructions are shown in Fig. 7. + +# 4.5. Ablation study + +Training pyramid levels. We first analyze the effect of the number of pyramid levels on the quality of the reconstruction. To this end, we downsample the images to form pyramids with four different levels. Results of this analysis are summarized in Table 4a. As shown, the proposed 2-level pyramid is the best. As the level of pyramid increases, the image resolution of the coarsest level decreases. For more than 2-levels, this resolution is too small to produce a good initial depth map to be refined. + +![](images/10e4e7225c313d2784e3615958313a940db8ad0888281aa6eca20d49f4afd4d8.jpg) + +![](images/a507727d7201e9adb95897a6d449b3a5147b9c03d1637fea7d992f9f250fcb30.jpg) + +![](images/c052c1654dc80f336aefc9cd5bdbfc8d2b0227451466d4a354f7ae946e0bf038.jpg) + +![](images/8e6c0ea8c5d39d102328cad8a830d1f10fe30e21f1d5889ae8a079656cb15c15.jpg) + +![](images/7145e69f7c32ffc354061ed330f1f03a0ad92ec1cbd999cb22de2f2178104920.jpg) +R-MVSNet [43] + +![](images/119f6952b08823447432caeb2c2731ec59898d571743c357fc5b757922cc0671.jpg) +Point-MVSNet [5] + +![](images/b387956929882221f411238886151caa9d99f1be821da89dfeb33dbb4ab56f4e.jpg) +Ours + +![](images/9724e69e935b41da99490c19f68440a3c4ee79499f81653228a74489d15e441f.jpg) +Ground truth + +![](images/305420c998054880080c5b05cb68ef70e41879645a5864ca25fb69ba8ea99621.jpg) +Figure 6: Additional results from DTU dataset. Best viewed on screen. + +![](images/3fde2550d302478cae987f643fe1b686d381f4d0db1ad7b20eaf03ca0e9d85e3.jpg) +(b) Panther + +![](images/3de7a9a5e185930b7b75a4e4ddcc934fcd241529ed2900786e88f9b4cf7a2cf4.jpg) +(a) Train +(c) Lighthouse +Figure 7: Point cloud reconstruction of Tanks and Temples dataset [21]. Best viewed on screen. + +![](images/0c79af989e335912af35fb55866872a86f18d1b5c0b737f8a562752b17213e3a.jpg) +(d) Family + +![](images/cd826e2acd6e04c82d298dfb62f71b304bc305a2e687190f6fd61b0fe20a3585.jpg) +(e) Horse + +
LevelsCoarsest Img. SizeAcc.Comp.Overall
280x640.2960.4060.351
340x320.3260.4070.366
420x160.3390.4110.375
510x80.3410.4120.376
+ +(a) + +
Pixel IntervalAcc. (mm)Comp. (mm)Overall (mm)
20.2990.4130.356
10.2990.4030.351
0.50.2960.4060.351
0.250.3130.4820.397
+ +(b) + +Table 4: Parameter sensitivity on DTU dataset. a) Accuracy as a function of the number of pyramid levels. b) Accuracy as a function of the interval setting. + +Evaluation pixel interval settings. We now analyze the effect of varying the pixel interval setting for depth refinement. As discussed in section 3.3, the depth sampling is determined by the corresponding pixel offset in source views, hence, it is important to set a suitable pixel interval. Table 4b summarizes the effect of varying the interval from depth ranges corresponding to 0.25 pixel to 2 pixels during evaluation. As shown, the performance drops when the interval is too small (0.25 pixel) or too large (2 pixels). + +# 5. Conclusion + +In this paper, we proposed CVP-MVSNet, a cost volume pyramid based depth inference framework for MVS. + +CVP-MVSNet is compact, lightweight, fast in runtime and can handle high resolution images to obtain high quality depth map for 3D reconstruction. Our model achieves better performance than state-of-the-art methods by extensive evaluation on benchmark datasets. In the future, we want to explore the integration of our approach into a learning-based structure-from-motion framework to further reduce the memory requirements for different applications. + +# Acknowledgments + +This research is supported by Australian Research Council grants (DE180100628, DP200102274). + +# References + +[1] Henrik Aanaes, Rasmus Ramsbøl Jensen, George Vogiatzis, Engin Tola, and Anders Bjorholm Dahl. Large-scale data for multiple-view stereopsis. IJCV, 2016. 6 +[2] Konstantinos Batsos, Changjiang Cai, and Philippos Mordohai. CBMV: A coalesced bidirectional matching volume for disparity estimation. CVPR, 2018. 2 +[3] Neill D. F. Campbell, George Vogiatzis, Carlos Hernández, and Roberto Cipolla. Using multiple hypotheses to improve depth-maps for multi-view stereo. In David Forsyth, Philip Torr, and Andrew Zisserman, editors, ECCV, 2008. 6 +[4] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. TPAMI, 2017. 2 +[5] Rui Chen, Songfang Han, Jing Xu, and Hao Su. Point-based multi-view stereo network. In ICCV, 2019. 1, 2, 3, 4, 6, 7, 8 +[6] Robert T Collins. A space-sweep approach to true multi-image matching. In CVPR, 1996. 3 +[7] Jeremy S De Bonet and Paul Viola. Poxels: Probabilistic voxelized volume reconstruction. In ICCV, 1999. 2 +[8] Carlos Hernández Esteban and Francis Schmitt. Silhouette and stereo fusion for 3d object modeling. Computer Vision and Image Understanding, 2004. 2 +[9] Olivier Faugeras and Renaud Keriven. Variational principles, surface evolution, PDE's, level set methods and the stereo problem. 2002. 2 +[10] Pascal Fua and Yvan G Leclerc. Object-centered surface reconstruction: Combining multi-image stereo and shading. IJCV, 1995. 2 +[11] Y. Furukawa and J. Ponce. Accurate, dense, and robust multiview stereopsis. TMAPI, 2010. 6 +[12] 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, 2016. 6 +[13] Ross Girshick. Fast r-cnn. In ICCV, 2015. 2 +[14] Wilfried Hartmann, Silvano Galliani, Michal Havlena, Luc Van Gool, and Konrad Schindler. Learned multi-patch similarity. ICCV, 2017. 2 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 2 +[16] Sunghoon Im, Hae-Gon Jeon, Stephen Lin, and In So Kweon. DPSNet: End-to-end deep plane sweep stereo. In ICLR, 2019. 3, 4 +[17] Mengqi Ji, Juergen Gall, Haitian Zheng, Yebin Liu, and Lu Fang. Surfacenet: An end-to-end 3d neural network for multiview stereopsis. In ICCV, 2017. 2, 6 +[18] Sing Bing Kang, Richard Szeliski, and Jinxiang Chai. Handling occlusions in dense multi-view stereo. In CVPR, 2001. 2 +[19] Abhishek Kar, Christian Hane, and Jitendra Malik. Learning a multi-view stereo machine. In NeurIPS, pages 365-376, 2017. 2 + +[20] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[21] Arno Knapitsch, Jaesik Park, Qian-Yi Zhou, and Vladlen Koltun. Tanks and temples: Benchmarking large-scale scene reconstruction. ACM Transactions on Graphics (ToG), 2017, 6, 7, 8 +[22] Vladimir Kolmogorov and Ramin Zabih. Multi-camera scene reconstruction via graph cuts. In ECCV, 2002. 2 +[23] Kiriakos N Kutulakos and Steven M Seitz. A theory of shape by space carving. *IJCV*, 2000. 2 +[24] Vincent Leroy, Jean-Sebastien Franco, and Edmond Boyer. Shape reconstruction using volume sweeping and learned photoconsistency. In ECCV, 2018. 2 +[25] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. 2 +[26] Keyang Luo, Tao Guan, Lili Ju, Haipeng Huang, and Yawei Luo. P-mvsnet: Learning patch-wise matching confidence aggregation for multi-view stereo. In ICCV, 2019. 6, 7 +[27] Wenjie Luo, Alexander G Schwing, and Raquel Urtasun. Efficient deep learning for stereo matching. In CVPR, 2016. 2 +[28] Paul Merrell, Amir Akbarzadeh, Liang Wang, Philippos Mordohai, Jan-Michael Frahm, Ruigang Yang, David Nister, and Marc Pollefeys. Real-time visibility-based fusion of depth maps. In ICCV, 2007. 2 +[29] Despoina Paschalidou, Ali Osman Ulusoy, Carolin Schmitt, Luc Van Gool, and Andreas Geiger. Raynet: Learning volumetric 3d reconstruction with ray potentials. CVPR, 2019. 2 +[30] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NIPS-W, 2017. 6 +[31] J-P Pons, Renaud Keriven, O Faugeras, and Gerardo Hermosillo. Variational stereovision and 3d scene flow estimation with statistical similarity measures. In ICCV, 2003. 2 +[32] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NeurIPS, 2015. 2 +[33] Johannes Lutz Schonberger and Jan-Michael Frahm. Structure-from-motion revisited. In CVPR, 2016. 6 +[34] Johannes Lutz Schonberger, Enliang Zheng, Marc Pollefeys, and Jan-Michael Frahm. Pixelwise view selection for unstructured multi-view stereo. In ECCV, 2016. 6 +[35] Steven M Seitz, Brian Curless, James Diebel, Daniel Scharstein, and Richard Szeliski. A comparison and evaluation of multi-view stereo reconstruction algorithms. In CVPR, 2006. 1, 2 +[36] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 2 +[37] 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. 3 + +[38] Chengzhou Tang and Ping Tan. BA-net: Dense bundle adjustment networks. In ICLR, 2019. 3 +[39] Engin Tola, Christoph Strecha, and Pascal Fua. Efficient large-scale multi-view stereo for ultra high-resolution image sets. Machine Vision and Applications, 2012. 6 +[40] Youze Xue, Jiansheng Chen, Weitao Wan, Yiqing Huang, Cheng Yu, Tianpeng Li, and Jiayu Bao. Mvscrf: Learning multi-view stereo with conditional random fields. In ICCV, 2019. 6 +[41] Ruigang Yang and Marc Pollefeys. Multi-resolution real-time stereo on commodity graphics hardware. In CVPR, 2003. 3 +[42] Yao Yao, Zixin Luo, Shiwei Li, Tian Fang, and Long Quan. Mvsnet: Depth inference for unstructured multi-view stereo. In ECCV, 2018. 1, 2, 3, 4, 5, 6, 7 +[43] Yao Yao, Zixin Luo, Shiwei Li, Tianwei Shen, Tian Fang, and Long Quan. Recurrent mvsnet for high-resolution multi-view stereo depth inference. In CVPR, 2019. 1, 2, 3, 4, 6, 7, 8 +[44] Jure Zbontar, Yann LeCun, et al. Stereo matching by training a convolutional neural network to compare image patches. Journal of Machine Learning Research, 2016. 2 \ No newline at end of file diff --git a/costvolumepyramidbaseddepthinferenceformultiviewstereo/images.zip b/costvolumepyramidbaseddepthinferenceformultiviewstereo/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5f6022c78f8596b957c732187b5e5bc03d6ab3ec --- /dev/null +++ b/costvolumepyramidbaseddepthinferenceformultiviewstereo/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e8110eb4b5685eb850b026201d686b71cd1ef59815f60b393de3ba5a8d8d481 +size 769877 diff --git a/costvolumepyramidbaseddepthinferenceformultiviewstereo/layout.json b/costvolumepyramidbaseddepthinferenceformultiviewstereo/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..71d7521b95849cf09aa4e73fd39df1398264f495 --- /dev/null +++ b/costvolumepyramidbaseddepthinferenceformultiviewstereo/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21e6f2dac9c268cd5dfe69357f247837d47907e00bb9c6c5a79d36142d137e03 +size 447326 diff --git a/counterfactualsamplessynthesizingforrobustvisualquestionanswering/77adf73c-5053-4f88-b360-e38c6fe2170f_content_list.json b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/77adf73c-5053-4f88-b360-e38c6fe2170f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..661c126d663a28e353c2d4006f13fa37f3fdec74 --- /dev/null +++ b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/77adf73c-5053-4f88-b360-e38c6fe2170f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a64a9a019650c67ea47fd7cebbda6a00601040713164cc6ff56f34e5148c128b +size 90956 diff --git a/counterfactualsamplessynthesizingforrobustvisualquestionanswering/77adf73c-5053-4f88-b360-e38c6fe2170f_model.json b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/77adf73c-5053-4f88-b360-e38c6fe2170f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..fe4c66afbc727ca277263a7a760e0932c8d88b98 --- /dev/null +++ b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/77adf73c-5053-4f88-b360-e38c6fe2170f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0844eb0cc7bdb603d0324f493b1e7e5e89e4724f5b34d4f91ee86b151c407bc1 +size 113708 diff --git a/counterfactualsamplessynthesizingforrobustvisualquestionanswering/77adf73c-5053-4f88-b360-e38c6fe2170f_origin.pdf b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/77adf73c-5053-4f88-b360-e38c6fe2170f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e7a76405140f47616b2a58bf3b05ad7f674e693a --- /dev/null +++ b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/77adf73c-5053-4f88-b360-e38c6fe2170f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd490a88bac46a0e150d220aab8e2296e5f3b337cb3650c7a53c6445da307b08 +size 2753033 diff --git a/counterfactualsamplessynthesizingforrobustvisualquestionanswering/full.md b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e0a42231aa72c1599eeee3c67bd856f3dd6e8b41 --- /dev/null +++ b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/full.md @@ -0,0 +1,469 @@ +# Counterfactual Samples Synthesizing for Robust Visual Question Answering + +Long Chen $^{1*}$ Xin Yan $^{1*}$ Jun Xiao $^{1\dagger}$ Hanwang Zhang $^{2}$ Shiliang Pu $^{3}$ Yueting Zhuang $^{1}$ + +$^{1}$ DCD Lab, College of Computer Science, Zhejiang University + +$^{2}$ MReaL Lab, Nanyang Technological University $^{3}$ Hikvision Research Institute + +# Abstract + +Despite Visual Question Answering (VQA) has realized impressive progress over the last few years, today's VQA models tend to capture superficial linguistic correlations in the train set and fail to generalize to the test set with different QA distributions. To reduce the language biases, several recent works introduce an auxiliary question-only model to regularize the training of targeted VQA model, and achieve dominating performance on VQA-CP. However, since the complexity of design, current methods are unable to equip the ensemble-based models with two indispensable characteristics of an ideal VQA model: 1) visual-explainable: the model should rely on the right visual regions when making decisions. 2) question-sensitive: the model should be sensitive to the linguistic variations in question. To this end, we propose a model-agnostic Counterfactual Samples Synthesizing (CSS) training scheme. The CSS generates numerous counterfactual training samples by masking critical objects in images or words in questions, and assigning different ground-truth answers. After training with the complementary samples (i.e., the original and generated samples), the VQA models are forced to focus on all critical objects and words, which significantly improves both visual-explainable and question-sensitive abilities. In return, the performance of these models is further boosted. Extensive ablations have shown the effectiveness of CSS. Particularly, by building on top of the model LMH [14], we achieve a record-breaking performance of $58.95\%$ on VQA-CP v2, with $6.5\%$ gains. $^{1}$ + +# 1. Introduction + +Visual Question Answering (VQA), i.e., answering natural language questions about the visual content, is one of the core techniques towards complete AI. With the release of multiple large scale VQA datasets (e.g., VQA v1 [6] and v2 [17]), VQA has received unprecedented attention and + +![](images/6bd06699c3202e15291ba381ef43c4150e9d953e0e2ed983223d6d36be86aa23.jpg) +(a) Visual-Explainable Ability + +![](images/793c5e6770944bcbfc1f31b837a61afe6ffa6577b25b0dfe3435de2311786947.jpg) +(b) Question-Sensitive Ability +Figure 1: The two indispensable characteristics of an ideal VQA model. (a) visual-explainable ability: the model not only needs to predict correct answer (e.g., "surfing"), but also relies on the right reference regions when making this prediction. (b) question-sensitive ability: the model should be sensitive to the linguistic variations, e.g., after replacing the critical word "luggage" with "bus", the predicted answers of two questions should be different. + +hundreds of models have been developed. However, since the inevitable annotation artifacts in the real image datasets, today's VQA models always over-rely on superficial linguistic correlations (i.e., language biases) [2, 42, 23, 17]. For example, a model answering "2" for all "how many $X$ " questions can still get satisfactory performance regardless of the $X$ . Recently, to disentangle the bias factors and clearly monitor the progress of VQA research, a diagnostic benchmark VQA-CP (VQA under Changing Priors) [3] has been proposed. The VQA-CP deliberately has different question-answer distributions in the train and test splits. The performance of many state-of-the-art VQA models [5, 15, 40, 4] drop significantly on VQA-CP compared to other datasets. + +Currently, the prevailing solutions to mitigate the bias issues are ensemble-based methods: they introduce an aux + +![](images/19fb9707f1f014e64e5793d8e14e0d9c3c4361bc923e0201b1bf2148f39b2933.jpg) +Figure 2: (a): A training sample from the VQA-CP. (b): The synthesized training sample by V-CSS. It masks cirlical objects $(e.g., \text{"tie'})$ in image and assigns different ground-truth answers ("not green"). (c): The synthesized training sample by Q-CSS. It replaces critical words $(e.g., \text{"tie'})$ with special token "[MASK]" in question and assigns different ground-truth answers ("not green"). + +illary question-only model to regularize the training of targeted VQA model. Specifically, these methods can further be grouped into two sub-types: 1) adversary-based [33, 18, 7]: they train two models in an adversarial manner [16, 12], i.e., minimizing the loss of VQA model while maximizing the loss of question-only model. Since the two models are designed to share the same question encoder, the adversary-based methods aim to reduce the language biases by learning a bias-neutral question representation. Unfortunately, the adversarial training scheme brings significant noise into gradients and results in an unstable training process [18]. 2) fusion-based [10, 14, 27]: they late fuse the predicted answer distributions of the two models, and derive the training gradients based on the fused answer distributions. The design philosophy of the fusion-based methods, is to let the targeted VQA model focuses more on the samples, which cannot be answered correctly by the question-only model. + +Although the ensemble-based methods have dominated the performance on VQA-CP, it is worth noting that current methods fail to equip them with two indispensable characteristics of an ideal VQA model: 1) visual-explainable: the model should rely on the right visual regions when making decisions, i.e., right for the right reasons [34]. As shown in Figure 1 (a), although both two models can predict the correct answer "surfing", they actually refer to totally different reference regions when making this answer prediction. 2) question-sensitive: the model should be sensitive to the linguistic variations in question. As shown in Figure 1 (b), for two questions with similar sentence structure (e.g., only replacing word "luggage" with "bus"), if the meanings of two questions are different, the model should perceive the discrepancy and make corresponding predictions. + +In this paper, we propose a novel model-agnostic Coun + +terfactual Samples Synthesizing (CSS) training scheme. The CSS serves as a plug-and-play component to improve the VQA models' visual-explainable and question-sensitive abilities, even for complex ensemble-based methods. As shown in Figure 2, CSS consists of two different types of samples synthesizing mechanisms: V-CSS and Q-CSS. For V-CSS, it synthesizes a counterfactual image by masking critical objects in the original image. By "critical", we mean that these objects are important in answering a certain question (e.g., object for the question "what color is the man's tie"). Then, the counterfactual image and original question compose a new image-question (VQ) pair. For Q-CSS, it synthesizes a counterfactual question by replacing critical words in the original question with a special token "[MASK]". Similarly, the counterfactual question and original image compose a new VQ pair. Given a VQ pair (from V-CSS or Q-CSS), a standard VQA training sample triplet still needs the corresponding ground-truth answers. To avoid the expensive manual annotations, we design a dynamic answer assigning mechanism to approximate ground-truth answers for all synthesized VQ pairs (e.g., "not green" in Figure 2). Then, we train the VQA models with all original and synthesized samples. After training with numerous complementary samples, the VQA models are forced to focus on critical objects and words. + +Extensive ablations including both qualitative and quantitative results have demonstrated the effectiveness of CSS. The CSS can be seamlessly incorporated into the ensemble-based methods, which not only improves their both visual-explainable and question-sensitive abilities, but also consistently boosts the performance on VQA-CP. Particularly, by building of top on model LMH [14], we achieve a new record-breaking performance of $58.95\%$ on VQA-CP v2. + +# 2. Related Work + +Language Biases in VQA. Despite VQA is a multimodal task, a large body of research [21, 2, 42, 17] has shown the existence of language biases in VQA. There are two main solutions to reduce the language biases: + +1. Balancing Datasets to Reduce Biases. The most straightforward solution is to create more balanced datasets. For example, Zhang et al. [42] collected complementary abstract scenes with opposite answers for all binary questions. And Goyal et al. [17] extended this idea into real images and all types of questions. Although these "balanced" datasets have reduced biases to some extent, the statistical biases from questions still can be leveraged [3]. As shown in the benchmark VQA-CP, the performance of numerous models drop significantly compared to these "balanced" datasets. In this paper, we follow the same spirit of dataset balancing and train VQA models with more complementary samples. Especially, CSS doesn't need any extra manual annotations. + +2. Designing Models to Reduce Biases. Another solution is + +to design specific debiasing models. So far, the most effective debiasing models for VQA are ensemble-based methods [33, 18, 7, 10, 14, 27]. In this paper, we propose a novel CSS training scheme, which can be seamlessly incorporated into the ensemble-based models to further reduce the biases. + +Visual-Explainable Ability in VQA Models. To improve visual-explainable ability, early works [32, 26, 43] directly apply human attention as supervision to guide the models' attention maps. However, since the existence of strong biases, even with appropriate attention maps, the remaining layers of network may still disregard the visual signal [36]. Thus, some recent works [36, 39] utilize GradCAM [35] to obtain private contribution of each object to correct answers, and encourage the rank of all object contributions to be consistent with human annotations. Unfortunately, these models have two drawbacks: 1) They need extra human annotations. 2) The training is not end-to-end. + +Question-Sensitive Ability in VQA Models. If VQA systems really "understand" the question, they should be sensitive to the linguistic variations in question. Surprisingly, to the best of our knowledge, there is only one work [37] has studied the influence of linguistic variations in VQA. Specifically, it designs a cycle-consistent loss between two dual tasks, and utilizes sampled noises to generate diverse questions. However, Shah et al. [37] only considers the robustness to different rephrasings of questions. In contrast, we also encourage the model to perceive the difference of questions when changing some critical words. + +Counterfactual Training Samples for VQA. Some concurrent works [1, 30] also try to synthesize counterfactual samples for VQA. Different from these works that all resort to GAN [16] to generate images, CSS only mask critical objects or words, which is easier and more adoptable. + +# 3. Approach + +We consider the common formulation of VQA task as a multi-class classification problem. Without loss of generality, given a dataset $\mathcal{D} = \{I_i,Q_i,a_i\}_i^N$ consisting of triplets of images $I_{i}\in \mathcal{I}$ , questions $Q_{i}\in \mathcal{Q}$ and answers $a_{i}\in \mathcal{A}$ , VQA task learns a mapping $f_{vqa}:\mathcal{I}\times \mathcal{Q}\to [0,1]^{|\mathcal{A}|}$ , which produces an answer distribution given image-question pair. For simplicity, we omit subscript $i$ in the following sections. + +In this section, we first introduce the base bottom-up top-down model [4], and the ensemble-based methods for debiasing in Section 3.1. Then, we introduce the details of the Counterfactual Samples Synthesizing (CSS) in Section 3.2. + +# 3.1. Preliminaries + +Bottom-Up Top-Down (UpDn) Model. For each image $I$ , the UpDn uses an image encoder $e_v$ to output a set of object features: $\mathbf{V} = \{\pmb{v}_1, \dots, \pmb{v}_{n_v}\}$ , where $\pmb{v}_i$ is $i$ -th object feature. For each question $Q$ , the UpDn uses a question encoder $e_q$ to output a set of word features: $\mathbf{Q} = \{\pmb{w}_1, \dots, \pmb{w}_{n_q}\}$ , where + +Algorithm 1 Ensemble-based Model (fusion-based) +1: function VQA(I, Q, a, cond) +2: $\mathbf{V} \gets e_v(I)$ +3: $\mathbf{Q} \gets e_q(\mathbf{Q})$ +4: $P_{vqa}(\mathbf{a}) \gets f_{vqa}(\mathbf{V}, \mathbf{Q})$ +5: $P_q(\mathbf{a}) \gets f_q(\mathbf{Q})$ +6: $\hat{P}_{vqa}(\mathbf{a}) \gets M(P_{vqa}(\mathbf{a}), P_q(\mathbf{a}))$ +7: Loss $\leftarrow$ XE( $\hat{P}_{vqa}(\mathbf{a}), a$ ) +8: if cond then +9: return V, Q, $P_{vqa}(\mathbf{a})$ +10: end if +11: end function + +$\pmb{w}_j$ is $j$ -th word feature. Then both $\mathbf{V}$ and $\mathbf{Q}$ are fed into the model $f_{vqa}$ to predict answer distributions: + +$$ +P _ {v q a} (\boldsymbol {a} | I, Q) = f _ {v q a} (\boldsymbol {V}, \boldsymbol {Q}). \tag {1} +$$ + +Model $f_{vqa}$ typically contains an attention mechanism [13, 29, 41], and it is trained with cross-entropy loss [38, 11]. + +Ensemble-Based Models. As we discussed in Section 1, the ensemble-based models can be grouped into two subtypes: adversary-based and fusion-based. Since adversary-based models [33, 18, 7] suffer severe unstable training and relatively worse performance, in this section, we only introduce the fusion-based models [10, 14, 27]. As shown in Algorithm 1, they introduce an auxiliary question-only model $f_{q}$ which takes $Q$ as input and predicts answer distribution: + +$$ +P _ {q} (\boldsymbol {a} | Q) = f _ {q} (\boldsymbol {Q}). \tag {2} +$$ + +Then, they combine the two answer distributions and obtain a new answer distribution $\dot{P}_{vqa}(\pmb{a})$ by a function $M$ : + +$$ +\hat {P} _ {v q a} (\boldsymbol {a} | I, Q) = M \left(P _ {v q a} (\boldsymbol {a} | I, Q), P _ {q} (\boldsymbol {a} | Q)\right). \tag {3} +$$ + +In the training stage, the XE loss is computed based on the fused answer distribution $\hat{P}_{vqa}(\pmb{a})$ and the training gradients are backpropagated through both $f_{vqa}$ and $f_{q}$ . In test stage, only model $f_{vqa}$ is used as the plain VQA models. + +# 3.2. Counterfactual Samples Synthesizing (CSS) + +The overall structure of CSS training scheme is shown in Algorithm 2. Specifically, for any $\mathcal{VQA}$ model, given a training sample $(I,Q,a)$ , CSS consists of three main steps: + +1. Training $\mathcal{VQA}$ model with original sample $(I,Q,a)$ ; +2. Synthesizing a counterfactual sample $(I^{-},Q,a^{-})$ by V-CSS or $(I,Q^{-},a^{-})$ by Q-CSS; +3. Training $\mathcal{V}\mathcal{Q}\mathcal{A}$ model with the counterfactual sample. + +In the following, we introduce the details of V-CSS and Q-CSS (i.e., the second step). As shown in Algorithm 2, for each training sample, we only use one certain synthesizing mechanism, and $\delta$ is the trade-off weight (See Figure 4 (c) for more details about the influence of different $\delta$ ). + +Algorithm 2 Counterfactual Samples Synthesizing +1: function $CSS(I, Q, a)$ +2: $V, Q, P_{vqa}(a) \gets \mathcal{VQA}(I, Q, a, \text{True})$ +3: cond $\sim$ U[0, 1] +4: if cond $\geq \delta$ then +5: $\mathcal{I} \gets \text{IO_SEL}(I, Q)$ +6: $s(a, \boldsymbol{v}_i) \gets S(P_{vqa}(a), \boldsymbol{v}_i)$ +7: $I^+, I^- \gets \text{CO_SEL}(\mathcal{I}, \{s(a, \boldsymbol{v}_i)\})$ +8: $a^- \gets \text{DA_ASS}(I^+, Q, \mathcal{VQA}, a)$ +9: $\mathcal{VQA}(I^-, Q, a^-, \text{False})$ +10: else +11: $s(a, \boldsymbol{w}_i) \gets S(P_{vqa}(a), \boldsymbol{w}_i)$ +12: $Q^+, Q^- \gets \text{CW_SEL}(\{s(a, \boldsymbol{w}_i)\})$ +13: $a^- \gets \text{DA_ASS}(I, Q^+, \mathcal{VQA}, a)$ +14: $\mathcal{VQA}(I, Q^-, a^-, \text{False})$ +15: end if +16: end function + +# 3.2.1 V-CSS + +We sequentially introduce all steps of V-CSS following its execution path (line 5 to 8 in Algorithm 2), which consists of four main steps: initial objects selection (IO_SEL), object local contributions calculation, critical objects selection (CO_SEL), and dynamic answer assigning (DA-Ass). + +1. Initial Objects Selection (IO_SEL). In general, for any specific QA pair $(Q,a)$ , only a few objects in image $I$ are related. To narrow the scope of critical objects selection, we first construct a smaller object set $\mathcal{I}$ , and assume all objects in $\mathcal{I}$ are possibly important in answering this question. Since we lack annotations about the critical objects for each sample, we followed [39] to extract the objects which are highly related with the QA. Specifically, we first assign POS tags to each word in the QA using the spaCy POS tagger [19] and extract nouns in QA. Then, we calculate the cosine similarity between the GloVe [31] embedding of object categories and the extracted nouns, the similarity scores between all objects in $I$ and the QA are denoted as $\mathcal{SIM}$ . We select $|\mathcal{I}|$ objects with the highest $\mathcal{SIM}$ scores as $\mathcal{I}$ . + +2. Object Local Contributions Calculation. After obtaining the object set $\mathcal{I}$ , we start to calculate the local contribution of each object to the predicted probability of ground-truth answer. Following recent works [22, 36, 39] which utilize the modified Grad-CAM [35] to derive the local contribution of each participant, we calculate the contribution of $i$ -th object feature to the ground-truth answer $a$ as: + +$$ +s (a, \boldsymbol {v} _ {i}) = \mathcal {S} \left(P _ {v q a} (a), \boldsymbol {v} _ {i}\right) := \left(\nabla_ {\boldsymbol {v} _ {i}} P _ {v q a} (a)\right) ^ {T} \mathbf {1}, \tag {4} +$$ + +where $P_{vqa}(a)$ is the predicted answer probability of ground truth answer a, $\pmb{v}_i$ is $i$ -th object feature, and $\mathbf{1}$ is an all-ones vector. Obviously, if the score $s(a, \pmb{v}_i)$ is higher, the contributions of object $\pmb{v}_i$ to answer $a$ is larger. + +Algorithm 3 Dynamic Answer Assigning +1: function DA_Ass $(I^{+},Q^{+},\mathcal{VQA},a)$ +2: VQA.eval() don't update parameters +3: $\rightarrow ,P_{vqa}^{+}(a)\gets \mathcal{VQA}(I^{+},Q^{+},a,\mathrm{True})$ +4: $a^+ \leftarrow$ top-N(argsort $a_i\in A(P_{vqa}^+(a_i))$ ) +5: $a^{-}\coloneqq \{a_{i}|a_{i}\in a,a_{i}\notin a^{+}\}$ △a is gt answer set +6: return $a^{-}$ +7: end function +1 I I+ I- What color is the [MASK] [MASK] kite? What color [MASK] What color is the [MASK]? Q Q+ Q + +Figure 3: An informal illustration example of the $I^{+}, I^{-}, Q^{+}$ , and $Q^{-}$ in $\mathcal{CSS}$ . For $I^{+}$ and $I^{-}$ , they are two mutual exclusive object sets. For $Q^{+}$ and $Q^{-}$ , we show the example when word "kite" is selected as critical word. + +3. Critical Objects Selection (CO_SEL). After obtaining the private contribution scores $s(a, \boldsymbol{v}_i)$ for all objects in $\mathcal{I}$ , we select the top-K objects with highest scores as the critical object set $I^+$ . The K is a dynamic number for each image, which is the smallest number meets Eq. (5): + +$$ +\sum_ {\boldsymbol {v} _ {i} \in I ^ {+}} \exp (s (a, \boldsymbol {v} _ {i})) / \sum_ {\boldsymbol {v} _ {j} \in \mathcal {I}} \exp (s (a, \boldsymbol {v} _ {j})) > \eta , \tag {5} +$$ + +where $\eta$ is a constant, we set $\eta = 0.65$ in all experiments (See Figure 4 for more details about the dynamic K setting). + +Then, the counterfactual visual input $I^{-}$ is the absolute complement of set $I^{+}$ in set $I$ , i.e., $I^{-} = I \backslash I^{+}$ . We show an example of $I, I^{+}$ , and $I^{-}$ in Figure 3. + +4. Dynamic Answer Assigning (DA_Ass). Given the counterfactual visual input $I^{-}$ and original question $Q$ , we compose a new VQ pair $(I^{-}, Q)$ . To assign ground truth answers for VQ pair $(I^{-}, Q)$ , we design a dynamic answer assigning (DA_Ass) mechanism. The details of DA_Ass are shown in Algorithm 3. Specifically, we first feed another VQ pair $(I^{+}, Q)$ into the VQA model, and obtain the predicted answer distribution $P_{vqa}^{+}(a)$ . Based on $P_{vqa}^{+}(a)$ , we select the top-N answers with highest predicted probabilities as $a^{+}$ . Then we define $a^{-} := \{a_{i} | a_{i} \in a, a_{i} \notin a^{+}\}$ . In an extreme case, if the model predicts all ground truth answer correctly for VQ pair $(I^{+}, Q)$ , i.e., $a \subset a^{+}$ , then $a^{-}$ is a $\emptyset$ , i.e., zero for all answer candidates. The basic motivation is that if current model can predict ground truth answer for $(I^{+}, Q)$ (i.e., $I^{+}$ contains critical objects and $I^{-}$ not), the ground truth for $(I^{-}, Q)$ should not contain original ground truth answers anymore, e.g., "not green" in Figure 2. + +# 3.2.2 Q-CSS + +All steps in Q-CSS are similar to V-CSS. Following its execution path (line 11 to 13 in Algorithm 2), it consists of word local contribution calculation, critical words selection (CW_SEL), and dynamic answer assigning (DA_Ass). + +1. Word Local Contribution Calculation. Similar with the V-CSS (cf. Eq. (4)), we calculate the contribution of $i$ -th word feature to the ground-truth answer $a$ as: + +$$ +s (a, \boldsymbol {w} _ {i}) = \mathcal {S} \left(P _ {v q a} (a), \boldsymbol {w} _ {i}\right) := \left(\nabla_ {\boldsymbol {w} _ {i}} P _ {v q a} (a)\right) ^ {T} \mathbf {1}. \tag {6} +$$ + +2. Critical Words Selection (CW_SEL.) In this step, we first extract question-type words for each question $Q^2$ (e.g., "what color" in Figure 3). Then, we select top-K words with highest scores from the remaining sentence (except the question-type words) as critical words. The counterfactual question $Q^-$ is the sentence by replacing all critical words in $Q$ with a special token "[MASK)". Meanwhile, the $Q^+$ is the sentence by replacing all other words (except question-type and critical words) with "[MASK]". We show an example of $Q, Q^+,$ and $Q^-$ in Figure 3. + +3. Dynamic Answer Assigning (DA_Ass.) This step is identical to the DA_Ass in V-CSS, i.e., Algorithm 3. For Q-CSS, the input for DA_Ass is the VQ pair $(I, Q^{+})$ . + +# 4. Experiments + +Settings. We evaluated the proposed CSS for VQA mainly on the VQA-CP test set [3]. We also presented experimental results on the VQA v2 validation set [17] for completeness. For model accuracies, we followed the standard VQA evaluation metric [6]. For fair comparisons, we did all the same data preprocessing steps with the widely-used UpDn model [4] using the publicly available reimplementation3. + +# 4.1. Ablative Studies + +# 4.1.1 Hyperparameters of V-CSS and Q-CSS + +We run a number of ablations to analyze the influence of different hyperparameters of V-CSS and Q-CSS. Specifically, we conducted all ablations by building on top of ensemble-based model LMH [14]. Results are illustrated in Figure 4. + +The size of $\mathcal{I}$ in V-CSS. The influence of different size of $\mathcal{I}$ is shown in Figure 4 (a). We can observe that the model's performance gradually decreases with the increase of $|\mathcal{I}|$ . + +The size of critical objects in V-CSS. The influence of masking different numbers of critical objects is shown in Figure 4 (a). We compared the dynamic K (Eq. (5)) with some fixed constants (e.g., 1, 3, 5). From the results, we can observe that the dynamic K achieves the best performance. + +The size of critical words in Q-CSS. The influence of replacing different sizes of critical words is shown in Figure 4 + +
ModelAllY/NNumOther
Plain ModelsUpDn [4]Baseline39.7442.2711.9346.05
\( Baseline {}^{ \dagger } \)39.6841.9312.6845.91
+Q-CSS40.0542.1612.3046.56
+V-CSS40.9843.1212.2846.86
\( +CSS \)41.1643.9612.7847.48
Ensemble-Based ModelsPoE [14, 27]Baseline39.93---
\( Baseline {}^{ \dagger } \)39.8641.9612.5946.25
+Q-CSS40.7342.9912.4947.28
+V-CSS49.6574.9816.4145.50
\( +CSS \)48.3270.4413.8446.20
RUBi [10]Baseline44.23---
\( Baselinen^{\dagger} \)45.2364.8511.8344.11
+Q-CSS46.3168.7012.1543.95
+V-CSS46.0062.0811.8446.95
\( +CSS \)46.6767.2611.6245.13
LMH [14]Baseline52.05---
\( Baselinen^{\dagger} \)52.4569.8144.4645.54
+Q-CSS56.6680.8245.8346.98
+V-CSS58.2380.5352.4848.13
\( +CSS \)58.9584.3749.4248.21
+ +Table 1: Accuracies $(\%)$ on VQA-CP v2 test set of different VQA architectures. $CSS$ denotes the model with both V-CSS and Q-CSS. represents these results are based on our reimplementation. + +(b). From the results, we can observe that replacing only one word (i.e., top-1) achieves the best performance. + +The proportion $\delta$ of V-CSS and Q-CSS. The influence of different $\delta$ is shown in Figure 4 (c). From the results, we can observe that the performance is best when $\delta = 0.5$ . + +# 4.1.2 Architecture Agnostic + +Settings. Since the proposed CSS is a model-agnostic training scheme, which can be seamlessly incorporated into different VQA architectures. To evaluate the effectiveness of CSS to boost the debiasing performance of different backbones, we incorporated the CSS into multiple architectures including: UpDn [4], PoE (Product of Experts) [14, 27], RUBi [10], LMH [14]. Especially, PoE, RUBi, LMH are ensemble-based methods. All results are shown in Table 1. + +Results. Compared to these baseline models, the CSS can consistently improve the performance for all architectures. The improvement is more significant in the ensemble-based models (e.g., $6.50\%$ and $9.79\%$ absolute performance gains in LMH and PoE). Furthermore, when both two types of CSS are used, models often achieve the best performance. + +# 4.2. Comparisons with State-of-the-Arts + +# 4.2.1 Performance on VQA-CP v2 and VQA v2 + +Settings. We incorporated the CSS into model LMH [14], which is dubbed as LMH-CSS, and compared it with the state-of-the-art models on both VQA-CP v2 and VQA v2. According to the backbone of these models, we group them into: 1) AReg [33], MuRel [9], GRL [18], RUBi [10], + +![](images/0854aa1ffbedcab62c1bb2581cdf6db9bd3646c01c66aa9e854ee02a312ad9a4.jpg) +(a) + +![](images/a62e85e79eb0833c855db960dd0315b4258d7e4821a6bf358816f7c9aa0736ba.jpg) +(b) + +![](images/3b563206dc1a57a48b23a59317b0581ba38efea75a6f064b65bb3d5a1a4b9c44.jpg) +(c) +Figure 4: Ablations. Accuracies $(\%)$ on VQA-CP v2 test set of different hyperparameters settings of V-CSS or Q-CSS. (a) The results of different size of $\mathcal{I}$ and critical objects in V-CSS. All results come from model LMH+V-CSS. (b) The results of different size of critical words in Q-CSS. All results come from model LMH+Q-CSS. (c) The results of different $\delta$ . All results come from model LMH+V-CSS+Q-CSS. + +SCR [39], LMH [14], HINT [36]. These models utilize the UpDn [4] as their backbone. 2) HAN [28], GVQA [3], ReGAT [25], NSM [20]. These models utilize other different backbones, e.g., BLOCK [8], BAN [24] etc. Especially, the AReg, GRL, RUBi, LMH are ensemble-based models. + +Results. The results are reported in Table 3. When trained and tested on the VQA-CP v2 dataset (i.e., left side of Table 3), the LMH-CSS achieves a new state-of-the-art performance over all question categories. Particularly, CSS improves the performance of LMH with a $6.50\%$ absolution performance gains $(58.95\%$ vs. $52.45\%)$ . When trained and tested on the VQA v2 dataset (i.e., middle side of Table 3), the CSS results in a minor drop in the performance by $1.74\%$ for LMH. For completeness, we further compared the performance drop between the two benchmarks. Different from previous models that suffer severe performance drops (e.g., $23.74\%$ in UpDn, and $9.19\%$ in LMH), the LMH-CSS can significantly decrease the performance drop into $0.96\%$ , which demonstrate that the effectiveness of CSS to further reduce the language biases in VQA. + +# 4.2.2 Performance on VQA-CP v1 + +Settings. We further compared the LMH-CSS with state-of-the-art models on VQA-CP v1. Similarly, we group these baseline models into: 1) GVQA with SAN [40] backbone, 2) AReg, GRL, RUBi, and LMH with UpDn backbone. + +Results. Results are reported in Table 2. Compared to these baseline models, the LMH-CSS achieves a new state-of-the-art performance on VQA-CP v1. Particularly, the CSS improves the performance of LMH with a $5.68\%$ absolution performance gains (60.95% vs. 55.27%). + +# 4.3. Improving Visual-Explainable Ability + +We will validate the effectiveness of CSS to improve the visual-explainable ability by answering the following questions: Q1: Can existing visual-explainable models be incorporated into the ensemble-based framework? Q2: How + +
ModelAllYes/NoNumOther
GVQA [3]39.2364.7211.8724.86
UpDn [4]39.7442.2711.9346.05
+AReg†[33]41.1765.4915.4835.48
+GRL†[18]45.6977.6413.2126.97
+RUBi†* [10]50.9080.8313.8436.02
+LMH†* [14]55.2776.4726.6645.68
+LMH-CSS60.9585.6040.5744.62
+ +Table 2: Accuracies $(\%)$ on VQA-CP v1 test set of state-of-the-art models. $^{\dagger}$ represents the ensemble-based methods. * indicates the results from our reimplementation using official released codes. + +does CSS improve the model's visual-explainable ability? + +# 4.3.1 CSS vs. SCR (Q1) + +Settings. We equipped the existing state-of-the-art visual-explainable model SCR [39] into the LMH framework, and compared it with CSS. Results are reported in Table 4 (a). + +Results. Since the training of all SOTA visual-explainable models (e.g., SCR, HINT) are not end-to-end, for fair comparisons, we used a well-trained LMH (i.e., $52.45\%$ accuracies on VQA-CP v2) as the initial model. However, we observe that its performance continues to decrease from the start, which shows that the existing visual-explainable models can not be easily incorporated into the ensemble-based framework. In contrast, CSS can improve the performance. + +# 4.3.2 Evaluations of Visual-Explainable Ability (Q2) + +Settings. We evaluate the effectiveness of CSS to improve the visual-explainable ability on both quantitative and qualitative results. For quantitative results, since we lack human annotations about the critical objects for each question, we regard the $\mathcal{S}\mathcal{I}\mathcal{M}$ score (Section 3.2.1 IO_SEL) as pseudo ground truth. Thus, we design a new metric Average Importance ( $\mathcal{A}\mathcal{I}$ ): the average $\mathcal{S}\mathcal{I}\mathcal{M}$ score of the top-K objects with highest $|s(a,v)|$ . The results are shown in Table 4 (b). + +
ModelVenueExpl.VQA-CP v2 test ↑VQA v2 val ↑GapΔ↓
AllYes/NoNumOtherAllYes/NoNumOtherAllOther
HAN [28]ECCV'1828.6552.2513.7920.33------
GVQA [3]CVPR'1831.3057.9913.6822.1448.2472.0331.1734.6516.9412.51
ReGAT [25]ICCV'1940.42---67.18---26.76-
RUBi [10]NeurIPS'1947.1168.6520.2843.1861.16---14.05-
NSM [20]NeurIPS'1945.80---------
UpDn [4]CVPR'1839.7442.2711.9346.0563.4881.1842.1455.6623.749.61
+AReg†[33]NeurIPS'1841.1765.4915.4835.4862.7579.8442.3555.1621.5819.68
+MuRel [9]CVPR'1939.5442.8513.1745.04------
+GRL†[18]ACL'1942.3359.7414.7840.7651.92---9.59-
+RUBi†* [10]NeurIPS'1945.2364.8511.8344.1150.5649.4541.0253.955.339.84
+SCR [39]NeurIPS'1948.4770.4110.4247.2962.3077.4040.9056.5013.839.21
+LMH†* [14]EMNLP'1952.4569.8144.4645.5461.6477.8540.0355.049.199.50
+LMH-CSSCVPR'2058.9584.3749.4248.2159.9173.2539.7755.110.966.90
+HINT [36]ICCV'19HAT47.7070.0410.6846.3162.3580.4941.7554.0114.657.70
+SCR [39]NeurIPS'19HAT49.1771.5510.7247.4962.2078.9041.4054.3013.036.81
+SCR [39]NeurIPS'19VQA-X49.4572.3610.9348.0262.2078.8041.6054.4012.756.38
+ +Table 3: Accuracies $(\%)$ on VQA-CP v2 test set and VQA v2 val set of state-of-the-art models. The gap represents the accuracy difference between VQA v2 and VQA-CP v2. $\dagger$ represents the ensemble-based methods. Expl. denotes the model has used extra human annotations, e.g., human attention (HAT) or explanations (VQA-X). * indicates the results from our reimplementation using official released codes. + +
ModelAllYes/NoNumOther
SCR48.4770.4110.4247.29
LMH52.4569.8144.4645.54
LMH+SCRcontinued
LMH+CSS58.9584.3749.4248.21
+ +(a) Accuracies $(\%)$ on VQA-CP v2 test set. + +
ModelTop-1Top-2Top-3
UpDn22.7021.5820.89
SCR27.5826.2925.38
LMH29.6728.0627.04
LMH+V-CSS30.2428.5327.51
LMH+CSSS33.4331.2729.86
+ +(b) $\mathcal{A}\mathcal{I}$ score $(\%)$ on VQA-CP v2 test set. + +
Modelk=1k=2k=3k=4CI
UpDn49.9438.8031.5528.086.01
LMH51.6839.8433.3829.117.44
LMH+Q-CSS54.8342.3435.4831.029.02
LMH+CSS55.0442.7835.6331.179.03
+ +(c) Left: $CS(k)$ (%) on VQA-CP-Rephrasing; Right: $\mathcal{C}\mathcal{I}$ score (%) on VQA-CP v2 test set. + +Table 4: Quantitative results about the evaluation of the VQA models' visual-explainable and question-sensitive abilities. + +For qualitative results, we illustrated in Figure 5 (a). + +Results. From Table 4 (b), we can observe that CSS dramatically improves the $\mathcal{A}\mathcal{I}$ scores, which means the actually influential objects are more related to the QA pair. From Figure 5 (a), we can find that the CSS helps the model to make predictions based on critical objects (i.e., green boxes), and suppress the influence of irrelevant objects (i.e., red boxes). + +# 4.4. Improving Question-Sensitive Ability + +We will validate the effectiveness of CSS to improve the question-sensitive ability by answering the following questions: Q3: Does CSS helps to improve the robustness to diverse rephrasings of questions? Q4: How does CSS improve the model's question-sensitive abilities? + +# 4.4.1 Robustness to Rephrasings of Questions (Q3) + +Settings. As discussed in previous work [37], being robust to diverse rephrasing of questions is one of key behaviors of a question-sensitive model. To more accurately evaluate the robustness, we re-splited the existing dataset VQA-Rephrasings [37] with the same splits as VQA-CP, and denoted it as VQA-CP-Rephrasings. For evaluation, we used + +the standard metric Consensus Score $CS(k)$ . Results are reported in Table 4 (c) (left). We refer readers to [37] for more details about the VQA-Rephrasings and metric $CS(k)$ . + +Results. From Table 4 (c), we can observe that Q-CSS dramatically improves the robustness to diverse rephrasings of questions. Furthermore, V-CSS can help to further improve the robustness, i.e., CSS achieves the best performance. + +# 4.4.2 Evaluations of Question-Sensitive Ability (Q4) + +Settings. We evaluate the effectiveness of CSS to improve the question-sensitive ability on both quantitative and qualitative results. For quantitative results, since there is no standard evaluation metric, we design a new metric Confidence Improvement $(\mathcal{C}\mathcal{I})$ : Given a test sample $(I,Q,a)$ , we remove a critical noun in question $Q$ , and obtain a new test sample $(I,Q^{*},a)^{4}$ . Then we feed both two samples into evaluated model, and calculate the confidence decrees of the ground-truth answer. We formally define $\mathcal{C}\mathcal{I}$ in Eq. 7: + +$$ +\mathcal {I} = \frac {\sum_ {(I , Q)} \left(P _ {v q a} (a | I , Q) - P _ {v q a} (a | I , Q ^ {*})\right) \cdot \mathbf {1} (a = \hat {a})}{\sum_ {(I , Q)} 1} \tag {7} +$$ + +![](images/bca16e7f87af1326b39a885f91bdd70f981984b669e14b07f7d3d7347f7b6632.jpg) +Q: What color is the fire truck? + +![](images/3ff3f4cbf13b1b1a914d83c085c4d1ab7033e978c12f1346a25679d07ffe7259.jpg) +(a) + +![](images/72e85eadfa16cbdba72adcf134e0fc8263ef577cef5a587c0f6a0b29b3eec048.jpg) +LMH: red and white X +LMH+CSS:red + +![](images/60c07994771407e16c3b2fe75a60ea6226528ff2675d3171215c692971dbca51.jpg) +Q: Why is one player wearing a glove? + +![](images/4dbe14a3e37c4146ef107e34caf5c711ee9ce4860d3fce4545c73276516787db.jpg) +LMH: protection X + +![](images/e9cc9c9a02db447f9b22bd82aa9a09aab8015f69ac94c1e03d36f1a5c4a24a5b.jpg) +LMH+CSS: catcher + +![](images/3e0d551f165bc702b630f39449efaf51a588787ebf2ace4d334f09b7985db0b0.jpg) +Q: How many plants are in the room? + +![](images/bf7f6d8a976436363f01a4f75ea8ab9fde8d5f0d62bd3c17fc11fda3f3848a0e.jpg) +LMH:5 + +![](images/04f4b2aa836600a267eab76cd76a35ccd0089a12dc8e0cb54a66fd16c3e4f5fc.jpg) +LMH+CSS:1 + +![](images/493436010ef5119711eac4ef2f0af463299a12f5724312911dd4b7c6df543e31.jpg) +Q: What vehicle is in the foreground? + +![](images/cfcb90a000529aa80aed3a1eb390c9a6d42aacefb22fa0ddbb471db078e2e262.jpg) + +![](images/90e2ebf77b7803e634bd06e89fced5e54adaa092ab2f1e67b74079328f9f4f35.jpg) +LMH: motorcycle +LMH+CSS: motorcycle + +![](images/d8ba201c4fed44217acc63e473678072025394911dd7f84779811a54055c5df1.jpg) +Q: What color is the mens' shirts? + +![](images/180a7ae0070fbaf134adb1e67640c5ccc3aae675d3a1ccebd8863505b9015a84.jpg) +LMH: blue + +![](images/0ea0ddd7a4620a9781a6e01f92d7b8845943f6623f8ff6fb6140b2076dd45c62.jpg) +LMH+CSS: blue + +![](images/1b821edd39825a44c4f1942cff5376b1535596a0608d1d4d413d79066ece71cb.jpg) +(b) + +Q: Does this stove look updated? + +LMH: + +Q: Does this stove look updated? + +A:Yes + +LMH+CSS: + +Q: Does this stove look updated? + +A: No + +Q: What is the yellow object? + +LMH: + +Q: What is the yellow object? + +A: banana + +LMH+CSS: + +Q: What is the yellow object? + +A: banana + +![](images/68b3011afdd6885d85c12fbc0febc6d5ea03c52ddf279a67822fac0af5a719f2.jpg) + +![](images/7b9ffd55669fd433c7d73c10bb458dfba2c8742d771cb098571c50e3dca3dfd9.jpg) +Figure 5: (a) visual-explainable ability: The green boxes denote their scores $s(\hat{a}, \mathbf{v}) > 0$ , i.e., positive contributions to final predictions; The red boxes denote their scores $s(\hat{a}, \mathbf{v}) < 0$ , i.e., negative contributions to final predictions. Only objects which are highly related to the QA pair are shown (i.e., $S\mathcal{IM} \geq 0.6$ ). (b) question-sensitive ability: The different shades of green color in the question denotes the relative values of $s(\hat{a}, \mathbf{w})$ . Thus, the word with darker green denotes the word has larger contribution to final predictions. + +Q: Can you see trees in the window? + +LMH: + +Q: Can you see trees in the window? + +A: No X + +$\mathrm{LMH + CSS}$ + +Q: Can you see trees in the window? + +A:Yes + +Q: Where is the lasagna? + +LMH: + +Q: Where is the lasagna? + +A:oven + +$\mathrm{LMH + CSS}$ + +Q: Where is the lasagna? + +A:oven + +where $\hat{a}$ is the model predicted answer for sample $(I, Q)$ , $\mathbf{1}$ is an indicator function. The results are reported in Table 4 (c). For qualitative results, we illustrated in Figure 5 (b). + +Results. From Table 4 (c), we can observe that CSS helps the model to benefit more from the critical words, i.e., removing critical words results in more confidence drops for the ground-truth answers. From Figure 5 (b), we can find that CSS helps the model to make predictions based on critical words (e.g., "stove" or "lasagna"), i.e., forcing model to understand the whole questions before making predictions. + +# 5. Conclusion + +In this paper, we proposed a model-agnostic Counterfactual Samples Synthesizing (CSS) training scheme to im + +prove the model's visual-explainable and question-sensitive abilities. The CSS generates counterfactual training samples by masking critical objects or words. Meanwhile, the CSS can consistently boost the performance of different VQA models. We validate the effectiveness of CSS through extensive comparative and ablative experiments. Moving forward, we are going to 1) extend CSS to other visual-language tasks that suffer severe language biases; 2) design a specific VQA backbone to benefits from CSS. + +Acknowledgement This work was supported by National Key Research & Development Project of China (No.2018AAA0101900), National Natural Science Foundation of China (U19B2043, 61976185), Zhejiang Natural Science Foundation (LR19F020002, LZ17F020001), Fundamental Research Funds for the Central Universities and Chinese Knowledge Center for Engineering Sciences and Technology. Long Chen was supported by 2018 ZJU Academic Award for Outstanding Doctoral Candidates. + +# References + +[1] Vedika Agarwal, Rakshith Shetty, and Mario Fritz. Towards causal vqa: Revealing and reducing spurious correlations by invariant and covariant semantic editing. In arXiv, 2019. 3 +[2] Aishwarya Agrawal, Dhruv Batra, and Devi Parikh. Analyzing the behavior of visual question answering models. In EMNLP, 2016. 1, 2 +[3] Aishwarya Agrawal, Dhruv Batra, Devi Parikh, and Aniruddha Kembhavi. Don't just assume; look and answer: Overcoming priors for visual question answering. In CVPR, 2018, 1, 2, 5, 6, 7 +[4] Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In CVPR, 2018. 1, 3, 5, 6, 7 +[5] Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. In CVPR, 2016. 1 +[6] Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In ICCV, 2015. 1, 5 +[7] Yonatan Belinkov, Adam Poliak, Stuart M Shieber, Benjamin Van Durme, and Alexander M Rush. Don't take the premise for granted: Mitigating artifacts in natural language inference. In ACL, 2019. 2, 3 +[8] Hedi Ben-Younes, Rémi Cadene, Nicolas Thome, and Matthieu Cord. Block: Bilinear superdiagonal fusion for visual question answering and visual relationship detection. In AAAI, 2019. 6 +[9] Remi Cadene, Hedi Ben-Younes, Matthieu Cord, and Nicolas Thome. Murel: Multimodal relational reasoning for visual question answering. In CVPR, 2019. 5, 7 +[10] Remi Cadene, Corentin Dancette, Hedi Ben-younes, Matthieu Cord, and Devi Parikh. Rubi: Reducing unimodal biases in visual question answering. In NeurlPS, 2019. 2, 3, 5, 6, 7 +[11] Long Chen, Hanwang Zhang, Jun Xiao, Xiangnan He, Shiliang Pu, and Shih-Fu Chang. Counterfactual critic multiagent training for scene graph generation. In ICCV, 2019. 3 +[12] Long Chen, Hanwang Zhang, Jun Xiao, Wei Liu, and Shih-Fu Chang. Zero-shot visual recognition using semantics-preserving adversarial embedding networks. In CVPR, 2018. 2 +[13] Long Chen, Hanwang Zhang, Jun Xiao, Liqiang Nie, Jian Shao, Wei Liu, and Tat-Seng Chua. Sca-cnn: Spatial and channel-wise attention in convolutional networks for image captioning. In CVPR, 2017. 3 +[14] Christopher Clark, Mark Yatskar, and Luke Zettlemoyer. Don't take the easy way out: Ensemble based methods for avoiding known dataset biases. In EMNLP, 2019. 1, 2, 3, 5, 6, 7 +[15] 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. In EMNLP, 2016. 1 +[16] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and + +Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014. 2, 3 +[17] Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Bartra, and Devi Parikh. Making the v in vqa matter: Elevating the role of image understanding in visual question answering. In CVPR, 2017. 1, 2, 5 +[18] Gabriel Grand and Yonatan Belinkov. Adversarial regularization for visual question answering: Strengths, shortcomings, and side effects. In ACL workshop, 2019. 2, 3, 5, 6, 7 +[19] Matthew Honnibal and Ines Montani. spacy 2: Natural language understanding with bloom embeddings, convolutional neural networks and incremental parsing. To appear, 2017. 4 +[20] Drew A Hudson and Christopher D Manning. Learning by abstraction: The neural state machine. In NeurIPS, 2019. 6, 7 +[21] Allan Jabri, Armand Joulin, and Laurens Van Der Maaten. Revisiting visual question answering baselines. In ECCV, 2016. 2 +[22] Sarthak Jain and Byron C Wallace. Attention is not explanation. In *NAACL*, 2019. 4 +[23] Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. In CVPR, 2017. 1 +[24] Jin-Hwa Kim, Jaehyun Jun, and Byoung-Tak Zhang. Bilinear attention networks. In NeurIPS, 2018. 6 +[25] Linjie Li, Zhe Gan, Yu Cheng, and Jingjing Liu. Relation-aware graph attention network for visual question answering. In ICCV, 2019. 6, 7 +[26] Chenxi Liu, Junhua Mao, Fei Sha, and Alan Yuille. Attention correctness in neural image captioning. In AAAI, 2017. 3 +[27] Raabeeh Karimi Mahabadi and James Henderson. Simple but effective techniques to reduce biases. In arXiv, 2019. 2, 3, 5 +[28] Mateusz Malinowski, Carl Doersch, Adam Santoro, and Peter Battaglia. Learning visual question answering by bootstrapping hard attention. In ECCV, 2018. 6, 7 +[29] Yulei Niu, Hanwang Zhang, Manli Zhang, Jianhong Zhang, Zhiwu Lu, and Ji-Rong Wen. Recursive visual attention in visual dialog. In CVPR, 2019. 3 +[30] Jingjing Pan, Yash Goyal, and Stefan Lee. Question-conditioned counterfactual image generation for vqa. In arXiv, 2019. 3 +[31] Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In EMNLP, 2014. 4 +[32] Tingting Qiao, Jianfeng Dong, and Duanqing Xu. Exploring human-like attention supervision in visual question answering. In AAAI, 2018. 3 +[33] Sainandan Ramakrishnan, Aishwarya Agrawal, and Stefan Lee. Overcoming language priors in visual question answering with adversarial regularization. In NeurIPS, 2018. 2, 3, 5, 6, 7 +[34] Andrew Slavin Ross, Michael C Hughes, and Finale Doshi-Velez. Right for the right reasons: Training differentiable models by constraining their explanations. In IJCAI, 2017. 2 + +[35] Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In ICCV, 2017. 3, 4 +[36] Ramprasaath R Selvaraju, Stefan Lee, Yilin Shen, Hongxia Jin, Dhruv Batra, and Devi Parikh. Taking a hint: Leveraging explanations to make vision and language models more grounded. In ICCV, 2019. 3, 4, 6, 7 +[37] Meet Shah, Xinlei Chen, Marcus Rohrbach, and Devi Parikh. Cycle-consistency for robust visual question answering. In CVPR, 2019. 3, 7 +[38] Kaihua Tang, Hanwang Zhang, Baoyuan Wu, Wenhan Luo, and Wei Liu. Learning to compose dynamic tree structures for visual contexts. In CVPR, 2019. 3 +[39] Jialin Wu and Raymond J Mooney. Self-critical reasoning for robust visual question answering. In NeurIPS, 2019. 3, 4, 6, 7 +[40] Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. In CVPR, 2016. 1, 6 +[41] Yunan Ye, Zhou Zhao, Yimeng Li, Long Chen, Jun Xiao, and Yueting Zhuang. Video question answering via attribute-augmented attention network learning. In SIGIR, 2017. 3 +[42] Peng Zhang, Yash Goyal, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Yin and yang: Balancing and answering binary visual questions. In CVPR, 2016. 1, 2 +[43] Yundong Zhang, Juan Carlos Niebles, and Alvaro Soto. Interpretable visual question answering by visual grounding from attention supervision mining. In WACV, 2019. 3 \ No newline at end of file diff --git a/counterfactualsamplessynthesizingforrobustvisualquestionanswering/images.zip b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2eabba7bb8a9676d63b1c8bf84fbb9002ea008c6 --- /dev/null +++ b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0b5a027c252452637f584c04f6524c802543be841c70bab16c1ca6adf18cc52 +size 624306 diff --git a/counterfactualsamplessynthesizingforrobustvisualquestionanswering/layout.json b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ac45e6519ab2b28c87323e22800ebcac63111c1b --- /dev/null +++ b/counterfactualsamplessynthesizingforrobustvisualquestionanswering/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84d38bbad2cef92923dda6d055a2104f469d888971ec9e609edc2346bcfc6b2f +size 576852 diff --git a/counterfactualvisionandlanguagelearning/051b9950-1a76-44f9-bb07-ec353831b07f_content_list.json b/counterfactualvisionandlanguagelearning/051b9950-1a76-44f9-bb07-ec353831b07f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..548544235b88dd004a196f638bfd08edad11a6d1 --- /dev/null +++ b/counterfactualvisionandlanguagelearning/051b9950-1a76-44f9-bb07-ec353831b07f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9913a9ef72fdc4a759987d178f768e3ea0ee09af688773712f594c98de6297f5 +size 89229 diff --git a/counterfactualvisionandlanguagelearning/051b9950-1a76-44f9-bb07-ec353831b07f_model.json b/counterfactualvisionandlanguagelearning/051b9950-1a76-44f9-bb07-ec353831b07f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..453b30ae0c11b7c664499cb37412e5d86eb30a0c --- /dev/null +++ b/counterfactualvisionandlanguagelearning/051b9950-1a76-44f9-bb07-ec353831b07f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35cae7d5b4a07bd5f9446822bf0fbe392482ad5ca0085eb58203b260b9bbd017 +size 107535 diff --git a/counterfactualvisionandlanguagelearning/051b9950-1a76-44f9-bb07-ec353831b07f_origin.pdf b/counterfactualvisionandlanguagelearning/051b9950-1a76-44f9-bb07-ec353831b07f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..70deb6ffed7f44b4805b0a69c4fd853f4b423b36 --- /dev/null +++ b/counterfactualvisionandlanguagelearning/051b9950-1a76-44f9-bb07-ec353831b07f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec16436e7f6a909288aa2cc7890b77276b0ded1a9cfd977b9b3445b097c141c1 +size 769550 diff --git a/counterfactualvisionandlanguagelearning/full.md b/counterfactualvisionandlanguagelearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4ccc8132fba84b40d79ddd3a3af8f1e46ee502d6 --- /dev/null +++ b/counterfactualvisionandlanguagelearning/full.md @@ -0,0 +1,371 @@ +# Counterfactual Vision and Language Learning + +Ehsan Abbasnejad, Damien Teney, Amin Parvaneh, Javen Shi, Anton van den Hengel + +{ehsan.abbasnejad,damien.teney,amin.parvaneh,javen.shi,anton.vandenhengel}@adelaide.edu.au + +Australian Institute for Machine Learning & The University of Adelaide, Australia + +# Abstract + +The ongoing success of visual question answering methods has been somewhat surprising given that, at its most general, the problem requires understanding the entire variety of both visual and language stimuli. It is particularly remarkable that this success has been achieved on the basis of comparatively small datasets, given the scale of the problem. One explanation is that this has been accomplished partly by exploiting bias in the datasets rather than developing deeper multi-modal reasoning. This fundamentally limits the generalization of the method, and thus its practical applicability. We propose a method that addresses this problem by introducing counterfactuals in the training. In doing so we leverage structural causal models for counterfactual evaluation to formulate alternatives, for instance, questions that could be asked of the same image set. We show that simulating plausible alternative training data through this process results in better generalization. + +# 1. Introduction + +Recent advances in computer vision and natural language understanding have paved the way for a variety of tasks that combine visual and textual modalities [28, 15, 7, 5, 33]. Visual Question Answering (VQA) is one such task in which the goal is to answer a question framed in natural language that relates to an image. VQA thus requires a high-level understanding of the visual scene and the question, and an ability to relate (or ground) the two. Much of the interest around VQA, and the associated vision-and-language problems, stems from the fact that success might represent a step toward artificial intelligence. A variety of real-world applications have arisen also, including aiding the visually impaired, searching through large quantities of visual data via natural language interfaces, and flexible tasking of robots. + +Current end-to-end VQA models achieve high accuracies on most of the available benchmarks and surpass human performance in a selection of cases (compositional reasoning [25], for example). It has been shown, however, that + +these methods exploit statistical regularities and biases in the data to achieve this performance [25, 33, 23, 6]. In addition, although these approaches are expected to merge information from multiple modalities, in practice they often exploit unimodal biases and ignore the other modalities entirely. In addition, particular signals in the input trigger specific answers; for instance, when the image contains a banana, the answer is most likely to be yellow, irrespective of the remainder of the image, or the question. This dependence on spurious correlations in the training data leaves VQA methods vulnerable to a failure to generalize. In addition, this phenomenon highlights the lack of high-level understanding of the input and its connection to other modalities. + +To remedy the weaknesses identified above and improve generalization, we propose to utilize counterfactuals [30, 12] in the learning process. In traditional causal inference counterfactuals are unobserved scenarios, and are often used to estimate the effect of an intervention that is not directly represented in the data. In machine learning they can equally represent a potential training data element for which we do not have a label, or a data-label pair for which we do not have a reward. This is particularly relevant in those supervised learning settings where more than one true label might apply to each training data element, yet only one true answer is typically observed. This is the case in many vision-and-language problems, as the fact that the training set documents a particular answer to a VQA question does not mean that every alternate answer is wrong. This is referred to as bandit feedback [24], and such problems are labelled nonstochastic multiarmed bandit problems [9]. In the context of VQA, counterfactual analysis leads us to ask "what would have happened if we observed a different image or asked a different question, given the past observations". + +We consider the causal model underlying the training data, and introducing an extra (exogenous) variable that governs the question and image generation (from which the observed answers are produced). Then, we learn a distribution for that variable, providing a model of how the observational data was generated. Subsequently, we ask + +"What would be the minimum alteration to the question or image that could change the answer". To that end, we choose the exogenous variable such that the question or image generated using that variable yields an incorrect answer, thus effectively injecting an intervention into our causal model. Since the intervention can degrade the model's performance, we "reason" about these counterfactual instances by formulating an alternative to conventional empirical risk minimization, allowing the model to learn both from observational and counterfactual instances. This implicitly forces the VQA model to use both input modalities instead of relying on statistical regularities specific to either of them. Further, training a model to both learn to answer and "reason" about the intervention in questions and images, encourages generalization. In Fig. 1, our approach is summarized. + +By effectively "asking the algorithm" what would have happened, we aim to highlight the most interesting cases of disagreement between the counterfactuals and the training observations, while also demonstrating implicitly why the learned model is preferred. + +We describe extensive experiments on VQA-CP [6], VQA 2.0 [7] and Embodied QA [14] (where agent requires navigation to answer questions) and demonstrate the ability of our approach to improve generalization. Our contributions in this paper are: + +- We provide a counterfactual framework under which the interventions in the inputs, either the question or image, are anticipated. We show that a simple model of learning the distribution of an exogenous intervention variable of the observational data, and subsequently counterfactual samples generated from that variable improves generalization. We encourage the model to reason about "what the answer could be about a counterfactual image or question". +- We provide a theoretical analysis for the proposed approach to shed light on its underlying working mechanism. In addition, we show a lower bound on the likelihood of the counterfactuals based on the observations. +- Our extensive experiments show that our simple yet powerful approach is capable of improving the generalization ability of diverse multimodal and unimodal vision and language tasks. In VQA-CP we observe more than $2\%$ improvement over the baseline when using the full set and $7\%$ when using a fraction of the dataset. In Embodied QA, our approach improves the state-of-the-art by more than $2\%$ . + +# 2. Related Work + +Counterfactuals [12, 30] have gained recent interest in various areas in machine learning, in particular in applying insights from causal inference to augment the training as in + +![](images/cfbae1ab5587461dd738855a045a15212221b9d73701c7d3b7bb4d435062e85d.jpg) +Figure 1: The training process with counterfactuals. We infer the posterior on the exogenous variables. Subsequently generate counterfactual samples using that variable and evaluate its output. + +bandit settings [24, 2], reinforcement learning [10], recommendation [39] and explanation [19]. Adversarial learning [17] is a prime instance of use of counterfactuals in learning and was shown to improve performance (e.g. [42]). However, most of the state-of-the-art in this area focus on the analysis of the outcome of an intervention of sorts, i.e. change in the input or model. Our approach however, focuses on both proper generation of the counterfactuals from intervention and ensuring the outcome is adjusted in an alternative risk minimization. + +Data Augmentation lies at the heart of successful machine learning where substantial domain knowledge is leveraged to design suitable data transformations (e.g. rescaling, rotation, etc) leading to improved generalization. While learning these invariances, using for instance generative models, can potentially alleviate the problem, their use is nontrivial. + +Recently, MixUp [41] was proposed as a simple means for data augmentation and regularization which does not require significant domain knowledge. Similar to label smoothing, the supervision of every example is not overly dominated by the ground-truth label. Moreover, the augmented data is transformed from training instances to establish a linear relationship between data augmentation and the supervision signal. However, it requires sampling a mixing parameter that is not trivial to choose. Our approach on the other hand, learns to interpolate depending on the difficulty of producing its output for the model and the landscape in the feature space, hence harnessing the advantages of MixUp for sample generation. + +Biases in VQA datasets and models are major pitfalls in current models where superficial correlations between inputs from one modality and the answers are exploited by models [29, 18, 33]. Unfortunately, biased models that exploit statistical shortcuts from one modality usually reach impressive accuracy on most of the current benchmarks. VQA-CP [6] is a recent diagnostic datasets containing different answer distributions for each question-type leading to different distribution of train and test splits. Consequently, models biased towards one of the modality often fail at this benchmark. Human provided additional balancing data, for instance in the case of VQA v2 [18] has not resolved the issue. More elaborate models to avoid biases + +such as Grounded VQA [6] introduces additional submodules that are not trivial to be used with novel architectures. Similarly, [33] proposed a model-agnostic learning strategy to overcome language priors in VQA models by directly penalizing the input question-only bias. In [13], the authors cluster training questions using their prefix to prevent the model from relying on them as features. + +Our method is model-agnostic, easy to implement and does not need an elaborate parameter tuning or prior knowledge. In addition, our approach naturally leverages inherent dependencies to improve generalization and discourage simple exploitation of the biases by the model. Our counterfactual training approach discourages learning the biases by relying on the capacity to generate samples that can change the predictions. + +# 2.1. Visual Question Answering + +Visual Question Answering (VQA) is the task of answering previously unseen questions framed in natural language about a previously unseen image. For training, we are interested in learning a model from a training set made up of image $\mathbf{v}$ , question $\mathbf{q}$ and answer $a$ triplets $\mathcal{D} = \{\langle \pmb{q}_i, \pmb{v}_i, a_i \rangle\}_{i=1}^n$ . During test time, given an image and question, the trained model predicts the correct answer. The classical approach for VQA is to use an embedding of the questions $\mathbf{e}^q = f_q(\pmb{q})$ , an embedding of the image $\mathbf{e}^v = f_v(\pmb{v})$ and a fusion function of the two $\mathbf{z} = h(\mathbf{e}^q, \mathbf{e}^v)$ into what is known as the joint space. We denote by $\theta$ all of the parameters of the deep models used to learn these representations and generate answers. Using better embeddings yields better joint space representations and consequently more accurate answers. For brevity below we omit the parameters in the models, i.e., we use $p(a|q, \pmb{v})$ as a shorthand for $p(a|q, \pmb{v}, \pmb{\theta})$ . + +# 2.2. Counterfactuals + +In the following we provide a background on counterfactuals that will form the basis for the rest of this paper. Interested readers are referred to [30] for further details + +Definition 1 (Structural Causal Model (SCM)). A structural causal model $\mathcal{M}$ consists of a set of independent (exogenous) random variables $\mathbf{u} = \{\mathbf{u}_1, \dots, \mathbf{u}_n\}$ with distribution $P(\mathbf{u})$ , a set of functions $\mathbf{F} = \{f_1, \dots, f_n\}$ , and a set of variables $\mathbf{X} = \{X_1, \dots, X_n\}$ such that $X_i = f_i(\mathbf{PA}_i, \mathbf{u}_i), \forall i$ , where $\mathbf{PA}_i \subseteq \mathbf{X} \setminus X_i$ is the subset of $\mathbf{X}$ which are parents of $X_i$ . As a result, the prior distribution $P(\mathbf{u})$ and functions determine the distribution $P^{\mathcal{M}}$ . + +An SCM defines the data generating process and the distribution of the observations. Using this model, we can investigate the consequences of intervention. + +Definition 2 (Interventional Distribution). For an SCM $\mathcal{M}$ , an intervention $I = \mathrm{do}\big(X_{i} \coloneqq \tilde{f}_{i}(\mathbf{P}\bar{\mathbf{A}}_{i},\mathbf{u}_{i})\big)$ corresponds + +to replacing the structural mechanism $f_{i}(\mathbf{PA}_{i},\mathbf{u}_{i})$ with $\tilde{f}_i(\tilde{\mathbf{A}}_i,\mathbf{u}_i)$ . We can simply write $\mathrm{do}(X_i = x)$ to denote the intervention. The resulting SCM is denoted $\mathcal{M}^I$ , and the resulting interventional distribution is denoted $P^{\mathcal{M};I}$ . + +We can also define the counterfactual distribution which tells us what might have happened had we acted differently. + +Definition 3 (Counterfactual Distribution). Given an SCM $\mathcal{M}$ and an observed assignment $\mathbf{X} = \mathbf{x}$ over any set of observed variables, the counterfactual distribution $P^{\mathcal{M}|\mathbf{X} = \mathbf{x};I}$ corresponds to the distribution entailed by the SCM $\mathcal{M}^I$ using the posterior distribution $P(\mathbf{u}|\mathbf{X} = \mathbf{x})$ . + +For an SCM $\mathcal{M}$ , the counterfactual distribution can be estimated by first inferring the posterior over exogenous variables and then passing that distribution through the modified structural model $\mathcal{M}^I$ to obtain a counterfactual distribution over other variables1. + +# 3. Counterfactual Vision and Language (CVL) + +Our intuition is that the functions that extract the features in a VQA system, either from the image or the question, are prone to focusing on spurious correlations in the data, which diverts them from modeling the deeper relations that generalize better. Hence, we encourage the learning algorithm to consider counterfactuals-a set of imaginary alternative samples. Training a model to both learn to answer, and "reason" about the intervention in the questions and images allows better generalization. To that end, we construct the SCM as shown in Fig. 2 where the functions for learning the embeddings are conditioned on the exogenous variables. + +As is the convention for intervention in counterfactual reasoning, we are interested in replacing the embedding functions by their corresponding counterfactuals, that is, $f_{v}$ is replaced by $\tilde{f}_{v}(\mathbf{v},\mathbf{u}^{v})$ or $f_{q}$ by $\tilde{f}_{q}(\mathbf{q},\mathbf{u}^{q})$ where $\mathbf{u}^v$ and $\mathbf{u}^q$ are exogenous variables for image (vision module) and question (language module), respectively. Note that $\tilde{f}_{v}(\cdot ,\cdot)$ and $\tilde{f}_q(\cdot ,\cdot)$ are the functions of the exogenous variables for a given image and question pair. Effectively our approach reasons about the interventions in the embedding extractions. We use $\mathbf{u} = [\mathbf{u}^v,\mathbf{u}^q]$ to denote both of the exogenous variables. We denote by $\tilde{\pmb{q}}$ and $\tilde{\pmb{v}}$ the variables obtained after the intervention and $\tilde{\mathrm{e}}^q$ and $\tilde{\mathrm{e}}^v$ as their corresponding embeddings. This intuitively allows our model to answer image-based questions it has never observed. We are generally interested in the following objectives: (1) the joint space of the question-image embedding must lead to a low-error rate on the factual data; (2) the conditional distribution of the factual and counterfactual data considering the exogenous distribution must be similar; (3) the distribution of the exogenous variables must be obtained from the observations; and (4) the embedding has to yield small error on + +![](images/9e22644d3558078f73bd420a5f2d0f2d17b857ac7e47b83a80941cefc002d253.jpg) +(a) VQA model + +![](images/0fac5af39e27aa6cd55b032e01a38db93c68724e73b20716e4c9ccaa334334fc.jpg) +(b) Our SCM + +![](images/6665de32da3e4d6660b7cd03a6b429f51f27405b4dca0930611c6b05aa7d3e11.jpg) +(c) Our SCM with Intervention + +![](images/d81a14d72400acb5a8cce9df4f825d09af81cb61516ab81b270934d2f9b8b6cf.jpg) +Figure 2: The difference between a typical VQA graphical model (in Fig. 2a), our corresponding causal model (in Fig. 2b) and an example of intervention in the question representation of this model (in Fig. 2c). In our model two exogenous variables $\mathbf{u}^q$ and $\mathbf{u}^v$ are incorporated to learn and reason about the intervention caused by these variables. +Figure 3: Counterfactual examples that can be generated for a given image. The fusion function $h$ is used with the observational data as well as the counterfactual data to predict the answer. For the counterfactual loss, we need to consider the relationship between the predicted counterfactual answer and its observational counterpart. + +the unobserved counterfactual distribution (obtained from the intervention in the structural model). + +The first objective is the same as any other vision and language task. The second is a necessary constraint to ensure using a model from the observations we can predict answers for counterfactuals. The third objective ensures the possible intervention distribution from the exogenous variable is learned as part of the model. Lastly, our approach should be able to reason about the answer to the counterfactual instances (see Fig. 3 for an example). As such, we devise the following steps through which our model is trained and the distribution of the exogenous variable is found: + +1. Infer the predictive model for the observed data using one step of the conventional risk minimization. +2. Perform intervention $I$ on $\mathcal{M}$ . This yields $\mathcal{M}^I$ , which entails the counterfactual distribution $p^{\mathrm{do}(I)|\tilde{q},\tilde{v}}$ . +3. Reason about the effect of that intervention on the answer and the loss that incurs. + +Intuitively, first we learn what distribution of the exogenous variable is obtained from the observations, then model how the answer is affected by the intervention on this variable. + +# 4. Counterfactual Distribution + +The counterfactual distribution is the posterior of the exogenous variables obtained from the observations. Hence, using the training data we are interested in + +$$ +p (\mathbf {u} | \mathcal {D}) \propto p (\mathbf {u}) \prod_ {i = 1} ^ {n} p \left(a _ {i} \mid \boldsymbol {q} _ {i}, \boldsymbol {v} _ {i}\right) p \left(\boldsymbol {v} _ {i} \mid \mathbf {u} ^ {v}\right) p \left(\boldsymbol {q} _ {i} \mid \mathbf {u} ^ {q}\right). \tag {1} +$$ + +We use independent priors, i.e. $p(\mathbf{u}) = p(\mathbf{u}^q)p(\mathbf{u}^v)$ with Beta distributions for $\mathbf{u}^v$ and $\mathbf{u}^q$ (i.e. $\mathbf{u}^v\sim \mathrm{Beta}(\alpha_0,\beta_0)$ ). Although we could estimate $p(\boldsymbol {v}_i|\mathbf{u}^v)$ and $p(\boldsymbol {q}_i|\mathbf{u}^q)$ using various methods (including autoencoders [27, 1] and GANs [16, 4, 3]), we use a simple approach to model the question or image's conditional likelihood. To obtain the posterior, considering the generating process of $\boldsymbol {q}_i$ and $\boldsymbol {v}_i$ for a given sample of the variable $\mathbf{u}^q$ , $\mathbf{u}^v$ and an arbitrary constant $0\leq \epsilon < 1$ , we have + +$$ +\boldsymbol {q} \sim p (\boldsymbol {q} | \mathbf {u} ^ {q}) = \left\{ \begin{array}{l l} \boldsymbol {q} & \mathbf {u} ^ {q} \geq 1 - \epsilon \\ \mathbf {u} ^ {q} \boldsymbol {q} \oplus (1 - \mathbf {u} ^ {q}) \boldsymbol {q} ^ {\prime}, & \text {o t h e r w i s e} \end{array} , \quad \text {a n d} \right. +$$ + +$$ +\boldsymbol {v} \sim p \left(\boldsymbol {v} _ {i} \mid \mathbf {u} ^ {v}\right) = \left\{ \begin{array}{l l} \boldsymbol {v} & \mathbf {u} ^ {v} \geq 1 - \epsilon \\ \mathbf {u} ^ {v} \boldsymbol {v} \oplus (1 - \mathbf {u} ^ {v}) \boldsymbol {v} ^ {\prime}, & \text {o t h e r w i s e} \end{array} \right. \tag {2} +$$ + +where $\pmb{q}^{\prime}$ and $\pmb{v}^{\prime}$ are uniformly sampled at random from the dataset and $\oplus$ denotes an interpolation. It is easy to see that for $\epsilon \rightarrow 0$ we have more interpolated samples and for $\epsilon \rightarrow 1$ , we obtain samples that are independent of the prior. An advantage of this approach of sampling the observations is that we effectively reduce the conditional independence assumption of the training data allowing for the relation between observations to be established. + +Since we use all conjugate priors, the posterior is also a Beta distribution with parameters $\alpha, \beta$ where $\alpha = \alpha_0 + \sum \mathbb{I}[a_i = \arg \max p(a_i | \boldsymbol{q}_i, \boldsymbol{v}_i)]$ and $\beta = \beta_0 + \sum \mathbb{I}[a_i \neq \arg \max p(a_i | \boldsymbol{q}_i, \boldsymbol{v}_i)]$ . Intuitively, samples from the regions of the prior that produce the correct answers are "successful" and encourage the posterior to concentrate. Notice that the samples from the posterior are drawn from the regions where the likelihood of the correct answer is higher (since the expectation of the posterior is $\alpha / (\alpha + \beta)$ ). + +# 4.1. Generating Counterfactuals + +Once the posterior on the exogenous variables $p(\mathbf{u}|\mathcal{D})$ is obtained, we perform the intervention. That is, we generate the counterfactuals and replace the $\boldsymbol{v}$ (or $\boldsymbol{q}$ ) with its alternative $\tilde{\boldsymbol{v}}$ (or $\tilde{\boldsymbol{q}}$ ) and anticipate the answer. This corresponds to replacing the function $f_{v}(\cdot,\cdot)$ (or $f_{q}(\cdot,\cdot)$ ) with an alternative $\tilde{f}_{v}(\cdot,\cdot)$ (or $\tilde{f}_{q}(\cdot,\cdot)$ ) which leads to a different answer prediction. + +In obtaining the counterfactual samples we are interested in the minimum interventions that will change the answer for a given question-image pair $(\boldsymbol{q},\boldsymbol{v})$ to $(\tilde{\boldsymbol{q}},\tilde{\boldsymbol{v}})$ when using the generating process in Eq. 2. This corresponds to a sample from the posterior of the exogenous variable with high likelihood (minimum intervention) that will alter the answer for $(\boldsymbol{q},\boldsymbol{v})$ to an incorrect one. As such, we formalize the problem as: + +$\max_{\mathbf{u}} \quad \log(p^{\mathrm{do}(I)|\mathbf{q},\mathbf{v}}(\tilde{\mathbf{q}},\tilde{\mathbf{v}}|\mathbf{u}))$ + +s.t. $\tilde{a} = \operatorname{argmax}_{a'} p^{\mathrm{do}(I)|\boldsymbol{q},\boldsymbol{v}}(a'|\tilde{\boldsymbol{q}},\tilde{\boldsymbol{v}}), \forall \tilde{a} \neq a$ + +$$ +0 \leq \mathbf {u} < 1 +$$ + +Considering the generative process in Eq. 2, the minimum intervention (the minimum edit of the factual [32, 19]) is achieved when $\mathbf{u}$ is largest. Since the constraint is not computationally feasible, we relax the objective and choose the variable that has the minimum likelihood of having the same answer as the observations. Thus, we choose $\mathbf{u}$ from the relaxed alternative (we project $\mathbf{u}$ to be bounded in $[0,1)$ ) + +$$ +\max _ {\mathbf {u}} \left\| \mathbf {u} \right\| ^ {2} - \lambda \log \left(p ^ {\operatorname {d o} (I) | \boldsymbol {q}, \boldsymbol {v}} \left(a | \tilde {\boldsymbol {q}}, \tilde {\boldsymbol {v}}\right)\right) \tag {3} +$$ + +where $\lambda$ is a hyper-parameter. We note that simply sampling from the posterior $p(\mathbf{u}|\mathcal{D})$ and generating $\mathbf{v}$ (or $\mathbf{q}$ ) to infer the answer, is not the counterfactual (alternating between sampling the variable $\mathbf{u}$ and learning parameter $\theta$ resembles conventional Gibbs sampling). Hence, this step is critical to obtain instances that are not merely from the learned distribution, yet very likely. Consequently, enabling our approach to generalize better beyond observations. + +# 4.2. Counterfactual Loss + +We alternate between intervening in the inputs, and minimizing the risk on the corresponding counterfactual along with the observations. As is common practice in empirical risk minimization (ERM), the objective in using observational training instances is minimizing $\mathbb{E}_{\pmb {q},\pmb{v}}\mathbb{E}_{p(a|\pmb {q},\pmb {v})}[\ell (f_{\pmb{\theta}}(\pmb {q},\pmb {v}),a)]$ where $\ell (f_{\pmb{\theta}}(\pmb {q},\pmb {v}))$ is the loss of the function predicting the answer. Note that in practice $f_{\theta}$ and $p(a|q,v,\theta)$ may be the same function or share architecture (e.g. $p(a|q,v,\theta) = \mathrm{softmax}(f_{\theta}(\pmb {q},\pmb {v})))$ . In the case of using counterfactuals, we can rewrite the risk by changing the distribution [12]: + +$$ +\begin{array}{l} R (\boldsymbol {\theta}) = \mathbb {E} _ {\boldsymbol {q}, \boldsymbol {v}} \mathbb {E} _ {p (a | \boldsymbol {q}, \boldsymbol {v})} [ \ell (f _ {\boldsymbol {\theta}} (\boldsymbol {q}, \boldsymbol {v}), a) ] \\ = \mathbb {E} _ {\pmb {q}, \pmb {v}} \mathbb {E} _ {p ^ {\mathrm {d o} (I) | \pmb {q}, \pmb {v}} (a | \tilde {\pmb {q}}, \tilde {\pmb {v}})} \left[ \ell (f _ {\pmb {\theta}} (\pmb {q}, \pmb {v}), a) \frac {p (a | \pmb {q} , \pmb {v} , \pmb {\theta})}{p ^ {\mathrm {d o} (I) | \pmb {q} , \pmb {v}} (a | \tilde {\pmb {q}} , \tilde {\pmb {v}} , \pmb {\theta})} \right] \\ \end{array} +$$ + +Note that $p^{\mathrm{do}(I)|\boldsymbol{q}, \boldsymbol{v}}(a|\tilde{\boldsymbol{q}}, \tilde{\boldsymbol{v}}, \boldsymbol{\theta})$ has part of SCM altered. Intuitively, the counterfactuals that have smaller scores are more penalized and conversely the over-confident ones are discouraged. This subsequently adjusts the decision boundary to be discriminative for both observations and counterfactuals. Furthermore, since this risk can have a very high variance we can clip this value similar to [12], + +$$ +\begin{array}{l} R ^ {M} (\boldsymbol {\theta}) = \mathbb {E} _ {\boldsymbol {q}, \boldsymbol {v}} \mathbb {E} _ {\bar {p} ^ {u} (a | \boldsymbol {q}, \boldsymbol {v})} \left[ \ell (f _ {\boldsymbol {\theta}} (\boldsymbol {q}, \boldsymbol {v}), a) \right. \\ \times \operatorname * {m i n} \left\{M, \frac {p (a | \pmb {q} , \pmb {v} , \pmb {\theta})}{p ^ {\mathrm {d o} (I) | \pmb {q} , \pmb {v}} (a | \tilde {\pmb {q}}, \tilde {\pmb {v}}, \pmb {\theta})} \right\} \\ \end{array} +$$ + +This is because we may have very low probability in predicting an output of an intervened observation. Thus, the empirical counterfactual risk is, + +$$ +\hat {R} ^ {M} (\boldsymbol {\theta}) = \frac {1}{n} \sum_ {i = 1} ^ {n} \ell \left(f _ {\boldsymbol {\theta}} \left(\boldsymbol {q} _ {i}, \boldsymbol {v} _ {i}\right), a _ {i}\right) \times \omega_ {i} (\boldsymbol {\theta}) \tag {4} +$$ + +$$ +\text {w h e r e} \quad \omega_ {i} (\boldsymbol {\theta}) = \min \left\{M, \frac {p (a _ {i} | \boldsymbol {q} _ {i} , \boldsymbol {v} _ {i} , \boldsymbol {\theta})}{p ^ {\mathrm {d o} (I) | \boldsymbol {q} , \boldsymbol {v}} (a | \tilde {\boldsymbol {q}}, \tilde {\boldsymbol {v}}, \boldsymbol {\theta})} \right\}. +$$ + +Here, $\omega_{i}(\theta)$ is the clipped ratio of evaluation of the factual sample $i$ and its corresponding counterfactual. We intentionally use a shorthand to underscore The fact that the parameters are optimized with respect to $\theta$ in $p$ . The objective of the counterfactual risk minimization for vision and language tasks is therefore + +$$ +\hat {R} ^ {M ^ {*}} = \arg \min _ {\boldsymbol {\theta}} \hat {R} ^ {M} (\boldsymbol {\theta}) +$$ + +In practice, we alternate between the conventional ERM (i.e. when $\omega (\pmb {\theta}) = 1$ ) and the counterfactual risk. + +# 4.3. Further Analysis + +When we generate samples in Eq. 2, $q'$ is likely to have a different answer to $q$ (with probability $\left(1 - \frac{n_a}{n}\right)$ for $n_a$ denoting the number of instances with answer $a$ ). As such, interpolating between the questions and images will lead to samples for which the answer is uncertain. In the case of the generated counterfactuals, however, such interpolations are in fact close to the decision boundary. Hence, when weighted by the confidence of the classifier in Eq. 4, the connection between samples in the fusion space (i.e. the common semantic space) is adjusted to account for the sensitivity of the representations to changes in the input. + +Furthermore, one main question is how do we know that the interventions won't lead to divergence, or learning useless models. We can derive the bound on the risk using the following theorem: + +Theorem 4. Denote $u^{i}(\pmb{\theta}) \equiv \ell(f_{\pmb{\theta}}(\pmb{q}_{i},\pmb{v}_{i}),a_{i})\omega_{i}(\pmb{\theta})$ , $\overline{u} \equiv \sum_{i=1}^{n} u^{i}(\pmb{\theta}) / n$ , $\hat{\mathbb{V}}(u) \equiv \sum_{i=1}^{n} \left( u^{i}(\pmb{\theta}) - \overline{u} \right)^{2} / (n-1)$ and $\mathcal{Q}_{\gamma} \equiv \log(10 \cdot \epsilon / \gamma)$ for $0 < \gamma < 1$ and $\epsilon$ the $\epsilon$ -cover for the function class that predicts the answer. With probability at least $1 - \gamma$ for $n \geq 16$ we have + +$$ +R (\pmb {\theta}) \leq \hat {R} ^ {M} (\pmb {\theta}) + \sqrt {1 8 \hat {\mathbb {V}} (u) \mathcal {Q} _ {\gamma} / n} + 1 5 M \mathcal {Q} _ {\gamma} / (n - 1) +$$ + +Proof. See the supplementary material. + +![](images/6a8f648023c5aef221353f0ba98c3072c06904f3b8bb8fce1842c13b61e7629c.jpg) + +This result implies that when we have the counterfactual risk minimized, we achieve the minimum variance. + +We note that we can compute the density of the counterfactuals based on the observations, i.e. + +$$ +p ^ {\mathrm {d o} (I)} (\tilde {\boldsymbol {q}}, \tilde {\boldsymbol {v}}) = \mathbb {E} _ {(\boldsymbol {q}, \boldsymbol {v}) \sim p (\boldsymbol {q}, \boldsymbol {v})} \left[ p ^ {\mathrm {d o} (I) | \boldsymbol {q}, \boldsymbol {v}} (\tilde {\boldsymbol {q}}, \tilde {\boldsymbol {v}}) \right] \tag {5} +$$ + +This result shows that the density of intervened variables $(\tilde{\pmb{q}},\tilde{\pmb{v}})$ is the marginal of the observations. Hence, the factual, counterfactual and exogenous variables are connected with the following lemma: + +Lemma 5. We have the following lower bound on the log-density of the counterfactuals: + +$$ +\begin{array}{l} \log \left(p ^ {d o (I)} \left(a, \tilde {\boldsymbol {q}}, \tilde {\boldsymbol {v}}\right)\right) \geq \mathbb {E} _ {\left(\boldsymbol {q}, \boldsymbol {v}\right) \sim p (\boldsymbol {q}, \boldsymbol {v})} \left[ \log \left(p ^ {\mathrm {d o} (I) | \boldsymbol {q}, \boldsymbol {v}} \left(a | \tilde {\boldsymbol {q}}, \tilde {\boldsymbol {v}}\right)\right) \right] \\ + \mathbb {E} _ {\mathbf {u} \sim p (\mathbf {u})} \left[ \log (p ^ {\mathrm {d o} (I)} (\tilde {\boldsymbol {q}}, \tilde {\boldsymbol {v}} | \mathbf {u})) \right]. \\ \end{array} +$$ + +Proof. See the supplementary material. + +![](images/eb070db4d19641c215654d064a6355013e52672be45136ec95cc75a276486849.jpg) + +In fact we can show that even if $\mathbf{u}$ is not drawn from the true generating prior, we can use an arbitrary distribution $q$ and obtain an alternative lower bound to that of Lemma 5: + +$$ +\begin{array}{l} \log \left(p ^ {\operatorname {d o} (I)} \left(a, \tilde {\boldsymbol {q}}, \tilde {\boldsymbol {v}}\right)\right) \geq \mathbb {E} _ {\left(\boldsymbol {q}, \boldsymbol {v}\right) \sim p (\boldsymbol {q}, \boldsymbol {v})} \left[ \log \left(p ^ {\operatorname {d o} (I) | \boldsymbol {q}, \boldsymbol {v}} \left(a | \tilde {\boldsymbol {q}}, \tilde {\boldsymbol {v}}\right)\right) \right] \\ + \mathbb {E} _ {q} \left[ \log \left(p ^ {\mathrm {d o} (I)} \left(\tilde {\boldsymbol {q}}, \tilde {\boldsymbol {v}} | \mathbf {u}\right)\right) \right] \tag {6} \\ + H (q) - H _ {q} (p). \\ \end{array} +$$ + +Effectively using Lemma 5, we know even if the distribution of the exogenous variable for generating the counterfactuals deviates from the true posterior obtained from observations, we can lower-bound the marginal of the counterfactuals which depends on the likelihood of predicting the correct answer, the difference of entropy of the true prior versus the one used and the likelihood of the counterfactual examples. + +# 5. Experiments + +To evaluate the performance of our approach, we construct experiments on various datasets. We note that our approach is agnostic to the base model used and as such is widely applicable to a wide range of applications. To optimize the objective in Eq. (3), we use a simple gradient ascent where we set the learning rate to a constant. We use prior for the exogenous variable as $\mathrm{Beta}(0.1, 0.1)$ for the experiments unless otherwise stated. We alternate between the observational training and the counterfactuals. + +# 5.1. Unimodal Problems + +The motivation of our approach is multimodal problems, but it is equally effective for problems involving only a single modality. In this case the description of the process + +
LSTMTLSTM+PT+PLSTM+CT+C
Random84.482.084.5385.2185.6185.56
GloVe84.986.485.7787.187.2488.4
+ +Table 1: Accuracy (%) obtained by the testing methods using LSTM (with randomly initialized, trainable embeddings). Best results highlighted in Bold. T abbreviates TreeLSTM [40]; +P and +C indicate posterior and Counterfactuals respectively. + +stands, with the exception that either $\mathbf{u}^v$ or $\mathbf{u}^q$ is inferred and used for counterfactual generation. + +Stanford Sentiment Treebank (SST) [38] is a natural language dataset of movie reviews (neutrals are removed in our experiments). This dataset contains 11855 instances with vocabulary size of 17836 and 5 classes. We follow the implementation of [40] where a tree structured LSTM is used with this dataset. We use two alternative baselines for embedding words to be used when sampling in Eq. (2): random embedding and trainable GloVe [31] initialized word embeddings. We report mean scores over 5 runs and use 10 epochs for training. Here we examine how the change in the embedding representation effects the performance of the model. Since we don't have the image input, we only infer $\mathbf{u}^q$ with prior $\mathrm{Beta}(0.1,0.1)$ and the counterfactual learning rate is set to 0.01. As shown in Table 1 using either the posterior (+P models) or the optimized exogenous variable (+C) from Eq. (3) improves algorithm accuracy. As expected, when pretrained models are tuned, the overall performance is better. + +We further evaluate the generalization performance of our approach when only the visual data is available on the CIFAR-10 and CIFAR-100 image classification datasets. In particular, we compare the baseline architectures for: VGG-19 [35], ResNet-18 [21], ResNet-101 [20], and DenseNet [22]. All models are trained for 100 epochs on the training set with 128 examples per minibatch and learning rate 0.1, using SGD and evaluated on the test set. The learning rate is then reduced to 0.001 for an additional 150 epochs. We use the interpolations in the input images for Eq. (2). In the experiments we have not observed any noticeable + +![](images/5331f200145ff7f1782b4236dd185fbe579a25d2bc1d9dd9ef45e19b893bfbbe.jpg) +(a) Values of $\mathbf{u}^v$ in Training + +![](images/610f1940da61104ae2445a7f11df9bd4e8e4b16519fcdbde1fcf46406a33177f.jpg) +(b) Variance of Loss +Figure 4: Training metrics in CIFAR experiments. + +difference (see the supplementary material for additional results). We set the prior of $\mathbf{u}^v$ to $\mathrm{Beta}(0.1, 0.1)$ and run the counterfactual optimizer for 10 iterations. + +We summarize our results in Table 2. In both CIFAR-10 and CIFAR-100 classification problems, the models trained + +
DatasetModelBaselineOurs+POurs+C
CIFAR-10VGG-1995.0495.9296.73
ResNet-1893.0294.294.91
ResNet-10193.7594.195.34
DenseNet-12195.0495.9296.73
CIFAR-100VGG-1972.2373.4574.8
ResNet-1875.6176.577.75
ResNet-10177.7878.980.0
DenseNet-12177.0179.6779.67
+ +Table 2: Test errors for the CIFAR experiments. + +
ModelOverallYes/NoNumberOther
Question-Only [6]15.9535.0911.637.11
RAMEN [34]39.21---
BAN [26]39.31---
MuRel [11]39.5442.8513.1745.04
UpDn [8]39.7442.2711.9346.05
UpDn+Q-Adv+DoE [33]41.1765.4915.4835.48
UpDn+C Images41.0144.6112.3846.11
UpDn+C Questions40.6242.3314.1748.32
UpDn+C (Q+I)42.1245.7212.4548.34
+ +using our approach consistently improve on the baselines by a margin. As seen in Fig. 4, the variance is also reduced during training which, as discussed in Theorem 4, is an indication of the convergence of counterfactual training. As observed, the values of $\mathbf{u}^v$ decreases over time to find the samples that are harder to predict. Our experiments thus indicate that our approach provides improvements to even unimodal problems. + +# 5.2. Multimodal Problems + +Visual Question Answering is used to evaluate our model with two datasets: VQA-CP [6] and VQA v2 [18]. VQACP is specifically designed to measure the generalization ability of VQA models. Since our model learns how the data is generated, we expect it to be particularly robust towards bias. We follow the same training and evaluation protocol as [8] (see the supplementary material for implementation details). For each model, we report the standard VQA accuracy metric [7]. In this experiment, we interpolate the word/visual embeddings rather than actual inputs to generate counterfactuals. + +In Table 3, we compare our approach consisting of our baseline architecture trained with additional counterfactual training on VQA-CP against the state-of-the-art. To be fair, we only report approaches that use the visual features from [8]. Our approach improves the baseline more than 2 percentage point beyond $\mathrm{UpDn + Q - Adv + DoE}$ which regularizes the model for better performance. In addition, our approach gains most from the "other" category that encom + +pass the most valuable improvement indicating better reasoning about the answers. We should note that since our approach is architecture agnostic, we expect more against better baselines. + +Ablation Study on Modality Intervention: In Table 3, we perform an ablation study of learning to intervene in multimodal problems by only either inferring $\mathbf{u}^q$ (i.e. intervention in the question) or $\mathbf{u}^v$ (intervention in the images). Even though intervening in both $\mathbf{u}^q$ , $\mathbf{u}^v$ improves performance, counterfactual questions lead to better "number" results indicating strong bias in the baseline for questions with number answers. + +Smaller Training Sets: As shown in Fig. 6, when the number of training instances is smaller our approach achieves significantly better performance compared to the baseline. This is due to our approach being able to exploit the alternative instances with counterfactuals. + +Impact on VQA v2: We use the standard VQA v2 dataset [18] by following the implementation in [37, 36]. Since by exploiting statistical regularities in this dataset it is easier to achieve better performance, large gains are not expected. As shown in this section, counterfactual samples improve the accuracy in VQA-CP, while marginally improving in VQA v2 compared to its baseline. It is interesting to note that in ad + +![](images/ca0ddb9e49af30c4a80f7ac2f3305af471d28cc1d3e89e04c7de924bea53a0e7.jpg) +Figure 6: The performance of our approach vs. the baseline using fraction of the training data. + +versarial training in $\mathrm{UpDn + Q - Adv + DoE}$ , the performance drops in VQA v2 indicating the same phenomenon. + +In Fig. 5 we show samples of the counterfactuals for the given question-image pairs from the test set. These samples are generated by following Eq. (2) (i.e. randomly sampling another question-image pair and interpolating the embeddings using + +Table 3: State-of-the-art results on VQA-CP test. $\mathbf{UpDn} + \mathbf{C}$ indicates our approach based on UpDn baseline. $(\mathbf{Q} + \mathbf{I})$ denotes both question and images are intervened. + +
ModelOverall
Question-Only [6]25.98
BAN [26]69.08
MuRel [11]65.14
UpDn [8]63.48
UpDn+Q-Adv+DoE [33]62.75
Pythia [37]68.49
Pythia+C68.77
+ +Table 4: Performance of our approach on VQA v2 validation. Pythia+C is our counterfactual implementation of [37]. + +the samples from the posterior) and subsequently finding the closest instances (either question or image with smallest Euclidean distance in the embedding space) in the test + +
Question ImageCounterfactual QuestionsCounterfactual Images
Is this in Australia?1. Is the grass green? +2. Is there grass on the ground? +3. Are they standing on a green grass field? +4. Is the stop light green?
What color is the person's helmet?1. What color jacket is the girl wearing? +2. What color jacket is the person wearing? +3. What color is the jacket? +4. What color is the woman's jacket?
Where did the shadow on the car come from?1. What kind of dog is this? +2. What type of dog is this? +3. What kind of dog is shown? +4. What is the breed of dog?
+ +Figure 5: Given the image-question pair in the first column, the closest instances of the questions (in second column) and images (in the third column) are found from the VQA v2 test dataset corresponding to the generated counterfactuals (using the exogenous variables). + +set. As observed, some of the questions are reasonable alternatives to the ones asked and conversely, the given question can be asked of the counterfactual images showing that our approach successfully generates alternatives. + +Embodied Question Answering (EQA) [14] is proposed as a novel variant of VQA where an agent is spawned at a random location in a 3D environment and asked a question for which the answer requires exploration in the environment. We closely follow the instructions of [14] for the experimental setup. Similar to VQA, the agent is tasked with utilizing both vision (i.e. the input ego-centric RGB image from the robot's camera) and language (i.e. the given instructions) to answer questions. However, a distinct feature of this task is, unlike VQA, the final answer is produced after the agent takes a finite number of intermediate actions (i.e. navigation by choosing the action right, left, straight, stop at each step for which we use a 2-layer GRU to predict). During training, each batch contains a random environment, a question in that environment and its corresponding answer along with the path to reach the corresponding location in the target room. + +In our approach, we intervene in both the image and question embeddings using a randomly sampled environment and question to generate counterfactual instances in Eq. (2). We set the prior for the exogenous variables $\mathbf{u}^q$ and $\mathbf{u}^v$ to Beta(0.75, 0.75). We trained the model based on shortest path trajectories to target objects inside 640 houses (total 6,912 questions) for 30 epochs and then evaluated it on 57 unseen environments during the inference. In particular we consider three cases which correspond to being 10, 30 and 50 steps away from the target room, with the distance corresponding to 0.94, 5.47 and 10.99 respectively. In this experiment we measure the number of correct intermediate steps that the agent correctly takes to increase its proximity to the room with the answer. The results are shown in Table 5. As is shown, our approach of allowing the agent to contemplate counterfactual questions and images enables the robot to travel closer to the target room and improves + +
ModeldTLower is betterdΔHigher is better
T-10T-30T-50T-10T-30T-50
PACMAN [14]1.394.989.33-0.450.491.66
GRU [14]0.743.998.740.201.482.26
GRU+C0.673.908.470.261.572.52
+ +Table 5: Evaluation metrics for EQA navigation. Spawning the agent 10, 30, or 50 steps away from the target location, $d_0$ shows the distance between these initial locations and the target location, while $d_T$ reveals the distance of the final locations and the target ones by starting from these initial location and using the model for the maximum of 100 steps. Finally, $d_{\Delta} = d_T - d_0$ measures the overall progress of the agent towards the target. GRU+C is ours. + +generalization. This further illustrates our approach's success in improving generalization in various tasks and input-output alternatives. Note that in this task the output is a sequence of actions to be predicted (before the answer). + +# 6. Conclusion + +The tendency to focus on spurious correlations in the training data is one of the key factors limiting the practical application of modern machine learning methods. We have shown that this failure to generalize can, in part, be tackled by generating a set of counterfactual examples to augment the training data. This is motivated by the success that the counterfactual approach has had in causal reasoning. We have demonstrated the effectiveness and generality of the proposed approach on a wide variety of problems including multimodal vision-and-language tasks. An additional advantage of the method is that the sample generation strategy relieves the conditional independence assumption of the training data, which is too strong for most real datasets. + +Acknowledgement: This work is partly supported by DP160100703. + +# References + +[1] Ehsan Abbasnejad, Anthony R. Dick, and Anton van den Hengel. Infinite variational autoencoder for semi-supervised learning. In CVPR, pages 781-790. IEEE Computer Society, 2017. +[2] Ehsan Abbasnejad, Justin Domke, and Scott Sanner. Loss-calibrated monte carlo action selection. In Twenty-Ninth AAAI Conference on Artificial Intelligence, 2015. +[3] Ehsan Abbasnejad, Javen Shi, and Anton van den Hengel. Deep lipschitz networks and dudley gans. 2018. +[4] Ehsan Abbasnejad, Qinfeng Shi, Anton van den Hengel, and Lingqiao Liu. A generative adversarial density estimator. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[5] Ehsan Abbasnejad, Qi Wu, Qinfeng Shi, and Anton van den Hengel. What's to know? uncertainty as a guide to asking goal-oriented questions. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[6] Aishwarya Agrawal, Dhruv Batra, Devi Parikh, and Aniruddha Kembhavi. Don't just assume; look and answer: Overcoming priors for visual question answering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. +[7] Aishwarya Agrawal, Jiasen Lu, Stanislaw Antol, Margaret Mitchell, C. Lawrence Zitnick, Devi Parikh, and Dhruv Batra. VQA: visual question answering. Int. J. Comput. Vis., 123(1):4-31, 2017. +[8] Peter Anderson, Xiaodong He, Chris Buehler, Damien Teney, Mark Johnson, Stephen Gould, and Lei Zhang. Bottom-up and top-down attention for image captioning and visual question answering. In CVPR, 2018. +[9] Peter Auer, Nicolo Cesa-Bianchi, Yoav Freund, and Robert E Schapire. The nonstochastic multiarmed bandit problem. SIAM journal on computing, 32(1):48-77, 2002. +[10] Lars Buesing, Theophane Weber, Yori Zwols, Nicolas Heess, Sebastien Racaniere, Arthur Guez, and Jean-Baptiste Lespiau. Woulda, coulda, shoulda: Counterfactually-guided policy search. In International Conference on Learning Representations, 2019. +[11] Remi Cadene, Hedi Ben-Younes, Nicolas Thome, and Matthieu Cord. Murel: Multimodal Relational Reasoning for Visual Question Answering. In IEEE Conference on Computer Vision and Pattern Recognition CVPR, 2019. + +[12] Denis Charles, Max Chickering, and Patrice Simard. Counterfactual reasoning and learning systems: The example of computational advertising. Journal of Machine Learning Research, 14:3207-3260, November 2013. +[13] Anton van den Hengel Damien Teney, Ehsan Abbasnejad. Unshuffling data for improved generalization. arXiv preprint arXiv:2002.11894, 2020. +[14] Abhishek Das, Samyak Datta, Georgia Gkioxari, Stefan Lee, Devi Parikh, and Dhruv Batra. Embodied Question Answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. +[15] Abhishek Das, Satwik Kottur, Khushi Gupta, Avi Singh, Deshraj Yadav, José M.F. Moura, Devi Parikh, and Dhruv Batra. Visual Dialog. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. +[16] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger, editors, Advances in Neural Information Processing Systems 27, pages 2672-2680. Curran Associates, Inc., 2014. +[17] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR 2015: International Conference on Learning Representations 2015, 2015. +[18] Yash Goyal, Tejas Khot, Aishwarya Agrawal, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Making the v in vqa matter: Elevating the role of image understanding in visual question answering. Int. J. Comput. Vision, 127(4):398-414, April 2019. +[19] Yash Goyal, Ziyan Wu, Jan Ernst, Dhruv Batra, Devi Parikh, and Stefan Lee. Counterfactual visual explanations. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 2376-2384, Long Beach, California, USA, 09-15 Jun 2019. PMLR. +[20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Computer Vision and Pattern Recognition, 2016. +[21] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, 2016. + +[22] Gao Huang, Zhuang Liu, Kilian Q Weinberger, and Laurens van der Maaten. Densely connected convolutional networks. In Computer Vision and Pattern Recognition, 2017. +[23] Drew A Hudson and Christopher D Manning. Gqa: A new dataset for real-world visual reasoning and compositional question answering. Conference on Computer Vision and Pattern Recognition (CVPR), 2019. +[24] Fredrik Johansson, Uri Shalit, and David Sontag. Learning representations for counterfactual inference. In International conference on machine learning, pages 3020-3029, 2016. +[25] Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. In CVPR, 2017. +[26] Jin-Hwa Kim, Jaehyun Jun, and Byoung-Tak Zhang. Bilinear Attention Networks. In Advances in Neural Information Processing Systems 31, pages 1571-1581, 2018. +[27] Diederik P Kingma and Max Welling. Auto-encoding variational bayes, 2013. +[28] Ryan Kiros, Yukun Zhu, Ruslan R Salakhutdinov, Richard Zemel, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Skip-thought vectors. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 3294-3302. Curran Associates, Inc., 2015. +[29] Varun Manjunatha, Nirat Saini, and Larry S. Davis. Explicit bias discovery in visual question answering models. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 9562-9571, 2019. +[30] Judea Pearl. Causality: Models, Reasoning and Inference. Cambridge University Press, New York, NY, USA, 2nd edition, 2009. +[31] Jeffrey Pennington, Richard Socher, and Christopher Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1532-1543, Doha, Qatar, October 2014. Association for Computational Linguistics. +[32] Lianhui Qin, Antoine Bosselut, Ari Holtzman, Chandra Bhagavatula, Elizabeth Clark, and Yejin Choi. + +Counterfactual story reasoning and generation. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2019. +[33] Sainandan Ramakrishnan, Aishwarya Agrawal, and Stefan Lee. Overcoming language priors in visual question answering with adversarial regularization. In Proceedings of the 32Nd International Conference on Neural Information Processing Systems, NIPS'18, pages 1548-1558, USA, 2018. Curran Associates Inc. +[34] Robik Shrestha, Kushal Kafle, and Christopher Kanan. Answer them all! toward universal visual question answering models. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. +[35] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +[36] Amanpreet Singh, Vivek Natarajan, Yu Jiang, Xinlei Chen, Meet Shah, Marcus Rohrbach, Dhruv Batra, and Devi Parikh. Pythia-a platform for vision & language research. In SysML Workshop, NeurIPS, volume 2018, 2018. +[37] Amanpreet Singh, Vivek Natarajan, Meet Shah, Yu Jiang, Xinlei Chen, Dhruv Batra, Devi Parikh, and Marcus Rohrbach. Towards vqa models that can read. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 8317-8326, 2019. +[38] Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D. Manning, Andrew Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1631-1642, Seattle, Washington, USA, October 2013. Association for Computational Linguistics. +[39] Adith Swaminathan and Thorsten Joachims. Counterfactual risk minimization: Learning from logged bandit feedback. In Francis Bach and David Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pages 814-823, Lille, France, 07-09 Jul 2015. PMLR. +[40] Kai Sheng Tai, Richard Socher, and Christopher D. Manning. Improved semantic representations from tree-structured long short-term memory networks. In + +Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pages 1556-1566, Beijing, China, July 2015. Association for Computational Linguistics. +[41] Hongyi Zhang, Moustapha Cisse, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. International Conference on Learning Representations, 2018. +[42] Ruixiang Zhang, Tong Che, Zoubin Ghahramani, Yoshua Bengio, and Yangqiu Song. Metagan: An adversarial approach to few-shot learning. In Proceedings of the 32Nd International Conference on Neural Information Processing Systems, NIPS'18, pages 2371-2380, USA, 2018. Curran Associates Inc. \ No newline at end of file diff --git a/counterfactualvisionandlanguagelearning/images.zip b/counterfactualvisionandlanguagelearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..e50c3a759050e4615fdc6bf960f68c8f6dfc4862 --- /dev/null +++ b/counterfactualvisionandlanguagelearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9db8a6764581b7c75510f8b43458aa03787b478b61e38ea3e053f85309d2894b +size 405765 diff --git a/counterfactualvisionandlanguagelearning/layout.json b/counterfactualvisionandlanguagelearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..abcaec4c805b6965b0e535470501f1a558aa1446 --- /dev/null +++ b/counterfactualvisionandlanguagelearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f8f8a53167ef71e29eab98653d1e225e2da4fe881b59f53ea1947fb8f0ea20a +size 463967 diff --git a/countingouttimeclassagnosticvideorepetitioncountinginthewild/2ee0d59b-f661-4d4f-a44e-fc796d7837ef_content_list.json b/countingouttimeclassagnosticvideorepetitioncountinginthewild/2ee0d59b-f661-4d4f-a44e-fc796d7837ef_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..3c82f1554fc3b50edf75c1de2f8c366e0cb93750 --- /dev/null +++ b/countingouttimeclassagnosticvideorepetitioncountinginthewild/2ee0d59b-f661-4d4f-a44e-fc796d7837ef_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a95ea558d65c8dc1baf7478343bbc405463d85950ef2b3c8a93862b34cac171 +size 89586 diff --git a/countingouttimeclassagnosticvideorepetitioncountinginthewild/2ee0d59b-f661-4d4f-a44e-fc796d7837ef_model.json b/countingouttimeclassagnosticvideorepetitioncountinginthewild/2ee0d59b-f661-4d4f-a44e-fc796d7837ef_model.json new file mode 100644 index 0000000000000000000000000000000000000000..081cb3de834053eda93088cf181792d5efc4194f --- /dev/null +++ b/countingouttimeclassagnosticvideorepetitioncountinginthewild/2ee0d59b-f661-4d4f-a44e-fc796d7837ef_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96a81490ab2d19b2c23ec939fe212618719ca18052a0b61f2b131d08bfa06b29 +size 106301 diff --git a/countingouttimeclassagnosticvideorepetitioncountinginthewild/2ee0d59b-f661-4d4f-a44e-fc796d7837ef_origin.pdf b/countingouttimeclassagnosticvideorepetitioncountinginthewild/2ee0d59b-f661-4d4f-a44e-fc796d7837ef_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d72c55d87334c5dacaa82fd0260be9f2e1d9e7dc --- /dev/null +++ b/countingouttimeclassagnosticvideorepetitioncountinginthewild/2ee0d59b-f661-4d4f-a44e-fc796d7837ef_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:184260e5fe7aabe6fb8723491049d982e0c96e646967122695449685e4329674 +size 3298720 diff --git a/countingouttimeclassagnosticvideorepetitioncountinginthewild/full.md b/countingouttimeclassagnosticvideorepetitioncountinginthewild/full.md new file mode 100644 index 0000000000000000000000000000000000000000..28088b995d0c2c0b61451bef721044089743a3da --- /dev/null +++ b/countingouttimeclassagnosticvideorepetitioncountinginthewild/full.md @@ -0,0 +1,385 @@ +# Counting Out Time: Class Agnostic Video Repetition Counting in the Wild + +Debidatta Dwibedi $^{1}$ , Yusuf Aytar $^{2}$ , Jonathan Tompson $^{1}$ , Pierre Sermanet $^{1}$ , and Andrew Zisserman $^{2}$ + +$^{1}$ Google Research $^{2}$ DeepMind {debidatta, yusufaytar, tompson, sermanet, zisserman}@google.com + +# Abstract + +We present an approach for estimating the period with which an action is repeated in a video. The crux of the approach lies in constraining the period prediction module to use temporal self-similarity as an intermediate representation bottleneck that allows generalization to unseen repetitions in videos in the wild. We train this model, called RepNet, with a synthetic dataset that is generated from a large unlabeled video collection by sampling short clips of varying lengths and repeating them with different periods and counts. This combination of synthetic data and a powerful yet constrained model, allows us to predict periods in a class-agnostic fashion. Our model substantially exceeds the state of the art performance on existing periodicity (PERTUBE) and repetition counting (QUVA) benchmarks. We also collect a new challenging dataset called Countix ( $\sim$ 90 times larger than existing datasets) which captures the challenges of repetition counting in real-world videos. Project webpage: https://sites.google.com/view/repnet. + +# 1. Introduction + +Picture the most mundane of scenes – a person eating by themselves in a cafe. They might be stirring sugar in their coffee while chewing their food, and tapping their feet to the background music. This person is doing at least three periodic activities in parallel. Repeating actions and processes are ubiquitous in our daily lives. These range from organic cycles, such as heart beats and breathing, through programming and manufacturing, to planetary cycles like the day-night cycle and seasons. Thus the need for recognizing repetitions in videos is pervasive, and a system that is able to identify and count repetitions in video will benefit any perceptual system that aims to observe and understand our world for an extended period of time. + +Repetitions are also interesting for the following reasons: (1) there is usually an intent or a driving cause behind something happening multiple times; (2) the same event can be + +![](images/7d5ddf977fc33bf968518b0a79fd684fe52130574b496656cfd6316d17c7366c.jpg) +Figure 1: We present RepNet, which leverages a temporal self-similarity matrix as an intermediate layer to predict the period length and periodicity of each frame in the video. + +observed again but with slight variations; (3) there may be gradual changes in the scene as a result of these repetitions; (4) they provide us with unambiguous action units, a subsequence in the action that can be segmented in time (for example if you are chopping an onion, the action unit is the manipulation action that is repeated to produce additional slices). Due to the above reasons, any agent interacting with the world would benefit greatly from such a system. Furthermore, repetition counting is pertinent for many computer vision applications; such as counting the number of times an exercise was done, measurement of biological events (like heartbeats), etc. + +Yet research in periodic video understanding has been limited, potentially due to the lack of a large scale labeled video repetition dataset. In contrast, for action recognition there are large scale datasets, like Kinetics [21], but their collection at large scale is enabled by the availability of keywords/text associated with the videos. Unfortunately it is rare for videos to be labeled with annotations related to + +repeated activity as the text is more likely to describe the semantic content. For this reason, we use a dataset with semantic action labels typically used for action recognition (Kinetics) and manually choose videos of those classes with periodic motion (bouncing, clapping etc.). We proceed to label the selected videos with the number of repetitions present in each clip. + +Manual labelling limits the number of videos that can be annotated – labelling is tedious and expensive due to the temporally fine-grained nature of the task. In order to increase the amount of training data, we propose a method to create synthetic repetition videos by repeating clips from existing videos with different periods. Since we are synthesizing these videos, we also have precise annotations for the period and count of repetitions in the videos, which can be used for training models using supervised learning. However, as we find in our work, such synthetic videos fail to capture all the nuances of real repeated videos and are prone to over-fitting by high-capacity deep learning models. To address this issue, we propose a data augmentation strategy for synthetic videos so that models trained on them transfer to real videos with repetitions. We use a combination of real and synthetic data to develop our model. + +In this paper, our objective is a single model that works for many classes of periodic videos, and indeed, also for classes of videos unseen during training. We achieve this by using an intermediate representation that encourages generalization to unseen classes. This representation – a temporal self-similarity matrix – is used to predict the period with which an action is repeating in the video. This common representation is used across different kinds of repeating videos enabling the desired generalization. For example, whether a person is doing push ups, or a kid is swinging in a playground, the self-similarity matrix is the shared parameterization from which the number of repetitions is inferred. This extreme bottleneck (the number of channels in the feature map reduces from 512 to 1) also aids generalization from synthetic data to real data. The other advantage of this representation is that model interpretability is baked into the network architecture as we force the network to predict the period from the self-similarity matrix only, as opposed to inferring the period from latent high-dimensional features. + +We focus on two tasks: (i) Repetition counting, identifying the number of repeats in the video. We rephrase this problem as first estimating per frame period lengths, and then converting them to a repetition count; (ii) Periodicity detection, identifying if the current frame is a part of a repeating temporal pattern or not. We approach this as a per-frame binary classification problem. A visual explanation of these tasks and the overview of our solution is shown in Figure 1. + +Our main contributions in this paper are: (i) RepNet, a neural network architecture designed for counting repetitions in videos in the wild. (ii) A method to generate and augment synthetic repetition videos from unlabeled + +videos. (iii) By training RepNet on the synthetic dataset we outperform the state-of-the-art methods on both repetition counting and periodicity detection tasks over existing benchmarks by a substantial margin. (iv) A new video repetition counting dataset, Countix, which is $\sim 90$ times larger than the previous largest dataset. + +# 2. Related Work + +Periodicity Estimation. Extracting periodicity (detection of periodic motion) and the period by leveraging the auto-correlation in time series is a well-studied problem [40, 45]. Period estimation in videos has been done using periodograms on top of auto-correlation [9] or Wavelet transforms on hand-designed features derived from optical flow [35]. The extracted periodic motion has supported multiple tasks including 3D reconstruction [4, 27] and bird species classification [26]. Periodicity has been used for various applications [9, 30, 32, 36] including temporal pattern classification [33]. + +Temporal Self-similarity Matrix (TSM). TSMs are useful representations for human action recognition [20, 22, 41] and gait analysis [5, 6] due to their robustness against large viewpoint changes when paired with appropriate feature representations. A TSM based on Improved Dense Trajectories [46] is used in [31] for unsupervised identification of periodic segments in videos using special filters. Unlike these approaches, we use TSM as an intermediate layer in an end-to-end neural network architecture, which acts as an information bottleneck. + +Synthetic Training Data. The use of synthetic training data in computer vision is becoming more common place. Pasting object patches on real images has been shown to be effective as training data for object detection [12, 15, 42] and human pose estimation [43]. Blending multiple videos or multiple images together has been useful for producing synthetic training data for specific tasks [2] as well as regularizing deep learning models [50, 51]. Synthetic data for training repetition counting was first proposed by [25]. They introduce a dataset of synthetic repeating patterns and use this to train a deep learning based counting model. However, the data they use for training consists of hand-designed random patterns that do not appear realistic. As shown in [35], these patterns are not diverse enough to capture all the nuances of repetitions in real videos. Instead, we propose to create synthetic training dataset of realistic video repetitions from existing video datasets. + +Counting in Computer Vision. Counting objects and people in images [3, 7, 24, 28, 49] is an active area in computer vision. On the other hand, video repetition counting [25, 35] has attracted less attention from the community in the deep learning era. We build on the idea of [25] of predicting the period (cycle length), though [25] did not use a TSM. + +Temporally Fine-grained Tasks. Repetition counting and periodicity detection are temporally fine-grained tasks like temporal action localization [8, 38], per-frame phase clas + +![](images/eebcbb8978d02dfb97ea9bbb473f8d05be747f618b3924a25ba246b9b6765155.jpg) +Figure 2: RepNet architecture. The features produced by a single video frame is highlighted with the green color throughout the network. + +sification [11] and future anticipation [10]. We leverage the interfaces previously used to collect action localization datasets such as [16, 23, 39] to create our repetition dataset Countix. Instead of annotating semantic segments, we label the extent of the periodic segments in videos and the number of repetitions in each segment. + +# 3. RepNet Model + +In this section we introduce our RepNet architecture, which is composed of two learned components, the encoder and the period predictor, with a temporal self-similarity layer in between them. + +Assume we are given a video $V = [v_{1}, v_{2}, \dots, v_{N}]$ as a sequence of $N$ frames. First we feed the video $V$ to an image encoder $\phi$ as $X = \phi(V)$ to produce per-frame embeddings $X = [x_{1}, x_{2}, \dots, x_{N}]^{\top}$ . Then, using the embeddings $X$ we obtain the self-similarity matrix $S$ by computing pairwise similarities $S_{ij}$ between all pairs of embeddings. Finally, $S$ is fed to the period predictor module which outputs two elements for each frame: period length estimate $l = \psi(S)$ and periodicity score $p = \tau(S)$ . The period length is the rate at which a repetition is occurring while the periodicity score indicates if the frame is within a periodic portion of the video or not. The overall architecture can be viewed in the Figure 1 and a more detailed version can be seen in Figure 2. + +# 3.1. Encoder + +Our encoder $\phi$ is composed of three main components: Convolutional feature extractor: We use ResNet-50[18] architecture as our base convolutional neural network (CNN) to extract 2D convolutional features from individual frames $v_{i}$ of the input video. These frames are $112\times 112\times 3$ in size. We use the output of conv4_block3 layer to have a larger spatial 2D feature map. The resulting per-frame features are of size $7\times 7\times 1024$ . + +Temporal Context: We pass these convolutional features through a layer of 3D convolutions to add local temporal information to the per-frame features. We use 512 filters of size $3 \times 3 \times 3$ with ReLU activation. The temporal context helps modeling short-term motion [13, 48] and enables the model to distinguish between similar looking frames but with different motion (e.g. hands moving up or down while exercising). + +![](images/37f97c222b3d4213284c876452b9afe5f447537a88bf9789677cde8b49cb5b73.jpg) +(a) Jumping Jacks +Figure 3: Diversity of temporal self-similarity matrices found in real-world repetition videos (yellow means high similarity, blue means low similarity). (a) Uniformly repeated periodic motion (jumping jacks) (b) Repetitions with acceleration (athlete performing hammer throw) (c) Repetitions with decreasing period (a bouncing ball losing speed due to repeated bounces) (d) Repeated motion preceded and succeeded by no motion (waiting to mix concrete, mixing concrete, stopped mixing). A complex model is needed to predict the period and periodicity from such diverse self-similarity matrices. + +![](images/5db05d7fa2f1c79dae159afdd5ebaa8e4b6c2fb3670c7a39354e73a61a6f2571.jpg) +(b) Hammer Throw + +![](images/3b4a16f4554bf20e50b9936b285259db6fa85c3dacb733ce86bcb5ccc1ec20bf.jpg) +(c) Bouncing Ball + +![](images/247997c930f4d9c41d00f90f4d8592e972a328dfc281efb7c7b8ee8a063d5f5d.jpg) +(d) Mixing Concrete + +Dimensionality reduction: We reduce the dimensionality of extracted spatio-temporal features by using Global 2D Max-pooling over the spatial dimensions and to produce embedding vectors $x_{i}$ corresponding to each frame $v_{i}$ in the video. By collapsing the spatial dimensions we remove the need for tracking the region of interest as done explicitly in prior methods [6, 9, 33]. + +# 3.2. Temporal Self-similarity Matrix (TSM) + +After obtaining latent embeddings $x_{i}$ for each frame $v_{i}$ , we construct the self-similarity matrix $S$ by computing all pairwise similarities $S_{ij} = f(x_i, x_j)$ between pairs of embeddings $x_{i}$ and $x_{j}$ , where $f(.)$ is the similarity function. We use the negative of the squared euclidean distance as the similarity function, $f(a, b) = -||a - b||^2$ , followed by row-wise softmax operation. + +As the TSM has only one channel, it acts as an information bottleneck in the middle of our network and provides regularization. TSMs also make the model temporally interpretable which brings further insights to the predictions made by the model. Some examples can be viewed in Figure 3. + +# 3.3. Period Predictor + +The final module of RepNet is the period predictor. This module accepts the self-similarity matrix $S =$ + +$[s_1,s_2,\dots ,s_N]^{\intercal}$ where each row $s_i$ is the per frame self-similarity representation, and generates two outputs: per frame period length estimation $l = \psi (S)$ , and per-frame binary periodicity classification $p = \tau (S)$ . Note that both $l$ and $p$ are vectors and their elements are per frame predictions (i.e. $l_{i}$ is the predicted period length for the $i^{th}$ frame). + +The architecture of the period predictor module can be viewed in Figure 2. Note that predictors $\psi$ and $\tau$ share a common architecture and weights until the last classification phase. The shared processing pipeline starts with 32 2D convolutional filters of size $3\times 3$ , followed by a transformer [44] layer which uses a multi-headed attention with trainable positional embeddings in the form of a 64 length variable that is learned by training. We use 4 heads with 512 dimensions in the transformer with each head being 128 dimensions in size. After the shared pipeline, we have two classifiers, period length classifier $\psi$ and periodicity classifier $\tau$ . Each of them consists of two fully connected layers of size 512. + +# 3.4. Losses + +Our periodicity classifier $\tau$ outputs per frame periodicity classification $p_i$ and uses a binary classification loss (binary cross-entropy) for optimization. Our period length estimator $\psi$ outputs per frame period length estimation $l_i \in L$ where the classes are discrete period lengths $L = \{2, 3, \dots, \frac{N}{2}\}$ where $N$ is the number of input frames. We use a multi-class classification objective (softmax cross-entropy) for optimizing our model. For all our experiments we use $N = 64$ . We sample the input video with different frame rates as described below to predict larger period lengths. + +# 3.5. Inference + +Inferring the count of repetitions robustly for a given video requires two main operations: + +Count from period length predictions: We sample consecutive non-overlapping windows of $N$ frames and provide it as input to RepNet which outputs per-frame periodicity $p_i$ and period lengths $l_i$ . We define per-frame count as $\frac{p_i}{l_i}$ . The overall repetition count is computed as the sum of all per-frame counts: $\sum_{i=1}^{N} \frac{p_i}{l_i}$ . The evaluation datasets for repetition counting have only periodic segments. Hence, we set $p_i$ to 1 as default for counting experiments. + +Multi-speed evaluation: As our model can predict period lengths up to 32, for covering much longer period lengths we sample input video with different frame rates. (i.e. we play the video at $1 \times$ , $2 \times$ , $3 \times$ , and $4 \times$ speeds). We choose the frame rate which has the highest score for the predicted period. This is similar to what [25] do at test time. + +# 4. Training with Synthetic Repetitions + +A potential supervised approach to period estimation would be collecting a large training set of periodic videos + +![](images/d393a85286be0f9c5c220f08f20782832d6854afa51801bc8745855adb48bffb.jpg) +Figure 4: Our synthetic data generation pipeline that produces videos with repetitions from any video. We randomly sample a portion of a video that we repeat N times to produce synthetic repeating videos. More details in Section 4 + +and annotating the beginning and the end of every period in all repeating actions. However, collecting such a dataset is expensive due to the fine-grained nature of the task. + +As a cheaper and more scalable alternative, we propose a training strategy that makes use of synthetically generated repetitions using unlabeled videos in the wild (e.g. YouTube). We generate synthetic periodic videos using randomly selected videos, and predict per frame periodicity and period lengths. Next, we'll explain how we generate synthetic repetitions, and introduce camera motion augmentations which are crucial for training effective counting models from synthetic videos. + +# 4.1. Synthetic Repetition Videos + +Given a large set of unlabeled videos, we propose a simple yet effective approach for creating synthetic repetition videos (shown in Figure 4) from them. The advantage of using real videos to create synthetic data is that the training data is much closer to real repeated videos when compared to using synthetic patterns. Another advantage of using real videos is that using a big dataset like Kinetics ensures that the diversity of data seen by the model is huge. This allows us to train big complex models that can work on real repetition videos. + +Our pipeline starts with sampling a random video $V$ from a dataset of videos. We use the training set of Kinetics [21] without any labels. Then, we sample a clip $C$ of random length $P$ frames from $V$ . This clip $C$ is repeated $K$ times (where $K > 1$ ) to simulate videos with repetitions. We randomly concatenate the reversed clip before repeating to simulate actions where the motion is done in reverse in the period (like jumping jacks). Then, we pre-pend and append the repeating frames with other non-repeating segments from $V$ , which are just before and after $C$ , respectively. The lengths of these aperiodic segments are chosen randomly and can potentially be zero too. This operation makes sure that there are both periodic and non-periodic segments in the generated video. Finally, each frame in the repeating part of the generated video is assigned a period length label $P$ . A periodicity label is also generated indicating whether the frame is inside or outside the repeating portion of the generated video. + +![](images/9bd0b9296adac5f43ec2bedf4cd875d6ccc06f7e228f31070be70e0c276f9145.jpg) +Figure 5: Camera motion augmentation. We vary the augmentation parameters for each type of camera motion smoothly over time as opposed to randomly sampling them independently for each frame. This ensures that the augmented sequence still retains the temporal coherence naturally present in videos. + +# 4.2. Camera Motion Augmentation + +A crucial step in the synthetic video generation is camera motion augmentation (shown in Figure 5). Although it is not feasible to predict views of an arbitrarily moving camera without knowing the 3D structure, occluded parts and lighting sources in the scene, we can approximate it using affine image transformations. Here we consider the affine motion of a viewing frame over the video, which includes temporally smooth changes in rotation, translation, and scale. As we will show in section 6, when we train without these augmentations, the training loss quickly decreases but the model does not transfer to real repetition videos. We empirically find camera motion augmentation is a vital part of training effective models with synthetic videos. + +To achieve camera motion augmentations, we temporally vary the parameters for various motion types in a continuous manner as the video proceeds. For example, we change the angle of rotation smoothly over time. This ensures that the video is temporally coherent even after the augmentation. Figure 5 illustrates how temporal augmentation parameter drives viewing frame (shown in blue rectangle) for each motion type. This results in videos with fewer near duplicates across the repeating segments. + +# 5. Countix Dataset + +Existing datasets for video repetition counting [25, 35] are mostly utilized for testing purposes, mainly due to their limited size. The most recent and challenging benchmark on this task is the QUVA repetition dataset [35] which includes realistic repetition videos with occlusion, camera movement, and changes in speed of the repeated actions. It is composed of 100 class-agnostic test videos, annotated with the count of repeated actions. Despite being challenging, its limited size makes it hard to cover diverse semantic categories of repetitions. Also training supervised deep + +models with this scale of data is not feasible. + +To increase the semantic diversity and scale up the size of counting datasets, we introduce the Countix dataset: a real world dataset of repetition videos collected in the wild (i.e. YouTube) covering a wide range of semantic settings with significant challenges such as camera and object motion, diverse set of periods and counts, and changes in the speed of repeated actions. Countix include repeated videos of workout activities (squats, pull ups, battle rope training, exercising arm), dance moves (pirouetting, pumping fist), playing instruments (playing ukulele), using tools repeatedly (hammer hitting objects, chainsaw cutting wood, slicing onion), artistic performances (hula hooping, juggling soccer ball), sports (playing ping pong and tennis) and many others. Figure 6 illustrates some examples from the dataset as well as the distribution of repetition counts and period lengths. + +Dataset Collection: The Countix dataset is a subset of the Kinetics [21] dataset annotated with segments of repeated actions and corresponding counts. During collection we first manually choose a subset of classes from Kinetics which have a higher chance of repetitions happening in them for e.g. jumping jacks, slicing onion etc., rather than classes like head stand or alligator wrestling. We crowd-source the labels for repetition segments and counts for the selected classes. The interface used is similar to what is typically used to mark out temporal segments for fine-grained action recognition[16, 34]. The annotators are asked to first segment the part of the video that contains valid repetitions with unambiguous counts. The annotators then proceed to count the number of repetitions in each segment. This count serves as the label for the entire clip. We reject segments with insignificant overlap in the temporal extents marked out by 3 different annotators. For the remaining segments, we use the median of the count annotations and segment extents as the ground truth. The Countix dataset is about 90 times bigger than the previous largest repetition counting dataset (QUVA Repetition Dataset). The detailed statistics can be viewed in Table 1. The dataset is available on the project webpage. + +Note that we retain the train/val/test splits from the Kinetics dataset. Hence, models pre-trained with Kinetics may be used for training counting models without data leakage. + +
QUVACountix
No. of Videos in Train set04588
No. of Videos in Val. set01450
No. of Videos in Test set1002719
Duration Avg. ± Std (s)17.6 ± 13.36.13 ± 3.08
Duration Min./Max. (s)2.5 / 64.20.2 / 10.0
Count Avg ± Std12.5 ± 10.46.84 ± 6.76
Count Min./Max.4 / 632 / 73
+ +Table 1: Statistics of Countix and QUVA Repetition datasets. + +![](images/9f9944f8c56e5fa898074e3ac9c90806aef1f278abca5e005014669627fe2ff8.jpg) + +![](images/67d351dfbb83753e2ce2ae4c8ae7c7e217855c4b718b7009c685f0e2f175189e.jpg) + +![](images/46ccc0eeafad2516e15486534f5471b3e104beb57de110ffaaa32191ad6c99a2.jpg) + +![](images/4fdb3b5a92d37928c1a613fcd46a26c2045f6bf41f75c55c0c3ece742a1fd66d.jpg) + +![](images/811839297ab1e03e7cd2c6be948c1cf440db381e7c2f8f708e3935ee5a7ca46d.jpg) + +![](images/479a143c6c527dcbeb60f5a5dd13628711f31a70349217ca336b94b280c9e4ea.jpg) + +![](images/eb9a8376ed89abefa66b6bdb1b4cb614627368925f8e31fc644ea873bb634cd7.jpg) + +![](images/fde8a4ea6c05901efef3da562dbc896b9b492d29dcf6b0dcf9a74c6af4611158.jpg) + +![](images/19d53b9cd4b8933ed41357d1ddae5dcd65643c037ed4e386203f31d27f118d4a.jpg) + +![](images/5b59f39f7bda3566f0de0cb2f385d6f94cc3b104674a6db5e9e4c6f625c9e193.jpg) + +![](images/21e64d9f38e5788204d521d2ef4659f5f11c62fc70904a7a2882918c3244d334.jpg) +Figure 6: Countix dataset. In the left two columns, we present examples of repeating videos from the Countix dataset. The last column shows the distribution of the number of the videos in the dataset with respect to the count and the period length labels. + +![](images/cc59ca881bf77816ac836c445ad28f744fe2c2b0753ccf7ea1a8fac9795eba49.jpg) +Playing Ukulele + +![](images/04d6ca321e767f3cca9d0f1733138647fc1db799987fda4106723d9055ebb5fc.jpg) + +![](images/867bf2a7eb8f3eb2566621bc0e434a54316f0d236781f3dd3cee6b277b01f77b.jpg) + +![](images/5e8d3da66dcc88cb2a709ea763ef6f0ba7376298dc689f3db6f208a0c66cc066.jpg) + +![](images/e63a1b20a192d1c5c6fb9d5838d77bb3006afc473c756df539c30cd8f420c7f1.jpg) + +![](images/73164591cfccfc2c94be3eee8201bc4c72182184a94bf402e6e742e9a65c728b.jpg) + +![](images/30398843a52ab62392c02c844cf464530c648ee2a84c960612ffc7429e071bed.jpg) + +![](images/d34361bb09cf76874cf5bd251df9199865df77be9558756ca069c364794bf7be.jpg) + +![](images/e52f66db2c847a1d083ae8c7620e2c79d2ca67916461b41ec221c6b2d5bd1837.jpg) + +![](images/73758bdd2e944a54d47feec6b9cd2577cb0c4fb8a49a8e642afe3221231ac87e.jpg) + +![](images/ff7d236bca2843d0a664746ff19f129815d4aa8499481a25c6db02cd70c53583.jpg) + +![](images/5818f397e5290b755073d7c962e8f5758a280a546bf1484fda60c2d103ca6401.jpg) +Exercising Arm + +![](images/e4b22dcb241370abd812bed5ebb7caef7da74abdab15815fd1caa2ee25bdf728.jpg) + +![](images/c29682cc765dbae976f4ef111a9fb4217bfc5045c9bfad567daeafa44b74283f.jpg) + +![](images/92686ed8d383a023efb27b0a9e0359f45a91111b0aad5ee1a5c8abc478215485.jpg) + +![](images/072451f7ab5958eaf2e30c697df59f6111b894509f0e0dce051b2194f46c72ec.jpg) + +![](images/50ae72f8e0ef843b95ed6f4fca7199633c6c1d85b7d11678ed18f1a749d376d9.jpg) + +![](images/58c0e862a8f343957c5ab323f5483dfdfc6fb8536e799794c86f809b2ce0d731.jpg) + +![](images/7bcb05e0720740fda9802588ae1663e4c524b9d7ac92df757464b0342531bf6c.jpg) + +![](images/bc801fb131f1b1f8a7b2ff52a295c494dd35d486fe4e609cb62b3659710964e7.jpg) + +![](images/327f6ea544655238ea19c4310dae74e4451c0e7fd5a2a14508b669f555a095b6.jpg) + +![](images/095752fb274bf48e854c7726c654dfb46510cac531aa33999662a04eb6f2265e.jpg) + +# 6. Experiments + +We start by explaining the existing benchmarks and the evaluation metrics used in repetition counting. We next present a series of ablation studies that demonstrate which components and design choices are crucial. Then we compare our performance on the existing benchmarks and show that RepNet clearly outperforms the state-of-the-art methods on repetition counting and periodicity detection. Finally, through qualitative analysis, we bring more insight into our model. + +# 6.1. Benchmarks and Evaluation Metrics + +Here we discuss two established benchmark datasets for periodicity detection and repetition counting together with the commonly used evaluation metrics. + +Periodicity detection: The benchmark dataset for this task is the PERTUBE dataset [31], which has per frame labels identifying periodicity, if the frame is a part of a repeating action or not. [31] casts the problem as a binary per frame classification task and reports precision, recall, F1 score and overlap. We follow the same metrics for evaluation. + +Repetition counting: As discussed in Section 5, the QUVA dataset [35] is the largest available dataset for repetition counting. The existing literature uses two main metrics for evaluating repetition counting in videos: + +Off-By-One (OBO) count error. If the predicted count is within one count of the ground truth value, then the video is considered to be classified correctly, otherwise it is a misclassification. The OBO error is the mis-classification rate over the entire dataset. + +Mean Absolute Error (MAE) of count. This metric measures the absolute difference between the ground truth count and the predicted count, and then normalizes it by dividing with the ground truth count. The reported MAE error is the mean of the normalized absolute differences over the entire dataset. + +Both in our ablation experiments and state-of-the-art comparisons we follow [25, 35] and report OBO and MAE errors over the QUVA and Countix validation set. We also + +provide a final score on the Countix test set in Table 7. + +# 6.2. Implementation Details + +We implement our method in Tensorflow [1]. We initialize the encoder with weights from an ImageNet pre-trained ResNet-50 checkpoint. We train the model for $400K$ steps with a learning rate of $6 \times 10^{-6}$ with the ADAM optimizer and batch size of 5 videos (each with 64 frames). For all ablation studies we train the model on the synthetic repetition data unless otherwise stated. Additional details are provided on the project webpage. + +# 6.3. Ablations + +We perform a number of ablations to justify the decisions made while designing RepNet. + +Temporal Self-similarity Matrix (TSM): In Table 2 we compare the impact of adding the TSM to the model. Models without the TSM apply the transformer directly on the per-frame embeddings produced by the encoder. The temporal self-similarity matrix substantially improves performance on all metrics and validation datasets whether we train the model using synthetic repetition videos, real Countix videos or a mix of both. Moreover, the TSM layer helps in generalizing to real repetition videos even when the model has only seen synthetic repetition videos (rows 1 and 2 in Table 2). + +Training Data Source: We vary the training data sources in Table 2 while comparing our synthetic repetition videos with real ones from the Countix dataset. We find that RepNet achieves similar performance on the Countix dataset when trained with synthetic videos or with the real repetition videos of the Countix dataset. But the model trained on Countix dataset is worse on the QUVA dataset compared to training on synthetic repeating videos. This shows using a synthetic repeating dataset results in a model that performs competitively on unseen classes as well. The best performance in terms of OBO error is achieved when the model is trained with both the datasets. + +Alternative Period Prediction Architectures: In Table 3, + +we compare the transformer architecture with other contemporary sequence models like LSTM and Temporal CNNs. We also compare it with a model that uses a 2D CNN on the self-similarity matrix itself. We find that the transformer architecture performs better than these alternatives. + +Camera Motion Augmentation: In Table 4 we show the value of camera motion augmentation when using the synthetic repeating dataset. We observe that performance on both datasets improves when the fraction of samples in the batch with camera motion augmentation is increased. + +
QUVACountix (Val)
TSMTraining Data SourceMAEOBOMAEOBO
✓Synthetic1.28530.641.16710.5510
Synthetic0.10350.170.31000.2903
✓Countix0.75840.720.64830.5448
Countix0.32250.340.34680.2949
✓Synthetic + Countix0.63880.570.88890.4848
Synthetic + Countix0.13150.150.32800.2752
+ +Table 2: Ablation of architecture with or without the temporal self-similarity matrix (TSM) with different training data sources. + +
QUVACountix (Val)
ArchitectureMAEOBOMAEOBO
Transformer0.10350.170.31000.2903
LSTM [19]0.13950.180.68950.3579
2D CNN0.11860.170.44400.3310
1D Temporal CNN0.32290.230.70770.3641
+ +Table 3: Performance of different period prediction architectures when trained with synthetic data. + +
QUVACountix (Val)
Augmentation FractionMAEOBOMAEOBO
0.000.71780.321.26290.4683
0.250.14140.170.44300.3303
0.500.12020.150.37290.2993
0.750.10350.170.31000.2903
1.000.17100.170.33460.2848
+ +# 6.4. Evaluation on Benchmarks + +We compare our system with the current state-of-the-art methods on periodicity detection and repetition counting on the established benchmarks described in Section 6.1. + +Periodicity Detection. We report the performance for measuring periodicity classification by choosing the threshold that maximizes the F1 score. As done in [31] we calculate the metrics on a per video basis and average the scores. We also report Area Under the Curve (AUC) of the precision-recall curve which is independent of the threshold chosen. Our model produces an AUC of 0.969. We outperform the previous work without using any hand-designed filtering methods mentioned in [31] (see Table 5). Our model trained entirely on synthetic data works out of the box for the task of periodicity detection in real videos. + +![](images/d1969a2626758f50fac8857b6931701e762c8a1497233052d382859caf6e991e.jpg) +Figure 7: 1D PCA projections of the encoder features over time. Note that even 1D projections of the learned features are encoding the periodicity fairly well. Frames with similar embeddings across different periods show similar states in the video (angle of rotation of biker, position of legs of person and position of knife). Best viewed with zoom. Video version on webpage. + +![](images/855b204d0d2839e243bcc25c8477a06b7f33c71f6c16526d0768c0aa734e9158.jpg) + +![](images/091f1ff12455e22059e335d4513fda32ffd7ca43f021c02eb4c4134552892379.jpg) + +Repetition Counting. In Table 6 we compare our RepNet model with previous models and show it outperforms existing methods by a significant margin and therefore establishing a new state-of-the-art for this dataset. Experimental results on the test set of Countix dataset indicate that RepNet is an effective baseline for the video repetition counting task (see Table 7). + +Table 4: Impact of camera motion augmentation when trained with synthetic data. + +
ModelRecallPrecisionF1Overlap
Power spectrum baseline [31]0.7930.6110.6680.573
P-MUCOS [31]0.8410.7570.770.677
RepNet (Ours)0.8590.8210.8200.731
+ +Table 5: Periodicity detection results on the PERTUBE Dataset + +
ModelMAEOBO
Visual quasi-periodicity [33]0.3850.51
Live Repetition Counting [25]0.4820.55
Div-Grad-Curl [35]0.2320.38
RepNet (Ours)0.1040.17
+ +Table 6: Counting Results on the QUVA dataset. + +
ModelMAEOBO
RepNet0.36410.3034
+ +Table 7: Counting Results on the Countix test set. + +# 6.5. Qualitative analysis + +Temporal Self-similarity Matrix. TSM provides us with meaningful interpretations about the model's predictions. It also contains additional information regarding acceleration and deceleration of the action. We show some examples of self-similarity matrices in Figure 3. + +1D PCA Embeddings. We also investigate the learned embeddings which are used to produce the TSM. In Figure 7, we project the 512 dimensional vector to 1 dimension using + +![](images/5aacea1dded1276049fb2429542881bc742984654d4dd81f58c9323c981eaa55.jpg) +Figure 8: One model, many domains and applications. A single model is capable of performing these tasks over videos from many diverse domains (animal movement, physics experiments, humans manipulating objects, people exercising, child swinging) in a class-agnostic manner. Please see the project webpage for videos showcasing these tasks. + +the first principal component of the per-frame embeddings for each video. This reveals interesting quasi-sinusoidal patterns traced out by the embeddings in time. We plot the frames when the embeddings are changing directions and observe that the retrieved frames show the person or object in a similar state but in different periods. + +Double Counting Errors. We observe that a common failure mode of our model is that for some actions (e.g. juggling soccer ball), it predicts half the count reported by annotators. This happens when the model considers left and right legs' motion for counting while people tend to consider the ball's up/down motion resulting in people double counting the repetitions. We believe such errors are difficult to isolate in a class-agnostic manner. But they can be fixed easily with either labeled data or post-processing methods if the application is known. + +# 7. Applications + +Predict speed changes of repetitions. Our method takes in a video clip and predicts the period of any repeated action. The consecutive difference of predicted rates encodes the rate of speed change of the repetitions. Monitoring speed changes is useful for exercise tracking applications where it might be important to know if someone is speeding up or slowing down (Column 4 in Figure 8). + +Estimating frequency of processes from videos. Our model can be used to predict the count and frequency of repeating phenomena from videos for e.g. biological processes (heartbeats). [47] presented a method to reveal subtle changes by magnifying the difference in frames. We find that the output from the above system can be fed directly into our model to predict the frequency of these changes. A class-agnostic period estimator removes the need to explicitly train on these videos. On our project webpage, we show examples of repetition counting on echo-cardiogram videos which look very different from Kinetics videos. + +Fine-grained cross-period retrieval. The learned embeddings are useful for performing cross-period retrieval. In + +other words, the features capture similarities present across different periods while still encoding subtle differences between similar looking frames. Examples of these retrievals are shown in Figure 7 and the last column in Figure 8. + +Repetitions with longer temporal extent. Many repeating phenomena occur over a longer temporal scale (in the order of days or years). Even though our model has been trained on short videos ( $\sim 10\mathrm{s}$ ), it can still work on videos with slow periodic events by automatically choosing a higher input frame stride. On the project webpage, we show videos where RepNet predicts the period length of a day from videos of the earth captured by satellites. + +Aid self-supervised video representation learning. Self-supervised learning methods for video embeddings, e.g. Shuffle and Learn [29], Odd-One-Out networks [14], DPC [17], TCC [11] and TCN [37] are not designed to handle repetitions in sequences. RepNet can identify the repeating sections and may help in training on videos with repetitions without modifying the proposed objectives. + +# 8. Conclusion + +We have shown a simple combination of synthetic training data, together with an architecture using temporal self-similarity, results in a powerful class-agnostic repetition counting model. This model successfully detects periodicity and predicts counts over a diverse set of actors (objects, humans, animals, the earth) and sensors (standard camera, ultrasound, laser microscope) and has been evaluated on a vast collection of videos. With this we have addressed the case of simple repetitions, and the next step is to consider more complex cases such as multiple simultaneous repeating signals and temporal arrangements of repeating sections such as in dance steps and music. + +Acknowledgements: We thank Aishwarya Gomatam, Anelia Angelova, Relja Arandjelovic, Shefali Umrania, Sourish Chaudhuri, and Vincent Vanhoucke for their help with this project. + +# References + +[1] Martin 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. 6 +[2] Jean-Baptiste Alayrac, Joao Carreira, and Andrew Zisserman. The visual centrifuge: Model-free layered video representations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2457-2466, 2019. 2 +[3] Carlos Arteta, Victor Lempitsky, and Andrew Zisserman. Counting in the wild. In European conference on computer vision, pages 483-498. Springer, 2016. 2 +[4] Serge Belongie and Josh Wills. Structure from periodic motion. In International Workshop on Spatial Coherence for Visual Motion Analysis, pages 16-24. Springer, 2004. 2 +[5] Chiraz BenAbdelkader, Ross Cutler, Harsh Nanda, and Larry Davis. Eigengait: Motion-based recognition of people using image self-similarity. In International Conference on Audio- and Video-Based Biometric Person Authentication, pages 284–294. Springer, 2001. 2 +[6] Chiraz BenAbdelkader, Ross G Cutler, and Larry S Davis. Gait recognition using image self-similarity. EURASIP Journal on Advances in Signal Processing, 2004(4):721765, 2004. 2, 3 +[7] Lokesh Boominathan, Srinivas SS Kruthiventi, and R Venkatesh Babu. Crowdnet: A deep convolutional network for dense crowd counting. In Proceedings of the 24th ACM international conference on Multimedia, pages 640-644. ACM, 2016. 2 +[8] Yu-Wei Chao, Sudheendra Vijayanarasimhan, Bryan Seybold, David A Ross, Jia Deng, and Rahul Sukthankar. Rethinking the faster r-cnn architecture for temporal action localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1130–1139, 2018. 2 +[9] Ross Cutler and Larry S. Davis. Robust real-time periodic motion detection, analysis, and applications. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):781-796, 2000. 2, 3 +[10] Dima Damen, Hazel Doughty, Giovanni Maria Farinella, Sanja Fidler, Antonino Furnari, Evangelos Kazakos, Davide Moltisanti, Jonathan Munro, Toby Perrett, Will Price, et al. Scaling egocentric vision: The epic-kitchens dataset. In Proceedings of the European Conference on Computer Vision (ECCV), pages 720-736, 2018. 3 +[11] Debidatta Dwibedi, Yusuf Aytar, Jonathan Tompson, Pierre Sermanet, and Andrew Zisserman. Temporal cycle-consistency learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1801-1810, 2019. 3, 8 +[12] Debidatta Dwibedi, Ishan Misra, and Martial Hebert. Cut, paste and learn: Surprisingly easy synthesis for instance detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 1301-1310, 2017. 2 +[13] Debidatta Dwibedi, Jonathan Tompson, Corey Lynch, and Pierre Sermanet. Learning actionable representations from visual observations. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1577- + +1584.IEEE,2018.3 +[14] Basura Fernando, Hakan Bilen, Efstratios Gavves, and Stephen Gould. Self-supervised video representation learning with odd-one-out networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3636-3645, 2017. 8 +[15] Georgios Georgakis, Arsalan Mousavian, Alexander C Berg, and Jana Kosecka. Synthesizing training data for object detection in indoor scenes. arXiv preprint arXiv:1702.07836, 2017. 2 +[16] Chunhui Gu, Chen Sun, David A Ross, Carl Vondrick, Caroline Pantofaru, Yeqing Li, Sudheendra Vijayanarasimhan, George Toderici, Susanna Ricco, Rahul Sukthankar, et al. Ava: A video dataset of spatio-temporally localized atomic visual actions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6047-6056, 2018. 3, 5 +[17] Tengda Han, Weidi Xie, and Andrew Zisserman. Video representation learning by dense predictive coding. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 0–0, 2019. 8 +[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. 3 +[19] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-1780, 1997. 7 +[20] Imran N Junejo, Emilie Dexter, Ivan Laptev, and Patrick Perez. View-independent action recognition from temporal self-similarities. IEEE transactions on pattern analysis and machine intelligence, 33(1):172-185, 2010. 2 +[21] Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, Mustafa Suleyman, and Andrew Zisserman. The kinetics human action video dataset. arXiv preprint arXiv:1705.06950, 2017. 1, 4, 5 +[22] Marco Körner and Joachim Denzler. Temporal self-similarity for appearance-based action recognition in multiview setups. In International Conference on Computer Analysis of Images and Patterns, pages 163-171. Springer, 2013. 2 +[23] Hilde Kuehne, Ali Arslan, and Thomas Serre. The language of actions: Recovering the syntax and semantics of goal-directed human activities. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 780-787, 2014. 3 +[24] Victor Lempitsky and Andrew Zisserman. Learning to count objects in images. In Advances in neural information processing systems, pages 1324-1332, 2010. 2 +[25] Ofir Levy and Lior Wolf. Live repetition counting. In Proceedings of the IEEE International Conference on Computer Vision, pages 3020-3028, 2015. 2, 4, 5, 6, 7 +[26] Wen Li and Dezhen Song. Automatic bird species detection using periodicity of salient extremities. In 2013 IEEE International Conference on Robotics and Automation, pages 5775-5780. IEEE, 2013. 2 +[27] Xiu Li, Hongdong Li, Hanbyul Joo, Yebin Liu, and Yaser Sheikh. Structure from recurrent motion: From rigidity to concurrency. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3032-3040, 2018. 2 +[28] Erika Lu, Weidi Xie, and Andrew Zisserman. Class-agnostic + +counting. In Asian Conference on Computer Vision, pages 669-684. Springer, 2018. 2 +[29] Ishan Misra, C Lawrence Zitnick, and Martial Hebert. Shuffle and learn: unsupervised learning using temporal order verification. In European Conference on Computer Vision, pages 527-544. Springer, 2016. 8 +[30] Sourabh A Niyogi and Edward H Adelson. Analyzing gait with spatiotemporal surfaces. In Proceedings of 1994 IEEE Workshop on Motion of Non-rigid and Articulated Objects, pages 64-69. IEEE, 1994. 2 +[31] Costas Panagiotakis, Giorgos Karvounas, and Antonis Argyros. Unsupervised detection of periodic segments in videos. In 2018 25th IEEE International Conference on Image Processing (ICIP), pages 923–927. IEEE, 2018. 2, 6, 7 +[32] Silvia L Pintea, Jian Zheng, Xilin Li, Paulina JM Bank, Jacobus J van Hilden, and Jan C van Gemert. Hand-tremor frequency estimation in videos. In Proceedings of the European Conference on Computer Vision (ECCV), pages 0–0, 2018. 2 +[33] Erik Pogalin, Arnold WM Smeulders, and Andrew HC Thean. Visual quasi-periodicity. In 2008 IEEE Conference on Computer Vision and Pattern Recognition, pages 1-8. IEEE, 2008. 2, 3, 7 +[34] Joseph Roth, Sourish Chaudhuri, Ondrej Klejch, Radhika Marvin, Andrew Gallagher, Liat Kaver, Sharadh Ramaswamy, Arkadiusz Stopczynski, Cordelia Schmid, Zhonghua Xi, et al. Ava-activespeaker: An audiovisual dataset for active speaker detection. arXiv preprint arXiv:1901.01342, 2019. 5 +[35] Tom FH Runia, Cees GM Snoek, and Arnold WM Smeulders. Real-world repetition estimation by div, grad and curl. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9009-9017, 2018. 2, 5, 6, 7 +[36] Steven M Seitz and Charles R Dyer. View-invariant analysis of cyclic motion. International Journal of Computer Vision, 25(3):231-251, 1997. 2 +[37] Pierre Sermanet, Corey Lynch, Yevgen Chebotar, Jasmine Hsu, Eric Jang, Stefan Schaal, Sergey Levine, and Google Brain. Time-contrastive networks: Self-supervised learning from video. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 1134–1141. IEEE, 2018. 8 +[38] Zheng Shou, Dongang Wang, and Shih-Fu Chang. Temporal action localization in untrimmed videos via multi-stage cnns. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1049-1058, 2016. 2 +[39] Gunnar A Sigurdsson, Gúl Varol, Xiaolong Wang, Ali Farhadi, Ivan Laptev, and Abhinav Gupta. Hollywood in homes: Crowdsourcing data collection for activity understanding. In European Conference on Computer Vision, pages 510-526. Springer, 2016. 3 +[40] Petre Stoica, Randolph L Moses, et al. Spectral analysis of signals. 2 +[41] Chuan Sun, Imran Nazir Junejo, Marshall Tappen, and Hassan Foroosh. Exploring sparseness and self-similarity for action recognition. IEEE Transactions on Image Processing, 24(8):2488-2501, 2015. 2 +[42] Jonathan Tremblay, Aayush Prakash, David Acuna, Mark Brophy, Varun Jampani, Cem Anil, Thang To, Eric Cameracci, Shaad Boochoon, and Stan Birchfield. Training deep networks with synthetic data: Bridging the reality gap by domain randomization. In Proceedings of the IEEE Con + +ference on Computer Vision and Pattern Recognition Workshops, pages 969-977, 2018. 2 +[43] Gul Varol, Javier Romero, Xavier Martin, Naureen Mahmood, Michael J. Black, Ivan Laptev, and Cordelia Schmid. Learning from synthetic humans. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 2 +[44] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pages 5998-6008, 2017. 4 +[45] Michail Vlachos, Philip Yu, and Vittorio Castelli. On periodicity detection and structural periodic similarity. In Proceedings of the 2005 SIAM international conference on data mining, pages 449-460. SIAM, 2005. 2 +[46] Heng Wang and Cordelia Schmid. Action recognition with improved trajectories. In Proceedings of the IEEE international conference on computer vision, pages 3551-3558, 2013. 2 +[47] Hao-Yu Wu, Michael Rubinstein, Eugene Shih, John Guttag, Frédo Durand, and William Freeman. Eulerian video magnification for revealing subtle changes in the world. 2012. 8 +[48] Saining Xie, Chen Sun, Jonathan Huang, Zhuowen Tu, and Kevin Murphy. Rethinking spatiotemporal feature learning: Speed-accuracy trade-offs in video classification. In Proceedings of the European Conference on Computer Vision (ECCV), pages 305–321, 2018. 3 +[49] Weidi Xie, J Alison Noble, and Andrew Zisserman. Microscopy cell counting and detection with fully convolutional regression networks. Computer methods in biomechanics and biomedical engineering: Imaging & Visualization, 6(3):283-292, 2018. 2 +[50] Sangdoo Yun, Dongyoon Han, Seong Joon Oh, Sanghyuk Chun, Junsuk Choe, and Youngjoon Yoo. Cutmix: Regularization strategy to train strong classifiers with localizable features. arXiv preprint arXiv:1905.04899, 2019. 2 +[51] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017. 2 \ No newline at end of file diff --git a/countingouttimeclassagnosticvideorepetitioncountinginthewild/images.zip b/countingouttimeclassagnosticvideorepetitioncountinginthewild/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..14bdbf54491ae9a34a55e4199ba33ea246a4e814 --- /dev/null +++ b/countingouttimeclassagnosticvideorepetitioncountinginthewild/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cbd82cce8cd88a321ac08e057cab3fde8f99d5f96bd584f2966bdf79f0f3470 +size 592834 diff --git a/countingouttimeclassagnosticvideorepetitioncountinginthewild/layout.json b/countingouttimeclassagnosticvideorepetitioncountinginthewild/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3ef82edcf8e97a6af4c61532331634939ecc00b8 --- /dev/null +++ b/countingouttimeclassagnosticvideorepetitioncountinginthewild/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e924d01ec84c89b7311284159e67e797dc93fd1ea28355c904f47012f3b7a739 +size 445126 diff --git a/covernetmultimodalbehaviorpredictionusingtrajectorysets/8c3c2544-f824-40ca-b74d-9ec4a7f6e56d_content_list.json b/covernetmultimodalbehaviorpredictionusingtrajectorysets/8c3c2544-f824-40ca-b74d-9ec4a7f6e56d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ac9e159fa41c459f5d7f33d4d8235a08da29d363 --- /dev/null +++ b/covernetmultimodalbehaviorpredictionusingtrajectorysets/8c3c2544-f824-40ca-b74d-9ec4a7f6e56d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a3449a76c0e2e9a8cd68d77efd6cc4f9d86101ede194e35b63c68301576a4fe +size 76750 diff --git a/covernetmultimodalbehaviorpredictionusingtrajectorysets/8c3c2544-f824-40ca-b74d-9ec4a7f6e56d_model.json b/covernetmultimodalbehaviorpredictionusingtrajectorysets/8c3c2544-f824-40ca-b74d-9ec4a7f6e56d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..205ba7ca22c97503911daca643f83b21d9ea6c56 --- /dev/null +++ b/covernetmultimodalbehaviorpredictionusingtrajectorysets/8c3c2544-f824-40ca-b74d-9ec4a7f6e56d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac0dc2ac0e4746d5cafbca84b211842496774fc33a46d56a08375f9363eec225 +size 93475 diff --git a/covernetmultimodalbehaviorpredictionusingtrajectorysets/8c3c2544-f824-40ca-b74d-9ec4a7f6e56d_origin.pdf b/covernetmultimodalbehaviorpredictionusingtrajectorysets/8c3c2544-f824-40ca-b74d-9ec4a7f6e56d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4d9a809e0d856006c66cbca5c1143ab0b0f5e4c6 --- /dev/null +++ b/covernetmultimodalbehaviorpredictionusingtrajectorysets/8c3c2544-f824-40ca-b74d-9ec4a7f6e56d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c95fbce1eadc71f4063a5f42fbaa98cde903d0d96743bc7524c93f5c9e6289d0 +size 613240 diff --git a/covernetmultimodalbehaviorpredictionusingtrajectorysets/full.md b/covernetmultimodalbehaviorpredictionusingtrajectorysets/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6bd95df1c880c00aba358fe25d6d6190d829e895 --- /dev/null +++ b/covernetmultimodalbehaviorpredictionusingtrajectorysets/full.md @@ -0,0 +1,327 @@ +# CoverNet: Multimodal Behavior Prediction using Trajectory Sets + +Tung Phan-Minh* Caltech + +tung@caltech.edu + +Elena Corina Grigore, Freddy A. Boulton, Oscar Beijbom, and Eric M. Wolff nuTonomy, an Aptiv company + +{elena.corina.grigore,freddy.boulton,scar,eric}@nutonomy.com + +# Abstract + +We present CoverNet, a new method for multimodal, probabilistic trajectory prediction for urban driving. Previous work has employed a variety of methods, including multimodal regression, occupancy maps, and 1-step stochastic policies. We instead frame the trajectory prediction problem as classification over a diverse set of trajectories. The size of this set remains manageable due to the limited number of distinct actions that can be taken over a reasonable prediction horizon. We structure the trajectory set to $a$ ) ensure a desired level of coverage of the state space, and $b$ ) eliminate physically impossible trajectories. By dynamically generating trajectory sets based on the agent's current state, we can further improve our method's efficiency. We demonstrate our approach on public, real-world self-driving datasets, and show that it outperforms state-of-the-art methods. + +# 1. Introduction + +We are motivated by autonomous systems operating in dynamic, interactive, and uncertain environments. Specifically, we focus on the problem of a self-driving car navigating in an urban environment, where it must share the road with a diverse set of other agents, including vehicles, bicyclists, and pedestrians. In this context, reasoning about the possible future states of agents is critical for safe and confident operation. Effective prediction of future agent states depends on both road context (e.g., lane geometry, cross-walks, traffic lights) and the recent behavior of other agents. + +Trajectory prediction is inherently challenging due to a wide distribution of agent preferences (e.g., a cautious vs. aggressive) and intents (e.g., turn right vs. go straight). Useful predictions must represent multiple possibilities and their associated likelihoods. Furthermore, we expect that predicted trajectories are physically realizable. + +Multimodal regression models appear naturally suited for this task, but may degenerate during training into a single mode. Avoiding this "mode collapse" requires careful + +considerations [13, 7, 20]. Additionally, most state-of-the-art methods predict unconstrained positions [13, 7, 20, 31], resulting in trajectories that may not be physically possible for execution ([12] is a recent exception). Our main insights leverage domain-specific knowledge to effectively structure the output representation and address these concerns. + +Our first insight is that there are relatively few distinct actions that can be taken over a reasonable time horizon. Dynamic constraints considerably limit the set of reachable states over a standard six second prediction horizon, and the inherent uncertainty in agent behavior outweighs small approximation errors. We exploit this insight to formulate multimodal, probabilistic trajectory prediction as classification over a trajectory set. This avoids mode collapse and lets the user design the trajectory set to meet specific requirements (e.g., dynamically feasible, coverage guarantees). + +Our second insight is that predicted trajectories should be consistent with the current dynamic state. Thus, we formulate our output as motions relative to our initial state (e.g., turn slightly right, accelerate). When integrated with a dynamics model, the output is converted to an appropriate sequence of positions. Beyond helping ensure physically valid trajectories, this dynamic output representation ensures that the outputs are diverse in the control space across a wide range of speeds. While [12] exploit a similar insight for regression, we extend the use of a dynamic representation to classification and anchor-box regression. + +We now summarize our main contributions on multimodal, probabilistic trajectory prediction with CoverNet: + +- introduce the notion of trajectory sets for multimodal trajectory prediction, and show how to generate them in both a fixed and dynamic manner; +- compare state-of-the-art methods on nuScenes [5], a public, real-world urban driving benchmark; +- empirically show the benefits of classification on trajectory sets over multimodal regression. + +# 2. Related Work + +We focus on trajectory prediction approaches based on deep learning, and refer the reader to [26] for a survey of more classical approaches. The approaches below typically + +![](images/b9a6c8869f9aa5fd2cab10931ee88f0f6d75910c5b0dc33ec6053cb2cb9d9538.jpg) +Figure 1: CoverNet overview. We generate a trajectory set (fixed or dynamic based on current state) that we classify over. The input and backbone follow [13]. + +use CNNs to combine agent history with scene context, and vary significantly in their output representations. Depending on the method, the scene context will include everything from the past states of a single agent, to the past states of all agents along with high-fidelity map information. + +Stochastic approaches encode choice over multiple possibilities via sampling random variables. One of the earliest works on motion forecasting frames the problem as learning stochastic 1-step policies [22]. R2P2 [30] improves sample coverage for such policies via a symmetric KL loss. Recent work has considered the multiagent setting [31] and uncertainty in the model itself [19]. Other methods generate samples using CVAEs [20, 25, 2, 21] or GANs [34, 17, 36]. Stochastic approaches can be computationally expensive due to a) repeated 1-step rollouts (in the 1-step policy approach), or b) requiring a large number of samples for acceptable performance (often hard to determine in practice). + +Unimodal approaches output a single trajectory per agent [27, 6, 15, 1]. This is often unable to adequately capture possibilities in complex scenarios, even when predicting Gaussian uncertainty. These methods typically average over behaviors, which may result in nonsensical trajectories (e.g., halfway between a right turn and going straight). + +Multimodal approaches output either a distribution over multiple trajectories [7, 13, 20, 14] or a spatial-temporal occupancy map [20, 28, 35]. The latter flexibly captures multiple outcomes, but often has large memory requirements for grids at reasonable resolutions. Sampling trajectories from an occupancy map a) is not well defined, and b) adds additional compute during inference. Multimodal regression methods can easily suffer from "mode collapse" to a single mode, leading [7] to use a fixed set of anchor boxes. In contrast, the strength of our contribution lies in framing the problem as classification rather than regression. We also contribute three methods of creating trajectory sets to classify over, and achieve performance improvements over [7]. + +Most trajectory prediction methods do not explicitly encode motion constraints, predicting trajectories that can be physically infeasible (a recent exception is [12]). By careful choice of our output representation, we exclude all trajectories that would be physically impossible to execute. Although our predictions can result in off-road trajectories at test time, our model learns to assign them a low probability as long as such trajectories are not included during training. + +Graph search is a classic approach to motion planning [24], and often used in urban driving applications [4]. A motion planner grows a compact graph (or tree) of possible motions, and computes the best trajectory from this set (e.g., max clearance from obstacles). Since we do not know the other agent's goals or preferences, we cannot directly plan over the trajectory set. Instead, we implicitly estimate these features and directly classify over the set of possible trajectories. There is a fundamental tension between the size of the trajectory set, and the coverage of all potential motions [3]. Since we are only trying to predict the motions of other vehicles well enough to drive, we can easily accept small errors over moderate time horizons (3 to 6 seconds). + +Comparing results on trajectory prediction for self-driving cars in urban environments is challenging. Numerous papers are evaluated purely on internal datasets [13, 35, 6, 28], as common public datasets are either relatively small [16], focused on highway driving [9], or are tangentially related to driving [32]. While there are encouraging new developments in public datasets [8, 20], there is no standard. To help provide clear and open results, we evaluate our models on nuScenes [5], a recent public self-driving car dataset focused on urban driving. + +# 3. Method + +In this section we outline the main contribution of the paper: a novel method for trajectory set generation, and show how it can be used for behavior prediction. + +# 3.1. Notation + +CoverNet computes a multimodal, probabilistic prediction of the future states of a given vehicle using i) the current and past states of all agents (e.g., vehicles, pedestrians, bicyclists), and ii) a high-definition map. + +We assume access to the state outputs of an object detection and tracking system of sufficient quality for self-driving. We denote the set of agents that a self-driving car interacts with at time $t$ by $\mathcal{I}_t$ and $s_t^i$ the state of agent $i \in \mathcal{I}_t$ at time $t$ . Let $s_{m:n}^i = [s_m^i, \ldots, s_n^i]$ where $m < n$ and $i \in \mathcal{I}_t$ denote the discrete-time trajectory of agent $i$ from for times $t = m, \ldots, n$ . + +Furthermore, we assume access to a high-definition map including lane geometry, crosswalks, drivable area, and other relevant information. + +Let $\mathcal{C} = \{\bigcup_{i}s_{t - m:t}^{i};\mathrm{map}\}$ denote the scene context over the past $m$ steps (i.e., map and partial history of all agents). + +Figure 1 overviews our model architecture. It largely follows [13], with the key difference in the output representation (see Section 3.2). We use ResNet-50 [18] given its effectiveness in this domain [13, 7]. + +While our network only computes a prediction for a single agent at a time, our approach can be extended to simultaneously predict for all agents in a similar manner as [7]. We focus on single agent predictions (as in [13]) both to simplify the paper and focus on our main contributions. + +The next sections detail our input and output representations. Our innovations are in our output representations (the dynamic encoding of trajectories), and in treating the problem as classification over a diverse set of trajectories. + +# 3.2. Output representation + +Due to the relatively short trajectory prediction horizons (up to 6 seconds), and inherent uncertainty in agent behavior, we approximate all possible motions with a set of trajectories that gives sufficient coverage of the space. + +Let $\mathcal{R}(s_t)$ be the set of all states that can be reached by an agent with current state $s_t$ in $N$ timesteps (purely based on physical capabilities). We approximate this set by a finite number of trajectories, defining a trajectory set $\mathcal{K} = \{s_{t:t + N}\}$ . We define a dynamic trajectory set generator as a function $f_{N}: s_{0} \to \mathcal{K}$ , which allows the trajectory set to be consistent with the current dynamics. In contrast, a fixed generator does not use information about the current state, and thus returns the same trajectories for each instance. We discuss trajectory set construction in Section 3. + +We encode multimodal, probabilistic trajectory predictions by classifying over the appropriate trajectory set given an agent of interest and the scene context $\mathcal{C}$ . As is common in the classification literature, we use the softmax distribution. Concretely, the probability of the $k$ -th trajectory is given as $p(s_{t:t+N}^k | x) = \frac{\exp f_k(x)}{\sum_i \exp f_i(x)}$ , where $f_i(x) \in \mathbb{R}$ is + +![](images/579813f8415fc836c108b8364fed553ad99ae52de8a1be665853bdf331d19230.jpg) +(a) fixed + +![](images/a50397574eedb20e9432e7fb50139f9174ef7aa78a70e4edeb55d3c46b75df2a.jpg) +(b) dynamic +Figure 2: Overview of trajectory set generation approaches. + +the output of the network's penultimate layer. + +In contrast to previous work [13, 7], we choose not to learn an uncertainty distribution over the space. While it is straightforward to add Gaussian uncertainty along each trajectory in a similar manner to [7], the density of our trajectory sets reduces its benefit compared to the case when there are only a handful of modes. + +An ideal trajectory set always contains a trajectory that is close to the ground truth. We propose two broad categories of trajectory set generation functions: fixed and dynamic (see Figure 2). In both cases, we normalize the current state to be at the origin, with the heading oriented upwards. + +# 3.3. Fixed trajectory sets + +We consider a trajectory set to be fixed if the trajectories that it contains do not change as a function of the agent's current dynamic state or environment. Intuitively, this makes it easy to classify over since it allows for a fixed enumeration over the set, but may result in many trajectories that are poor matches for the current situation. + +Given a set of representative trajectory data, the problem of finding the smallest fixed approximating trajectory set $\mathcal{K}$ can be cast as an instance of the NP-hard set cover problem. [11]. Approximating a dense trajectory set by a sparse trajectory set that still maintains good coverage and diversity has been studied in the context of robot motion planning [3]. In this work, we use a coverage metric $\delta$ defined as the maximum point-wise Euclidean distance between trajectories. Our trajectory set construction procedure starts with subsampling a reasonably large set $\mathcal{K}'$ of trajectories (ours have size 20,000) from the training set. Selecting an acceptable error tolerance $\varepsilon$ , we proceed to find the solution to: + +$$ +\begin{array}{l} \operatorname * {a r g m i n} _ {\mathcal {K}} \qquad | \mathcal {K} | \\ \text {s u b j e c t} \quad \mathcal {K} \subseteq \mathcal {K} ^ {\prime}, \tag {1} \\ \forall k \in \mathcal {K} ^ {\prime}, \exists l \in \mathcal {K}, \delta (k, l) \leq \varepsilon , \\ \end{array} +$$ + +where $\delta(s_{t:t+N}, \hat{s}_{t:t+N}) \coloneqq \max_{\tau=t}^{t+N} \|s_{\tau} - \hat{s}_{\tau}\|_2$ . We refer to this metric as the maximum point-wise $\ell^2$ distance. + +We employ a simple greedy approximation algorithm to solve (1), which we refer to as the bagging algorithm. We cherry-pick the best among candidate trajectories to place in a bag of trajectories that will be used as the covering set. We repeatedly consider as candidates those trajectories that have not yet been covered and choose the one that covers the most uncovered trajectories (ties are broken arbitrarily). + +Standard results (without using the specialized structure of the data) show that our deterministic greedy algorithm is suboptimal by a factor of at most $\log(|\mathcal{K}'|)$ (see Chapter 35.3 [11]). In our experiments, we were able to obtain decent coverage (specifically, under 2 meters in maximum point-wise $\ell^2$ distance for 6 second trajectories) with fewer than 2,000 elements in the covering set. + +# 3.4. Dynamic trajectory sets + +We consider a trajectory set to be dynamic if the trajectories that it contains change as a function of the agent's current dynamic state. This construction guarantees that all trajectories in the set are dynamically feasible. + +We now describe a simple approach to constructing such a dynamic trajectory set, focused on predicting vehicle motion. We use a standard vehicle dynamical model [24] as similar models are effective for planning at urban (non-highway) driving speeds [23]. Our approach, however, is not limited to vehicles or any specific model. The dynamical model we use is: + +$$ +\begin{array}{l} \dot {x} = v \cos \theta \\ \dot {y} = v \sin \theta \\ \dot {\theta} = \frac {v}{b} \tan (u _ {\text {s t e e r}}) \\ \dot {v} = u _ {a c c e l} \\ \end{array} +$$ + +with states: $x$ , $y$ (position), $v$ (speed), $\theta$ (yaw); controls: $u_{steer}$ (steering angle), $u_{accel}$ (longitudinal acceleration); and parameter: $b$ (wheelbase). + +The dynamics model, controls sequence, and current state determine a trajectory $s_{t:t+N}$ by forward integration. We create a dynamic trajectory set $\mathcal{K}$ based on the current state $s_t$ by integrating forward with our dynamic model over diverse control sequences. Such a dynamic trajectory set has the possibility of being sparser than a fixed set for the same coverage, as each control sequence maps to multiple trajectories (as a function of the current state). + +We parameterize the controls (output space) by a diverse set of constant lateral and longitudinal accelerations over the prediction horizon. Using lateral acceleration instead of steering angle is a way of normalizing the output over a range of speeds (a desired lateral acceleration will correspond to different steering angles as a function of speed). We convert the lateral acceleration into a steering angle assuming instantaneous circular motion $a_{lat} = v^2\kappa$ with curvature $\kappa = \tan (u_{steer}) / b$ . This conversion is ill-defined + +![](images/3284267d7a0b5ffbc957b025329f95b6afb3f135d576c3e6be66aca15a197ff8.jpg) +Figure 3: Number of trajectories needed for $\varepsilon$ coverage (in meters, see Section 3) + +when the speed is near zero, so we use $\max(v, 1)$ in place of $v$ . Note that it is straightforward to expand the controls (output space) to include multiple lateral and longitudinal accelerations over a non-uniform prediction horizon. + +We can further prune the dynamic trajectory set construction in a similar manner to how we handled the fixed trajectory sets in 3.3. The main difference is that the covering set here is constructed from the set of control input profiles as opposed to elements of $\kappa'$ itself. Namely, we use an analogous greedy procedure to cover the set of sample trajectories with a subset of control profiles (e.g., lateral and longitudinal accelerations as a function of time). Note that unlike the case of fixed trajectories, the synthetic nature of the dynamic profile may not guarantee $100\%$ coverage of $\kappa'$ . To counter this problem we can also create a hybrid trajectory set by combining a fixed and dynamic set. Particularly, we find a covering subset for the elements of $\kappa'$ that cannot be covered by the dynamic choices, and combine this subset with the dynamic choices. When the dynamic set is well-constructed, this can result in a smaller covering set as may be seen from Figure 3. + +# 4. Experiments + +We present empirical results on trajectory prediction of vehicles in urban environments. The following sections describe the baselines, metrics, and urban driving datasets that we considered. We used the same input representation and model architecture across our models and baselines. + +# 4.1. Baselines + +Physics oracle. We introduce a simple and interpretable model that extends classic physics-based models. We use the track's current velocity, acceleration, and yaw rate to compute the following predictions: i) constant velocity and yaw, ii) constant velocity and yaw rate, iii) constant acceleration and yaw, and iv) constant acceleration and yaw rate. + +The oracle is the minimum average point-wise Euclidean distance over the four models. + +Regression baselines and extensions. We compare our contribution to state-of-the-art methods by implementing two main types of regression models: multimodal regression to coordinates [13] and multimodal regression to residuals from a set of anchors [7] (ordinal regression). We overview these methods for completeness and to provide context for novel variations that we introduce. + +Multimodal regression to coordinates. Our implementation follows the details of Multiple-Trajectory Prediction (MTP) [13], adapted for our datasets. This model predicts a fixed number of trajectories (modes) and their associated probabilities. The per-agent loss (agent $i$ at time $t$ ) is defined as: + +$$ +\mathcal {L} _ {i t} ^ {M T P} = \sum_ {k = 1} ^ {| \mathcal {K} |} \mathbb {1} _ {k = \hat {k}} \left[ - \log p _ {i k} + \alpha L \left(s _ {t: t + N} ^ {i}, \hat {s} _ {t: t + N} ^ {i}\right) \right], \tag {2} +$$ + +where $\mathbb{1}(\cdot)$ is the indicator function that equals 1 only for the "best matching" mode, $k$ represents a mode, $L$ is the regression loss, and $\alpha$ is a hyper-parameter used to trade off between classification and regression. With some abuse of notation we use $\mathcal{K}$ to represent the set of trajectories predicted by a model. The original implementation [13] uses a heuristic based on the relative angle between each mode and the ground truth. We select a mode uniformly at random when there are no modes with an angle below the threshold. + +Multimodal regression to anchor residuals. Our implementation follows the details of MultiPath (MP) [7]. This model implements ordinal regression by first choosing among a fixed set of anchors (computed a priori) and then regressing to residuals from the chosen anchor. The proposed per-agent loss is (2) where $\alpha = 1$ and the $k$ -th trajectory is the sum of the corresponding anchor and predicted residual. To remain true to the implementation in [7], we choose our best matching anchor by minimizing the average displacement to the ground truth. + +We compute the set of fixed anchors by employing the same mechanism described in Section 3.3. Note that this set of trajectories is the same for all agents in our dataset. We then regress to the residuals from the chosen anchor. + +# 4.2. Our models + +CoverNet (fixed). Our classification approach where the $\kappa$ set includes only fixed trajectories. + +CoverNet (dynamic). Our classification approach where the $\kappa$ set is a function of the current agent state. + +CoverNet (hybrid). Our classification approach where the $\mathcal{K}$ set is a combination of fixed and dynamic trajectories. + +MultiPath with dynamic anchors. The MultiPath approach, extended to use dynamic anchors, described in Section 3.4. The set of anchors is a function of the agent's + +speed, helping ensure that anchors are dynamically feasible. We then regress to the residuals from the chosen anchor. + +# 4.3. Implementation details + +Our implementation setup follows [13] and [7], with key differences highlighted below. See Figure 1 for an overview. + +We implemented our models using ResNet-50 [18] as our backbone, with pre-trained ImageNet [33] weights downloaded from [10]. We read the ResNet conv5 feature map and apply a global pooling layer. We then concatenate the result with an agent state vector (including speed, acceleration, yaw rate), as detailed in [13]. We then add a fully connected layer, with dimension 4096. + +The output dimension of CoverNet is equal to the number of modes, namely $|\mathcal{K}|$ . For the hybrid models, the fixed:dynamic trajectory split for the nuScenes dataset is 92:682 and that of the internal dataset is 524:500. We chose these values to maximize coverage at $\epsilon \approx 2$ meters and minimize the sum of the total number of categories. + +For the regression models, our outputs are of dimension $|\mathcal{K}| \times (|\vec{x}| \times N + 1)$ , where $|\mathcal{K}|$ represents the total number of predicted modes, $|\vec{x}|$ represents the number of features we are predicting per point, $N$ represents the number of points in our predictions, and the extra output per mode is the probability associated with each mode. For our implementations, $N = H \times F$ , where $H$ represents the length of the prediction horizon in seconds, and $F$ represents the sampling frequency. For each point, we predict $(x,y)$ coordinates, so $|\vec{x}| = 2$ . + +Our internal datasets have $F = 10Hz$ , while the publicly available nuScenes is sampled at $F = 2Hz$ . We include results on two different prediction horizon lengths, namely $H = 3$ seconds and $H = 6$ seconds. + +The loss functions we use are the same across all of our implementations: for any classification losses, we utilize cross-entropy with positive samples determined by the element in the trajectory set closest to the actual ground truth in minimum average of point-wise Euclidean distances, and for any regression losses, we utilize smooth $\ell^1$ . For our MTP implementation, we place equal weighting between the classification and regression components of the loss, setting $\alpha = 1$ , similar to [13]. + +For our classification models, we utilize a fixed learning rate of $1\mathrm{e} - 4$ . For our regression models, we use a learning rate of $1\mathrm{e} - 4$ , with a drop by 0.1 as follows: for our internal dataset, we always perform the drop at epoch 6; for nuScenes, we perform the drop at (1) epoch 31 for MTP with 1 and 3 modes and MP dynamic with 16 modes, (2) epoch 12 for MTP with 16 and 64 modes, MP with 16 modes and MP dynamic with 64 modes, and (3) epoch 7 for MP with 64 modes. + +![](images/2da5072a2be42fbe5f2dbdfd84ff1de7121c0be87df215b6f9595aec83b351ce.jpg) +(a) CoverNet, fixed, $\varepsilon = 2$ , 1937 modes + +![](images/b0478dc021c7ae87551195174d3dc8af49e61ed930361d993a195fe3e3875125.jpg) +(b) CoverNet, hybrid, 1024 modes + +![](images/159c70dee0aee03579cb643cc8518dec66f90f3a2fc39b76cfa452f2ab81b599.jpg) +(c) CoverNet, dynamic $\varepsilon = 3, 342$ modes + +![](images/9a4ab11abff864ddb3de7833eb34bceee34bd5fcd48e7161dfa1542e7edff41c.jpg) +(d) MTP [13], 3 modes + +![](images/e4892d4dc1f4490696e15942a399f92e003d570a3492b1476345b2ab744e59ec.jpg) +(e) MultiPath [13], dynamic, 16 modes + +![](images/cc931e48ab3b01591101c215923934e152bfe2e8efe629a32a5c7661dccd41a7.jpg) +(f) MultiPath [13], 64 modes +Figure 4: Examples of predicted trajectories on the same scene. The top row includes our CoverNet models, ranging from fixed to dynamic. The bottom row includes the baselines we compare against, as well as our dynamic templates variation. Objects in the world are rendered up to the current time. + +# 4.4. Metrics + +There are multiple ways of evaluating multimodal trajectory prediction. Common measures include log-likelihood [7, 31], average displacement error, and hit rate [20]. We focus on the a) displacement error, and b) hit rate, both computed over a subset of the most likely modes. + +For insight into trajectory prediction performance in scenarios where there are multiple plausible actions, we use the minimum average displacement error (ADE). The $\min\mathrm{ADE_k}$ is $\min_{\hat{s} \in \mathcal{P}} \frac{1}{N} \sum_{\tau = t}^{t + N} ||s_{\tau} - \hat{s}_{\tau}||$ , where $\mathcal{P}$ is the set of $k$ most likely trajectories. We also analyze the final displacement error (FDE), which is $||s_{t + N} - \hat{s}_{t + N}^*||$ , where $s^*$ is the most likely mode. + +In the context of planning for a self-driving vehicle, the above metrics may be hard to interpret. We use the notion of a hit rate (see [20]) to simplify interpretation of whether or not a prediction was "close enough." We define a $\mathrm{Hit}_{k,d}$ for a single instance (agent at a given time) as 1 if + +$\min_{\hat{s} \in \mathcal{P}} \max_{\tau = t}^{t + N} ||s_{\tau} - \hat{s}_{\tau}|| \leq d,$ and $0$ otherwise. When averaged over all instances, we refer to it as the HitRate $_{k,d}$ . + +# 4.5. Input representation + +Similar to [13, 7, 15], we rely on results from an object detection module, and we rasterize the scene for each agent as an RGB image. We start with a blank image of size $(H, W, 3)$ and draw the drivable area, crosswalks, and walk ways using a distinct color for each semantic category. + +We rotate the image so that the agent's heading faces up, and place the agent on pixel $(l, w)$ , measured from the top-left of the image. We assign a different color to vehicles and pedestrians and choose a different color for the agent so that it is distinguishable. In our experiments, we use a resolution of 0.1 meters per pixel and choose $l = 400$ and $w = 250$ . Thus, the model can "see" 40 meters ahead, 10 meters behind, and 25 meters on each side of the agent. + +We represent the sequence of past observations for each agent as faded bounding boxes of the same color as the + +![](images/46f7f65451a5116e7103de331caf239eea9f875e0f2f866ac6a8bdb4004672d6.jpg) +Figure 5: Best models of each type on internal dataset (6 second horizon). CoverNet models significantly outperform others. Legend lists the model name, whether the model is dynamic or fixed (if applicable), and the number of modes. + +agent's current bounding box. We fade colors by linearly decreasing saturation (in HSV space) as a function of time. + +Although, we have only used one input representation in these experiments, our novel output representation can work with the input representations of [28, 35]. + +# 4.6. Datasets + +Internal self-driving dataset. We collected 60 hours of real-world, urban driving data in Singapore. Raw sensor data is collected by a car outfitted with cameras, lidars, and radars. A highly-optimized object detection and tracking system filters the raw sensor data to produce tracks at a $10\mathrm{Hz}$ rate. Each track includes information regarding its type (e.g., car, pedestrian, bicycle, unknown), pose, physical extent, and speed, with quality sufficient for fully-autonomous driving. We also have access to high-definition maps with semantic labels of the road such as the drivable area, lane geometry, and crosswalks. + +Each ego vehicle location at a given timestamp is considered a data point. We do not predict on any tracks that are stationary over the entire prediction horizon. Our internal dataset contains around 11 million usable data points but for this analysis we created train, validation, and test sets with 1 million, 300,000, and 300,000 data points, respectively. + +nuScenes. We also report results on nuScenes [5], a public self-driving car dataset. nuScenes consists of 1000 scenes, each 20 seconds in length. Scenes are taken from urban driving in Boston, USA and Singapore. Each scene includes hand-annotated tracks and high-definition maps. Tracks have 3D ground truth annotations, and are published at $2\mathrm{Hz}$ . Since annotations are not public on the test set, we created a set for validation from the train set (called the train-val set) and treated the validation set as the test set. As with our internal dataset, we removed vehicles that are stationary and also removed vehicles that go off the annotated + +
MethodminADE1minADE5minADE10minADE15
max ℓ21.00.670.640.64
average ℓ20.960.660.640.64
RMS of ℓ20.960.660.640.63
+ +Table 1: Ground truth matching for fixed trajectory set (150 modes) on internal dataset (3 sec horizon). + +map. This leaves us with 32,186 observations in the train set, 8,560 observations in the train-val set, and 9,041 observations in the validation set. This split publicly available in the nuScenes software development kit [29]. + +# 5. Results + +The main results are summarized in Table 2. Qualitative results are shown in Figure 4. + +Quantitative results. Across the six metrics and the two datasets we used, CoverNet outperforms previous methods and baselines in 8 out of 12 cases. However, there are big differences in method ranking depending on the metric. + +CoverNet represents a significant improvement on the HitRate $_{5,2\mathrm{m}}$ metric, achieving $33\%$ on nuScenes with the hybrid trajectory set. The next best model is MultiPath, where our dynamic grid extension is a slight improvement over the fixed grid used by the authors (13% vs. 10%). MTP with three modes performs worse, achieving $10\%$ , barely outperforming the constant velocity baseline. + +We notice a similar pattern on the internal dataset, where CoverNet outperforms previous methods and baselines. Here, the fixed set with 1,937 modes performs best $(57\%)$ , closely followed by the hybrid set $(55\%)$ . Among previous methods, again MultiPath with dynamic set works the best at $30\%$ HitRate $_{5,2m}$ . Figure 5 shows that CoverNet significantly outperforms previous methods as the hit rate is expanded over more modes. + +CoverNet also performs well according the Average Displace Error $\mathrm{minADE_k}$ metrics, in particular for $k\in$ $\{5,10,15\}$ , where we see CoverNet outperforming state-of-the-art methods in every category. Most notably, under the $\mathrm{minADE}_{15}$ metric for our internal dataset, the hybrid CoverNet with fixed set and 2,206 modes performs best with $\mathrm{minADE}_{15}$ of 0.84, 4x better than the constant velocity baseline and 2x better than the MTP and MultiPath. For the $\mathrm{minADE_1}$ metric the regression methods performed the best. This is not surprising since for low $k$ it is more important to have one trajectory very close to the ground truth, a metric paradigm that favors regression over classification. + +A notable difference between nuScenes and internal is that the HitRate $_{5,2\mathrm{m}}$ and $\min\mathrm{ADE_k}$ continues to improve for larger sets, while it plateaus, or even decreases at around + +
MethodModesminADE1↓minADE5↓minADE10↓minADE15↓FDE↓HitRate5,2m ↑
Const. vel. & yawN/A4.61 (3.63)4.61 (3.63)4.61 (3.63)4.61 (3.63)11.21 (9.86)0.09 (0.22)
Physics oracleN/A3.70 (1.88)3.70 (1.88)3.70(1.88)3.70 (1.88)9.09 (5.72)0.12 (0.31)
MTP [13]1 (1)4.17 (1.88)4.17 (1.88)4.17 (1.88)4.17 (1.88)9.37 (5.22)0.05 (0.24)
MTP [13]3 (3)4.13 (2.01)2.93 (1.73)2.93 (1.73)2.93 (1.73)9.23 (5.45)0.10 (0.28)
MTP [13]16 (16)4.55 (3.15)3.32 (2.48)3.25 (2.43)3.23 (2.42)9.58 (7.79)0.08 (0.25)
MTP [13]64 (64)4.50 (3.21)3.24 (2.63)3.15 (2.51)3.13 (2.47)9.59 (7.74)0.09 (0.27)
MultiPath [7]16 (16)4.89 (2.34)2.64 (1.71)2.47 (1.71)2.43 (1.70)10.41 (5.83)0.08 (0.24)
MultiPath [7]64 (64)5.05 (2.30)2.32 (1.42)1.96 (1.36)1.86 (1.34)10.69 (5.63)0.10 (0.27)
MultiPath [7], dyn.16 (16)3.89 (2.06)3.34 (1.47)3.28 (1.46)3.27 (1.46)9.19 (5.76)0.10 (0.30)
MultiPath [7], dyn.64 (64)4.05 (2.23)3.45 (1.53)3.33 (1.46)3.28 (1.44)9.47 (6.17)0.13 (0.28)
CoverNet, fixed, ε=864 (64)5.16 (2.77)2.41 (1.98)2.18 (1.93)2.13 (1.93)10.84 (6.65)0.08 (0.06)
CoverNet, fixed, ε=5232 (208)4.73 (2.32)2.14 (1.35)1.72 (1.25)1.60 (1.22)10.16 (5.67)0.15 (0.31)
CoverNet, fixed, ε=4415 (374)5.07 (2.27)2.31 (1.29)1.76 (1.15)1.57 (1.10)10.62 (5.85)0.17 (0.35)
CoverNet, fixed, ε=3844 (747)4.74 (2.28)2.32 (1.32)1.74 (1.13)1.51 (1.07)10.19 (5.92)0.23 (0.33)
CoverNet, fixed, ε=22206 (1937)5.41 (2.16)2.62 (1.16)1.92 (0.93)1.63 (0.84)11.36 (5.53)0.24 (0.57)
CoverNet, dyn., ε=3357 (342)3.90 (2.06)2.02 (1.17)1.57 (0.97)1.36 (0.88)9.65 (5.90)0.33 (0.52)
CoverNet, hybrid774 (1024)3.87 (2.18)1.96 (1.24)1.48 (0.99)1.28 (0.88)9.26 (5.84)0.33 (0.55)
+ +Table 2: nuScenes and internal datasets (6 sec horizon). Results listed as nuScenes (internal). Smaller $\mathrm{minADE_k}$ and FDE is better. Larger HitRate $_5, 2\mathrm{m}$ is better. Dyn. = dynamic, vel. = velocity, const. = constant, $\varepsilon$ is given in meters. + +500-1,000 modes on nuScenes. We hypothesize that this is due to relatively limited size of nuScenes. + +Qualitative results. In Figure 4, we show the visualization of a scene overlaid with predictions from our top models compared against our baselines. We note that our prediction horizon for this scene is six seconds. As such, the predictions do not reflect collisions as the pedestrians in the scene will have crossed the road before our vehicle reaches the pedestrian pose reflected in the images. + +We emphasize that the CoverNet predictions do not include straight trajectories because the vehicle slows down before the curve. When visualized as a video, we first predict straight trajectories, followed by predicting left turn trajectories when the vehicle starts slowing down. We highlight the smoothness of the trajectories predicted by our model contrasted against the regression baselines. Figure 4 also suggests that the different alternatives for left turns are better captured by CoverNet than by the baseline models. + +# 6. Ablation studies + +# 6.1. Distance function + +We analyzed different methods for matching the ground truth to the most suitable trajectory in the trajectory set. Table 1 compares performance using the max, average, and root-mean-square of the point-wise error vector of Euclidean distances for matching ground truth to the "best" trajectory in a fixed trajectory set of size 150. Performance is relatively consistent across all three choices, so we picked + +the average point-wise $\ell^2$ norm to better align with related regression approaches [7]. + +# 6.2. Dynamic vs fixed trajectory set coverage + +In Figure 3, we compare the number of trajectories needed to achieve $100\%$ coverage of the trajectory set for different levels of $\varepsilon$ for the fixed and hybrid trajectory set generation functions, where the latter use a mix of fixed and dynamic trajectories. This figure highlights the advantage of adding dynamic trajectories: they are able to achieve the same level of coverage as the fixed trajectories, but need a smaller number of trajectories to do so. + +# 7. Conclusion + +We introduced CoverNet, a novel method for multimodal, probabilistic trajectory prediction in real-world, urban driving scenarios. By framing this problem as classification over a diverse set of trajectories, we were able to a) ensure a desired level of coverage of the state space, b) eliminate dynamically infeasible trajectories, and c) avoid the issue of mode collapse. We showed that the size of our trajectory sets remain manageable over realistic prediction horizons. Dynamically generating trajectory sets based on the agent's current state further improved performance. We compared our results to multiple state-of-the-art methods on real-world self-driving datasets (public and internal), and showed that it outperforms similar methods. + +Acknowledgments. We would like to thank Emilio Frazzoli and Sourabh Vora for insightful discussions, and Robert Beaudoin for help on the implementation. + +# References + +[1] A. Alahi, K. Goel, V. Ramanathan, A. Robicquet, L. Fei-Fei, and S. Savarese. Social LSTM: Human trajectory prediction in crowded spaces. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 2 +[2] Apratim Bhattacharyya, Bernt Schiele, and Mario Fritz. Accurate and diverse sampling of sequences based on a "best of many" sample objective. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 2 +[3] M. S. Branicky, R. A. Knepper, and J. J. Kuffner. Path and trajectory diversity: Theory and algorithms. In The IEEE International Conference on Robotics and Automation (ICRA), May 2008. 2, 3 +[4] Martin Buehler, Karl Iagnemma, and Sanjiv Singh. The DARPA Urban Challenge: Autonomous Vehicles in City Traffic. Springer Publishing Company, 1st edition, 2009. 2 +[5] Holger Caesar, Varun Bankiti, Alex H. Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giancarlo Baldan, and Oscar Beijbom. nuScenes: A multimodal dataset for autonomous driving. arXiv preprint arXiv:1903.11027, 2019. 1, 2, 7 +[6] Sergio Casas, Wenjie Luo, and Raquel Urtasun. IntentNet: Learning to predict intention from raw sensor data. In Proceedings of The 2nd Conference on Robot Learning, October 2018. 2 +[7] Yuning Chai, Benjamin Sapp, Mayank Bansal, and Dragomir Anguelov. MultiPath: Multiple probabilistic anchor trajectory hypotheses for behavior prediction. In 3rd Conference on Robot Learning (CoRL), November 2019. 1, 2, 3, 5, 6, 8 +[8] Ming-Fang Chang, John Lambert, Patsorn Sangkloy, Jagjeet Singh, Slawomir Bak, Andrew Hartnett, De Wang, Peter Carr, Simon Lucey, Deva Ramanan, and James Hays. Argov-verse: 3d tracking and forecasting with rich maps. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[9] J. Colyar and J. Halkias. US highway 101 dataset, 2007. 2 +[10] Torch Contributors. Torchvision.models. https://torch.org/docs/stable/torchvision/models.html, 2019.5 +[11] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Third Edition. The MIT Press, 3rd edition, 2009. 3, 4 +[12] 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, 2019. https://arxiv.org/abs/1908.00219v1.1, 2 +[13] H. Cui, V. Radosavljevic, F. Chou, T. Lin, T. Nguyen, T. Huang, J. Schneider, and N. Djuric. Multimodal trajectory predictions for autonomous driving using deep convolutional networks. In International Conference on Robotics and Automation (ICRA), May 2019. 1, 2, 3, 5, 6, 8 +[14] Nachiket Deo and Mohan Trivedi. Convolutional social pooling for vehicle trajectory prediction. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, June 2018. 2 + +[15] 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, 2018. https://arxiv.org/abs/1808.05819v2.2, 6 +[16] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? The KITTI vision benchmark suite. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2012. 2 +[17] Agrim Gupta, Justin Johnson, Li Fei-Fei, Silvio Savarese, and Alexandre Alahi. Social GAN: Socially acceptable trajectories with generative adversarial networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 2 +[18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 3, 5 +[19] Mikael Henaff, Alfredo Canziani, and Yann LeCun. Model-predictive policy learning with uncertainty regularization for driving in dense traffic. In 7th International Conference on Learning Representations (ICLR), April 2019. 2 +[20] Joey Hong, Benjamin Sapp, and James Philbin. Rules of the Road: Predicting driving behavior with a convolutional model of semantic interactions. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 1, 2, 6 +[21] Boris Ivanovic, Edward Schmerling, Karen Leung, and Marco Pavone. Generative modeling of multimodal multi-human behavior. In Proceedings of the International Conference on Intelligent Robots and Systems (IROS), October 2018. 2 +[22] Kris M. Kitani, Brian D. Ziebart, J. Andrew Bagnell, and Martial Hebert. Activity forecasting. In The European Conference on Computer Vision (ECCV), 2012. 2 +[23] J. Kong, M. Pfeiffer, G. Schildbach, and F. Borrelli. Kinematic and dynamic vehicle models for autonomous driving control design. In The IEEE Intelligent Vehicles Symposium (IV), June 2015. 4 +[24] Steven M. LaValle. Planning Algorithms. Cambridge University Press, New York, NY, USA, 2006. 2, 4 +[25] Namhoon Lee, Wongun Choi, Paul Vernaza, Chris Choy, Philip Torr, and Manmohan Chandraker. DESIRE: Distant future prediction in dynamic scenes with interacting agents. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 2 +[26] Stephanie Lefvre, Dizan Vasquez, and Christian Laugier. A survey on motion prediction and risk assessment for intelligent vehicles. ROBOMECH Journal, 2014. 1 +[27] Wenjie Luo, Bin Yang, and Raquel Urtasun. Fast and Furious: Real time end-to-end 3d detection, tracking and motion forecasting with a single convolutional net. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 2 +[28] Abhijit Ogale Mayank Bansal, Alex Krizhevsky. Chauffeur-Net: Learning to drive by imitating the best and synthesizing the worst. In Robotics: Science and Systems (RSS), June 2019. 2, 7 + +[29] nuScenes Contributors. nuScenes. https://www.nuscenes.org/, 2020.7 +[30] Nicholas Rhinehart, Kris M. Kitani, and Paul Vernaza. R2P2: A reparameterized pushforward policy for diverse, precise generative path forecasting. In The European Conference on Computer Vision (ECCV), September 2018. 2 +[31] Nicholas Rhinehart, Rowan McAllister, Kris Kitani, and Sergey Levine. PRECOG: Prediction conditioned on goals in visual multi-agent settings. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 1, 2, 6 +[32] A. Robicquet, A. Sadeghian, A. Alahi, and S. Savarese. Learning social etiquette: Human trajectory prediction in crowded scenes. In The European Conference on Computer Vision (ECCV), 2016. 2 +[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. The International Journal of Computer Vision, December 2015. 5 +[34] 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 The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 +[35] Wenyuan Zeng, Wenjie Luo, Simon Suo, Abbas Sadat, Bin Yang, Sergio Casas, and Raquel Urtasun. End-to-end interpretable neural motion planner. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2, 7 +[36] 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 The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 2 \ No newline at end of file diff --git a/covernetmultimodalbehaviorpredictionusingtrajectorysets/images.zip b/covernetmultimodalbehaviorpredictionusingtrajectorysets/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5395b103529e725cd03f5e600b53ee6ee501dacd --- /dev/null +++ b/covernetmultimodalbehaviorpredictionusingtrajectorysets/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5af6199a0fba08ab6bb646c92110c63114b32fd80210f3a9eb8db18b2f11d8c9 +size 512534 diff --git a/covernetmultimodalbehaviorpredictionusingtrajectorysets/layout.json b/covernetmultimodalbehaviorpredictionusingtrajectorysets/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ef5a5c559fc33966ce1579eb8be0bc1208b67eb6 --- /dev/null +++ b/covernetmultimodalbehaviorpredictionusingtrajectorysets/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:522a164366ab0b1ba40321d961ea7c961f377707c992da3b8aeb8191909a799f +size 402944 diff --git a/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/9ff94425-27fb-479f-b924-67e5c242ab7c_content_list.json b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/9ff94425-27fb-479f-b924-67e5c242ab7c_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4db3a04fe17fe8999fa5a7edac8f37567adbfd25 --- /dev/null +++ b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/9ff94425-27fb-479f-b924-67e5c242ab7c_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ddc62a9f770e1cc881f41ed8b1a802ab1c7df2f465c9ca6aa6f27c8694ea0ca2 +size 77226 diff --git a/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/9ff94425-27fb-479f-b924-67e5c242ab7c_model.json b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/9ff94425-27fb-479f-b924-67e5c242ab7c_model.json new file mode 100644 index 0000000000000000000000000000000000000000..35c9515510f626ffc3feed3d17e28f5e14657b64 --- /dev/null +++ b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/9ff94425-27fb-479f-b924-67e5c242ab7c_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:999d7ffbe1fd9868d58e007bfeb0799fe94f5f0a43f4d7a57447f5fdd1d553dd +size 96307 diff --git a/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/9ff94425-27fb-479f-b924-67e5c242ab7c_origin.pdf b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/9ff94425-27fb-479f-b924-67e5c242ab7c_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2920aa1febd95fd774d5d4e1406074c5a8ebd710 --- /dev/null +++ b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/9ff94425-27fb-479f-b924-67e5c242ab7c_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c65140f7d9f83d0e85792ff756f569395a4a4858387c468c06a48fdea817728 +size 1833609 diff --git a/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/full.md b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/full.md new file mode 100644 index 0000000000000000000000000000000000000000..1e193b8666049e16f06b59f6e8ba3751efc72e65 --- /dev/null +++ b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/full.md @@ -0,0 +1,280 @@ +# Creating Something from Nothing: Unsupervised Knowledge Distillation for Cross-Modal Hashing + +Hengtong Hu $^{1,2*}$ ; Lingxi Xie $^{3}$ , Richang Hong $^{1,2†}$ ; Qi Tian $^{3}$ + +$^{1}$ School of Computer Science and Information Engineering, Hefei University of Technology, $^{2}$ Key Laboratory of Knowledge Engineering with Big Data, Hefei University of Technology, $^{3}$ Huawei Inc. + +huhengtong.hfut@gmail.com, 198808xc@gmail.com, hongrc@hfut.edu.cn, tian.qil@huawei.com + +# Abstract + +In recent years, cross-modal hashing (CMH) has attracted increasing attention, mainly because its potential ability of mapping contents from different modalities, especially in vision and language, into the same space, so that it becomes efficient in cross-modal data retrieval. There are two main frameworks for CMH, differing from each other in whether semantic supervision is required. Compared to the unsupervised methods, the supervised methods often enjoy more accurate results, but require much heavier labors in data annotation. In this paper, we propose a novel approach that enables guiding a supervised method using outputs produced by an unsupervised method. Specifically, we make use of teacher-student optimization for propagating knowledge. Experiments are performed on two popular CMH benchmarks, i.e., the MIRFlickr and NUS-WIDE datasets. Our approach outperforms all existing unsupervised methods by a large margin. + +# 1. Introduction + +Recently, with the rapid increase of multimedia data, cross-modal retrieval [37, 46, 18, 47, 7, 1, 10, 25, 22] has attracted more and more attentions in both academia and industry. The goal is to retrieve instances from one modality using a query instance from another modality, e.g., finding an image with a few textual tags. One of the most popular pipeline for this purpose, named cross-modal hashing (CMH) [1, 19, 23, 47, 7], involves mapping contents in different modalities into a common hamming space. By compressing each instance into a fixed-length binary code, the storage cost can be dramatically reduced and the time complexity for retrieval is constant since the indexing structure + +
WL?ER?KD?
DCMH [17]✓
SSAH [20]✓
UCH [21]✓
UGACH [45]✓✓
UKD✓✓✓
+ +Table 1. The difference between our approach and some recent cross-modal hashing methods. Here, 'WL' indicates that training without using labels, 'ER' indicates that the method utilizes extensive relevance information rather than only the pairwise information, and 'KD' indicates utilizing knowledge distillation in the training process. + +is built with hashing codes. + +State-of-the-art CMH methods can be roughly categorized into two parts, namely, supervised and unsupervised methods. Both of them learn to shrink the gap between the distributions of two sets of training data (e.g., using adversarial-learning-based approaches [20, 21, 13]), but they differ from each other in whether an instance-level annotation is provided during the training stage. From this perspective, the supervised CMH methods [1, 25, 22, 34, 44], receiving additional supervision, often produce more accurate results, and the unsupervised counterparts, while achieving lower performance, are relatively easier to deploy to real-world scenarios. + +This paper combines the benefits of both methods by a simple yet effective idea, known as creating something from nothing. The core idea is straightforward: the supervised methods do not really require each instance to be labeled, but they use the labels to estimate the similarity between each pair of cross-modal data. Such information, in case of no supervision, can also be obtained from calculating the distance between their feature vectors, with the features provided by a trained unsupervised CMH method. Our approach, unsupervised knowledge distillation (UKD), + +contains an unsupervised CMH module followed by another supervised one, both of which can be freely replaced by new and more powerful models in the future. + +Our research paves the way towards an interesting direction that using an unsupervised method to guide a supervised method, for which CMH is a good scenario to test on. We perform experiments on two popular cross-modality retrieval datasets, i.e., MIRFlickr and NUS-WIDE, and demonstrate state-of-the-art performance, outperforming existing unsupervised CMH methods by a significant margin. Moreover, we delve deep into the benefits of supervision, and point out a few directions for future research. + +The remainder of this paper is organized as follows. Section 2 briefly reviews the preliminaries of cross-modal retrieval and hashing, and Section 3 describes the unsupervised knowledge distillation approach. Experimental results are shown in Section 4 and conclusions are drawn in Section 5. + +# 2. Related Work + +# 2.1. Cross-Modal Retrieval and Hashing + +Cross-modal retrieval aims to search semantically similar instances in one modality using a query from another modality [37, 39]. Throughout this paper, we consider the retrieval task between vision and language, i.e., involving images and texts. To map them into the same space, two models need to be trained, one for each modality. The goal is to make the image-text pairs with relevant semantics to be close in the feature space. To train and evaluate the mapping functions, a dataset with image-text pairs is present. The dataset is further split into a training set and a query set, i.e., the testing stage is performed on the query set. + +In the past decade, many efforts were made on this topic [18, 46, 37]. However, most of them suffered from high computation costs in real-world, high-dimensional data. To scale up these models to real-world scenarios, researchers often compressed the output of these models into binary vectors of a fixed length [1, 19, 10, 24], i.e., Hashing codes. In this situation, this task is often referred to as cross-modality hashing. + +# 2.2. Supervised Cross-Modal Hashing Methods + +The fundamental challenges of cross-modal hashing lie in learning reliable mapping functions to bridge the modality gap. Supervised methods [25, 47, 38, 20, 39, 7] achieved this goal by exploiting semantic labels to capture rich correlation information among data from different modalities. Traditional supervised learning methods were mostly based on handcrafted features, and aimed to understand the semantic relevance in the common space. SePH [22] proposed a semantics-preserving hashing method which aimed to approximate the distribution of semantic labels with + +hash codes on the Hamming space via minimizing the KL-divergence. Wang et al. [34] proposed to leverage listwise supervision into a principled framework of learning the hashing function. + +With the rapid development of deep learning, researchers started to build supervised methods upon more powerful yet discriminative features. DCMH [17] proposed a deep cross-modal hashing method by integrating feature learning and binary quantization into one framework. SSAH [20] improved this work by proposing a self-supervised approach, which incorporated adversarial learning into cross-modal hashing. Zhang et al. [47] also investigated a similar idea by proposing an adversarial hashing network with an attention mechanism to enhance the measurement of content-level similarities. These supervised methods achieved superior performance, arguably by acquiring correlation information from the semantic labels of both images and texts. However, acquiring a large amount of such labels is often expensive and thus intractable, which makes the supervised approaches infeasible in the real-world applications. + +# 2.3. Unsupervised Cross-Modal Hashing Methods + +Compared with the supervised counterparts, unsupervised cross-modal hashing methods [8, 45, 13, 36] only relied on the correlation information from the paired data, making it easier to be deployed to other scenarios. These methods usually learned hashing codes by preserving inter- and intra-correlations. For example, Song et al. [32] proposed inter-media hashing to establish a common Hamming space by maintaining inter-media and intra-media consistency. Recently, several works introduced deep learning to improve unsupervised cross-modal hashing. UGACH [45] utilized a generative adversarial network to exploit the underlying manifold structure of cross-modal data. As an improvement, UCH [21] coupled the generative adversarial network to build two cycled networks in an unified framework to learn common representations and hash mapping simultaneously. + +Despite the superiority in reducing the burden of data annotation, the accuracy of unsupervised cross-modal hashing methods is often below satisfaction, in particular, much lower than the supervised counterparts. The main reason lies in lacking the knowledge of pairwise similarity for the training data pairs. On the other hand, we notice that the output of an unsupervised model contains, though somewhat inaccurate, such semantic information. This motivates us to guide a supervised model by the output of an unsupervised model. This is yet another type of research which distills knowledge to assist model training. + +# 3. Our Approach + +In this work, we focus on the idea named creating something from nothing, i.e., a supervised cross-modal hash- + +![](images/549493efca91c7f53572e592b92951236f142faf759439bdb69044dcde96d471.jpg) +Figure 1. The proposed UKD framework which involves training a teacher model in an unsupervised manner, constructing the similarity matrix $\mathbf{S}$ by distilling knowledge from the teacher model, and using $\mathbf{S}$ to supervise the student model. Each dot represents an intermediate feature. Please zoom in to see the details of this figure. + +ing method can be guided by the output of an unsupervised method, which reveals the similarity between training data pairs. Figure 1 shows the framework of the proposed UKD. In what follows, we first explain the motivation of our approach, and then introduce the proposed pipeline, unsupervised knowledge distillation, from two aspects, namely, how to distill similarity from an unsupervised model, and how to utilize it efficiently to optimize a supervised model. + +# 3.1. Supervised and Unsupervised Baselines + +Throughout this paper, we consider the case that the training set contains paired data, i.e., $\mathcal{D} = \{\mathbf{v}_n^{\mathrm{I}},\mathbf{v}_n^{\mathrm{T}}\}_{n = 1}^N$ where $N$ is the number of image-text pairs. Here, $\mathbf{v}_n^{\mathrm{I}}\in \mathbb{R}^{D_{\mathrm{I}}}$ be an image and $\mathbf{v}_n^{\mathrm{T}}\in \mathbb{R}^{D_{\mathrm{T}}}$ be a text, where the superscripts I and T denote 'images' and 'texts', and $D_{\mathrm{I}}$ and $D_{\mathrm{T}}$ denote the dimensionality of the feature spaces, respectively. $D_{\mathrm{I}}$ and $D_{\mathrm{T}}$ can be different, e.g., as in our experiments. The models that map them into the same space are denoted as $\mathbf{f}_n^{\mathrm{I}}\doteq f^{\mathrm{I}}\Big(\mathbf{v}_n^{\mathrm{I}};\pmb {\theta}^{\mathrm{I}}\Big)\in \mathbb{R}^K$ and $\mathbf{f}_n^{\mathrm{T}}\doteq f^{\mathrm{T}}\Big(\mathbf{v}_n^{\mathrm{T}};\pmb {\theta}^{\mathrm{T}}\Big)\in \mathbb{R}^K$ respectively, where $K$ is the dimensionality of the common feature space, and $\pmb{\theta}^{\mathrm{I}}$ and $\pmb{\theta}^{\mathrm{T}}$ are model parameters. The compressed hashing code for images and texts are denoted by $\mathbf{b}_n^{\mathrm{I}}\doteq \operatorname {sgn}\bigl (\mathbf{f}_n^{\mathrm{I}}\bigr)$ and $\mathbf{b}_n^{\mathrm{T}}\doteq \operatorname {sgn}\bigl (\mathbf{f}_n^{\mathrm{T}}\bigr)$ , respectively, i.e., both $\mathbf{b}_n^{\mathrm{I}}$ and $\mathbf{b}_n^{\mathrm{T}}$ fall within $\{-1, + 1\} ^K$ . + +The key to cross-modal hashing lies in recognizing which pairs of image-text data are semantically relevant while other are not, so that the model can learn to pull the features of relevant pairs closer in the common space. A straightforward idea is to define all paired image and text instances to be relevant and all others irrelevant. However, this strategy produces a very small positive set and a much larger negative set, which often causes data imbalance during the training stage. A generalized yet more effective solution is to define a similarity matrix $\mathbf{S} \in \{0,1\}^{N \times N}$ , so that when $S_{i,j} = 1$ defines a positive pair $(i,j)$ and vice versa. The original sampling strategy is equivalent to $\mathbf{S} \equiv \mathbf{I}$ . + +Given S, the objective of training involves minimizing the total distance with respect to $\pmb{\theta}^{\mathrm{I}}$ and $\pmb{\theta}^{\mathrm{T}}$ , i.e., + +$$ +\boldsymbol {\theta} ^ {\mathrm {I}, \star}, \boldsymbol {\theta} ^ {\mathrm {T}, \star} = \arg \min _ {\boldsymbol {\theta} ^ {\mathrm {I}}, \boldsymbol {\theta} ^ {\mathrm {T}}} = \sum_ {i, j} S _ {i, j} \cdot \left| \mathbf {f} _ {i} ^ {\mathrm {I}} - \mathbf {f} _ {j} ^ {\mathrm {T}} \right|. \tag {1} +$$ + +Therefore, the definition of S forms the major challenge of the learning task. According to whether extra labels of images and texts, besides the paired information, are used, existing methods can be categorized into either supervised or unsupervised learning. In the supervised setting, instance-level annotations (e.g., classification tags) are used to measure whether two instances are relevant, while in the unsupervised setting, no additional labels are available and thus the raw features are the only source of judgment. Obviously, the former provides more accurate estimation on S than the latter and, consequently, stronger models for cross-modal hashing. However, collecting additional annotations, even at the instance level, can be a large burden especially when the dataset is very large. Hence, we focus on improving the performance of unsupervised learning methods which are easier to be deployed to real-world scenarios. + +# 3.2. Unsupervised Knowledge Distillation + +Our idea originates from the fact that, as shown above, the difference between supervised and unsupervised cross-modal hashing algorithms is not big, but supervised methods often report much higher accuracy than the unsupervised counterparts. Moreover, the supervised algorithms do not require real supervision, namely, the manually labeled image/text tags, but only need to know, or estimate, the similarity between any pair of data, i.e., elements in S. Beyond the unsupervised baseline that estimates S using raw image/text features (extracted from a pre-trained deep network or computed using bag-of-words statistics), we seek for the possibility that a cross-modal retrieval model, after trained in an unsupervised manner, can produce a more accurate estimation of S. We illustrate an example in Figure 2. Later, + +
FunctionnewimagetextP@1000P@5000
Si,j = (2 - |vi - vj|2) / 2✓74.6%64.4%
Si,j = (2 - |viT - vjT|2) / 2✓57.1%55.6%
Si,j = (2 - |fi - fj|2) / 2✓✓84.6%74.6%
Si,j = (2 - |fT - fjT|2) / 2✓✓75.9%67.9%
Si,j = (4 - |fi - fj|2 - |fT - fjT|2) / 4✓✓✓83.9%73.4%
+ +Table 2. Comparison among different functions to measure the similarity between image-text pairs. All the results are computed using features extracted from a UGACH [45] model trained on the MIRFlickr dataset. Here we consider four properties: 'new' means that the new feature space, learned by the teacher model, is used; 'image' and 'text' means the corresponding features used, and 'indiv' means image and text features are used individually. P@1000/P@5000 indicate the accuracy rates among the top 1000/5000 retrieved pairs. + +![](images/e5cd63b5420a788d5e4af021ff553d8b5d2b7946a1bd1a7c408237a61e22194d.jpg) + +Ball, bird, people, dog, water +dog,baby,room,light,white +- kite,plane, clouds,man, blue + +grass, sky, clouds, dog, green +husky, gray, leaves, tree, sun +night, sky, dogs, oldman, moon + +![](images/0390f200dce6822d07eab7260d8634f0916290bf6433eb6115acde071914b969.jpg) +Figure 2. Knowledge distilled from an unsupervised model (best viewed in color). Compared to the retrieval results in the original feature space, our approach produces more accurate information about the tag of an image and, more importantly, better estimation on the relevance of image-text pairs. + +B house, women, sofa, cat, TV +keyboard, phone, cats, toy, pens +bag, clock, papers, man +- wooden, cat, light, room +mC floor, chair, person, cigarette, cat +kitty, grass, boy, yellow, sky + +we will show in experiments, with the help of oracle annotations, that the updated estimation of $\mathbf{S}$ is indeed more accurate in terms of finding relevant pairs. + +Note that the estimated S can be used to train either supervised or unsupervised models, with the formulations detailed above. When S is used for unsupervised learning, the only effect is to provide a better sampling strategy, so as to increase the portion of true-positive image-text pairs in the chosen training set. This alleviates the risk that the model learns to pull the features of actually irrelevant pairs. When it is used for supervised learning, we are actually creating something from nothing, i.e., guiding a supervised model with the output of an unsupervised model. + +The proposed framework, unsupervised knowledge distillation (UKD), works as follows. After the teacher model has been trained, we obtain both $f^{\mathrm{I}}\left(\cdot ;\boldsymbol{\theta}^{\mathrm{I}}\right)$ and $f^{\mathrm{T}}\left(\cdot ;\boldsymbol{\theta}^{\mathrm{T}}\right)$ for image and text feature embedding, respectively. It remains to determine each element of S. Without loss of generality, we assume that the feature vectors extracted from either modality, i.e., $\mathbf{f}_n^{\mathrm{I}}$ or $\mathbf{f}_i^{\mathrm{T}}$ , have a $\ell_2$ -norm. This is to ease the following calculations. + +First, we point out that $S_{i,i} \equiv 1$ for all $i$ . When $i \neq j$ , $S_{i,j}$ takes four vectors, $\mathbf{f}_i^{\mathrm{I}}, \mathbf{f}_i^{\mathrm{T}}, \mathbf{f}_j^{\mathrm{I}}$ and $\mathbf{f}_j^{\mathrm{T}}$ , into consideration. The design of $S_{i,j}$ can have various forms. For example, it can consider both image and text features so that $S_{i,j} = \left(4 - \left|\mathbf{f}_i^{\mathrm{I}} - \mathbf{f}_j^{\mathrm{I}}\right|_2 - \left|\mathbf{f}_i^{\mathrm{T}} - \mathbf{f}_j^{\mathrm{T}}\right|_2\right) / 4$ , where $|\mathbf{f}_1 - \mathbf{f}_2|_2$ is the Euclidean distance between two vectors which lies in the range of [0, 2] for two normalized vectors. Also, it is possible for $S_{i,j}$ to consider only single-modal information, e.g., $S_{i,j} = \left(2 - \left|\mathbf{f}_i^{\mathrm{I}} - \mathbf{f}_j^{\mathrm{I}}\right|_2\right) / 2$ in which only image features are used for measuring similarity. + +Here, we take several definitions of $S_{i,j}$ into consideration, and compare their performance in finding true-positive pairs. Results are shown in Table 2. We can observe several important properties that are useful for similarity measurement. First, the features trained for cross-modal hashing are indeed better than those without being fine-tuned; Second, measuring similarity in the image feature space is more accurate than that in the text feature space; Third, directly combining image and text similarity into one does not improve accuracy beyond using image similarity alone, though we expect that text features to provide auxiliary information. Motivated by these results, we use image features and text features to retrieve two lists of relevant pairs and then merge them into one. This strategy reports a precision of $76.1\%$ at top-5000 instances, surpassing that using image and text features alone. We fix this setting throughout the remainder of this paper. + +# 3.3. Models and Implementation Details + +We first illustrate the supervised and unsupervised methods we have used. We take DCMH [17] as an example of supervised learning. Here we utilize the framework of DCMH but modify its architecture for higher accuracy. This model contains two deep neural networks, designed for the image modality and the text modality, respectively. The image modality network consists of 19 layers, the first eighteen layers are the same as those in VGG19 network [31], and the last layer maps features into the Hamming space. For the + +text modality, a multi-scale fusion model from SSAH [20] which consists of multiple average pooling layers and a $1 \times 1$ convolutional layer is used to extract the text features. Then, a hash layer follows to map the text features into the Hamming space. + +On the other hand, we investigate UGACH [45], a representative unsupervised learning method as the teacher model. It consists of a generative module and a discriminative module. The discriminator receives the data selected by the generator as negative instances, and take the data sampled using S as positive instances. Then a triplet loss is used to optimize to obtain better discriminate ability for the discriminator. Both the generative and discriminative modules have a two-pathway architecture, each of which has two fully-connected layers. We set the dimension of representation layer to 4096 in our experiments. The dimension of the hash layer is same as the hash code length. + +For the supervised model, we take the raw pixels as inputs. In pre-processing, we resize all images into $256 \times 256$ and crop a $224 \times 224$ patches randomly. We select relevant instances for the student model by using the teacher model with the highest precision (128 bits in all experiments). We set the number of relevant instances to be 10,000 for the supervised student model, and 20 for the unsupervised student model. We train our approach in a batch-based manner and set the batch size to 256. We train the model using an SGD optimizer with a weight decay of 0.01. For the compared methods, we apply the same implementations as provided in the original work. + +# 3.4. Relationship to Previous Work + +Our method is related to knowledge distillation [29, 43, 33], which was proposed to extract knowledge from a teacher model to assist training a student model. Hinton et al. [15] suggested that there should be some 'dark knowledge' that can be propagated during this process. Recently, many efforts were made to study what the dark knowledge is [41, 40], and/or how to efficiently take advantage of such knowledge [11, 42, 35, 2]. In particular, DarkRank [5] distilled knowledge for deep metric learning by matching two probability distributions over ranking, while our approach utilized knowledge by selecting relevant instances. On the other hand, both [42] and [27] transferred knowledge to improve the student models by designing a distillation loss, while our approach enables guiding a supervised method by an unsupervised method, in which no extra loss is used. + +We also notice the connection between our approach and the self-learning algorithms for semi-supervised learning, e.g., medical image analysis [48]. The shared idea is to start with a small part of labeled data (in our case, labeled image-text pairs) and try to explore the unlabeled part (in our case, other image-text pairs with unknown relevance), but the methods to gain additional supervision are differ + +ent. Also, the idea that 'training a stronger model at the second time' is related to the coarse-to-fine learning approaches [14, 49] which often adopted iteration for larger improvements. + +Our approach shares the same idea with some prior work that guided a supervised model with the output of an unsupervised model. DeepCluster [3] groups the features with a standard clustering algorithm and uses the subsequent assignments as supervision to update the weights of the network. Gomez et al. [12] performed self-supervised learning of visual features by mining a large scale corpus of multimodal (text and image) documents. Differently, our approach makes use of teacher-student optimization to combine the supervised and unsupervised models. Experiment results show the effectiveness of knowledge distillation. + +# 4. Experiments + +# 4.1. Datasets, Evaluation, and Baselines + +We evaluate our approach on two benchmark datasets: MIRFlickr and NUS-WIDE. MIRFlickr-25K [16] consists of 25,000 images downloaded from Flickr. Each image is associated with text tags and annotated with at least one among 24 pre-defined categories. Following UGACH [45], we use 20,015 image-text pairs in our experiments, where 2,000 are preserved as the query set and the rest are used for retrieving. We represent each image by a 4096-dimensional feature vector, extracted from a pre-trained VGGNet [31] of 19 layers, and each text by a 1386-dimensional bag-of-words features. + +NUS-WIDE [6] is much larger than MIRFlickr, which contains 269,498 images and the associated text tags from Flickr. It defined 81 categories, but there are considerable overlaps among them. Still, following UGACH [45], 10 largest categories and the corresponding 186,577 imagedataset pairs are used in the experiments. We preserve $1\%$ of data as the query database and use the rest as the retrieval set. Each image is represented by a 4096-dimensional feature vector extracted from the same VGGNet, and each text by a 1000-dimensional bag-of-words vector. + +Following the convention, we adopt the mean Average Precision (mAP) criterion to evaluate the retrieval performance of all methods. The mAP score is computed as the mean value of the average precision scores for all queries. + +We compare our approach against 9 previous methods. 4 of them used additional supervision (CMSSH [1], SCM [44], DCMH [17], and SSAH [20]), and while 5 others (CVH [19], PDH [28], CMFH [9], and CCQ [26]), and UGACH [45]) did not. Following our direct baseline, UGACH, we use a 19-layer VGGNet [31] pre-trained on the ImageNet dataset [30] to extract deep features and, for a fair comparison, use them to replace the features used in other baselines, including those using handcrafted features. + +
TaskMethodMIRFlickr-25KNUS-WIDE
163264128163264128
image → textCMSSH [1]0.6110.6020.5990.5910.5120.4700.4790.466
SCM [44]0.6360.6400.6410.6430.5170.5140.5180.518
DCMH [17]0.6770.7030.725-0.5900.6030.609-
SSAH [20]0.7970.8090.810-0.6360.6360.637-
CVH [19]0.6020.5870.5780.5720.4580.4320.4100.392
PDH [28]0.6230.6240.6210.6260.4750.4840.4800.490
CMFH [9]0.6590.6600.6630.6530.5170.5500.5470.520
CCQ [26]0.6370.6390.6390.6380.5040.5050.5060.505
UGACH [45]0.6760.6930.7020.7060.5970.6150.6270.638
UKD-US0.6950.7030.7050.7070.6060.6210.6340.643
UKD-SS0.7140.7180.7250.7200.6140.6370.6380.645
text → imageCMSSH [1]0.6120.6040.5920.5850.5190.4980.4560.488
SCM [44]0.6610.6640.6680.6700.5180.5100.5170.518
DCMH [17]0.7050.7070.724-0.6200.6340.643-
SSAH [20]0.7820.7970.799-0.6530.6760.683-
CVH [19]0.6070.5910.5810.5740.4740.4450.4190.398
PDH [28]0.6270.6280.6280.6290.4890.5120.5070.517
CMFH [9]0.6110.6060.5750.5630.4390.4160.3770.349
CCQ [26]0.6280.6280.6220.6180.4990.4960.4920.488
UGACH [45]0.6760.6920.7030.7070.6020.6100.6280.637
UKD-US0.7040.7070.7150.7140.6210.6250.6400.647
UKD-SS0.7150.7160.7210.7190.6300.6560.6570.663
+ +Table 3. The mAP scores of our approach and state-of-the-art competitors, in two datasets and four different code lengths. In each half, the four rows above the horizontal line contain supervised learning algorithms, while the right rows below contain unsupervised ones. + +# 4.2. Unsupervised Student vs. Supervised Student + +In Table 3, we list the accuracy, in terms of mAP, of our approach as well as other methods for comparison. On two benchmark datasets MIRFlickr and NUS-WIDE. We use 'image $\rightarrow$ text' to denote the task that images are taken as the query to retrieve the instances in the text database, and 'text $\rightarrow$ image' the task in the opposite direction. Our approach is denoted by 'UKD-US' and 'UKD-SS', with 'US' and 'SS' indicating 'unsupervised-student' and 'supervised-student', respectively. + +We observe interesting results. Regarding the image $\rightarrow$ text task, UKD-SS outperforms UKD-US significantly on the MIRFlickr dataset, but the advantage on the NUS-WIDE dataset becomes much smaller. This is explained by noting that the impact brought by supervision is different between these two datasets. We consider SSAH [20] and UGACH [45], the supervised and unsupervised models we used as the students. SSAH typically outperforms UGACH by $9\%$ on MIRFlickr, but the number is quickly shrunk to $1\%-4\%$ on NUS-WIDE. This is partially due to the larger variance of the images in NUS-WIDE, which makes it difficult for the labeled tags to provide accurate and valuable supervision. From this perspective, the reduced advantage of UKD-SS over UKD-US is reasonable, considering that + +SSAH is the upper-bound of UKD-SS. + +On the other hand, by introducing extra supervision, (in particular, by checking the distance between the features extracted from an unsupervised model), considerable noise (e.g., inaccurate similarity measurement) is also introduced to the supervised student model. Hence, there is a trade-off between the quality and impact of these self-annotated pairs. Most often, the latter can be measured by the advantage of the supervised student model over the unsupervised one, if both can be obtained in a small reference dataset. + +# 4.3. Comparison to the State-of-the-Arts + +From Table 3, one can observe that our approach, UKD, significantly outperforms all existing unsupervised cross-modal hashing methods on both datasets, and under any length of hash code. In particular, compared to our baseline (UGACH, which is also the strongest model that ever reported results with VGGNet-19 features), UKD enjoys $3.9\%$ , $2.5\%$ , $2.1\%$ and $1.3\%$ gains (averaged over image $\rightarrow$ text and text $\rightarrow$ image) under 16, 32, 64 and 128 bits on the MIRFlickr dataset, and the corresponding numbers on the NUS-WIDE dataset are $2.3\%$ , $3.4\%$ , $2.0\%$ and $1.7\%$ , respectively. Given such a high baseline, these improvements clearly demonstrate the effectiveness of distilling knowl + +
TaskMethodMIRFlickr-25K
163264128
image → textGEN-00.6760.6930.7020.706
GEN-10.6950.7030.7050.707
GEN-20.6980.7050.7080.712
text → imageGEN-00.6760.6920.7030.707
GEN-10.7040.7070.7150.714
GEN-20.7050.7120.7160.719
+ +Table 4. Results of training in generations for unsupervised student model on MIRFlickr-25K. 'GEN-0' and 'GEN-1' are identical to the UGACH and UKD-US models reported in Table 3, respectively. + +
MethodTaskMIRFlickr-25K
163264128
UKD-SSimage → text0.7110.7040.7110.720
text → image0.6920.7020.7050.706
+ +edge from the teacher model, although it is trained in an unsupervised manner. Moreover, the accuracy gain in more significant in the low-bit scenarios, arguably because richer information is provided by the teacher model which has 128 bits. On the other hand, the amount of supervision saturates with the increasing number of compressed bits. We also tried to use full-precision models to serve as the teacher, but achieved marginal gain. + +# 4.4. Does Iteration Help? + +Motivated by the consistent improvement from the teacher to the student, a question is straightforward: is it possible to further improve the performance if we continue distilling knowledge from the student, so as to guide a 'new student'? We investigate this option, and results are summarized in Table 4. We find that, compared to the significant gain brought by the first knowledge distillation, the gain of the second round is mostly marginal, e.g., the average gain on the image $\rightarrow$ text task is $0.33\%$ compared to $0.60\%$ of the first round. + +We owe this to the limited improvement of our student model in intra-modal learning – recall that we have used intra-modal similarities to choose relevant pairs. Unlike the accuracy of cross-modal retrieval performance, that of intramodel retrieval, from the teacher to the student, is hardly improved. This is to say, the new batch of image-text pairs for either supervised or unsupervised learning do not have a clear advantage over the previous batch, and so the quality of training data mostly remains unchanged. + +Table 5. Results of using a 16-bit teacher to guide the supervised student model on MIRFlickr-25K. + +
TaskMethodMIRFlickr-25K
163264
image → textUGACH [45]0.6030.6070.616
UCH [21]0.6540.6690.679
UKD-US0.6670.6740.677
UKD-SS0.6780.6800.679
text → imageUGACH [45]0.5900.6320.642
UCH [21]0.6610.6670.668
UKD-US0.6760.6830.680
UKD-SS0.6880.6870.694
+ +Table 6. Accuracy (mAP) comparison on MIRFlickr-25K, with UGACH and UCH as the baselines. To observe how a stronger teacher model (128-bit) teaches a weaker student model, we only report 16-bit, 32-bit and 64-bit results. + +# 4.5. Diagnostic Experiments + +# - Knowledge Distillation with a Weaker Teacher + +In order to show that UKD can work under a relatively weaker teacher signal, we use a 16-bit model of UGACH [45] as the teacher. As shown in Table 5, we still achieve consistent accuracy gain beyond the baseline. However, the gain is reduced compared to using a 128-bit teacher, since the benefit of UKD is mostly determined by the quality of the similarity matrix $\mathbf{S}$ , and a weaker teacher often leads to a weaker $\mathbf{S}$ , e.g., the precision of the top-ranked list of pairs is reduced. + +# Transferring to Other Features + +To verify that our approach is generalized to other features, we apply it to UCH [21], a recently published unsupervised cross-modal hashing method, using features extracted from a pre-trained CNN-F model [4] (same as in the original paper). Table 6 shows the comparison between UCH and our approach in terms of mAP values on MIRFlickr. Note that our baseline is still UGACH, with the features replaced, since the authors of UCH did not provide the code. One can see that both UKD-US and UKD-SS outperform UGACH (and also, UCH), and UKD-SS works better than UKD-US, i.e., the same phenomena we have observed previously. + +# - Sensitivity to the Number of Selected Pairs + +Next, we analyze how the performance of cross-modal hashing is related to the number of relevant pairs selected during the training process. In Figure 3, one can observe a trend of accuracy gain as the number of selected pairs increases, but when the number goes to a relatively large value, it tends to saturate and even goes down a little bit. This is related to the total number of relevant pairs in the dataset and, of course, the ability of the model in choosing relevant pairs. + +We also compare our approach with the baseline in terms + +![](images/68a3dd3049e8d0301af54d926ec42bebdd7b91fcc72c56791021f5d8d6ab1a2b.jpg) +Figure 3. The mAP value with respect to the number of relevant pairs selected (tested on the MIRFlickr dataset, teacher is a 128-bit model, student is a 16-bit model). + +![](images/a1029248e459169e11b579eec31822fabbd36c7a669bb3b214af7c76c95091da.jpg) +Figure 4. The top- $K$ precision curves with respect to the number of relevant pairs selected (tested on the MIRFlickr dataset, teacher is a 128-bit model). + +of the precision of the top-ranked, selected instance pairs. From Figure 4, we can see that UKD enjoys a significant advantage over UGACH, our direct baseline. Nevertheless, we see a rapid drop in precision when the number of selected pairs grows, implying that non-top-ranked pairs can introduce noise to the model. Again, this is a tradeoff between quantity and quality. + +# Qualitative Studies + +Finally, we qualitatively compare the results of our approach and the baseline. Figure 5 shows two typical examples. The text $\rightarrow$ image query (dog) is relatively simple, but in the original paired training set, there are no sufficient amount of labeled data for the algorithm to learn the vision-language correspondence. This is compensated with the enlarged set found by an unsupervised teacher model. In comparison, the image $\rightarrow$ text query contains complicated semantics that are even more difficult to learn, but our + +![](images/e4c94030320398aef502e5f7878127e0028f83b5fe45bbf2db4ccc066cd08927.jpg) +Figure 5. Qualitative comparison (top: a text query with top-5 retrieved instances; bottom: an image query with top-5 retrieved instances) between our approach and UGACH (16-bit hashing), our direct baseline. Red frames and words indicate relevant images or words in the retrieved results. Note that the image query is much more difficult, as it contains semantically complicated concepts which even requires aesthetic perception to understand. + +model, by making use of image-level similarity, mines extra training data from other sources (see the examples in Figure 5 which is also related to these tags). Consequently, the prediction of our approach is much better. + +# 5. Conclusions + +In this paper, we propose a novel approach to improve cross-modal hashing which enables guiding a supervised method using the outputs produced by an unsupervised method. We make use of teacher-student optimization for propagating knowledge. Superior performance can be achieved for the supervised student model by utilizing the extensive relevance information exploited from the outputs of the unsupervised teacher model. We evaluate our approach on two benchmarks MIRFlickr and NUS-WIDE, and the experiment results show that our method outperforms the state-of-the-art methods. + +Acknowledgements This work was supported in part by the National Natural Science Foundation of China under grant 61722204, 61932009, and in part by the National Key Research and Development Program of China under grant 2019YFA0706200, 2018AAA0102002. + +# References + +[1] Michael M Bronstein, Alexander M Bronstein, Fabrice Michel, and Nikos Paragios. Data fusion through cross-modality metric learning using similarity-sensitive hashing. In 2010 IEEE computer society conference on computer vision and pattern recognition, pages 3594-3601. IEEE, 2010. +[2] Qi Cai, Yingwei Pan, Chong-Wah Ngo, Xinmei Tian, Lingyu Duan, and Ting Yao. Exploring object relation in mean teacher for cross-domain detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11457-11466, 2019. +[3] Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proceedings of the European Conference on Computer Vision (ECCV), pages 132-149, 2018. +[4] Ken Chatfield, Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Return of the devil in the details: Delving deep into convolutional nets. arXiv preprint arXiv:1405.3531, 2014. +[5] Yuntao Chen, Naiyan Wang, and Zhaoxiang Zhang. Dark-rank: Accelerating deep metric learning via cross sample similarities transfer. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. +[6] Tat-Seng Chua, Jinhui Tang, Richang Hong, Haojie Li, Zhiping Luo, and Yantao Zheng. Nus-wide: a real-world web image database from national university ofSingapore. In Proceedings of the ACM international conference on image and video retrieval, page 48. ACM, 2009. +[7] Cheng Deng, Zhaojia Chen, Xianglong Liu, Xinbo Gao, and Dacheng Tao. Triplet-based deep hashing network for cross-modal retrieval. IEEE Transactions on Image Processing, 27(8):3893-3903, 2018. +[8] Guiguang Ding, Yuchen Guo, and Jile Zhou. Collective matrix factorization hashing for multimodal data. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2075-2082, 2014. +[9] Guiguang Ding, Yuchen Guo, Jile Zhou, and Yue Gao. Large-scale cross-modality search via collective matrix factorization hashing. IEEE Transactions on Image Processing, 25(11):5427-5440, 2016. +[10] Fangxiang Feng, Xiaojie Wang, and Ruifan Li. Cross-modal retrieval with correspondence autoencoder. In Proceedings of the 22nd ACM international conference on Multimedia, pages 7-16. ACM, 2014. +[11] Tommaso Furlanello, Zachary C Lipton, Michael Tschannen, Laurent Itti, and Anima Anandkumar. Born again neural networks. arXiv preprint arXiv:1805.04770, 2018. +[12] Lluis Gomez, Yash Patel, Marçal Rusinol, Dimosthenis Karatzas, and CV Jawahar. Self-supervised learning of visual features through embedding images into text topic spaces. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4230-4239, 2017. +[13] Jieuxiang Gu, Jianfei Cai, Shafiq R Joty, Li Niu, and Gang Wang. Look, imagine and match: Improving textual-visual cross-modal retrieval with generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7181-7189, 2018. + +[14] Jiumiang Gu, Jianfei Cai, Gang Wang, and Tsuhan Chen. Stack-captioning: Coarse-to-fine learning for image captioning. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. +[15] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. +[16] Mark J Huiskes and Michael S Lew. The mir flickr retrieval evaluation. In Proceedings of the 1st ACM international conference on Multimedia information retrieval, pages 39-43. ACM, 2008. +[17] Qing-Yuan Jiang and Wu-Jun Li. Deep cross-modal hashing. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3232-3240, 2017. +[18] Ryan Kiros, Ruslan Salakhutdinov, and Richard S Zemel. Unifying visual-semantic embeddings with multimodal neural language models. arXiv preprint arXiv:1411.2539, 2014. +[19] Shaishav Kumar and Raghavendra Udupa. Learning hash functions for cross-view similarity search. In Twenty-Second International Joint Conference on Artificial Intelligence, 2011. +[20] Chao Li, Cheng Deng, Ning Li, Wei Liu, Xinbo Gao, and Dacheng Tao. Self-supervised adversarial hashing networks for cross-modal retrieval. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4242-4251, 2018. +[21] Chao Li, Cheng Deng, Lei Wang, De Xie, and Xianglong Liu. Coupled cyclegan: Unsupervised hashing network for cross-modal retrieval. arXiv preprint arXiv:1903.02149, 1, 2019. +[22] Zijia Lin, Guiguang Ding, Mingqing Hu, and Jianmin Wang. Semantics-preserving hashing for cross-view retrieval. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3864-3872, 2015. +[23] Hong Liu, Rongrong Ji, Yongjian Wu, Feiyue Huang, and Baochang Zhang. Cross-modality binary code learning via fusion similarity hashing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7380-7388, 2017. +[24] Wei Liu, Cun Mu, Sanjiv Kumar, and Shih-Fu Chang. Discrete graph hashing. In Advances in neural information processing systems, pages 3419-3427, 2014. +[25] Wei Liu, Jun Wang, Rongrong Ji, Yu-Gang Jiang, and Shih-Fu Chang. Supervised hashing with kernels. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pages 2074-2081. IEEE, 2012. +[26] Mingsheng Long, Yue Cao, Jianmin Wang, and Philip S Yu. Composite correlation quantization for efficient multimodal retrieval. In Proceedings of the 39th International ACM SIGIR conference on Research and Development in Information Retrieval, pages 579-588. ACM, 2016. +[27] Wonpyo Park, Dongju Kim, Yan Lu, and Minsu Cho. Relational knowledge distillation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3967-3976, 2019. +[28] Mohammad Rastegari, Jonghyun Choi, Shobeir Fakhraei, Daume Hal, and Larry Davis. Predictable dual-view hashing. + +In International Conference on Machine Learning, pages 1328-1336, 2013. +[29] Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. arXiv preprint arXiv:1412.6550, 2014. +[30] 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. +[31] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. +[32] Jingkuan Song, Yang Yang, Yi Yang, Zi Huang, and Heng Tao Shen. Inter-media hashing for large-scale retrieval from heterogeneous data sources. In Proceedings of the 2013 ACM SIGMOD International Conference on Management of Data, pages 785-796. ACM, 2013. +[33] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Advances in neural information processing systems, pages 1195–1204, 2017. +[34] Jun Wang, Wei Liu, Andy X Sun, and Yu-Gang Jiang. Learning hash codes with listwise supervision. In Proceedings of the IEEE International Conference on Computer Vision, pages 3032-3039, 2013. +[35] Xionghui Wang, Jian-Fang Hu, Jian-Huang Lai, Jianguo Zhang, and Wei-Shi Zheng. Progressive teacher-student learning for early action prediction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3556-3565, 2019. +[36] Lin Wu, Yang Wang, and Ling Shao. Cycle-consistent deep generative hashing for cross-modal retrieval. IEEE Transactions on Image Processing, 28(4):1602-1612, 2018. +[37] Yiling Wu, Shuhui Wang, and Qingming Huang. Online asymmetric similarity learning for cross-modal retrieval. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4269-4278, 2017. +[38] Yiling Wu, Shuhui Wang, and Qingming Huang. Learning semantic structure-preserved embeddings for cross-modal retrieval. In 2018 ACM Multimedia Conference on Multimedia Conference, pages 825-833. ACM, 2018. +[39] Xing Xu, Li He, Huimin Lu, Lianli Gao, and Yanli Ji. Deep adversarial metric learning for cross-modal retrieval. World Wide Web, 22(2):657-672, 2019. +[40] Chenglin Yang, Lingxi Xie, Siyuan Qiao, and Alan L Yuille. Training deep neural networks in generations: A more tolerant teacher educates better students. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 5628-5635, 2019. +[41] Junho Yim, Donggyu Joo, Jihoon Bae, and Junmo Kim. A gift from knowledge distillation: Fast optimization, network minimization and transfer learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4133-4141, 2017. +[42] Lu Yu, Vacit Oguz Yazici, Xialei Liu, Joost van de Weijer, Yongmei Cheng, and Arnau Ramisa. Learning metrics from + +teachers: Compact networks for image embedding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2907-2916, 2019. +[43] Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. arXiv preprint arXiv:1612.03928, 2016. +[44] Dongqing Zhang and Wu-Jun Li. Large-scale supervised multimodal hashing with semantic correlation maximization. In Twenty-Eighth AAAI Conference on Artificial Intelligence, 2014. +[45] Jian Zhang, Yuxin Peng, and Mingkuan Yuan. Unsupervised generative adversarial cross-modal hashing. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. +[46] Ting Zhang and Jingdong Wang. Collaborative quantization for cross-modal similarity search. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2036-2045, 2016. +[47] Xi Zhang, Hanjiang Lai, and Jiashi Feng. Attention-aware deep adversarial hashing for cross-modal retrieval. In Proceedings of the European Conference on Computer Vision (ECCV), pages 591-606, 2018. +[48] Yuyin Zhou, Yan Wang, Peng Tang, Song Bai, Wei Shen, Elliot Fishman, and Alan Yuille. Semi-supervised 3d abdominal multi-organ segmentation via deep multi-planar cotraining. In 2019 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 121–140. IEEE, 2019. +[49] Yuyin Zhou, Lingxi Xie, Wei Shen, Yan Wang, Elliot K Fishman, and Alan L Yuille. A fixed-point model for pancreas segmentation in abdominal ct scans. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 693-701. Springer, 2017. \ No newline at end of file diff --git a/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/images.zip b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..b3e6dc682c343f05957ffab6d56bbffdfc84c4b3 --- /dev/null +++ b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1d0c4945e9779866221885b6fc8ace52931607ca88d0d4ea29feb43574c1da2b +size 577528 diff --git a/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/layout.json b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6bf942eccb107ea46a3ac516f6cc6dc6b935821d --- /dev/null +++ b/creatingsomethingfromnothingunsupervisedknowledgedistillationforcrossmodalhashing/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13f0a4d66bacb2a88ae64bb8c2fb2d1f13068714882cc098a60c10284cc144f5 +size 360809 diff --git a/crossbatchmemoryforembeddinglearning/37dfd313-99ee-4c55-a490-c6fce0fccbbf_content_list.json b/crossbatchmemoryforembeddinglearning/37dfd313-99ee-4c55-a490-c6fce0fccbbf_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8b49949cfd354c0b63a837f11c1c6a869213ff22 --- /dev/null +++ b/crossbatchmemoryforembeddinglearning/37dfd313-99ee-4c55-a490-c6fce0fccbbf_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1352c8bda25b18787b4c23e702ab3eab45e29177e7bbce458697c75dbbeb48cf +size 77606 diff --git a/crossbatchmemoryforembeddinglearning/37dfd313-99ee-4c55-a490-c6fce0fccbbf_model.json b/crossbatchmemoryforembeddinglearning/37dfd313-99ee-4c55-a490-c6fce0fccbbf_model.json new file mode 100644 index 0000000000000000000000000000000000000000..6206ccefd3c65a1d5035cb92d47e40d009e25e64 --- /dev/null +++ b/crossbatchmemoryforembeddinglearning/37dfd313-99ee-4c55-a490-c6fce0fccbbf_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc4082d38d588bd60513e566797ef9852a27f95e9d6a1b94688068039728a7f9 +size 95954 diff --git a/crossbatchmemoryforembeddinglearning/37dfd313-99ee-4c55-a490-c6fce0fccbbf_origin.pdf b/crossbatchmemoryforembeddinglearning/37dfd313-99ee-4c55-a490-c6fce0fccbbf_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7e977d4e74aad40fad177acc3c876cc6376a1d85 --- /dev/null +++ b/crossbatchmemoryforembeddinglearning/37dfd313-99ee-4c55-a490-c6fce0fccbbf_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46ace630616c59c7da68eda14c36e1ea3b3cdd421e082a7dbed20367c3ffbd2c +size 1096745 diff --git a/crossbatchmemoryforembeddinglearning/full.md b/crossbatchmemoryforembeddinglearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c3d38876c835f4528a7a9d15210d6c696483ebcb --- /dev/null +++ b/crossbatchmemoryforembeddinglearning/full.md @@ -0,0 +1,314 @@ +# Cross-Batch Memory for Embedding Learning + +Xun Wang*, Haozhi Zhang*, Weilin Huang†, Matthew R. Scott Malong Technologies + +{xunwang, haozhang,whuang, mscott}@malong.com + +# Abstract + +Mining informative negative instances are of central importance to deep metric learning (DML), however this task is intrinsically limited by mini-batch training, where only a mini-batch of instances is accessible at each iteration. In this paper, we identify a "slow drift" phenomena by observing that the embedding features drift exceptionally slow even as the model parameters are updating throughout the training process. This suggests that the features of instances computed at preceding iterations can be used to considerably approximate their features extracted by the current model. We propose a cross-batch memory (XBM) mechanism that memorizes the embeddings of past iterations, allowing the model to collect sufficient hard negative pairs across multiple mini-batches - even over the whole dataset. Our XBM can be directly integrated into a general pair-based DML framework, where the XBM augmented DML can boost performance considerably. In particular, without bells and whistles, a simple contrastive loss with our XBM can have large $R@1$ improvements of $12\% - 22.5\%$ on three large-scale image retrieval datasets, surpassing the most sophisticated state-of-the-art methods [37, 26, 2], by a large margin. Our XBM is conceptually simple, easy to implement - using several lines of codes, and is memory efficient - with a negligible 0.2 GB extra GPU memory. Code is available at: https://github.com/MalongTech/research-xbm. + +# 1. Introduction + +Deep metric learning (DML) aims to learn an embedding space where instances from the same class are encouraged to be closer than those from different classes. As a fundamental problem in computer vision, DML has been applied to various tasks, including image retrieval [39, 12, 7], face recognition [38], zero-shot learning [47, 1, 16], visual tracking [17, 34] and person re-identification [44, 13]. + +A family of DML approaches are known as pair-based, whose objectives can be defined in terms of pair-wise similarities within a mini-batch, such as contrastive loss [3], triplet loss [29], lifted-structure loss[22], n-pairs loss [30], multi-similarity (MS) loss [37] and etc. Moreover, most existing pair-based DML methods can be unified as weighting schemes under a General Pair Weighting (GPW) framework [37]. The performance of pair-based methods heavily relies on their capability of mining informative negative pairs. To collect sufficient informative negative pairs from each mini-batch, many efforts have been devoted to improving the sampling schemes, which can be categorized into two main directions: (1) sampling informative minibatches based on global data distribution [32, 6, 28, 32, 9]; (2) weighting informative pairs within each individual minibatch [22, 30, 37, 35, 40]. + +Various sophisticated sampling schemes have been developed, but the hard mining ability is inherently limited by the size of a mini-batch, which the number of possible training pairs depends on. Therefore, to improve the sampling scheme, it is straightforward to enlarge the minibatch, which can boost the performance of pair-based DML methods immediately. We demonstrate by experiments that the performance of pair-based approaches, such as contrastive loss [3] and recent MS loss [37], can be improved strikingly when the mini-batch grows larger on large-scale datasets (Figure 1, left and middle). It is not surprising because the number of negative pairs grows quadratically w.r.t. the mini-batch size. However, simply enlarging a mini-batch is not an ideal solution to solve the hard mining problem due to two limitations: (1) the mini-batch size is limited by the GPU memory and computational cost; (2) a large mini-batch (e.g. 1800 used in [29]) often requires cross-device synchronization, which is a challenging engineering task. A naive solution to collect abundant informative pairs is to compute the features of instances in the whole training set at each training iteration, and then search for hard negative pairs from the whole dataset. Obviously, this solution is extremely time consuming, especially for a large-scale dataset, but it inspired us to break the limit of mining hard negatives within a single mini-batch. + +![](images/8c8ad17fefcf5e4aec431a4fcd35b4d583c5f9776f1a3196432e59745a1fd893.jpg) +Figure 1. R@1 results with GoogleNet. Left: R@1 on SOP vs. mini-batch size with contrastive, triplet and MS approaches. Middle: R@1 vs. mini-batch size by varying datasets. Right R@1 vs. memory ratio at mini-batch size 16 with contrastive loss. + +![](images/4bd439d175140bc8b3f739372846d0dec6ab2088eda8732328ef976249538601.jpg) + +![](images/603d8b8e7304745432ce8a09c823b60c1cfc42c7f27b56875063d6f3a3d13505.jpg) + +In this paper, we identify an interesting "slow drift" phenomena that the embedding of an instance actually drifts at a relatively slow rate throughout the training process. It suggests that the deep features of a mini-batch computed at past iterations can considerably approximate to those extracted by current model. Based on the "slow drift" phenomena, we propose a cross-batch memory (XBM) module to record and update the deep features of recent mini-batches, allowing for mining informative examples across multiple minibatches. Our XBM can provide plentiful hard negative pairs by directly connecting each anchor in the current mini-batch with the embeddings from recent mini-batches. + +Our XBM is conceptually simple, easy to implement and memory efficient. The memory module can be updated using a simple enqueue-dequeue mechanism by leveraging the computation-free features computed at the past iterations, with only about a negligible 0.2 GB of extra GPU memory utilized. More importantly, our XBM can be directly integrated into most existing pair-based methods with just several lines of codes, and can boost performance considerably. We evaluate our XBM with various conventional pair-based DML techniques on three widely used large-scale image retrieval datasets: Stanford Online Products (SOP) [22], In-shop Clothes Retrieval (In-shop) [20], and PKU VehicleID (VehicleID) [19]. In Figure 1 (middle and right), our approach demonstrates excellent robustness and brings consistent performance improvements across all settings; under the same configurations, our XBM obtains extraordinary R@1 improvements on all three datasets compared with the corresponding pair-based methods (e.g. over $20\%$ for contrastive loss). Furthermore, with our XBM, a simple contrastive loss can easily outperform the most state-of-the-art sophisticated methods, such as [37, 26, 2], by a large margin. + +In parallel to our work, He et al. [10] built a dynamic dictionary as a queue of preceding mini-batches to provide a rich set of negative samples for unsupervised learning (with a contrastive loss). However, unlike [10] which uses a specific encoding network to compute the features of current mini-batch, our features are computed more efficiently by taking them directly from the forward of the current model + +with no additional computational cost. More importantly, to solve the problem of feature drift, He et al. designed a momentum update that slowly progresses the key encoder to ensure the consistency between different iterations, while we identify the "slow drift" phenomena which suggests that the features can become stable by themselves when the early phase of training finishes. + +# 2. Related Work + +Pair-based DML. Pair-based DML methods can be optimized by computing the pair-wise similarities between instances in the embedding space [8, 22, 29, 35, 30, 37]. Contrastive loss [8] is one of the classic pair-based DML methods, which learns a discriminative metric via Siamese networks. It encourages the deep features of positive pairs to be closer to each other, and those of negative pairs to be farther than a fixed threshold. Triplet loss [29] requires the similarity of a positive pair to be higher than that of a negative pair (with the same anchor) by a given margin. + +Inspired by contrastive loss and triplet loss, a number of pair-based DML algorithms have been developed, which attempted to weight all pairs in a mini-batch, such as upweighting informative pairs (e.g. N-pair loss [30], Multi-Similarity (MS) loss [37]) through a log-exp formulation, or sampling negative pairs uniformly w.r.t. pair-wise distance [40]. Generally, pair-based methods can be cast into a unified weighting formulation through General Pair Weighting (GPW) framework [37]. + +However, most deep models are trained with SGD where only a mini-batch of samples are accessible at each iteration, and the size of a mini-batch can be relatively small compared to the whole dataset, especially for a large-scale dataset. Moreover, a large fraction of the pairs is less informative as the model learns to embed most trivial pairs correctly. Thus the conventional pair-based DML techniques suffer from lacks of hard negative pairs, which are critical to promote model training. + +To alleviate the aforementioned problems, a number of approaches have been developed to collect more potential information contained in a mini-batch, such as building + +a class-level hierarchical tree [6], updating class-level signatures to select hard negative instances [32], or obtaining samples from an individual cluster [28]. Unlike these approaches which aim to enrich the information in a mini-batch, our XBM are designed to directly mine hard negative examples across multiple mini-batches. + +Proxy-based DML. There is another branch of DML methods aiming to learn the embeddings by comparing each sample with proxies, including proxy NCA [21], NormSoftmax [46] and SoftTriple [25]. In fact, our XBM module can be regarded as the proxies to some extent. However, there are two main differences between the proxy-based methods and our XBM module: (1) proxies are often optimized along with the model weights, while the embeddings of our memory are directly taken from the past mini-batches; (2) proxies are used to represent the class-level information, whereas the embedding of our memory computes the information for each individual instance. Both proxy-based methods and our XBM augmented pair-based methods are able to capture the global distribution of data over the whole dataset during training. + +Feature Memory Module. Non-parametric memory module for embedding learning has shown power in various computer visual tasks [36, 43, 41, 42, 48, 18]. For examples, the external memory can be used to address the unaffordable computational demand of conventional NCA [41] in large-scale recognition, and encourage instance-invariance in domain adaptation [48, 42]. But only the positive pairs are optimized, while the negatives are ignored in [41]. Our XBM is able to provide a rich set of negative examples for the pair-based DML methods, which is more generalized and can make full use of the past embeddings. The key distinction is that existing memory modules only store the embeddings of current mini-batch [36], or maintain the whole dataset [41, 48] with a moving average update, while our XBM is maintained as a dynamic queue of mini-batches, which is more flexible and applicable in extremely large-scale datasets. + +# 3. Cross-Batch Memory Embedding Networks + +In this section, we first analyze the limitation of existing pair-based DML methods. Then we introduce the "slow drift" phenomena, which provides the underlying evidence that supports our cross-batch mining approach. Finally, we describe our XBM module and integrate it into existing pair-based DML methods. + +# 3.1. Delving into Pair-based DML + +Let $\mathbb{X} = \{\pmb{x}_1, \pmb{x}_2, \dots, \pmb{x}_N\}$ denotes a set of training instances, and $y_i$ is the corresponding label of $\pmb{x}_i$ . An embedding function, $f(\cdot; \theta)$ , projects a data point $\pmb{x}_i$ onto a $D$ - + +dimensional unit hyper-sphere, $\pmb{v}_i = f(\pmb{x}_i;\pmb{\theta})$ . We measure the similarity between two instances of a pair in the embedding space. During training, we denote an affinity matrix of all pairs within the current mini-batch as $\pmb{S}$ , whose $(i,j)$ element is the cosine similarity between the embeddings of the $i$ -th sample and the $j$ -th sample: $\pmb{v}_i^T\pmb{v}_j$ . + +To facilitate further analysis, we delve into the pair-based DML methods by using the GPW framework described in [37]. With GPW, a pair-based function can be formulated in a unified pair-weighting form: + +$$ +\mathcal {L} = \frac {1}{m} \sum_ {i = 1} ^ {m} \left[ \sum_ {y _ {j} \neq y _ {i}} ^ {m} w _ {i j} \boldsymbol {S} _ {i j} - \sum_ {y _ {j} = y _ {i}} ^ {m} w _ {i j} \boldsymbol {S} _ {i j} \right], \tag {1} +$$ + +where $m$ is the mini-batch size, and $w_{ij}$ is the weight assigned to $S_{ij}$ . Eq. 1 shows that any pair-based method can be considered as a weighting scheme focusing on informative pairs. Here we list the weighting schemes of contrastive loss, triplet loss and MS loss. + +-Contrastive loss. For each negative pair, $w_{ij} = 1$ if $S_{ij} > \lambda$ , otherwise $w_{ij} = 0$ . The weights of all positive pairs are set to 1. +- Triplet loss. For each negative pair, $w_{ij} = |\mathcal{P}_{ij}|$ , where $\mathcal{P}_{ij}$ is the valid positive set sharing the anchor. Formally, $\mathcal{P}_{ij} = \{x_{i,k} | y_k = y_i$ , and $S_{ik} < S_{ij} + \eta \}$ and $\eta$ is a predefined margin in triplet loss. Similarly, we can obtain the triplet weight for a positive pair. +- MS loss. Unlike contrastive loss and triplet loss which only assigns a weight with integer value, MS loss [37] is able to weight the pairs more properly by jointly considering multiple similarities. The MS weight for a negative pair is computed as: + +$$ +w _ {i j} = \frac {e ^ {\beta (\boldsymbol {S} _ {i j} - \lambda)}}{1 + \sum_ {k \in \mathcal {N} _ {i}} e ^ {\beta (\boldsymbol {S} _ {i k} - \lambda)}}, +$$ + +where $\beta$ and $\lambda$ are hyper-parameters, and $\mathcal{N}_i$ is the valid negative set for the anchor $x_{i}$ . The MS weight for a positive pair can be computed similarly. + +In fact, the main path of developing pair-based DML is to design a better weighting mechanism for pairs within a mini-batch. Generally, with a small mini-batch (e.g. 16 or 32), the sophisticated weighting schemes can perform much better (Figure 1, left). However, beyond the weighting scheme, the mini-batch size is also of great importance to DML. Figure 1 (left and middle) shows the R@1s of various pair-based methods are increased considerably by using a larger mini-batch on large-scale datasets. Intuitively, the number of negative pairs increase quadratically when the mini-batch size grows, which naturally provides more informative pairs. Instead of developing another sophisticated + +![](images/7927809c48c7514b4e853fbdc5b523bab7545ec04c95aa63a7c894b71b1e7963.jpg) +mini-batch + +![](images/b100979acfb0a3b899675b222bc7dad04e5e9a7e27102d719f5bd213e3f3014b.jpg) +$\pmb {f}(\cdot ,\pmb {\theta})$ + +![](images/a0aadd9d30e576585676b2768847e8a3d609e0f871e58d47c935de79c778f3aa.jpg) +→ + +Figure 2. Cross-Batch Memory (XBM) trains an embedding network by comparing each anchor with a memory bank using a pair-based loss. The memory bank is maintained as a queue with the current mini-batch dequeued and the oldest mini-batch dequeued. Our XBM enables a large amount of valid negatives for each anchor to benefit the model training with many pair-based methods. + +![](images/119788ef73d3e64b9f939b5fff25cfa54efd62ef5830e5e5a9de264a98d3ccb3.jpg) +compare +XBM + +![](images/d458c9723ab9b5e6661d2b30d7bea27d0f7380cd51ceffe429bd3bdd8a13b643.jpg) +similarities + +![](images/19ced88a386898cb1ec03578c12c9095db9676aca1fb9f16b2aa6dfa3c6f2f33.jpg) + +but highly complicated algorithm to weight the informative pairs, our intuition is to simply collect sufficient informative negative pairs, where a simple weighting scheme, such as contrastive loss, can easily outperform the stage-of-the-art weighting approaches. This provides a new path that is straightforward yet more efficient to solve the hard mining problem in DML. + +Naively, a straightforward solution to collect more informative negative pairs is to increase the mini-batch size. However, training deep networks with a large mini-batch is limited by GPU memory, and often requires massive data flow communication between multiple GPUs. To this end, we attempt to achieve the same goal by introducing an alternative approach using very low GPU memory and minimum computation burden. We propose a XBM module that allows the model to collect informative pairs over multiple past mini-batches, based on the "slow drift" phenomena as described below. + +# 3.2. Slow Drift Phenomena + +The embeddings of past mini-batches are usually considered out-of-date because the model parameters are changing throughout the training process [10, 32, 25]. Such out-of-date features are always discarded, but we learn that they can be an important resource, while being computation-free, by identifying the "slow drift" phenomena. We study the drifting speed of embeddings by measuring the difference of features for the same instance computed at different training iterations. Formally, the feature drift of an input $\mathbf{x}$ at $t$ -th iteration with step $\Delta t$ is defined as: + +$$ +D (x, t; \Delta t) := | | f (\boldsymbol {x}; \boldsymbol {\theta} ^ {t}) - f (\boldsymbol {x}; \boldsymbol {\theta} ^ {t - \Delta t}) | | _ {2} ^ {2} \tag {2} +$$ + +We train GoogleNet [33] from scratch with a contrastive loss, and compute the average feature drift for a set of randomly sampled instances at different steps: $\{10, 100, 1000\}$ (in Figure 3). The feature drift is consistently small, within only e.g. 10 iterations. For the large steps, e.g. 100 and 1000, the features change drastically at the early phase, but + +![](images/ab90ed767c4e9d0dc4b76049ba14c7f144876f1d384dca1be199a236c6e57ea9.jpg) +Figure 3. Feature drift with different steps on SOP. The embeddings of training instances drift within a relatively small distance even under a large interval, e.g. $\Delta t = 1000$ . + +become relatively stable within about 3K iterations. Furthermore, when the learning rate decreases, the drift gets extremely slow. We define such phenomena as "slow drift", which suggests that with a certain number of training iterations, the embeddings of instances can drift very slowly, resulting in marginal differences between the features computed at different training iterations. + +Furthermore, we demonstrate that such "slow drift" phenomena can provide a strict upper bound for the error of gradients of a pair-based loss. For simplicity, we consider the contrastive loss of one single negative pair $\mathcal{L} = \boldsymbol{v}_i^T\boldsymbol{v}_j$ where $\boldsymbol{v}_i, \boldsymbol{v}_j$ are the embeddings of current model and $\widetilde{\boldsymbol{v}}_j$ is an approximation of $\boldsymbol{v}_j$ . + +Lemma 1. Assume $||\pmb{v}_j - \widetilde{\pmb{v}}_j||_2^2 < \epsilon$ , $\widetilde{\mathcal{L}} = \pmb{v}_i^T\widetilde{\pmb{v}}_j$ and $f$ satisfies Lipschitz continuous condition, then the error of gradients related to $\pmb{v}_i$ is, + +$$ +\left| \left| \frac {\partial \mathcal {L}}{\partial \boldsymbol {\theta}} - \frac {\partial \widetilde {\mathcal {L}}}{\partial \boldsymbol {\theta}} \right| \right| _ {2} ^ {2} < C \epsilon , \tag {3} +$$ + +where $C$ is the Lipschitz constant. + +Proof and discussion of Lemma 1 are provided in Supplementary Materials. Empirically, $C$ is often less than 1 + +Algorithm 1 Pseudocode of XBM. +train network f conventionally with K epochs initialize XBM as queue M +for x, y in loader: # x: data, y: labels anchors $=$ f.forward(x) # memory update enqueue(M, (anchorsdetach(), y)) dequeuM) # compare anchors with M sim $=$ torch/matmul(anchors.transpose(), M feats) loss $=$ pair_based_loss(sim, y, M.labels) loss.backup() optimizer step() + +with the backbones used in our experiments. Lemma 1 suggests that the error of gradients is controlled by the error of embeddings under Lipschitz assumption. Thus, the "slow drift" phenomenon ensures that mining across mini-batches can provide negative pairs with valid information for pair-based methods. + +In addition, we discover that the "slow drift" of embeddings is not a special phenomena in DML, and also exists in other conventional tasks, as shown in Supplementary Materials. + +# 3.3. Cross-Batch Memory Module + +We first describe our cross-batch memory (XBM) module, with model initialization and updating mechanism. Then we show that our memory module is easy to implement, can be directly integrated into existing pair-based DML framework as a plug-and-play module, by simply using several lines of codes (in Algorithm 1). + +XBM. As the feature drift is relatively large at the early epochs, we warm up the neural networks with 1k iterations, allowing the model to reach a certain local optimal field where the embeddings become more stable. Then we initialize the memory module $\mathbb{M}$ by computing the features of a set of randomly sampled training images with the warm-up model. Formally, $\mathbb{M} = \{(\widetilde{v}_1,\widetilde{y}_1),(\widetilde{v}_2,\widetilde{y}_2),\ldots ,(\widetilde{v}_m,\widetilde{y}_M)\}$ , where $\widetilde{\boldsymbol{v}}_i$ is initialized as the embedding of the $i$ -th sample $\boldsymbol{x}_i$ , and $M$ is the memory size. We define a memory ratio as $R_{\mathbb{M}}\coloneqq M / N$ , the ratio of memory size to the training size. + +We maintain and update our XBM module as a queue: at each iteration, we enqueue the embeddings and labels of the current mini-batch, and dequeue the entities of the earliest mini-batch. Thus our memory module is updated with embeddings of the current mini-batch directly, without any additional computation. Furthermore, the whole training set can be cached in the memory module, because very limited memory is required for storing the embedding features, e.g. 512-d float vectors. See the other update strategy in Supplementary Materials. + +XBM augmented Pair-based DML. We perform hard negative mining with our XBM on the pair-based DML. For a pair-based loss, based on GPW in [37], it can be cast into a unified weighting formulation of pair-wise similarities within a mini-batch in Eqn.(1), where a similarity matrix is computed within a mini-batch, $S$ . To perform our XBM mechanism, we simply compute a cross-batch similarity matrix $\widetilde{S}$ between the instances of current mini-batch and the memory bank. + +Formally, the memory augmented pair-based DML can be formulated as below: + +$$ +\mathcal {L} = \frac {1}{m} \sum_ {i = 1} ^ {m} \mathcal {L} _ {i} = \sum_ {i = 1} ^ {m} \left[ \sum_ {\tilde {y} _ {j} \neq y _ {i}} ^ {M} w _ {i j} \widetilde {\boldsymbol {S}} _ {i j} - \sum_ {\tilde {y} _ {j} = y _ {i}} ^ {M} w _ {i j} \widetilde {\boldsymbol {S}} _ {i j} \right], \tag {4} +$$ + +where $\widetilde{S}_{ij} = v_i^T\widetilde{v}_j$ . The memory augmented pair-based loss in Eqn.(4) is in the same form as the normal pair-based loss in Eqn.(1), by computing a new similarity matrix $\widetilde{S}$ . Each instance in current mini-batch is compared with all the instances stored in the memory, enabling us to collect sufficient informative pairs for training. The gradient of the loss $\mathcal{L}_i$ w.r.t. $\pmb{v}_i$ is, + +$$ +\frac {\partial \mathcal {L} _ {i}}{\partial \boldsymbol {v} _ {i}} = \sum_ {\widetilde {y} _ {j} \neq y _ {i}} ^ {M} w _ {i j} \widetilde {\boldsymbol {v}} _ {j} - \sum_ {\widetilde {y} _ {j} = y _ {i}} ^ {M} w _ {i j} \widetilde {\boldsymbol {v}} _ {j} \tag {5} +$$ + +and the gradients w.r.t. $\pmb{v}_i$ model parameters $(\theta)$ can be computed through a chain rule: + +$$ +\frac {\partial \mathcal {L} _ {i}}{\partial \boldsymbol {\theta}} = \frac {\partial \mathcal {L} _ {i}}{\partial \boldsymbol {v} _ {i}} \frac {\partial \boldsymbol {v} _ {i}}{\partial \boldsymbol {\theta}} \tag {6} +$$ + +Finally, the model parameters $\theta$ are optimized through stochastic gradient descent. Lemma 1 ensures that the gradient error raised by embedding drift can be strictly constrained with a bound, which minimizes the side effect to the model training. + +Hard Mining Ability. We investigate the hard mining ability of our XBM mechanism. We study the amount of valid negative pairs produced by our memory module at each iteration. A negative pair with non-zero gradient is considered as valid. The statistical result is illustrated in Figure 4. Throughout the training procedure, our memory module steadily contributes about 1,000 hard negative pairs per iteration, whereas less than 10 valid pairs are generated by the original mini-batch mechanism. + +Qualitative hard mining results are shown in Figure 5. Given a bicycle image as an anchor, the mini-batch provides limited and different images, e.g. roof and sofa, as negatives. On the contrary, our XBM offers both semantically bicycle-related images and other samples, e.g. wheel and clothes. These results clearly demonstrate that the proposed + +![](images/2f5189b76ce15dd256c8f82074ea872e0ed6a0b2fc5a58322177cd2749c1f777.jpg) +Figure 4. The number of valid negative examples from mini-batch and that from memory per iteration. Model is trained on SOP with $R_{M} = 1$ , mini-batch size 64 and GoogleNet as the backbone. + +![](images/9fab84640bac1c731ce1223aeac5818460c0f8f8cdf89ac21f2f1ea24489548d.jpg) +Figure 5. Given an anchor image (yellow), examples of positive (green) and negative from mini-batch (gray) and that from memory (purple). Current mini-batch can only bring few valid negatives with less information, while our XBM module can provide a wide variety of informative negative examples. + +XBM can provide diverse, related, and even fine-grained samples to construct negative pairs. + +Our results confirm that (1) existing pair-based approaches suffer from the problem of lacking informative negative pairs to learn a discriminative model, and (2) our XBM module can significantly strengthen the hard mining ability of pair-based DML in a very simple yet efficient manner. See more examples in Supplementary Materials. + +# 4. Experiments and Results + +# 4.1. Implementation Details + +We follow the standard settings in [22, 30, 23, 14] for fair comparison. Specifically, we adopt GoogleNet [33] as the default backbone network if not mentioned. The weights of the backbone were pre-trained on ILSVRC 2012-CLS dataset [27]. A 512-d fully-connected layer with $l_{2}$ normalization is added after the global pooling layer. The default embedding dimension is set as 512. For all datasets, the input images are first resized to $256 \times 256$ , and then cropped to $224 \times 224$ . Random crops and random flips are utilized as data augmentation during training. For testing, we only use + +the single center crop to compute the embedding for each instance as [22]. In all experiments, we use the Adam optimizer [15] with $5e^{-4}$ weight decay and the PK sampler (P categories, K samples/category) to construct mini-batches. + +# 4.2. Datasets + +Our methods are evaluated on three large-scale datasets for few-shot image retrieval. Recall@ $k$ is reported. The training and testing protocol follow the standard setups: + +Stanford Online Products (SOP) [22] contains 120,053 online product images in 22,634 categories. There are only 2 to 10 images for each category. Following [22], we use 59,551 images (11,318 classes) for training, and 60,502 images (11,316 classes) for testing. + +In-shop Clothes Retrieval (In-shop) contains 72,712 clothing images of 7,986 classes. Following [20], we use 3,997 classes with 25,882 images as the training set. The test set is partitioned to a query set with 14,218 images of 3,985 classes, and a gallery set having 3,985 classes with 12,612 images. + +PKU VehicleID (VehicleID) [19] contains 221,736 surveillance images of 26,267 vehicle categories, where 13,134 classes (110,178 images) are used for training. Following the test protocol described in [19], evaluation is conducted on a predefined small, medium and large test sets which contain 800 classes (7,332 images), 1600 classes (12,995 images) and 2400 classes (20,038 images) respectively. + +# 4.3. Ablation Study + +We provide ablation study on SOP dataset with GoogleNet to verify the effectiveness of our XBM module. Memory Ratio. The search space of our cross-batch hard mining can be dynamically controlled by memory ratio $R_{\mathbb{M}}$ . We illustrate the impact of memory ratio to XBM augmented contrastive loss on three benchmarks (in Figure 1, right). Firstly, our method significantly outperforms the baseline (with $R_{\mathbb{M}} = 0$ ), with over $20\%$ improvements on all three datasets using various configurations of $R_{\mathbb{M}}$ . Secondly, our method with mini-batch of 16 can achieve better performance than the non-memory counterpart using 256 mini-batch, e.g. with an improvement of $71.7\% \rightarrow 78.2\%$ on recall@1, while saving GPU memory considerably. + +More importantly, our XBM can boost the contrastive loss largely with small $R_{\mathbb{M}}$ (e.g. on In-shop, $52.0\% \rightarrow 79.4\%$ on recall@1 with $R_{\mathbb{M}} = 0.01$ ) and its performance is going to be saturated when the memory expands to a moderate size. It makes sense, since the memory with a small $R_{\mathbb{M}}$ (e.g. $1\%$ ) already contains thousands of embeddings to generate sufficient valid negative instances on large-scale datasets, especially fine-grained ones, such as In-shop or VehicleID. Therefore, our memory scheme can have consistent and stable performance improvements with a wide range of memory ratios. + +
Recall@K(%)SOPIn-shopVehicleID
110100100011020304050SmallMediumLarge
151515
Contrastive64.081.492.197.877.193.095.296.196.897.179.591.676.289.370.086.0
Contrastive w/ M77.889.895.498.589.197.398.198.498.798.894.196.293.195.592.595.5
Triplet61.680.291.697.779.894.896.597.497.898.286.994.884.893.479.791.4
Triplet w/ M74.287.494.298.082.995.796.997.497.898.093.395.892.095.091.394.8
MS69.784.293.197.985.196.797.898.398.798.891.096.189.494.886.793.8
MS w/ M76.289.395.498.687.197.198.098.498.798.994.196.793.095.892.195.6
+ +![](images/c3c31dc5c2af0856772d6297636eb9dee564496e57415a17105031f61e9290d5.jpg) +Figure 6. Performance of contrastive loss by training with different mini-batch sizes. Unlike conventional pair-based methods, XBM augmented contrastive loss is equally effective under random shuffle mini-batch sampler (denoted with superscript *). + +Mini-batch Size. Mini-batch size is critical to the performance of many pair-based approaches (Figure 1, left). We further investigate its impact to our memory augmented pair-based methods (shown in Figure 6). Our method has a $3.2\%$ performance gain by increasing its mini-batch size from 16 to 256, while the original contrastive method has a significantly larger improvement of $25.1\%$ . Obviously, with the proposed memory module, the impact of mini-batch size is reduced significantly. This indicates that the effect of mini-batch size can be strongly compensated by our memory module, which provides a more principled solution to address the hard mining problem in DML. + +With General Pair-based DML. Our memory module can be directly applied to the GPW framework. We evaluate it with contrastive loss, triplet loss and MS loss. As shown in Table 1, our memory module can improve the original DML approaches significantly and consistently on all benchmarks. Specifically, the memory module remarkably boosts the performance of contrastive loss by $64.0\% \rightarrow 77.8\%$ and MS loss by $69.7\% \rightarrow 76.2\%$ . Furthermore, with sophisticated sampling and weighting approach, MS loss has $16.7\%$ recall@1 performance improvement over contrastive loss on VehicleID Large test set. Such a large gap can be simply filled by our memory module, with a further $5.8\%$ improvement. MS loss has a smaller improvement because it weights extremely hard negatives heavily which might be outliers, while such a harmful influence is weakened by the equally weighting scheme of contrastive loss. For a detailed + +Table 1. Retrieval results of memory augmented ( 'w/ M' ) pair-based methods compared with their respective baselines on three datasets. + +
MethodTimeGPU Mem.R@1Gain
Cont. bs. 642.10 h.5.12 GB63.9-
Cont. bs. 2564.32 h.+15.7 GB71.7+7.8
Cont. w/ 1% RM2.48 h.+0.01 GB69.8+5.9
Cont. w/ 100% RM3.19 h.+0.20 GB77.4+13.5
+ +Table 2. Training time and GPU memory cost on 64, 256 minibatch size and $1\%$ , $100\%$ memory ratio with 64 mini-batch size. + +analysis see Supplementary Materials (SM). + +The results suggest that (1) both straightforward (e.g. contrastive loss) and carefully designed weighting scheme (e.g. MS loss) can be improved largely by our memory module, and (2) with our memory module, a simple pair-weighting method (e.g. contrastive loss) can easily outperform the most sophisticated, state-of-the-art methods such as MS loss [37] by a large margin. + +Memory and Computational Cost. We analyze the complexity of our XBM module on memory and computational cost. On memory cost, The XBM module $\mathbb{M}(\mathcal{O}(DM))$ and affinity matrix $\widetilde{S}$ ( $\mathcal{O}(mM)$ ) requires a negligible 0.2 GB GPU memory for caching the whole training set (Table 2). On computational complexity, the cost of $\widetilde{S}$ ( $\mathcal{O}(mDM)$ ) increases linearly with memory size $M$ . With a GPU implementation, it takes a reasonable $34\%$ amount of extra training time w.r.t. the forward and backward procedure. + +It is also worth noting that XBM does not act in the inference phase. It only requires 1 hour extra training time and 0.2GB memory, to achieve a surprising $13.5\%$ performance gain by using a single GPU. Moreover, our method can be scalable to an extremely large-scale dataset, e.g. with 1 billion samples, since our XBM module can generate a rich set of valid negatives with a small-memory-ratio XBM, which requires acceptable cost. + +# 4.4. Quantitative and Qualitative Results + +In this section, we compare our XBM augmented contrastive loss with the state-of-the-art DML methods on three benchmarks on image retrieval. Even though our method can reach better performance with a larger mini-batch size (Figure 6), we only use 64 mini-batch which can be implemented on a single GPU with ResNet50 [11]. Since the backbone architecture and embedding dimension can effect the recall metric, we list the results of our method with var + +
Recall@K (%)1101001000
HDC [45]G38469.584.492.897.7
A-BIER [24]G51274.286.994.097.8
ABE [14]G51276.388.494.898.2
SM [32]G51275.287.593.797.4
Clustering [31]B6467.083.793.2-
ProxyNCA [21]B6473.7---
HTL [6]B51274.888.394.898.4
MS [37]B51278.290.596.098.7
SoftTriple [25]B51278.686.691.895.4
Margin [40]R12872.786.293.898.0
Divide [28]R12875.988.494.998.1
FastAP [2]R12873.888.094.998.3
MIC [26]R12877.289.495.6-
Cont. w/MG51277.489.695.498.4
Cont. w/MB51279.590.896.198.7
Cont. w/MR12880.691.696.298.7
+ +Table 3. Recall@ $K\left( \% \right)$ performance on SOP. 'G', 'B' and 'R' denotes applying GoogleNet, InceptionBN and ResNet50 as backbone respectively, and the superscript is embedding size. + +ious configurations for fair comparison in Table 3, 4 and 5. See results on more datasets in SM. + +The results demonstrate that our XBM module, with a contrastive loss, can surpass the state-of-the-art methods on all datasets by a large margin. On SOP, our method with $\mathbf{R}^{128}$ outperforms the current state-of-the-art method: MIC [26] by $77.2\% \rightarrow 80.6\%$ . On In-shop, our method with $\mathbf{R}^{128}$ achieves even higher performance than FastAP [2] with $\mathbf{R}^{512}$ , and improves by $88.2\% \rightarrow 91.3\%$ compared to MIC. On VehicleID, our method outperforms existing approaches considerably. For example, on the large test dataset, by using a same $\mathbf{G}^{512}$ , it improves the R@1 of recent A-BIER [24] largely by $81.9\% \rightarrow 92.5\%$ . With $\mathbf{R}^{128}$ , our method surpasses the best results by $87\% \rightarrow 93\%$ , which is obtained by FastAP [2] using $\mathbf{R}^{512}$ . + +Figure 7 shows that our memory module promotes the learning of a more discriminative encoder. For example, at the first row, our model is aware of the deer under the lamp which is a specific character of the query product, and retrieves the correct images. In addition, we also present some bad cases in the bottom rows, where our retrieved results are visually closer to the query than that of baseline model. See more visualizations in SM. + +# 5. Conclusions + +We have presented a conceptually simple, easy to implement, and memory efficient cross-batch mining mechanism for pair-based DML. In this work, we identify the "slow drift" phenomena that the embeddings drift exceptionally slow during the training process. Then we propose a cross-batch memory (XBM) module to dynamically update the embeddings of instances of recent mini-batches, which allows us to collect sufficient hard negative pairs across multiple mini-batches, or even from the whole dataset. Without + +
Recall@K (%)11020304050
HDC [45]G38462.184.989.091.292.393.1
A-BIER [24]G51283.195.196.997.597.898.0
ABE [14]G51287.396.797.998.298.598.7
HTL [6]B51280.994.395.897.297.497.8
MS [37]B51289.797.998.598.899.199.2
Divide [28]R12885.795.596.997.5-98.0
MIC [26]R12888.297.0-98.0-98.8
FastAP [2]R51290.997.798.598.898.999.1
Cont. w/MG51289.497.598.398.698.798.9
Cont. w/MB51289.997.698.498.698.898.9
Cont. w/MR12891.397.898.498.799.099.1
+ +Table 4. Recall@ $K\left( \% \right)$ performance on In-Shop. + +
MethodSmallMediumLarge
151515
GS-TRS [5]75.083.074.182.673.281.9
BIER [23]G51282.690.679.388.376.086.4
A-BIER [24]G51286.392.783.388.781.988.7
VANet [4]G204883.395.981.194.777.292.9
MS [37]B51291.096.189.494.886.793.8
Divide [28]R12887.792.985.790.482.990.2
MIC [26]R12886.993.4--82.091.0
FastAP [2]R51291.996.890.695.987.595.1
Cont. w/MG51294.096.393.295.492.595.5
Cont. w/MB51294.696.993.496.093.096.1
Cont. w/MR12894.796.893.795.893.095.8
+ +Table 5. Recall@ $K\left( \% \right)$ performance on VehicleID. + +![](images/1b51d75db5b531b9a25d9885ee3d02ee2b2e8b854196baab8dd350ccc97ead6e.jpg) +Figure 7. Top 4 retrieved images w/o and w/ memory module. Correct results are highlighted with green, while incorrect purple. + +bells and whistles, the proposed XBM can be directly integrated into a general pair-based DML framework, and improve the performance of existing pair-based methods significantly on image retrieval. In particular, with our XBM, a contrastive loss can easily surpass state-of-the-art methods [37, 26, 2] by a large margin on three large-scale datasets. + +This paves a new path in solving for hard negative mining which is a fundamental problem for various computer vision tasks. Furthermore, we hope that the dynamic memory mechanism can be extended to improve a wide variety of machine learning tasks because "slow drift" is a general phenomenon not only occurring in DML. + +# References + +[1] Maxime Bucher, Stéphane Herbin, and Frédéric Jurie. Improving semantic embedding consistency by metric learning for zero-shot classification. In ECCV, 2016. +[2] Fatih Cakir, Kun He, Xide Xia, Brian Kulis, and Stan Sclaroff. Deep metric learning to rank. In CVPR, 2019. +[3] S. Chopra, R. Hadsell, and Y. LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, 2005. +[4] Ruihang Chu, Yifan Sun, Yadong Li, Zheng Liu, Chi Zhang, and Yichen Wei. Vehicle re-identification with viewpoint-aware metric learning. In ICCV, 2019. +[5] Yan Em, Feng Gag, Yihang Lou, Shiqi Wang, Tiejun Huang, and Ling-Yu Duan. Incorporating intra-class variance to fine-grained visual recognition. In ICME. IEEE, 2017. +[6] Weifeng Ge, Weilin Huang, Dengke Dong, and Matthew R Scott. Deep metric learning with hierarchical triplet loss. In ECCV, 2018. +[7] Alexander Grabner, Peter M. Roth, and Vincent Lepetit. 3d pose estimation and 3d model retrieval for objects in the wild. In CVPR, 2018. +[8] R. Hadsell, S. Chopra, and Y. LeCun. Dimensionality reduction by learning an invariant mapping. In CVPR, 2006. +[9] Ben Harwood, Vijay Kumar B G, Gustavo Carneiro, Ian Reid, and Tom Drummond. Smart mining for deep metric learning. In ICCV, 2017. +[10] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In arXiv:1911.05722, 2019. +[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[12] Xinwei He, Yang Zhou, Zhichao Zhou, Song Bai, and Xiang Bai. Triplet-center loss for multi-view 3d object retrieval. In CVPR, 2018. +[13] Alexander Hermans*, Lucas Beyer*, and Bastian Leibe. In defense of the triplet loss for person re-identification. arXiv:1703.07737v4, 2017. +[14] Wonsik Kim, Bhavya Goyal, Kunal Chawla, Jungmin Lee, and Keunjoo Kwon. Attention-based ensemble for deep metric learning. In ECCV, 2018. +[15] Diederick P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR, 2015. +[16] Sasi Kiran Yelamarthi, Shiva Krishna Reddy, Ashish Mishra, and Anurag Mittal. A zero-shot framework for sketch based image retrieval. In ECCV, 2018. +[17] Laura Leal-Taixe, Cristian Canton-Ferrer, and Konrad Schindler. Learning by tracking: Siamese cnn for robust target association. In CVPR Workshops, 2016. +[18] Suichan Li, Dapeng Chen, Bin Liu, Nenghai Yu, and Rui Zhao. Memory-based neighbourhood embedding for visual recognition. In ICCV, 2019. +[19] Hongye Liu, Yonghong Tian, Yaowei Wang, Lu Pang, and Tiejun Huang. Deep relative distance learning: Tell the difference between similar vehicles. In CVPR, 2016. + +[20] Ziwei Liu, Ping Luo, Shi Qiu, Xiaogang Wang, and Xiaou Tang. Deepfashion: Powering robust clothes recognition and retrieval with rich annotations. In CVPR, 2016. +[21] Yair Movshovitz-Attias, Alexander Toshev, Thomas K. Leung, Sergey Ioffe, and Saurabh Singh. No fuss distance metric learning using proxies. In ICCV, 2017. +[22] Hyun Oh Song, Yu Xiang, Stefanie Jegelka, and Silvio Savarese. Deep metric learning via lifted structured feature embedding. In CVPR, 2016. +[23] Michael Opitz, Georg Waltner, Horst Possegger, and Horst Bischof. Bier - boosting independent embeddings robustly. In ICCV, 2017. +[24] Michael Opitz, Georg Waltner, Horst Possegger, and Horst Bischof. Deep metric learning with bier: Boosting independent embeddings robustly. PAMI, 2018. +[25] Qi Qian, Lei Shang, Baigui Sun, and Juhua Hu. Softtriple loss: Deep metric learning without triplet sampling. ICCV, 2019. +[26] Karsten Roth, Biaggio Brattoli, and Bjorn Ommer. Mic: Mining interclass characteristics for improved metric learning. In ICCV, 2019. +[27] 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. +[28] Artsiom Sanakoyeu, Vadim Tschernezki, Uta Buchler, and Bjorn Ommer. Divide and conquer the embedding space for metric learning. In CVPR, 2019. +[29] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, 2015. +[30] Kihyuk Sohn. Improved deep metric learning with multiclass n-pair loss objective. In NeurIPS. 2016. +[31] Hyun Oh Song, Stefanie Jegelka, Vivek Rathod, and Kevin Murphy. Deep metric learning via facility location. In CVPR, 2017. +[32] Yumin Suh, Bohyung Han, Wonsik Kim, and Kyoung Mu Lee. Stochastic class-based hard example mining for deep metric learning. In CVPR, 2019. +[33] 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. +[34] Ran Tao, Efstratos Gavves, and Arnold WM Smeulders. Siamese instance search for tracking. In CVPR, 2016. +[35] Evgeniya Ustinova and Victor Lempitsky. Learning deep embeddings with histogram loss. In NeurIPS. 2016. +[36] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In NeurIPS, 2016. +[37] Xun Wang, Xintong Han, Weilin Huang, Dengke Dong, and Matthew R Scott. Multi-similarity loss with general pair weighting for deep metric learning. In CVPR, 2019. +[38] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In ECCV, 2016. + +[39] Paul Wohlhart and Vincent Lepetit. Learning descriptors for object recognition and 3d pose estimation. In CVPR, 2015. +[40] Chao-Yuan Wu, R. Manmatha, Alexander J. Smola, and Philipp Krahenbuhl. Sampling matters in deep embedding learning. ICCV, 2017. +[41] Zhirong Wu, Alexei A Efros, and Stella Yu. Improving generalization via scalable neighborhood component analysis. In ECCV, 2018. +[42] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, pages 3733-3742, 2018. +[43] Tong Xiao, Shuang Li, Bochao Wang, Liang Lin, and Xiaogang Wang. Joint detection and identification feature learning for person search. In CVPR, 2017. +[44] Rui Yu, Zhiyong Dou, Song Bai, Zhaoxiang Zhang, Yongchao Xu, and Xiang Bai. Hard-aware point-to-set deep metric for person re-identification. In ECCV, 2018. +[45] Yuhui Yuan, Kuiyuan Yang, and Chao Zhang. Hard-aware deeply cascaded embedding. In ICCV, 2017. +[46] Andrew Zhai, Hao-Yu Wu, and US San Francisco. Classification is a strong baseline for deep metric learning. 2019. +[47] Ziming Zhang and Venkatesh Saligrama. Zero-shot learning via joint latent similarity embedding. In CVPR, 2016. +[48] Zhun Zhong, Liang Zheng, Zhiming Luo, Shaozi Li, and Yi Yang. Invariance matters: Exemplar memory for domain adaptive person re-identification. In CVPR, 2019. \ No newline at end of file diff --git a/crossbatchmemoryforembeddinglearning/images.zip b/crossbatchmemoryforembeddinglearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..62efe7875826f94497a66e9efc00258c6520f941 --- /dev/null +++ b/crossbatchmemoryforembeddinglearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f511be4fd6f00ccf4a7f80adcdf6134eaa59f4fb968e58058890e53e320a417 +size 554631 diff --git a/crossbatchmemoryforembeddinglearning/layout.json b/crossbatchmemoryforembeddinglearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ee999eff1c42d33d7c40fb2c622676e57235485a --- /dev/null +++ b/crossbatchmemoryforembeddinglearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f256bd9865d132717f0f652f0a29a295a74fde04bc940a23fcef7ba0abecbc66 +size 403957 diff --git a/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/2f75ad8c-f608-4c7f-9e10-e8a7e5aa828b_content_list.json b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/2f75ad8c-f608-4c7f-9e10-e8a7e5aa828b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..1ad412ecd620f8392c71ff2a72d48b4ad2bbf9bd --- /dev/null +++ b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/2f75ad8c-f608-4c7f-9e10-e8a7e5aa828b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37aa0c6b7ab6cd55a069de7e007b65433329f82f7d11ee8511e32a63bef6b8c0 +size 72195 diff --git a/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/2f75ad8c-f608-4c7f-9e10-e8a7e5aa828b_model.json b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/2f75ad8c-f608-4c7f-9e10-e8a7e5aa828b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7a37d477e99438f07a855fac3577212620654c28 --- /dev/null +++ b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/2f75ad8c-f608-4c7f-9e10-e8a7e5aa828b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68666dd7a8ba23ff5250ab95697632fc7ff6e1dd3cd5a5ba519731d31ecf17ce +size 92243 diff --git a/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/2f75ad8c-f608-4c7f-9e10-e8a7e5aa828b_origin.pdf b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/2f75ad8c-f608-4c7f-9e10-e8a7e5aa828b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0889f8dd047e21ab4991b0481c82be8ba5e088db --- /dev/null +++ b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/2f75ad8c-f608-4c7f-9e10-e8a7e5aa828b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d487d92f8cf33d5affe0addafc5b5f78e2254fa6a9435220e678ed01b2bf9473 +size 1496302 diff --git a/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/full.md b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2568b1aa35db0bad674b1a541f8d96078ff3c633 --- /dev/null +++ b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/full.md @@ -0,0 +1,326 @@ +# Cross-domain Correspondence Learning for Exemplar-based Image Translation + +Pan Zhang $^{1}$ , Bo Zhang $^{2}$ , Dong Chen $^{2}$ , Lu Yuan $^{3}$ , Fang Wen $^{2}$ + +1University of Science and Technology of China 2Microsoft Research Asia 3 Microsoft Cloud+AI + +# Abstract + +We present a general framework for exemplar-based image translation, which synthesizes a photo-realistic image from the input in a distinct domain (e.g., semantic segmentation mask, or edge map, or pose keypoints), given an exemplar image. The output has the style (e.g., color, texture) in consistency with the semantically corresponding objects in the exemplar. We propose to jointly learn the cross-domain correspondence and the image translation, where both tasks facilitate each other and thus can be learned with weak supervision. The images from distinct domains are first aligned to an intermediate domain where dense correspondence is established. Then, the network synthesize images based on the appearance of semantically corresponding patches in the exemplar. We demonstrate the effectiveness of our approach in several image translation tasks. Our method is superior to state-of-the-art methods in terms of image quality significantly, with the image style faithful to the exemplar with semantic consistency. Moreover, we show the utility of our method for several applications. + +# 1. Introduction + +Conditional image synthesis aims to generate photorealistic images based on certain input data [18, 45, 52, 6]. We are interested in a specific form of conditional image synthesis, which converts a semantic segmentation mask, an edge map, and pose keypoints to a photo-realistic image, given an exemplar image, as shown in Figure 1. We refer to this form as exemplar-based image translation. It allows more flexible control for multi-modal generation according to a user-given exemplar. + +Recent methods directly learn the mapping from a semantic segmentation mask to an exemplar image using neural networks [17, 38, 34, 44]. Most of these methods encode the style of the exemplar into a latent style vector, from which the network synthesizes images with the desired style similar to the exemplar. However, the style code only characterizes the global style of the exemplar, regardless of spa + +![](images/39fdae355bb5c8acc336a10302fa4c2484f851c8ea4c4dbfe34d4f9bceebe988.jpg) +Figure 1: Exemplar-based image synthesis. Given the exemplar images (1st row), our network translates the inputs, in the form of segmentation mask, edge and pose, to photorealistic images (2nd row). Please refer to supplementary material for more results. + +tial relevant information. Thus, it causes some local style "wash away" in the ultimate image. + +To address this issue, the cross-domain correspondence between the input and the exemplar has to be established before image translation. As an extension of Image Analogies [14], Deep Analogy [27] attempts to find a dense semantically-meaningful correspondence between the image pair. It leverages deep features of VGG pretrained on + +real image classification tasks for matching. We argue such representation may fail to handle a more challenging mapping from mask (or edge, keypoints) to photo since the pretrained network does not recognize such images. In order to consider the mask (or edge) in the training, some methods [10, 46, 5] explicitly separate the exemplar image into semantic regions and learns to synthesize different parts individually. In this way, it successfully generates high-quality results. However, these approaches are task specific, and are unsuitable for general translation. + +How to find a more general solution for exemplar-based image translation is non-trivial. We aim to learn the dense semantic correspondence for cross-domain images (e.g., mask-to-image, edge-to-image, keypoints-to-image, etc.), and then use it to guide the image translation. It is weakly supervise learning, since we have neither the correspondence annotations nor the synthesis ground truth given a random exemplar. + +In this paper, we propose a CrOss-domain CoReSpondence network (CoCosNet) that learns cross-domain correspondence and image translation simultaneously. The network architecture comprises two sub-networks: 1) Cross-domain correspondence Network transforms the inputs from distinct domains to an intermediate feature domain where reliable dense correspondence can be established; 2) Translation network, employs a set of spatially-variant de-normalization blocks [38] to progressively synthesizes the output, using the style details from a warped exemplar which is semantically aligned to the mask (or edge, keypoints map) according to the estimated correspondence. Two sub-networks facilitate each other and are learned end-to-end with novel loss functions. Our method outperforms previous methods in terms of image quality by a large margin, with instance-level appearance being faithful to the exemplar. Moreover, the cross-domain correspondence implicitly learned enables some intriguing applications, such as image editing and makeup transfer. Our contribution can be summarized as follows: + +- We address the problem of learning dense cross-domain correspondence with weak supervision—joint learning with image translation. +- With the cross-domain correspondence, we present a general solution to exemplar-based image translation, that for the first time, outputs images resembling the fine structures of the exemplar at instance level. +- Our method outperforms state-of-the-art methods in terms of image quality by a large margin in various application tasks. + +# 2. Related Work + +Image-to-image translation The goal of image translation is to learn the mapping between different image domains. + +Most prominent contemporary approaches solve this problem through conditional generative adversarial network [36] that leverages either paired data [18, 45, 38] or unpaired data [52, 47, 22, 29, 42]. Since the mapping from one image domain to another is inherently multi-modal, following works promote the synthesis diversity by performing stochastic sampling from the latent space [53, 17, 24]. However, none of these methods allow delicate control of the output since the latent representation is rather complex and does not have an explicit correspondence to image style. In contrast, our method supports customization of the result according to a user-given exemplar, which allows more flexible control for multi-modal generation. + +Exemplar-based image synthesis Very recently, a few works [39, 44, 34, 40, 2] propose to synthesize photorealistic images from semantic layout under the guidance of exemplars. Non-parametric or semi-parametric approaches [39, 2] synthesize images by compositing the image fragments retrieved from a large database. Mainstream works, however, formulate the problem as image-to-image translation. Huang et al. [17] and Ma et al. [34] propose to employ Adaptive Instance Normalization (AdaIN) [16] to transfer the style code from the exemplar to the source image. Park et al. [38] learn an encoder to map the exemplar image into a vector from which the images are further synthesized. The style consistency discriminator is proposed in [44] to examine whether the image pairs exhibit a similar style. However, this method requires to constitute style consistency image pairs from video clips, which makes it unsuitable for general image translation. Unlike all of the above methods that only transfer the global style, our method transfers the fine style from a semantically corresponding region of the exemplar. Our work is inspired by the recent exemplar-based image colorization [48, 13], but we solve a more general problem: translating images between distinct domains. + +Semantic correspondence Early studies [33, 8, 43] on semantic correspondence focus on matching hand-crafted features. With the advent of the convolutional neural network, deep features are proven powerful to represent the high-level semantics. Long et al. [32] first propose to establish semantic correspondence by matching deep features extracted from a pretrained classification model. Following works further improve the correspondence quality by incorporating additional annotations [51, 7, 11, 12, 21, 25], adopting coarse-to-fine strategy [27] or retaining reliable sparse matchings [1]. However, all these methods can only handle the correspondence between natural images instead of cross-domain images, e.g., edge and photorealistic images. We explore this new scenario and implicitly learns the task with weak supervision. + +![](images/16912e30d308c664e2132cd1a6f4736732dc5565def538c6c243e9fb72a2dc78.jpg) +Figure 2: The illustration of the CoCosNet architecture. Given the input $x_A \in A$ and the exemplar $y_B \in B$ , the correspondence submodule adapts them into the same domain $S$ , where dense correspondence can be established. Then, the translation network generates the final output based on the warped exemplar $r_{y \to x}$ according to the correspondence, yielding an exemplar-based translation output. + +# 3. Approach + +We aim to learn the translation from the source domain $\mathcal{A}$ to the target domain $B$ given an input image $x_A \in A$ and an exemplar image $y_B \in B$ . The generated output is desired to conform to the content as $x_A$ while resembling the style from semantically similar parts in $y_B$ . For this purpose, the correspondence between $x_A$ and $y_B$ , which lie in different domains, is first established, and the exemplar image is warped accordingly so that its semantics is aligned with $x_A$ (Section 3.1). Thereafter, an image is synthesized according to the warped exemplar (Section 3.2). The whole network architecture is illustrated in Figure 2, by the example of mask to image synthesis. + +# 3.1. Cross-domain correspondence network + +Usually the semantic correspondence is found by matching patches [27, 25] in the feature domain with a pre-trained classification model. However, pre-trained models are typically trained on a specific type of images, e.g., natural images, so the extracted features cannot generalize to depict the semantics for another domain. Hence, prior works cannot establish the correspondence between heterogeneous images, e.g., edge and photo-realistic images. To tackle this, we propose a novel cross-domain correspondence network, mapping the input domains to a shared domain $S$ in which the representation is capable to represent the semantics for both input domains. As a result, reliable semantic correspondence can be found within domain $S$ . + +Domain alignment As shown in Figure 2, we first adapt the input image and the exemplar to a shared domain $S$ . To be specific, $x_{A}$ and $y_{B}$ are fed into the feature pyramid network that extracts multi-scale deep features by leveraging both local and global image context [41, 28]. The extracted + +feature maps are further transformed to the representations in $S$ , denoted by $x_{S} \in \mathbb{R}^{HW \times C}$ and $y_{S} \in \mathbb{R}^{HW \times C}$ respectively ( $H, W$ are feature spatial size; $C$ is the channel-wise dimension). Let $\mathcal{F}_{A \to S}$ and $\mathcal{F}_{B \to S}$ be the domain transformation from the two input domains respectively, so the adapted representation can be formulated as, + +$$ +x _ {S} = \mathcal {F} _ {A \rightarrow S} \left(x _ {A}; \theta_ {\mathcal {F}, A \rightarrow S}\right), \tag {1} +$$ + +$$ +y _ {S} = \mathcal {F} _ {B \rightarrow S} \left(y _ {B}; \theta_ {\mathcal {F}, B \rightarrow S}\right). \tag {2} +$$ + +where $\theta$ denotes the learnable parameter. The representation $x_{S}$ and $y_{S}$ comprise discriminative features that characterize the semantics of inputs. Domain alignment is, in practice, essential for correspondence in that only when $x_{S}$ and $y_{S}$ reside in the same domain can they be further matched with some similarity measure. + +Correspondence within shared domain We propose to match the features of $x_{S}$ and $y_{S}$ with the correspondence layer proposed in [48]. Concretely, we compute a correlation matrix $\mathcal{M} \in \mathbb{R}^{HW \times HW}$ of which each element is a pairwise feature correlation, + +$$ +\mathcal {M} (u, v) = \frac {\hat {x} _ {S} (u) ^ {T} \hat {y} _ {S} (v)}{\| \hat {x} _ {S} (u) \| \| \hat {y} _ {S} (v) \|}, \tag {3} +$$ + +where $\hat{x}_S(u)$ and $\hat{y}_S(v) \in \mathbb{R}^C$ represent the channel-wise centralized feature of $x_S$ and $y_S$ in position $u$ and $v$ , i.e., $\hat{x}_S(u) = x_S(u) - \mathrm{mean}(x_S(u))$ and $\hat{y}_S(v) = y_S(v) - \mathrm{mean}(y_S(v))$ . $\mathcal{M}(u,v)$ indicates a higher semantic similarity between $x_S(u)$ and $y_S(v)$ . + +Now the challenge is how to learn the correspondence without direct supervision. Our idea is to jointly train with image translation. The translation network may find it easier to generate high-quality outputs only by referring to the + +correct corresponding regions in the exemplar, which implicitly pushes the network to learn the accurate correspondence. In light of this, we warp $y_{B}$ according to $\mathcal{M}$ and obtain the warped exemplar $r_{y\rightarrow x}\in \mathbb{R}^{HW}$ . Specifically, we obtain $r_{y\rightarrow x}$ by selecting the most correlated pixels in $y_{B}$ and calculating their weighted average, + +$$ +r _ {y \rightarrow x} (u) = \sum_ {v} \operatorname * {s o f t m a x} _ {v} (\alpha \mathcal {M} (u, v)) \cdot y _ {B} (v). \qquad (4) +$$ + +Here, $\alpha$ is the coefficient that controls the sharpness of the softmax and we set its default value as 100. In the following, images will be synthesized conditioned on $r_{y\rightarrow x}$ and the correspondence network, in this way, learns its assignment with indirect supervision. + +# 3.2. Translation network + +Under the guidance of $r_{y \to x}$ , the translation network $\mathcal{G}$ transforms the constant code $z$ to the desired output $\hat{x}_B \in B$ . In order to preserve the structural information of $r_{y \to x}$ , we employ the spatially-adaptive denormalization (SPADE) block [38] to project the spatially variant exemplar style to different activation locations. As shown in Figure 2, the translation network has $L$ layers with the exemplar style progressively injected. As opposed to [38] which computes layer-wise statistics for batch normalization (BN), we empirically find the normalization that computes the statistics at each spatial position, the positional normalization (PN) [26], better preserves the structure information synthesized in prior layers. Hence, we propose to marry positional normalization and spatially-variant denormalization for high-fidelity texture transfer from the exemplar. + +Formally, given the activation $F^i \in \mathbb{R}^{C_i \times H_i \times W_i}$ before the $i^{th}$ normalization layer, we inject the exemplar style through, + +$$ +\alpha_ {h, w} ^ {i} \left(r _ {y \rightarrow x}\right) \times \frac {F _ {c , h , w} ^ {i} - \mu_ {h , w} ^ {i}}{\sigma_ {h , w} ^ {i}} + \beta_ {h, w} ^ {i} \left(r _ {y \rightarrow x}\right), \tag {5} +$$ + +where the statistic value $\mu_{h,w}^{i}$ and $\sigma_{h,w}^{i}$ are calculated exclusively across channel direction compared to BN. The denormalization parameter $\alpha^i$ and $\beta^i$ characterize the style of the exemplar, which is mapped from $r_{y\rightarrow x}$ with the projection $\mathcal{T}$ parameterized by $\theta_{\mathcal{T}}$ , i.e., + +$$ +\alpha^ {i}, \beta^ {i} = \mathcal {T} _ {i} \left(r _ {y \rightarrow x}; \theta_ {\mathcal {T}}\right). \tag {6} +$$ + +We use two plain convolutional layers to implement $\mathcal{T}$ so $\alpha$ and $\beta$ have the same spatial size as $r_{y\rightarrow x}$ . With the style modulation for each normalization layer, the overall image translation can be formulated as + +$$ +\hat {x} _ {B} = \mathcal {G} \left(z, \mathcal {T} _ {i} \left(r _ {y \rightarrow x}; \theta_ {\mathcal {T}}\right); \theta_ {\mathcal {G}}\right), \tag {7} +$$ + +where $\theta_{\mathcal{G}}$ denotes the learnable parameter. + +# 3.3. Losses for exemplar-based translation + +We jointly train the cross-domain correspondence along with image synthesis with following loss functions, hoping the two tasks benefit each other. + +Losses for pseudo exemplar pairs We construct exemplar training pairs by utilizing paired data $\{x_A, x_B\}$ that are semantically aligned but differ in domains. Specifically, we apply random geometric distortion to $x_B$ and get the distorted image $x_B' = h(x_B)$ , where $h$ denotes the augmentation operation like image warping or random flip. When $x_B'$ is regarded as the exemplar, the translation of $x_A$ is expected to be its counterpart $x_B$ . In this way, we obtain pseudo exemplar pairs. We propose to penalize the difference between the translation output and the ground truth $x_B$ by minimizing the feature matching loss [19, 18, 6] + +$$ +\mathcal {L} _ {\text {f e a t}} = \sum_ {l} \lambda_ {l} \| \phi_ {l} \left(\mathcal {G} \left(x _ {A}, x _ {B} ^ {\prime}\right)\right) - \phi_ {l} \left(x _ {B}\right) \| _ {1}, \tag {8} +$$ + +where $\phi_l$ represents the activation of layer $l$ in the pretrained VGG-19 model and $\lambda_l$ balance the terms. + +Domain alignment loss We need to make sure the transformed embedding $x_{S}$ and $y_{S}$ lie in the same domain. To achieve this, we once again make use of the image pair $\{x_{A}, x_{B}\}$ , whose feature embedding should be aligned exactly after domain transformation: + +$$ +\mathcal {L} _ {\text {d o m a i n}} ^ {\ell_ {1}} = \left\| \mathcal {F} _ {A \rightarrow S} \left(x _ {A}\right) - \mathcal {F} _ {B \rightarrow S} \left(x _ {B}\right)\right\| _ {1}. \tag {9} +$$ + +Note that we perform channel-wise normalization as the last layer of $\mathcal{F}_{A\to S}$ and $\mathcal{F}_{B\to S}$ so minimizing this domain discrepancy will not lead to a trivial solution (i.e., small magnitude of activations). + +Exemplar translation losses The learning with pair or pseudo exemplar pair is hard to generalize to general cases where the semantic layout of exemplar differs significantly from the source image. To tackle this, we propose the following losses. + +First, the ultimate output should be consistent with the semantics of the input $x_{A}$ , or its counterpart $x_{B}$ . We thereby penalize the perceptual loss to minimize the semantic discrepancy: + +$$ +\mathcal {L} _ {\text {p e r c}} = \left\| \phi_ {l} \left(\hat {x} _ {B}\right) - \phi_ {l} \left(x _ {B}\right) \right\| _ {1}. \tag {10} +$$ + +Here we choose $\phi_l$ to be the activation after $relu4\_2$ layer in the VGG-19 network since this layer mainly contains high-level semantics. + +On the other hand, we need a loss function that encourages $\hat{x}_B$ to adopt the appearance from the semantically corresponding patches from $y_{B}$ . To this end, we employ the contextual loss proposed in [35] to match the statistics be + +tween $\hat{x}_B$ and $y_{B}$ , which is + +$$ +\begin{array}{l} \mathcal {L} _ {\text {c o n t e x t}} = \\ \sum_ {l} \omega_ {l} \left[ - \log \left(\frac {1}{n _ {l}} \sum_ {i} \max _ {j} A ^ {l} \left(\phi_ {i} ^ {l} \left(\hat {x} _ {B}\right), \phi_ {j} ^ {l} \left(y _ {B}\right)\right)\right) \right], \tag {11} \\ \end{array} +$$ + +where $i$ and $j$ index the feature map of layer $\phi^l$ that contains $n_l$ features, and $\omega_{l}$ controls the relative importance of different layers. Still, we rely on pretrained VGG features. As opposed to $\mathcal{L}_{perc}$ which mainly utilizes high-level features, the contextual loss uses $relu2\_2$ up to $relu5\_2$ layers since low-level features capture richer style information (e.g., color or textures) useful for transferring the exemplar appearance. + +Correspondence regularization Besides, the learned correspondence should be cycle consistent, i.e., the image should match itself after forward-backward warping, which is + +$$ +\mathcal {L} _ {r e g} = \left\| r _ {y \rightarrow x \rightarrow y} - y _ {B} \right\| _ {1}, \tag {12} +$$ + +where $r_{y\to x\to y}(v) = \sum_u\mathrm{softmax}_u(\alpha \mathcal{M}(u,v))\cdot r_{y\to x}(u)$ is the forward-backward warping image. Indeed, this objective function is crucial because the rest loss functions, imposed at the end of the network, are weak supervision and cannot guarantee that the network learns a meaningful correspondence. Figure 9 shows that without $\mathcal{L}_{reg}$ the network fails to learn the cross-domain correspondence correctly although it is still capable to generate plausible translation result. The regularization $\mathcal{L}_{reg}$ enforces the warped image $r_{y\to x}$ remain in domain $B$ by constraining its backward warping, implicitly encouraging the correspondence to be meaningful as desired. + +Adversarial loss We train a discriminator [9] that discriminates the translation outputs and the real samples of domain $B$ . Both the discriminator $\mathcal{D}$ and the translation network $\mathcal{G}$ are trained alternatively until synthesized images look indistinguishable to real ones. The adversarial objectives of $\mathcal{D}$ and $\mathcal{G}$ are respectively defined as: + +$$ +\begin{array}{l} \mathcal {L} _ {a d v} ^ {\mathcal {D}} = - \mathbb {E} [ h (\mathcal {D} (y _ {B})) ] - \mathbb {E} [ h (- \mathcal {D} (\mathcal {G} (x _ {A}, y _ {B}))) ] \tag {13} \\ \mathcal {L} _ {a d v} ^ {\mathcal {G}} = - \mathbb {E} [ \mathcal {D} (\mathcal {G} (x _ {A}, y _ {B})) ], \\ \end{array} +$$ + +where $h(t) = \min (0, -1 + t)$ is a hinge function used to regularize the discriminator [49, 3]. + +Total loss In all, we optimize the following objective, + +$$ +\begin{array}{l} \mathcal {L} _ {\theta} = \min _ {\mathcal {F}, \mathcal {T}, \mathcal {G}} \max _ {\mathcal {D}} \psi_ {1} \mathcal {L} _ {\text {f e a t}} + \psi_ {2} \mathcal {L} _ {\text {p e r c}} + \psi_ {3} \mathcal {L} _ {\text {c o n t e x t}} \tag {14} \\ + \psi_ {4} \mathcal {L} _ {a d v} ^ {\mathcal {G}} + \psi_ {5} \mathcal {L} _ {d o m a i n} ^ {\ell_ {1}} + \psi_ {6} \mathcal {L} _ {r e g}, \\ \end{array} +$$ + +where weights $\psi$ are used to balance the objectives. + +Table 1: Image quality comparison. Lower FID or SWD score indicates better image quality. The best scores are highlighted. + +
ADE20kADE20k-outdoorCelebA-HQDeepFashion
FIDSWDFIDSWDFIDSWDFIDSWD
Pix2pixHD81.835.797.834.562.743.325.216.4
SPADE33.919.763.321.931.526.936.227.8
MUNIT129.397.8168.2126.356.840.874.046.2
SIMSN/AN/A67.727.2N/AN/AN/AN/A
EGSC-IT168.394.4210.0104.929.523.829.039.1
Ours26.410.542.411.514.315.214.417.2
+ +Table 2: Comparison of semantic consistency. The best scores are highlighted. + +
ADE20kADE20k-outdoorCelebA-HQDeepFashion
Pix2pixHD0.8330.8480.9140.943
SPADE0.8560.8670.9220.936
MUNIT0.7230.7040.8480.910
SIMSN/A0.822N/AN/A
EGSC-IT0.7340.7230.9150.942
Ours0.8620.8730.9490.968
+ +# 4. Experiments + +Implementation We use Adam [23] solver with $\beta_{1} = 0, \beta_{2} = 0.999$ . Following the TTUR [15], we set imbalanced learning rates, $1e - 4$ and $4e - 4$ respectively, for the generator and discriminator. Spectral normalization [37] is applied to all the layers for both networks to stabilize the adversarial training. Readers can refer to the supplementary material for detailed network architecture. We conduct experiments using 832GB Tesla V100 GPUs, and it takes roughly 4 days to train 100 epochs on the ADE20k dataset [50]. + +Datasets We conduct experiments on multiple datasets with different sorts of image representation. All the images are resized to $256 \times 256$ during training. + +- ADE20k [50] consists of $\sim 20\mathrm{k}$ training images, each image associated with a 150-class segmentation mask. This is a challenging dataset for most existing methods due to its large diversity. +- ADE20k-outdoor contains the outdoor images extracted from ADE20k, as the same protocol in SIMS [39]. +CelebA-HQ [30] contains high quality face images. We connect the face landmarks for face region, and use Canny edge detector to detect edges in the background. We perform an edge-to-face translation on this dataset. +- Deepfashion [31] consists of 52,712 person images in fashion clothes. We extract the pose keypoints using the OpenPose [4], and learn the translation to human body. + +![](images/e8d6a1d9ca858d1b1e3302ad5e19c369f5e70a3c03035cc15282839f1d74128d.jpg) +Figure 3: Qualitative comparison of different methods. + +![](images/24e39a604662e87ca8786a2e12abf45c5a0066ad111474162514c080c767889d.jpg) +Figure 4: Our results of segmentation mask to image synthesis (ADE20k dataset). + +Table 3: Comparison of style relevance. A higher score indicates a higher appearance similarity relative to the exemplar. The best scores are highlighted. + +
ADE20kCelebA-HQDeepFashion
ColorTextureColorTextureColorTexture
SPADE0.8740.8920.9550.9270.9430.904
MUNIT0.7450.7820.9390.8840.8930.861
EGSC-IT0.7810.8390.9650.9420.9450.916
Ours0.9620.9410.9770.9580.9820.958
+ +Baselines We compare our method with state-of-the-art image translation methods: 1) Pix2pixHD [45], a leading supervised approach; 2) SPADE [38], a recently proposed supervised translation method which also supports the style injection from an exemplar image; 3) MUNIT [17], an unsupervised method that produces multi-modal results; 4) SIMS [39], which synthesizes images by compositing image segments from a memory bank; 5) EGSC-IT [34], an exemplar-based method that also considers the semantic consistency but can only mimic the global style. These methods except Pix2pixHD can generate exemplar-based + +results, and we use their released codes in this mode to train on several datasets. Since it is computationally prohibitive to prepare a database using SIMS, we directly use their reported figures. As we aim to propose a general translation framework, we do not include other task-specific methods. To provide the exemplar for our method, we first train a plain translation network to generate natural images and use them to retrieve the exemplars from the dataset. + +Quantitative evaluation We evaluate different methods from three aspects. + +- We use two metrics to measure image quality. First, we use the Fréchet Inception Score (FID) [15] to measure the distance between the distributions of synthesized images and real images. While FID measures the semantic realism, we also adopt sliced Wasserstein distance (SWD) [20] to measure their statistical distance of low-level patch distributions. Measured by these two metrics, Table 1 shows that our method significantly outperforms prior methods in almost all the comparisons. Our method improves the FID score by 7.5 compared to previous leading methods on the challenging ADE20k dataset. + +![](images/9294aa74e2e67fbe0d91f090f0af354896a83f178af27e1577382c8fd290abd7.jpg) +Figure 5: Our results of edge to face synthesis (CelebA-HQ dataset). First row: exemplars. Second row: our results. + +![](images/58dc107f19cf56c6adf8647452089e34e6c752a66e17c636e3cebb3e5cf7aae4.jpg) +Figure 6: Our results of pose to body synthesis (DeepFashion). First row: exemplars. Second row: our results. + +![](images/9a2f03490b6c4445ff8d4c1710d27763e67d72b722a230f90dea6eb0b25b4027.jpg) +Figure 7: User study results. + +- The ultimate output should not alter the input semantics. To evaluate the semantic consistency, we adopt an ImageNet pretrained VGG model [3], and use its high-level features maps, $relu3\_2$ , $relu4\_2$ and $relu5\_2$ , to represent high-level semantics. We calculate the cosine similarity for these layers and take the average to yield the final score. Table 2 shows that our method best maintains the semantics during translation. +- Style relevance. We use low level features relu1_2 and relu2_2 respectively to measure the color and texture distance between the semantically corresponding patches in the output and the exemplar. We do not include Pix2pixHD as it does not produce an exemplar-based translation. Still, our method achieves considerably better instance-level style relevance as shown in Table 3. + +Qualitative comparison Figure 3 provides a qualitative comparison of different methods. It shows that our Co-cosNet demonstrates the most visually appealing quality + +![](images/b8c65086713baaa9302026d8b5fcccc17eaa66de819017befae2cb96b52f8d0d.jpg) +Figure 8: Sparse correspondence of different domains. Given the manual annotation points in domain A (first row), our method finds their corresponding points in domain B (second row). + +Table 4: Ablation study. + +
FID ↓Semantic consistency ↑Style (color/texture) ↑
w/o Lfeat14.40.9480.975 / 0.955
w/o Ldomain21.10.9330.983 / 0.957
w/o Lperc59.30.8520.971 / 0.852
w/o Lcontext28.40.9310.954 / 0.948
w/o Lreg19.30.9290.981 / 0.951
Full14.30.9490.977 / 0.958
+ +with much fewer artifacts. Meanwhile, compared to prior exemplar-based methods, our method demonstrates the best style fidelity, with the fine structures matching the semantically corresponding regions of the exemplar. This also correlates with the quantitative results, showing the obvious advantage of our approach. We show diverse results by changing the exemplar image in Figure 4-6. Please refer to the supplementary material for more results. + +Subjective evaluation We also conduct user study to compare the subjective quality. We randomly select 10 images for each task, yielding 30 images in total for comparison. We design two tasks, and let users sort all the methods in terms of the image quality and the style relevance. Figure 7 shows the results, where our method demonstrates a clear advantage. Our method ranks the first in $84.2\%$ cases in + +![](images/c45f79685e75e4c5f0def8fbe836f3d45818557ebbcb6d35f854b4e4203f1958.jpg) +Figure 9: Ablation study of loss functions. + +evaluating the image quality, with $93.8\%$ chance to be the best in the style relevance comparison. + +Cross-domain correspondence Figure 8 shows the cross-domain correspondence. For better visualization, we just annotate the sparse points. As the first approach in doing this, our CoCosNet successfully establishes meaningful semantic correspondence which is even difficult for manual labeling. The network is still capable to find the correspondence for sparse representation such as edge map, which captures little explicit semantic information. + +Ablation study In order to validate the effectiveness of each component, we conduct comprehensive ablation studies. Here we want to emphasize two key elements (Figure 9). First, the domain alignment loss $\mathcal{L}_{domain}^{\ell_1}$ with data pairs $x_A$ and $x_B$ is crucial. Without it, the correspondence will fail in unaligned domains, leading to oversmooth dense warping. We also ablate the correspondence regularization loss $\mathcal{L}_{reg}$ , which leads to incorrect dense correspondence, e.g., face to hair in Figure 9, though the network still yields plausible final output. With $\mathcal{L}_{reg}$ , the correspondence becomes meaningful, which facilitates the image synthesis as well. We also quantitatively measures the role of different losses in Table 4 where the full model demonstrates the best performance in terms of all the metrics. + +# 5. Applications + +Our method can enable a few intriguing applications. Here we give two examples. + +Image editing Given a natural image, we can manipulate its content by modifying the segmentation layout and synthesizing the image by using the original image as the + +![](images/c4763b3ad053082bc001ed7debf4ef5e27fd0920009d5fa5d6ed983e27c453b7.jpg) +Figure 10: Image editing. Given the input image and its mask (1st column), we can semantically edit the image content through the manipulation on the mask (column 2-4). + +![](images/f62567f7147b99d533cd0ce750608620da6817bba07c55b0fd97f39b58772f66.jpg) +Figure 11: Makeup transfer. Given a portrait and makeup strokes (1st column), we can transfer these makeup edits to other portraits by matching the semantic correspondence. We show more examples in the supplementary material. + +self-exemplar. Since this is similar to the pseudo exemplar pairs we constitute for training, our CocosNet could perfectly handle it and produce the output with high quality. Figure 10 illustrates the image editing, where one can move, add and delete instances. + +Makeup transfer Artists usually manually adds digital makeup on portraits. Because of the dense semantic correspondence we find, we can transfer the artistic stakes to other portraits. In this way, one can manually add makeup edits on one portrait, and use our network to process a large batch of portraits automatically based on the semantic correspondence, which illustrated in Figure 11. + +# 6. Conclusion + +In this paper, we present the CocosNet, which translates the image by relying on the cross-domain correspondence. Our method achieves preferable performance than leading approaches both quantitatively and qualitatively. Besides, our method learns the dense correspondence for cross-domain images, paving a way for several intriguing applications. Our method is computationally intensive and we leave high-resolution synthesis to future work. + +# References + +[1] K. Aberman, J. Liao, M. Shi, D. Lischinski, B. Chen, and D. Cohen-Or, "Neural best-buddies: Sparse cross-domain correspondence," ACM Transactions on Graphics (TOG), vol. 37, no. 4, p. 69, 2018. 2 +[2] A. Bansal, Y. Sheikh, and D. Ramanan, "Shapes and context: In-the-wild image synthesis & manipulation," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019, pp. 2317-2326. 2 +[3] A. Brock, J. Donahue, and K. Simonyan, “Large scale GAN training for high fidelity natural image synthesis,” arXiv preprint arXiv:1809.11096, 2018. 5, 7 +[4] Z. Cao, G. Hidalgo, T. Simon, S.-E. Wei, and Y. Sheikh, "Openpose: realtime multi-person 2d pose estimation using part affinity fields," arXiv preprint arXiv:1812.08008, 2018. 5 +[5] H. Chang, J. Lu, F. Yu, and A. Finkelstein, "Pairedcycle-gan: Asymmetric style transfer for applying and removing makeup," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018, pp. 40-48. 2 +[6] Q. Chen and V. Koltun, "Photographic image synthesis with cascaded refinement networks," in Proceedings of the IEEE International Conference on Computer Vision, 2017, pp. 1511-1520. 1, 4 +[7] C. B. Choy, J. Gwak, S. Savarese, and M. Chandraker, “Universal correspondence network,” in Advances in Neural Information Processing Systems, 2016, pp. 2414–2422. 2 +[8] N. Dalal and B. Triggs, “Histograms of oriented gradients for human detection,” 2005. 2 +[9] 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, 2014, pp. 2672-2680. 5 +[10] S. Gu, J. Bao, H. Yang, D. Chen, F. Wen, and L. Yuan, "Mask-guided portrait editing with conditional gans," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019, pp. 3436-3445. 2 +[11] B. Ham, M. Cho, C. Schmid, and J. Ponce, “Proposal flow: Semantic correspondences from object proposals,” IEEE transactions on pattern analysis and machine intelligence, vol. 40, no. 7, pp. 1711–1725, 2017. 2 +[12] K. Han, R. S. Rezende, B. Ham, K.-Y. K. Wong, M. Cho, C. Schmid, and J. Ponce, "Scnet: Learning semantic correspondence," in Proceedings of the IEEE International Conference on Computer Vision, 2017, pp. 1831-1840. 2 +[13] M. He, D. Chen, J. Liao, P. V. Sander, and L. Yuan, “Deep exemplar-based colorization,” ACM Transactions on Graphics (TOG), vol. 37, no. 4, p. 47, 2018. 2 + +[14] A. Hertzmann, C. E. Jacobs, N. Oliver, B. Curless, and D. H. Salesin, "Image analogies," in Proceedings of the 28th annual conference on Computer graphics and interactive techniques. ACM, 2001, pp. 327-340. 1 +[15] M. Heusel, H. Ramsauer, T. Unterthiner, B. Nessler, and S. Hochreiter, “Gans trained by a two time-scale update rule converge to a local nash equilibrium,” in Advances in Neural Information Processing Systems, 2017, pp. 6626–6637. 5, 6 +[16] X. Huang and S. Belongie, “Arbitrary style transfer in real-time with adaptive instance normalization,” in Proceedings of the IEEE International Conference on Computer Vision, 2017, pp. 1501–1510. 2 +[17] X. Huang, M.-Y. Liu, S. Belongie, and J. Kautz, “Multimodal unsupervised image-to-image translation,” in Proceedings of the European Conference on Computer Vision (ECCV), 2018, pp. 172–189. 1, 2, 6 +[18] P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros, "Image-to-image translation with conditional adversarial networks," in Proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 1125-1134. 1, 2, 4 +[19] J. Johnson, A. Alahi, and L. Fei-Fei, “Perceptual losses for real-time style transfer and super-resolution,” in European conference on computer vision. Springer, 2016, pp. 694–711. 4 +[20] T. Karras, T. Aila, S. Laine, and J. Lehtinen, “Progressive growing of GANs for improved quality, stability, and variation,” arXiv preprint arXiv:1710.10196, 2017. 6 +[21] S. Kim, D. Min, B. Ham, S. Jeon, S. Lin, and K. Sohn, "Fcss: Fully convolutional self-similarity for dense semantic correspondence," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017, pp. 6560-6569. 2 +[22] T. Kim, M. Cha, H. Kim, J. K. Lee, and J. Kim, “Learning to discover cross-domain relations with generative adversarial networks,” in Proceedings of the 34th International Conference on Machine Learning-Volume 70. JMLR.org, 2017, pp. 1857–1865. 2 +[23] D. P. Kingma and J. Ba, "Adam: A method for stochastic optimization," arXiv preprint arXiv:1412.6980, 2014. 5 +[24] H.-Y. Lee, H.-Y. Tseng, J.-B. Huang, M. Singh, and M.-H. Yang, “Diverse image-to-image translation via disentangled representations,” in Proceedings of the European Conference on Computer Vision (ECCV), 2018, pp. 35-51. 2 +[25] J. Lee, D. Kim, J. Ponce, and B. Ham, "Sfnet: Learning object-aware semantic correspondence," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019, pp. 2278-2287. 2, 3 +[26] B. Li, F. Wu, K. Q. Weinberger, and S. Belongie, "Positional Normalization," arXiv e-prints, p. arXiv:1907.04312, Jul. 2019. 4 + +[27] J. Liao, Y. Yao, L. Yuan, G. Hua, and S. B. Kang, "Visual attribute transfer through deep image analogy," arXiv preprint arXiv:1705.01088, 2017. 1, 2, 3 +[28] T.-Y. Lin, P. Dollar, R. Girshick, K. He, B. Hariharan, and S. Belongie, “Feature pyramid networks for object detection,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 2117–2125. 3 +[29] M.-Y. Liu, T. Breuel, and J. Kautz, "Unsupervised image-to-image translation networks," in Advances in neural information processing systems, 2017, pp. 700-708. 2 +[30] Z. Liu, P. Luo, X. Wang, and X. Tang, "Deep learning face attributes in the wild," in Proceedings of International Conference on Computer Vision (ICCV), Dec. 2015. 5 +[31] Z. Liu, P. Luo, S. Qiu, X. Wang, and X. Tang, "Deepfashion: Powering robust clothes recognition and retrieval with rich annotations," in Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Jun. 2016. 5 +[32] J. L. Long, N. Zhang, and T. Darrell, “Do convnets learn correspondence?” in Advances in Neural Information Processing Systems, 2014, pp. 1601-1609. 2 +[33] D. G. Lowe, "Distinctive image features from scale-invariant keypoints," International journal of computer vision, vol. 60, no. 2, pp. 91-110, 2004. 2 +[34] L. Ma, X. Jia, S. Georgoulis, T. Tuytelaars, and L. Van Gool, "Exemplar guided unsupervised image-to-image translation with semantic consistency," ICLR, 2019. 1, 2, 6 +[35] R. Mechrez, I. Talmi, and L. Zelnik-Manor, “The contextual loss for image transformation with non-aligned data,” in Proceedings of the European Conference on Computer Vision (ECCV), 2018, pp. 768–783. 4 +[36] M. Mirza and S. Osindero, "Conditional generative adversarial nets," arXiv preprint arXiv:1411.1784, 2014. 2 +[37] T. Miyato, T. Kataoka, M. Koyama, and Y. Yoshida, "Spectral normalization for generative adversarial networks," arXiv preprint arXiv:1802.05957, 2018. 5 +[38] T. Park, M.-Y. Liu, T.-C. Wang, and J.-Y. Zhu, "Semantic image synthesis with spatially-adaptive normalization," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019, pp. 2337-2346. 1, 2, 4, 6 +[39] X. Qi, Q. Chen, J. Jia, and V. Koltun, "Semi-parametric image synthesis," in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018, pp. 8808-8816. 2, 5, 6 +[40] M. Riviere, O. Teytaud, J. Rapin, Y. LeCun, and C. Couprie, "Inspirational adversarial image generation," arXiv preprint arXiv:1906.11661, 2019. 2 + +[41] 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. Springer, 2015, pp. 234–241. 3 +[42] A. Royer, K. Bousmalis, S. Gouws, F. Bertsch, I. Mosseri, F. Cole, and K. Murphy, "Xgan: Unsupervised imaged-to-image translation for many-to-many mappings," arXiv preprint arXiv:1711.05139, 2017. 2 +[43] E. Tola, V. Lepetit, and P. Fua, "Daisy: An efficient dense descriptor applied to wide-baseline stereo," IEEE transactions on pattern analysis and machine intelligence, vol. 32, no. 5, pp. 815-830, 2009. 2 +[44] M. Wang, G.-Y. Yang, R. Li, R.-Z. Liang, S.-H. Zhang, P. Hall, S.-M. Hu et al., "Example-guided style consistent image synthesis from semantic labeling," arXiv preprint arXiv:1906.01314, 2019. 1, 2 +[45] T.-C. Wang, M.-Y. Liu, J.-Y. Zhu, A. Tao, J. Kautz, and B. Catanzaro, “High-resolution image synthesis and semantic manipulation with conditional GANs,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2018, pp. 8798–8807. 1, 2, 6 +[46] R. Yi, Y.-J. Liu, Y.-K. Lai, and P. L. Rosin, “Apdrawing-gan: Generating artistic portrait drawings from face photos with hierarchical gans,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019, pp. 10743-10752. 2 +[47] Z. Yi, H. Zhang, P. Tan, and M. Gong, “Dualgan: Unsupervised dual learning for image-to-image translation,” in Proceedings of the IEEE international conference on computer vision, 2017, pp. 2849–2857. 2 +[48] B. Zhang, M. He, J. Liao, P. V. Sander, L. Yuan, A. Bermak, and D. Chen, “Deep exemplar-based video colorization,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019, pp. 8052–8061. 2, 3 +[49] H. Zhang, I. Goodfellow, D. Metaxas, and A. Odena, "Self-attention generative adversarial networks," arXiv preprint arXiv:1805.08318, 2018. 5 +[50] B. Zhou, H. Zhao, X. Puig, S. Fidler, A. Barriuso, and A. Torralba, “Scene parsing through ade20k dataset,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2017, pp. 633–641. 5 +[51] T. Zhou, P. Krahenbuhl, M. Aubry, Q. Huang, and A. A. Efros, “Learning dense correspondence via 3d-guided cycle consistency,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 117–126. 2 +[52] J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros, "Unpaired image-to-image translation using cycle-consistent adversarial networks," in Proceedings of the IEEE international conference on computer vision, 2017, pp. 2223-2232. 1, 2 + +[53] J.-Y. Zhu, R. Zhang, D. Pathak, T. Darrell, A. A. Efros, O. Wang, and E. Shechtman, "Toward multimodal image-to + +image translation," in Advances in Neural Information Processing Systems, 2017, pp. 465-476. 2 \ No newline at end of file diff --git a/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/images.zip b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2679c3e91a75f369c1df709fe373544a714f4a75 --- /dev/null +++ b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61d446b442418519e20026f89e48e28b551e9ff42df9b7fa4a32d4f3cd930966 +size 853843 diff --git a/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/layout.json b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2b4d94477dd9f84002008fc012c11b4a22e1ee55 --- /dev/null +++ b/crossdomaincorrespondencelearningforexemplarbasedimagetranslation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:384288f8b57c390319ab86e7aa9c12909bb7e711e7a9707264f7f0700b38a9d3 +size 423394 diff --git a/crossdomaindetectionviagraphinducedprototypealignment/35845a12-8966-41d3-963a-5f4dce9fedae_content_list.json b/crossdomaindetectionviagraphinducedprototypealignment/35845a12-8966-41d3-963a-5f4dce9fedae_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..626cd9035b2d1c5eb8d95dd771729d9f58eb0a2f --- /dev/null +++ b/crossdomaindetectionviagraphinducedprototypealignment/35845a12-8966-41d3-963a-5f4dce9fedae_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38b7605bf7a8303dafd63066b0859d5e662d7e90b80ad852e59d2bc621a68249 +size 85151 diff --git a/crossdomaindetectionviagraphinducedprototypealignment/35845a12-8966-41d3-963a-5f4dce9fedae_model.json b/crossdomaindetectionviagraphinducedprototypealignment/35845a12-8966-41d3-963a-5f4dce9fedae_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7ee2d9e7237ef7911075d6fcd41992219a42c213 --- /dev/null +++ b/crossdomaindetectionviagraphinducedprototypealignment/35845a12-8966-41d3-963a-5f4dce9fedae_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6182dbc5c0afbf3ec58f1af171f07ef0244ab61b38f6d8a09cf78f93733a1e8e +size 105989 diff --git a/crossdomaindetectionviagraphinducedprototypealignment/35845a12-8966-41d3-963a-5f4dce9fedae_origin.pdf b/crossdomaindetectionviagraphinducedprototypealignment/35845a12-8966-41d3-963a-5f4dce9fedae_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..35a5c7c7dac121c054290f040987ad743e585bac --- /dev/null +++ b/crossdomaindetectionviagraphinducedprototypealignment/35845a12-8966-41d3-963a-5f4dce9fedae_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5e2e6bb1dda1b09f7bc41dd66d4ed786931591662552facef87546762c70a698 +size 642973 diff --git a/crossdomaindetectionviagraphinducedprototypealignment/full.md b/crossdomaindetectionviagraphinducedprototypealignment/full.md new file mode 100644 index 0000000000000000000000000000000000000000..50af1f3198c367fc71e32b5236833563be2eb935 --- /dev/null +++ b/crossdomaindetectionviagraphinducedprototypealignment/full.md @@ -0,0 +1,379 @@ +# Cross-domain Detection via Graph-induced Prototype Alignment + +Minghao Xu $^{1,2}$ Hang Wang $^{1,2}$ Bingbing Ni $^{1,2,3*}$ Qi Tian $^{4}$ Wenjun Zhang $^{1}$ + +$^{1}$ Shanghai Jiao Tong University, Shanghai 200240, China + +$^{2}$ MoE Key Lab of Artificial Intelligence, AI Institute, Shanghai Jiao Tong University + +3Huawei Hisilicon 4Huawei Noah's Ark Lab + +{xuminghao118, wang-hang, nibingbing, zhangwenjun} @sjtu.edu.cn + +nibingbing@hisilicon.com tian.qi1@huawei.com + +# Abstract + +Applying the knowledge of an object detector trained on a specific domain directly onto a new domain is risky, as the gap between two domains can severely degrade model's performance. Furthermore, since different instances commonly embody distinct modal information in object detection scenario, the feature alignment of source and target domain is hard to be realized. To mitigate these problems, we propose a Graph-induced Prototype Alignment (GPA) framework to seek for category-level domain alignment via elaborate prototype representations. In the nutshell, more precise instance-level features are obtained through graph-based information propagation among region proposals, and, on such basis, the prototype representation of each class is derived for category-level domain alignment. In addition, in order to alleviate the negative effect of class-imbalance on domain adaptation, we design a Class-reweighted Contrastive Loss to harmonize the adaptation training process. Combining with Faster R-CNN, the proposed framework conducts feature alignment in a two-stage manner. Comprehensive results on various cross-domain detection tasks demonstrate that our approach outperforms existing methods with a remarkable margin. Our code is available at https://github.com/ChrisAllenMing/GPA-detection. + +# 1. Introduction + +Following the rapid development of techniques leveraging Deep Neural Networks (DNNs), a variety of computer-vision-related tasks, e.g. object classification [20, 14], object detection [35, 24], and semantic segmentation [4, 13], witnessed major breakthroughs in the last decade. It should be noticed that the impressive performance of these models is established, to a great extent, on the basis of massive amounts of annotated data, of which the annotation process + +![](images/bdd2d2336f8322bc0267aff28676af77e7b99395503f02982bb220501542a709.jpg) +(a) + +![](images/f646231ebf8902f59b0ecc7837324b44b4016183a2423e0a99217da0ebd279a6.jpg) +(b) +Figure 1. Two vehicles and corresponding region proposals from the Cityscapes [6] dataset which serves as target domain. These two vehicles reflect multi-modal information, e.g. distinct scale and orientation, and the generated region proposals contain incomplete information of them. + +itself could be a laborious task in many cases. Furthermore, when the model trained on a domain with abundant annotations is applied to a distinct domain with limited, even unavailable, labels, it will suffer from performance decay, due to the existence of domain shift [53]. + +One of the extensively explored techniques to deal with such dilemma is Unsupervised Domain Adaptation (UDA), which seeks for knowledge transfer from a labeled dataset (source domain) to another unlabeled one (target domain). In order to encourage domain-invariant feature representations, commonly adopted strategies can be roughly classified into two categories: 1) Minimizing an explicitly defined domain discrepancy measurement [25, 44, 42, 48]; 2) Applying adversarial training to UDA via domain classifier [7, 43, 1, 32]. These strategies are comprehensively exploited in classification-based tasks. + +Besides classification, cross-domain detection is also strongly demanded in modern Computer Vision systems, including intelligent surveillance and autonomous driving, in which the deployment environment, e.g. backgrounds, weather, illumination, changes from site to site. Previous works [5, 2, 55] utilize independent or grouped region proposals to align source and target domain on local instance level. However, since supervisory signal is lacked on target domain, the generated region proposals commonly deviate from instances, which makes the information from primal + +proposals improper to depict corresponding instances. In addition, the representation of an instance is insufficient to characterize the category it belongs to, because a single instance can only reflect limited modal information, e.g. specific scale or orientation. However, the representations of instances within a category are multi-modal. Two typical examples are illustrated in Figure 1, where two vehicles express different modal information, and the generated region proposals deviate from objects. These two problems make instance-level domain alignment trapped into dilemma. Except for these issues, in multi-class cross-domain detection tasks, class-imbalance leads to the inconsistency of domain adaptation process among different classes along training, which greatly impairs model's adaptation performance on those sample-scarce categories. + +Motivated by these problems, we propose the Graph-induced Prototype Alignment (GPA) framework and embed it into a two-stage detector, Faster R-CNN [35]. For the sake of better local alignment via region proposals, we introduce two key components, graph-based region aggregation and confidence-guided merging. In graph-based region aggregation, a relation graph which takes both the location and size of proposals into consideration is constructed to aggregate features on instance level, such that the critical features of each instance are integrated. In confidence-guided merging, the multi-modal information contained in various instances is embodied by prototype† representations, such that, by utilizing the complementarity of multi-modal information, each category can be better characterized. Using prototypes as the proxy of different classes, category-level domain alignment is performed. Furthermore, considering that class-imbalance exists in the multi-class cross-domain detection tasks, we harmonize the process of domain adaptation via a Class-reweighted Contrastive Loss, in which the sample-scarce classes are assigned with higher weights, thus they can be better aligned during training. + +Based on the two-stage structure of Faster R-CNN, we also conduct feature alignment in a two-stage manner: 1) In the first stage, foreground and background distributions are separated, and class-agnostic alignment is performed on feature distributions of two domains; 2) In the second stage, more fine-grained alignment is respectively performed on each foreground category. + +Our contributions can be summarized as follows: + +- We propose the Graph-induced Prototype Alignment (GPA) framework, in which more precise instance-level features are obtained through graph-based region aggregation, and prototype representations are derived for category-level domain alignment. +- In multi-class cross-domain detection tasks, for tackling the class-imbalance during feature alignment, we + +design a Class-reweighted Contrastive Loss to harmonize the adaptation process among different classes. + +- Combining with the Faster R-CNN architecture, we propose a two-stage domain alignment scheme, and it achieves state-of-the-art performance on the cross-domain detection tasks under various scenarios. + +# 2. Related Work + +Object Detection. Current object detection methods can be roughly categorized into two classes: one-stage detectors [33, 24, 34, 22] and two-stage detectors [10, 9, 35, 21, 13]. R-CNN [10] first obtains region proposals with selective search and then classifies each proposal. Fast R-CNN [9] speeds up detection process by introducing RoI pooling. Faster R-CNN [35] produces nearly cost-free region proposals with Region Proposal Network. One-stage detectors, such asYOLO [33] and SSD [24], directly predict category confidence and regress bounding box based on predefined anchors. Lin et al. [22] proposed focal loss to address class-imbalance, which increases the accuracy of one-stage detector. In this work, we choose Faster R-CNN as baseline detector for its robustness and scalability. + +Unsupervised Domain Adaptation (UDA). UDA aims to generalize the model learned from labeled source domain to the other unlabeled target domain. In the field of UDA, a group of approaches focus on minimizing a specific domain discrepancy metric, e.g., Maximum Mean Discrepancy (MMD) [11, 44], Weighted MMD [49], Multi-Kernel MMD [25] and Wasserstein Distance [41]. Another research line is based on adversarial training, in which a domain classifier is introduced to facilitate domain-invariance on feature level [7, 43, 26] or pixel level [40, 15, 47]. Recently, several works [46, 54, 30, 3] utilize pseudo labels of samples from target domain to introduce discriminative information during domain alignment. Following the prototype-based approaches [46, 30], we extend the usage of prototype to cross-domain detection tasks. + +Cross-domain Detection. Beginning with the work of Chen et al. [5], the topic of cross-domain detection arouses interests in the community of UDA. In that work, a Domain Adaptive Faster R-CNN model is constructed to reduce domain discrepancy on both image and instance levels. More recently, Saito et al. [38] proposed a strong-weak alignment strategy which puts less effort on aligning globally dissimilar images. Cai et al. [2] remolded the mean teacher scheme for cross-domain detection. Kim et al. [18] used domain diversification to learn feature representations which are invariant among multiple domains. Zhu et al. [55] solved the questions of "where to look" and "how to align" via two key components, region mining and region-level alignment. In [17], domain adaptation problem is tackled from the perspective of robust learning. + +![](images/9e15eec874b1899a176e4df30cbf01587f9cc58c15f83e0e7c672bd5cf245f9d.jpg) + +![](images/d41c5dab8fa57b9e6a703abbbf83929d404345f67a7561f5b7dfe2ce1987a322.jpg) +# + +![](images/c7e143ba2a5392d7359cd00c8ed17049892a01674db88f25c6a5fe4224e16450.jpg) +# + +![](images/c2ad4f9a2b756333a0bf77cb692a6e9e81095e127cd9a53b9ddb12aae0ea4644.jpg) + +![](images/ab449631665dfc35875ba8231c85c0af014238dad8b26dec7626ac78bc8bcd37.jpg) +(e) + +![](images/905d427826c7d97fc8d39430d54c1adc97137c750f31f50aca3d8db268b7ccc1.jpg) +(a) + +![](images/fa111d9ce3446888209939ee7cdc78677cb34284c3bd6a8a306470639de18830.jpg) +(b) + +![](images/b6bd1d681a9facf92a268dfc480bf15c19ac5b82c18b90b473b66507bafcd8a6.jpg) +(c) +C +Figure 2. Framework overview. (a) Region proposals are generated. (b) Constructing the relation graph on produced region proposals. (c) More accurate instance-level feature representations are obtained through information propagation among proposals belonging to the same instance. (d) Prototype representation of each class is derived via confidence-guided merging. (e) Performing category-level domain alignment through enhancing intra-class compactness and inter-class separability. + +![](images/459bb525630e9eac8a7caa751d0d43b7ca445023dc67c89e8258cf8210a3121c.jpg) +(d) + +Improvements over existing methods. Although former works [5, 2, 55] seek for instance-level domain alignment using region proposals, they fail to derive exact instance-level representations and ignore the multi-modal information of various instances. In this work, we utilize relation graph to obtain more precise instance-level feature representations, and per-category prototypes are derived to integrate different instances' multi-modal information. + +Graph Convolutional Network (GCN). GCN [19] has been explored as a manner to learn graph relations with convolution, which boosts the optimization of graph-based model. Because of the effectiveness and interpretability of GCN, it has been widely applied to various tasks, e.g., action recognition [50], person Re-ID [51], video understanding [45, 52] and point cloud learning [23]. Several recent works [29, 27] utilize graph model to structure multiple domains and categories for classification-based domain adaptation. For cross-domain detection, we employ graph structure to model the relation among region proposals. + +# 3. Method + +In Unsupervised Domain Adaptation (UDA), source domain $\mathcal{S} = \{(x_i^{\mathcal{S}},y_i^{\mathcal{S}})\}_{i = 1}^{N_{\mathcal{S}}}$ is characterized by $N_{\mathcal{S}}$ i.i.d. labeled samples, where $x_{i}^{\mathcal{S}}$ follows source distribution $\mathbb{P}_S$ and $y_{i}^{\mathcal{S}}$ denotes its corresponding label. Similarly, target domain $\mathcal{T} = \{x_j^{\mathcal{T}}\}_{j = 1}^{N_{\mathcal{T}}}$ is represented by $N_{\mathcal{T}}$ i.i.d. unlabeled samples, where $x_{j}^{\mathcal{T}}$ follows target distribution $\mathbb{P}_{\mathcal{T}}$ . + +# 3.1. Motivation and Overview + +In contrast to domain adaptation in classification, its application in object detection is more sophisticated. In specific, since supervisory signal is lacked on target domain, foreground instances are normally represented by a bunch + +of inaccurate region proposals. In addition, different instances in various scenes commonly reflect diverse modal information, which makes it harder to align source and target domain on local instance level. Another problem impairing model's performance on cross-domain detection tasks is class-imbalance. Concretely, those categories with abundant samples are trained more sufficiently, thus better aligned, while the sample-scarce categories can't be readily aligned for the lack of adaptation training. + +To address above issues, we propose the Graph-induced Prototype Alignment (GPA) framework. In specific, domain adaptation is realized via aligning two domains' prototypes, in which the critical information of each instance is aggregated via graph-based message propagation, and the multi-modal information reflected by different instances is integrated into per-category prototypes. On the basis of this framework, Class-imbalance-aware Adaptation Training is proposed to harmonize the domain adaptation process among different classes through assigning higher weights to the sample-scarce categories. + +# 3.2. Graph-induced Prototype Alignment + +In the proposed framework, five steps are performed to align source and target domain with category-level prototype representations, just as shown in Figure 2. + +Region proposal generation. In Faster R-CNN [35], region proposals are generated by Region Proposal Network (RPN) to characterize foreground and background. These proposals provide abundant information of various instance patterns and scene styles, while they usually contain incomplete information of instances because of the deviation of bounding boxes, especially on target domain. Subsequent operations aim to extract the exact information of each instance from region proposals. + +![](images/abf2e35a9a1a2309221a41cb28255b030ac8db12ad4e6279e9428cc4fef529ee.jpg) +Figure 3. Region proposal $r_i$ interacts with another two region proposals, $r_j$ and $r_{j'}$ , with different sizes. + +![](images/7054ab1dab1c6987129a56e611359e0902efa57617820f638671244352e09c61.jpg) + +Constructing relation graph. We structure the proposals generated by RPN as a graph $\mathcal{G} = (\mathcal{V},\mathcal{E})$ , where $\mathcal{V}$ represents the set of vertices corresponding to $N_{p}$ proposals, and $\mathcal{E}\subseteq \mathcal{V}\times \mathcal{V}$ denotes the set of edges, i.e. the relations between proposals. Adjacency matrix $\mathbf{A}\in \mathbb{R}^{N_p\times N_p}$ is used to model such relationship. Intuitively, two spatially closer proposals more likely depict the same object and should be assigned with higher connection weight. Following this intuition, a manner to obtain adjacency matrix is to apply a Gaussian kernel over the Euclidean distance between the centers of two proposals: + +$$ +\mathbf {A} _ {i, j} = \exp \left(- \frac {\left| \left| o _ {i} - o _ {j} \right| \right| _ {2} ^ {2}}{2 \sigma^ {2}}\right), \tag {1} +$$ + +where $o_i$ and $o_j$ denote the centers of the $i$ -th and $j$ -th proposal $(1 \leqslant i, j \leqslant N_p)$ , and $\sigma$ is the standard deviation parameter which controls the sparsity of $\mathbf{A}$ . + +However, when calculating the adjacency matrix, it is unreasonable to treat proposals with various spatial sizes equally. Just as shown in Figure 3, though region proposal pairs $(r_i,r_j)$ and $(r_i,r_{j'})$ have the equal center distance, their strength of relevance is obviously distinct, and $(r_i,r_j)$ should possess higher connection weight in $\mathbf{A}$ for the larger overlap between $r_i$ and $r_j$ . Intersection over Union (IoU) is a broadly used metric which takes both the location and size of proposals into consideration, and the derivation of adjacency matrix with IoU is as follows: + +$$ +\mathbf {A} _ {i, j} = \operatorname {I o U} \left(r _ {i}, r _ {j}\right) = \frac {r _ {i} \bigcap r _ {j}}{r _ {i} \bigcup r _ {j}}, \tag {2} +$$ + +where $r_i$ and $r_j$ denote the $i$ -th and $j$ -th region proposal respectively ( $1 \leqslant i, j \leqslant N_p$ ). The setup of relation graph lays the foundation for information propagation among region proposals. The comparison between above two methods of constructing adjacency matrix is presented in Sec. 5.1. + +Graph-based region aggregation. Because of the deviation of bounding boxes, region proposals often distribute around the ground truth objects, which leads to the inaccuracy of representing an object with single proposal. In fact, primal region proposals express incomplete information of instances. In order to achieve exact instance-level feature representations, the embeddings of proposals belonging to + +a certain instance should be aggregated. By utilizing the spatial relevance provided by adjacency matrix $\mathbf{A}$ , proposals' feature embeddings $\mathbf{F} \in \mathbb{R}^{N_p \times d}$ ( $d$ is the dimension of embedding) and classification confidence $\mathbf{P} \in \mathbb{R}^{N_p \times N_c}$ ( $N_c$ is the number of classes) are aggregated as follows: + +$$ +\widetilde {\mathbf {F}} = \mathbf {D} ^ {- \frac {1}{2}} \mathbf {A} \mathbf {D} ^ {- \frac {1}{2}} \mathbf {F}, \tag {3} +$$ + +$$ +\widetilde {\mathbf {P}} = \mathbf {D} ^ {- \frac {1}{2}} \mathbf {A} \mathbf {D} ^ {- \frac {1}{2}} \mathbf {P}, \tag {4} +$$ + +where $\mathbf{D} \in \mathbb{R}^{N_p \times N_p}$ denotes the diagonal degree matrix with entries $\mathbf{D}_{ii} = \sum_{j} \mathbf{A}_{ij}$ . In Eqs. 3, 4, after region aggregation, $\widetilde{\mathbf{F}} \in \mathbb{R}^{N_p \times d}$ and $\widetilde{\mathbf{P}} \in \mathbb{R}^{N_p \times N_c}$ express more precise instance-level information through information propagation among adjacent proposals. Compared with the conventional graph convolution, we leave the learnable parameter matrix out, considering that explicit supervisory signal is lacked on the branch of domain adaptation learning. We illustrate the benefit of such operation in Sec. 5.1. + +Confidence-guided merging. Now that the feature representations are aggregated on instance level, we would like to integrate the multi-modal information reflected by different instances into prototype representations. In order to highlight the modal information which is critical to a specific class, we employ proposals' confidence to each class as the weight during merging, and prototypes are derived as the weighted mean embedding of region proposals: + +$$ +c _ {k} = \frac {\sum_ {i = 1} ^ {N _ {p}} \widetilde {\mathbf {P}} _ {i k} \cdot \widetilde {\mathbf {F}} _ {i} ^ {T}}{\sum_ {i = 1} ^ {N _ {p}} \widetilde {\mathbf {P}} _ {i k}}, \tag {5} +$$ + +where $c_{k}\in \mathbb{R}^{d}$ denotes the prototype of class $k$ . The derived prototypes serve as the proxy of each class during subsequent domain alignment. + +Category-level domain alignment. Prototype-based domain alignment is comprehensively studied in recent literatures [46, 30, 37]. The core idea of these methods is to narrow the distance between same categories' prototypes of two domains, which is achieved through minimizing an intra-class loss, noted as $\mathcal{L}_{\text{intra}}$ . Furthermore, we propose that the distance between different classes' prototypes should also be constrained with another inter-class loss, noted as $\mathcal{L}_{\text{inter}}$ . In addition, considering the existence of class-imbalance, the influence of different classes needs to be adjusted. The detailed training scheme is presented in the next section. + +# 3.3. Class-imbalance-aware Adaptation Training + +In object detection scenario, the class-imbalance problem commonly exists, which means the number of samples belonging to different classes varies greatly. Former work [22] deems that such problem can overwhelm training and degrade detector's performance. In cross-domain detection tasks, class-imbalance can lead to another trouble: + +the domain adaptation process among different classes is highly unbalanced. In particular, the feature distributions of sample-scarce categories can't be readily aligned. Inspired by Focal Loss [22] which puts more weights on hard-to-classify examples, we would like to assign higher weights to the sample-scarce categories during the training process of domain adaptation. + +Considering that the categories with abundant samples are trained more sufficiently and better aligned, especially in the early training phase, they should possess higher confidence compared with sample-scarce categories. Based on this fact, we select a specific class's highest confidence in a set of proposals, and such confidence value is employed to calculate the weight of this class: + +$$ +p _ {k} = \max _ {1 \leqslant i \leqslant N _ {p}} \left\{\widetilde {\mathbf {P}} _ {i k} \right\}, \tag {6} +$$ + +$$ +\alpha_ {k} = \left\{ \begin{array}{l l} (1 - p _ {k}) ^ {\gamma} & \text {i f} p _ {k} > \frac {1}{N _ {c}} \\ 0 & \text {o t h e r w i s e} \end{array} , \right. \tag {7} +$$ + +where $p_k$ is the maximum confidence of class $k$ within $N_p$ proposals, and $\gamma$ is the parameter controlling the weights among different classes. Also, we apply a hard threshold, $1 / N_c$ , to filter out those classes whose samples are not included in the proposal set. + +Contrastive loss [12] is commonly used in siamese network architecture to enhance the intra-class compactness and inter-class separability. Utilizing such property, we propose a Class-reweighted Contrastive Loss to conduct domain alignment on category level, in which class weights $\{\alpha_i^S\}_{i = 0}^{N_c}$ and $\{\alpha_i^T\}_{i = 0}^{N_c}$ reweight each term in the loss ( $i = 0$ denotes background). Concretely, in this loss function, the intra-class part requires identical classes' prototypes to be as close as possible, and the inter-class part constrains the distance between different classes' prototypes to be larger than a margin: + +$$ +\mathcal {L} _ {\text {i n t r a}} (\mathcal {S}, \mathcal {T}) = \frac {\sum_ {i = 0} ^ {N _ {c}} \alpha_ {i} ^ {\mathcal {S}} \alpha_ {i} ^ {\mathcal {T}} \Phi \left(c _ {i} ^ {\mathcal {S}} , c _ {i} ^ {\mathcal {T}}\right)}{\sum_ {i = 0} ^ {N _ {c}} \alpha_ {i} ^ {\mathcal {S}} \alpha_ {i} ^ {\mathcal {T}}}, \tag {8} +$$ + +$$ +\begin{array}{l} \mathcal {L} _ {\text {i n t e r}} \left(\mathcal {D}, \mathcal {D} ^ {\prime}\right) = \frac {\sum_ {0 \leqslant i \neq j \leqslant N _ {c}} \alpha_ {i} ^ {\mathcal {D}} \alpha_ {j} ^ {\mathcal {D} ^ {\prime}} \max \left(0 , m - \Phi \left(c _ {i} ^ {\mathcal {D}}, c _ {j} ^ {\mathcal {D} ^ {\prime}}\right)\right)}{\sum_ {0 \leqslant i \neq j \leqslant N _ {c}} \alpha_ {i} ^ {\mathcal {D}} \alpha_ {j} ^ {\mathcal {D} ^ {\prime}}}, (9) \\ \mathcal {L} _ {d a} = \mathcal {L} _ {i n t r a} (\mathcal {S}, \mathcal {T}) + \frac {1}{3} \left(\mathcal {L} _ {i n t e r} (\mathcal {S}, \mathcal {S}) \right. (10) \\ + \mathcal {L} _ {i n t e r} (\mathcal {S}, \mathcal {T}) + \mathcal {L} _ {i n t e r} (\mathcal {T}, \mathcal {T}), \\ \end{array} +$$ + +where $\Phi (x,x^{\prime}) = ||x - x^{\prime}||_{2}$ calculates the Euclidean distance between two prototypes, and $\{c_i^S\}_{i = 0}^{N_c},\{c_i^T\}_{i = 0}^{N_c}$ denote the prototypes of source and target domain. $\mathcal{D}$ and $\mathcal{D}'$ represent two domains from which pairs of prototypes belonging to different categories are taken. $m$ is the margin term which is fixed as 1.0 in all experiments. In the total domain adaptation loss $\mathcal{L}_{da}$ , all pairwise relations between two domains' prototypes are considered. + +# 3.4. Two-stage Domain Alignment + +Faster R-CNN [35] is a two-stage object detector made up of Region Proposal Network (RPN) and Region-based CNN (R-CNN). First, based on the feature map produced by bottom convolutional layers, RPN generates class-agnostic region proposals. After that, R-CNN predicts fine-grained category labels from feature vectors obtained via ROI pooling. Each stage defines a classification and a localization error, and the total detection loss is defined as follows: + +$$ +\mathcal {L} _ {d e t} = \mathcal {L} _ {c l s} ^ {R P N} + \mathcal {L} _ {l o c} ^ {R P N} + \mathcal {L} _ {c l s} ^ {R C N N} + \mathcal {L} _ {l o c} ^ {R C N N}. \tag {11} +$$ + +Based on the two-stage structure of Faster R-CNN, we also conduct domain alignment in a two-stage manner. In the first stage, using the region proposals and corresponding class-agnostic confidence produced by RPN, foreground and background features are separated on latent space, and the foreground feature distributions are aligned as a whole. In the second stage, by utilizing the more accurate bounding boxes and per-category confidence, the feature distribution of each category is respectively aligned. Applying the proposed Class-reweighted Contrastive Loss to both RPN and RCNN, the overall objective is: + +$$ +\min _ {F _ {\theta}} \mathcal {L} _ {d e t} + \lambda_ {1} \mathcal {L} _ {d a} ^ {R P N} + \lambda_ {2} \mathcal {L} _ {d a} ^ {R C N N}, \tag {12} +$$ + +where $F_{\theta}$ represents the whole parameterized model, and $\lambda_{1}$ and $\lambda_{2}$ are the trade-off parameters between detection and domain adaptation loss. + +Implementation details. On the basis of ResNet-50 [14] architecture, we implement two domain adaptation losses, $\mathcal{L}_{da}^{RPN}$ and $\mathcal{L}_{da}^{RCNN}$ , through adding two domain adaptation learning branches to the $7\times 7\times 1024$ feature map after ROI pooling and the 2048-dimensional vector after average pooling, respectively. + +# 4. Experiments + +In this section, we provide comprehensive experimental results on three cross-domain detection tasks with distinct domain shift, including Normal to Foggy, Synthetic to Real and Cross Camera Adaptation. + +# 4.1. Experimental Setup + +Training details. In all experiments, unless otherwise specified, all of the training and test images are resized such that their shorter side has 600 pixels. During training, for each image, 128 anchors are sampled with a positive to negative ratio of $1:3$ . ResNet-50 [14] pre-trained on ImageNet [36] serves as the base architecture. We adopt the SGD optimizer (initial learning rate: 0.001, momentum: 0.9, weight decay: $5 \times 10^{-4}$ ) to train our model. The number of total training epoch is set as 20, and the learning rate warm + +Table 1. Experimental results (%) of Normal to Foggy cross-domain detection task, Cityscapes $\rightarrow$ Foggy Cityscapes. + +
MethodspersonridercartruckbustrainmotorcyclebicyclemAP
Source-only26.938.235.618.332.49.625.828.626.9
DA [5]29.240.443.419.738.328.523.732.732.0
DivMatch [18]31.840.551.020.941.834.326.632.434.9
SW-DA [38]31.844.348.921.043.828.028.935.835.3
SC-DA [55]33.842.152.126.842.526.529.234.535.9
MTOR [2]30.641.444.021.938.640.628.335.635.1
GPA (RPN Alignment)32.543.153.322.741.440.829.436.437.4
GPA (RCNN Alignment)33.544.852.626.041.237.629.835.237.6
GPA (Two-stage Alignment)32.946.754.124.745.741.132.438.739.5
+ +up strategy [14] is used in the first 200 iterations of training. Without specific notation, the class-balancing hyperparameter $\gamma$ is set as 2.0, and the IoU-based adjacency matrix defined in Eq. 2 is adopted. For evaluation, we report mean average precisions (mAP) with a threshold of 0.5. + +In our experiments, two NVIDIA GeForce 1080 Ti GPUs are used for training, and we select the batch size of 12 to fit GPU memory, i.e. 6 images per GPU, consisting of 3 labeled samples from source domain and 3 unlabeled samples from target domain. Our method is implemented with the PyTorch [31] deep learning framework. + +Performance comparison. We compare our approach with state-of-the-art methods to verify its effectiveness. Our method is evaluated under three configurations corresponding to RPN Alignment $(\lambda_{1} = 1.0, \lambda_{2} = 0.0)$ , RCNN Alignment $(\lambda_{1} = 0.0, \lambda_{2} = 1.0)$ and Two-stage Alignment $(\lambda_{1} = 1.0, \lambda_{2} = 1.0)$ . Former works, DA [5], DivMatch [18], SW-DA [38], SC-DA [55] and MTOR [2] are introduced for comparison. For the sake of fair comparison, we employ ResNet-50 as the backbone for all these methods. In specific, we re-evaluate the performance of DA, DivMatch, SW-DA and SC-DA using their source code with default configuration, and the performance of MTOR in original paper is reported for the lack of source code. + +# 4.2. Normal to Foggy + +Datasets. In this experiment, Cityscapes [6] and Foggy Cityscapes [39] dataset serve as source and target domain, respectively. Cityscapes dataset contains 2,975 training images and 500 validation images, and we follow the operation in [5] to get the detection annotations. Foggy Cityscapes dataset simulates fog on real scenes through rendering the images from Cityscapes, and it shares the same annotations with Cityscapes dataset. The results are reported on the validation set of Foggy Cityscapes. + +Results. In Table 1, the comparisons between our approach and other cross-domain detection methods are presented on eight categories. Source-only denotes the baseline Faster R-CNN trained with only source domain data. From the table, it can be observed that the performance of + +our approach under three configurations all surpasses existing methods. In particular, an increase of $3.6\%$ on mAP is achieved by Two-stage Alignment. The results showcase that, under the domain shift caused by local fog noise, the proposed graph-based region aggregation can effectively alleviate such noise and extract critical instance-level features. Take a closer look at per-category performance, our approach achieves highest AP on most sample-scarce categories, i.e. rider, bus, train and motorcycle. This phenomenon illustrates the effectiveness of Class-imbalance-aware Adaptation Training on balancing the domain adaptation process among different classes. + +# 4.3. Synthetic to Real + +Datasets. In this experiment, SIM 10k [16] dataset is employed as source domain. SIM 10k dataset is collected from the computer game Grand Theft Auto V (GTA5), and it contains 10,000 images. Cityscapes [6] dataset serves as target domain, and experimental results are reported on its validation split. + +Results. Table 2 reports the performance of our approach compared with other works on two datasets' common category, car. The Two-stage Alignment configuration of our approach obtains the highest AP $(47.6\%)$ over all methods. The domain shift of this task is mainly brought by distinct image styles. In such case, in order to achieve satisfactory performance, it's important to produce discriminative features between foreground and background on target domain. We think that, in our framework, such goal is realized through constraining inter-class separability in the Class-reweighted Contrastive Loss. + +# 4.4. Cross Camera Adaptation + +Datasets. In this part, we want to explore the adaptation between real-world datasets under different camera setups. KITTI [8] dataset serves as source domain, and it contains 7,481 training images. Cityscapes [6] dataset is utilized as target domain, and its validation set is used for evaluation. + +Results. The results of various methods on two datasets' common category, car, are presented in Table 3. In this + +Table 2. Experimental results $(\%)$ of Synthetic to Real cross-domain detection task, SIM $10\mathrm{k}\rightarrow$ Cityscapes. + +
Methodscar AP
Source-only34.6
DA [5]41.9
DivMatch [18]43.9
SW-DA [38]44.6
SC-DA [55]45.1
MTOR [2]46.6
GPA (RPN Alignment)45.1
GPA (RCNN Alignment)44.8
GPA (Two-stage Alignment)47.6
+ +task, all three configurations of our approach exceed existing works with a notable margin, in particular, $4.3\%$ performance gain achieved by Two-stage Alignment. In cross camera adaptation tasks, due to the difference of camera setups, abundant patterns exist in instances. In our method, the multi-modal information reflected by various instances is integrated into prototype representations, such that the diverse patterns within a specific category are considered during domain adaptation, which promises the superior performance of our approach. + +# 5. Analysis + +In this section, we provide more in-depth analysis of our approach to validate the effectiveness of major components with both quantitative and qualitative results. + +# 5.1. Ablation Study + +Effect of relation graph. In Table 4, we analyze a key component, i.e. the relation graph, on the task SIM $10\mathrm{k}\rightarrow$ Cityscapes. The first row directly uses the original region proposals produced by RPN to compute prototypes, and it serves as the baseline. In the second row, we use an Euclidean distance based relation graph defined in Eq. 1, in which $\sigma$ is set as 15.0 so as to keep the sparsity of derived relation graph same as the one defined by IoU. Comparing the second and fourth row, it can be observed that the configuration using IoU based relation graph performs better, which illustrates that region proposals' size information is essential for relation graph construction. + +In the third and fifth row, we append the learnable parameter matrix to Eqs. 3, 4, which forms the conventional formula of graph convolution. After introducing such learnable parameter matrix, compared with the parameter-free counterparts in the second and fourth row, apparent performance decay occurs. We suppose that such phenomenon can be ascribed to the lack of explicit supervisory signal on the branch of domain adaptation learning, which makes it hard to learn a proper feature transformation. + +Table 3. Experimental results $(\%)$ of Cross Camera Adaptation task, KITTI $\rightarrow$ Cityscapes. + +
Methodscar AP
Source-only37.6
DA [5]41.8
DivMatch [18]42.7
SW-DA [38]43.2
SC-DA [55]43.6
GPA (RPN Alignment)46.9
GPA (RCNN Alignment)46.1
GPA (Two-stage Alignment)47.9
+ +Table 4. Ablation study on different manners to construct relation graph. ("ED": Euclidean distance, "LP": learnable parameter.) + +
EDIoULPcar AP
45.0
✓46.1
✓✓43.2
✓47.6
✓✓43.6
+ +Effect of two-stage alignment. In this part, we demonstrate the effectiveness of two-stage alignment. In different cross-domain detection tasks, as shown in Table 1, 2 and 3, three configurations of the proposed approach are evaluated. Two single-stage configurations possess similar performance, and two-stage alignment surpasses them with a clear margin. These results illustrate that two-stage alignment boosts domain adaptation via a progressive alignment manner, i.e. from coarse-grained foreground alignment to fine-grained per-category alignment. + +# 5.2. Sensitivity Analysis + +Sensitivity of trade-off parameters $\lambda_{1},\lambda_{2}$ . In this experiment, we validate our approach's sensitivity to $\lambda_{1}$ and $\lambda_{2}$ which trade off between detection and domain adaptation loss. Figure 5(a) shows model's performance under different $\lambda_{1}(\lambda_{2})$ values when the other parameter $\lambda_{2}(\lambda_{1})$ is fixed, and all results are evaluated on the task SIM $10k\rightarrow$ Cityscapes. From the line chart, it can be observed that the performance on target domain is not sensitive to both parameters when they vary from 0.25 to 2.0, and apparent performance gain is obtained compared with RCNN Alignment $(\lambda_{1} = 0)$ and RPN Alignment $(\lambda_{2} = 0)$ . This phenomenon illustrates that the two-stage alignment can achieve satisfactory results on a wide range of trade-off parameters. + +Sensitivity of class-balancing parameter $\gamma$ . In this part, we discuss the selection of parameter $\gamma$ which balances the domain adaptation process among different categories. In Figure 5(b), we plot the performance of models trained with different $\gamma$ value on the task Cityscapes $\rightarrow$ + +![](images/621023d334f92069c8580fe984d4f67ea867dc8f90800b5b5e14ff4be453795d.jpg) + +![](images/a5b20073ddc5f5f462e3ba5308dc9c0cb736d124785d74a314d861a12e0b3a44.jpg) +(a) Source-only + +![](images/6f5c00bd1346b3d8484ee5853e882826bbe759664ed2b6df2f9cb93cbc8c0f90.jpg) + +![](images/2957549ce574ea2f360309714dc5f3662615b9efc21960cc629b43b9c0bdfb79.jpg) +(b) DA + +![](images/a6d1131681c027072578c6ed132bb64aa99fb8f88ba0ff377446ec11501639ac.jpg) + +![](images/6fd2456c6b97a7bded6c758c46eda79eed83fea8ad1c2fed064e034cefe1c461.jpg) +(c) GPA (Two-stage Alignment) + +![](images/b54edbe98b58207a34c9ec070160d1cd72be3bef84a5bab45f60ab4da1c45b79.jpg) +Figure 4. The detection results on the task SIM $10\mathrm{k}\rightarrow$ Cityscapes, in which Source-only, DA [5] and our method are evaluated. +Figure 5. Sensitivity analysis of trade-off parameters $\lambda_{1}$ , $\lambda_{2}$ (left) and class-balancing parameter $\gamma$ (right). + +![](images/171e544ffb52ee5d3cfd5972454da17dcc4ff2d4342c1ae6356114d99855935b.jpg) +(b) + +Foggy Cityscapes. The highest mAP on target domain is achieved when the value of $\gamma$ is around 2.0, which means that, under such condition, the weight assignment among different classes benefits domain adaptation most. + +# 5.3. Visualization + +Visualization of two-stage feature. In Figure 6, we utilize t-SNE [28] to visualize the feature distribution of source and target domain on the task SIM $10\mathrm{k}\rightarrow$ Cityscapes, in which the feature embeddings of both RPN and RCNN phase are used for visualization. Compared with the Source-only model, after conducting RPN and RCNN alignment, the features of the same category in two domains are better aligned, and different categories' features are separated more clearly. This visually verifies that the proposed method boosts feature alignment on both stages. + +Qualitative detection results. Figure 4 displays some typical detection results on the task SIM $10\mathrm{k}\rightarrow$ Cityscapes, in which Source-only, DA [5] and our approach are evaluated. As shown in the figure, the Source-only model can poorly localize objects. DA [5] predicts bounding box more accurately, but it incorrectly classifies the garbage can as a car, and produces some false positives. Our model successfully inhibits false positives, and it is able to localize objects precisely even when severe occlusion occurs. + +![](images/d1c1489ae99acfa112ced6466074157967e0ad2b6e1177cd0a07b6a3bed58b4a.jpg) + +![](images/fe5fcd1c61cf3fde5d27ad46ff08879d1ccd9f807d0b798988ab89e9a6c373ea.jpg) + +![](images/5c7365390d790b35a9d85a62dff5b007c22321e432464a56f22a4586f8ec0f31.jpg) +(a) Source-only +Figure 6. The t-SNE [28] visualization of feature embeddings produced by RPN and RCNN, in which Source-only model and our method are employed for feature extraction. + +![](images/82c997b4cc11e17e36cf32fe7dd07870a94480e749a76230a75bada8aa41d8b8.jpg) +(b) GPA (Two-stage Alignment) + +# 6. Conclusion + +In this paper, we propose the Graph-induced Prototype Alignment (GPA) framework for cross-domain detection. In the framework, the critical information of each instance is aggregated through graph-based message propagation, and prototype representations are derived for category-level domain alignment. Furthermore, we harmonize the process of adaptation training through Class-reweighted Contrastive Loss. Extensive experiments and analytical studies demonstrate the prominent performance of our approach. + +# 7. Acknowledgement + +This work was supported by National Science Foundation of China (61976137, U1611461, U19B2035) and STCSM(18DZ1112300). This work was also supported by National Key Research and Development Program of China (2016YFB1001003). Authors would like to appreciate the Student Innovation Center of SJTU for providing GPUs. + +# References + +[1] Konstantinos Bousmalis, Nathan Silberman, David Dohan, Dumitru Erhan, and Dilip Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. +[2] Qi Cai, Yingwei Pan, Chong-Wah Ngo, Xinmei Tian, Lingyu Duan, and Ting Yao. Exploring object relation in mean teacher for cross-domain detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[3] Chaoqi Chen, Weiping Xie, Wenbing Huang, Yu Rong, Xinghao Ding, Yue Huang, Tingyang Xu, and Junzhou Huang. Progressive feature alignment for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[4] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L. Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. In International Conference on Learning Representations, 2015. +[5] Yuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster R-CNN for object detection in the wild. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. +[6] 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 IEEE Conference on Computer Vision and Pattern Recognition, 2016. +[7] Yaroslav Ganin and Victor S. Lempitsky. Unsupervised domain adaptation by backpropagation. In International Conference on Machine Learning, 2015. +[8] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the KITTI vision benchmark suite. In IEEE Conference on Computer Vision and Pattern Recognition, 2012. +[9] Ross B. Girshick. Fast R-CNN. In IEEE International Conference on Computer Vision, 2015. +[10] Ross B. Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In IEEE Conference on Computer Vision and Pattern Recognition, 2014. +[11] Arthur Gretton, Karsten M. Borgwardt, Malte J. Rasch, Bernhard Schölkopf, and Alexander J. Smola. A kernel two-sample test. Journal of Machine Learning Research, 13:723-773, 2012. +[12] Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In IEEE Conference on Computer Vision and Pattern Recognition, 2006. +[13] Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross B. Girshick. Mask R-CNN. In IEEE International Conference on Computer Vision, 2017. +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. + +[15] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei A. Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. In International Conference on Machine Learning, 2018. +[16] Matthew Johnson-Roberson, Charles Barto, Rounak Mehta, Sharath Nittur Sridhar, Karl Rosaen, and Ram Vasudevan. Driving in the matrix: Can virtual worlds replace human-generated annotations for real world tasks? In IEEE International Conference on Robotics and Automation, 2017. +[17] Mehran Khodabandeh, Arash Vahdat, Mani Ranjbar, and William G. Macready. A robust learning approach to domain adaptive object detection. In IEEE International Conference on Computer Vision, 2019. +[18] Taekyung Kim, Minki Jeong, Seunghyeon Kim, Seokeon Choi, and Changick Kim. Diversify and match: A domain adaptive representation learning paradigm for object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[19] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations, 2017. +[20] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, 2012. +[21] 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 Conference on Computer Vision and Pattern Recognition, 2017. +[22] Tsung-Yi Lin, Priya Goyal, Ross B. Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In IEEE International Conference on Computer Vision, 2017. +[23] Jinxian Liu, Bingbing Ni, Caiyuan Li, Jiancheng Yang, and Qi Tian. Dynamic points agglomeration for hierarchical point sets learning. In IEEE International Conference on Computer Vision, 2019. +[24] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott E. Reed, Cheng-Yang Fu, and Alexander C. Berg. SSD: single shot multibox detector. In European Conference on Computer Vision, 2016. +[25] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I. Jordan. Learning transferable features with deep adaptation networks. In International Conference on Machine Learning, 2015. +[26] Mingsheng Long, Zhangjie Cao, Jianmin Wang, and Michael I. Jordan. Conditional adversarial domain adaptation. In Advances in Neural Information Processing Systems, 2018. +[27] Xinhong Ma, Tianzhu Zhang, and Changsheng Xu. GCAN: graph convolutional adversarial network for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[28] Laurens Van Der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(2605):2579-2605, 2008. + +[29] Massimiliano Mancini, Samuel Rota Bulò, Barbara Caputo, and Elisa Ricci. Adagraph: Unifying predictive and continuous domain adaptation through graphs. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[30] Yingwei Pan, Ting Yao, Yehao Li, Yu Wang, Chong-Wah Ngo, and Tao Mei. Transferrable prototypical networks for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[31] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. In NeurIPS Workshop, 2017. +[32] Zhongyi Pei, Zhangjie Cao, Mingsheng Long, and Jianmin Wang. Multi-adversarial domain adaptation. In AAAI Conference on Artificial Intelligence, 2018. +[33] Joseph Redmon, Santosh Kumar Divvala, Ross B. Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2016. +[34] Joseph Redmon and Ali Farhadi. YOLO9000: better, faster, stronger. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. +[35] Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster R-CNN: towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems, 2015. +[36] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael S. Bernstein, Alexander C. Berg, and Fei-Fei Li. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211-252, 2015. +[37] Kuniaki Saito, Donghyun Kim, Stan Sclaroff, Trevor Darryl, and Kate Saenko. Semi-supervised domain adaptation via minimax entropy. In IEEE International Conference on Computer Vision, 2019. +[38] Kuniaki Saito, Yoshitaka Ushiku, Tatsuya Harada, and Kate Saenko. Strong-weak distribution alignment for adaptive object detection. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[39] Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Semantic foggy scene understanding with synthetic data. International Journal of Computer Vision, 126(9):973-992, 2018. +[40] Swami Sankaranarayanan, Yogesh Balaji, Carlos D. Castillo, and Rama Chellappa. Generate to adapt: Aligning domains using generative adversarial networks. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. +[41] Jian Shen, Yanru Qu, Weinan Zhang, and Yong Yu. Wasserstein distance guided representation learning for domain adaptation. In AAAI Conference on Artificial Intelligence, 2018. +[42] Baochen Sun and Kate Saenko. Deep CORAL: correlation alignment for deep domain adaptation. In ECCV Workshop, 2016. +[43] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. + +[44] Eric Tzeng, Judy Hoffman, Ning Zhang, Kate Saenko, and Trevor Darrell. Deep domain confusion: Maximizing for domain invariance. CoRR, abs/1412.3474, 2014. +[45] Xiaolong Wang and Abhinav Gupta. Videos as space-time region graphs. In European Conference on Computer Vision, 2018. +[46] Shaoan Xie, Zibin Zheng, Liang Chen, and Chuan Chen. Learning semantic representations for unsupervised domain adaptation. In International Conference on Machine Learning, 2018. +[47] Minghao Xu, Jian Zhang, Bingbing Ni, Teng Li, Chengjie Wang, Qi Tian, and Wenjun Zhang. Adversarial domain adaptation with domain mixup. CoRR, abs/1912.01805, 2019. +[48] Hongliang Yan, Yukang Ding, Peihua Li, Qilong Wang, Yong Xu, and Wangmeng Zuo. Mind the class weight bias: Weighted maximum mean discrepancy for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. +[49] Hongliang Yan, Yukang Ding, Peihua Li, Qilong Wang, Yong Xu, and Wangmeng Zuo. Mind the class weight bias: Weighted maximum mean discrepancy for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, 2017. +[50] Sijie Yan, Yuanjun Xiong, and Dahua Lin. Spatial temporal graph convolutional networks for skeleton-based action recognition. In AAAI Conference on Artificial Intelligence, 2018. +[51] Yichao Yan, Qiang Zhang, Bingbing Ni, Wendong Zhang, Minghao Xu, and Xiaokang Yang. Learning context graph for person search. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. +[52] Yichao Yan, Ning Zhuang, Bingbing Ni, Jian Zhang, Minghao Xu, Qiang Zhang, Zhang Zheng, Shuo Cheng, Qi Tian, Yi Xu, Xiaokang Yang, and Wenjun Zhang. Fine-grained video captioning via graph-based multi-granularity interaction learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. +[53] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In Advances in Neural Information Processing Systems, 2014. +[54] Weichen Zhang, Wanli Ouyang, Wen Li, and Dong Xu. Collaborative and adversarial network for unsupervised domain adaptation. In IEEE Conference on Computer Vision and Pattern Recognition, 2018. +[55] Xinge Zhu, Jiangmiao Pang, Ceyuan Yang, Jianping Shi, and Dahua Lin. Adapting object detectors via selective cross-domain alignment. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. \ No newline at end of file diff --git a/crossdomaindetectionviagraphinducedprototypealignment/images.zip b/crossdomaindetectionviagraphinducedprototypealignment/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..42e28ed41c6a0aa4d4df21c71c4c29e654e76757 --- /dev/null +++ b/crossdomaindetectionviagraphinducedprototypealignment/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:672dd3335be3c441693780c75c0c9348d5841bc945864350dc4e52bce3d31707 +size 432382 diff --git a/crossdomaindetectionviagraphinducedprototypealignment/layout.json b/crossdomaindetectionviagraphinducedprototypealignment/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..ef99ee95b7aa717c5391b19b90b14c27fb95e3bc --- /dev/null +++ b/crossdomaindetectionviagraphinducedprototypealignment/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b72661fe02f6bd33acc02fd4f2524e307df102669efdd00334c0126c32f38027 +size 456109 diff --git a/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/7e780b9e-7b1e-4113-a20c-921363b12026_content_list.json b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/7e780b9e-7b1e-4113-a20c-921363b12026_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d34525bab89fa9a57ad386bb07fa7a7efca79dbb --- /dev/null +++ b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/7e780b9e-7b1e-4113-a20c-921363b12026_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5712137d601f5f8bd449f9cc2f85f06317bd7c80640cfcb346e561688f6d278 +size 72855 diff --git a/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/7e780b9e-7b1e-4113-a20c-921363b12026_model.json b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/7e780b9e-7b1e-4113-a20c-921363b12026_model.json new file mode 100644 index 0000000000000000000000000000000000000000..018b83dd1414d8373a9fd151033674bcfc3f7209 --- /dev/null +++ b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/7e780b9e-7b1e-4113-a20c-921363b12026_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:898d2197bc0c82ad64edc2ab2c5d589a5c78916138594345d21b0032e566c0e2 +size 87121 diff --git a/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/7e780b9e-7b1e-4113-a20c-921363b12026_origin.pdf b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/7e780b9e-7b1e-4113-a20c-921363b12026_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..871ab457ec3d34fbc12fecc44f5bd9f727de5d3b --- /dev/null +++ b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/7e780b9e-7b1e-4113-a20c-921363b12026_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e96ff48cbbf8af285861e0955a4469adeee2a7c44ed96a684c5fbe6655a7461 +size 2436340 diff --git a/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/full.md b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9c4fe9095cf44c31fc33166c9bf019310c924c27 --- /dev/null +++ b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/full.md @@ -0,0 +1,273 @@ +# Cross-Domain Document Object Detection: Benchmark Suite and Method + +Kai Li $^{1}$ , Curtis Wigington $^{2}$ , Chris Tensmeyer $^{2}$ , Handong Zhao $^{2}$ , Nikolaos Barmpalios $^{3}$ , Vlad I. Morariu $^{2}$ , Varun Manjunatha $^{2}$ , Tong Sun $^{2}$ , Yun Fu $^{1}$ , Northeastern University, $^{2}$ Adobe Research, $^{3}$ Adobe Document Cloud + +{kaili,yunfu}@ece.neu.edu {wipingto,tensmeyehazhao,barmali,morariu,vmanjuna,tsun} $@$ adobe.com + +# Abstract + +Decomposing images of document pages into high-level semantic regions (e.g., figures, tables, paragraphs), document object detection (DOD) is fundamental for downstream tasks like intelligent document editing and understanding. DOD remains a challenging problem as document objects vary significantly in layout, size, aspect ratio, texture, etc. An additional challenge arises in practice because large labeled training datasets are only available for domains that differ from the target domain. We investigate cross-domain DOD, where the goal is to learn a detector for the target domain using labeled data from the source domain and only unlabeled data from the target domain. Documents from the two domains may vary significantly in layout, language, and genre. We establish a benchmark suite consisting of different types of PDF document datasets that can be utilized for cross-domain DOD model training and evaluation. For each dataset, we provide the page images, bounding box annotations, PDF files, and the rendering layers extracted from the PDF files. Moreover, we propose a novel cross-domain DOD model which builds upon the standard detection model and addresses domain shifts by incorporating three novel alignment modules: Feature Pyramid Alignment (FPA) module, Region Alignment (RA) module and Rendering Layer alignment (RLA) module. Extensive experiments on the benchmark suite substantiate the efficacy of the three proposed modules and the proposed method significantly outperforms the baseline methods. The project page is at https://github.com/kailigo/cddod. + +# 1. Introduction + +Document Object Detection (DOD) is the task of automatically decomposing a document page image into its structural and logical units (e.g., figures, tables, paragraphs). DOD is critical for a variety of document image analysis applications, such as document editing, document + +structure analysis and content understanding [31, 1, 30]. Two popular document formats, image (e.g. scanned and camera-captured documents) and PDF, do not explicitly encode document structure: images consist of pixels, while PDFs consist of vector, raster, and text marking operations that allow a document to be faithfully reproduced across devices (e.g., printers, and displays). + +Though recent advances in object detection for natural scene images are impressive [27, 21], directly applying the same model to document images is likely sub-optimal due to large domain differences. For example, document objects are more diverse in aspect ratio and scale than natural scene objects: tables may occupy a whole page, page numbers can be as small as a single digit, and a single line of text spanning the page has an extreme aspect ratio. The intra-class variance of document objects is also usually larger than that of natural scene objects. Text can have arbitrary font face, style, position, orientation, and size. Table cells can be filled with arbitrary content as long as they are aligned in a grid layout. Document layouts and objects are also modular entities, so that, for example, examining the left half of a paragraph gives little information on how wide that paragraph is. In contrast, missing parts of natural objects and scenes can be reasonably in-painted based on surrounding context [26]. + +Another key challenge is that many factors influence the appearance of a document, such as document type (e.g. menu, scientific article), layout (e.g. Portrait vs Landscape or single/multi-column), and written language. While learning a single model that can handle all varieties of documents is desirable, constructing such a comprehensive dataset appears infeasible. Because labeled data is not available for every kind of document collection, we are motivated to examine cross-domain DOD. In cross-domain DOD, we leverage labeled data in the source domain and unlabeled data in the target domain to train a detector for the target domain. + +To facilitate advancements in this field, we establish a benchmark suite on which cross-domain DOD models can be trained and evaluated. The benchmark suite consists of different types of document datasets; each serves as one do + +main. Each dataset is composed of the following components. (1) Document page images and bounding box annotations. These are essential data for detection model training and evaluation. (2) Raw PDF files used to generate the page images. The raw PDF files preserve the information lost when converting PDF pages to images, like the text and some meta-data. These extra sources of information may complement the visual information and benefit the detection task. (3) PDF rendering layers. A PDF page is in fact a mixture of text, vector, and raster content. These three content types can be rendered into separate layers for a PDF page, with each layer containing the pixel rendering arising only from one content type (text, vector, or raster). These rendering layers provide a structural abstraction of the PDF page and thus could be helpful for the detection task as well. + +In addition to the benchmark suite, we propose a novel cross-domain DOD model, which builds on top of the Feature Pyramid Networks (FPN) object detector [21] and addresses the domain shift problem by introducing three novel modules. The first module is the Feature Pyramid Alignment (FPA) module. FPA performs dense pixel-wise alignment between feature pyramids from source and target domains. Since each layer of the pyramids mixes both high- and low-level features, explicitly pushing cross-domain feature pyramid layers closer to each other achieves joint alignment of both low- and high-level semantics. The second module is the Region Alignment (RA) module. RA aims to enhance the alignment of semantically meaningful foreground regions from the two domains and explicitly pushes regions extracted from the two domains closer to each other. We adopt the focal loss [22] into our objective function to focus more on hard-to-align samples. The last module is the Rendering Layer Alignment (RLA) module. We utilize the PDF rendering layers available in our benchmark suite and generate for each page a mask which specifies the rendering layer that each pixel belongs to. RLA takes the mask as a kind of segmentation map for the page and trains an auxiliary segmentation task to further align the domains by predicting the masks from images of the two domains. + +The contribution of this paper is three-fold: + +- We establish a benchmark suite for cross-domain DOD model training and evaluation. To our best knowledge, we are the first to study this problem and the benchmark is the first one in this area. +- We propose a novel cross-domain DOD model which introduces three novel modules to approach the domain shift problem. The three modules complement with each other and align the domains from both general image perspective and specific document image perspective. +- Our model effectively mitigates the domain shift problem and significantly advances the baseline performance on the benchmark suite. + +# 2. Related Work + +Our work is related to document object detection and cross-domain object detection for natural scene images. + +# 2.1. Document Object Detection + +Most existing approaches to document object detection focus on certain types of objects, e.g., tables, figures, or mathematical formulas. Early works rely on various heuristic rules to extract and identify these objects from document images [24, 9, 32]. These approaches often involve a set of hyper-parameters, which are difficult to adapt to new document domains. Recent works are usually data-driven and approach the problem with machine learning techniques, or a hybrid of heuristic rules and learning models. Taking advantage of the impressive progress of object detection on natural scene images, many works adapt natural image object detectors by considering the uniqueness of the document images [30, 11]. He et al. [13] propose a two-stage approach to detect tables and figures. In the first stage, the class label for each pixel is predicted using a multi-scale, multi-task fully convolutional neural network. Then in the second stage, heuristic rules are applied on the pixel-wise class predictions to get the object boxes. Gao et al. [8] utilize meta-data information of PDF files and detect formulas using a model that combines CNN and RNN. A few works detect multiple types of document objects jointly in a single framework [7]. Yi et al. [34] adapt the region proposal approach and redesign the CNN architecture of common object detectors by considering the uniqueness of document objects. [20] first performs deep structure prediction and gets the primitive region proposals from each column region. Then, the primitive proposals are clustered and those within the same cluster are merged as a single object instance. + +# 2.2. Cross-Domain Object Detection + +Existing cross-domain object detection methods can be roughly divided into two categories: ones that are based on feature alignment and ones that are based on self-training. Methods in the former category train models from which domain-agnostic feature representations can be obtained for images from both domains [37, 29, 3, 15]. To achieve this, these methods usually train domain classifiers and feature extraction models in an adversarial manner until the domain classifiers cannot distinguish the domains of the images from which the features are extracted. The difference lies in the position and way that the domain classifiers are used. Methods in the latter category train the models recursively by generating pseudo bounding box labels for target images and updating the models with the generated pseudo labels [18, 16, 17, 28]. Different methods vary in how they generate the pseudo labels or update the model. Both categories of methods benefit from style transfer techniques + +![](images/f19864bb1b52f820f461a365999b7a8b90b9822775965008755a8d3c9fd0e386.jpg) +Figure 1. Samples from the Chn dataset. Bounding box in colors are the ground truth labels: list, table, text, figure, and heading + +which first train a style transfer model (e.g., CycleGAN [36]) using images from both domains and then apply the model to translate images from the source domain as the style of the target domain. Using this approach, labeled images of a similar style as that of the target domain can be obtained, which facilitates further domain alignment [16, 19]. + +Our cross-domain DOD model inherits the merits of the recent cross-domain object detectors for natural scene images. We follow the line of approaches which addresses domain shifts by explicitly performing feature alignment. But instead of aligning either low-level features [29] or high-level features [3, 37], or alignment them both separately [15], we align them jointly with the feature pyramids, as each layer of which is a mixture of both low and high-level features. Further, we propose a focal loss based region proposal alignment module which aims to enhance the alignment of foreground regions. This module is different from the previous methods [3, 15] that treat all region proposal equally, and instead focuses more on the hard-to-align proposals. Moreover, we utilize the rendering layer data available for the document datasets and generate from them segmentation masks for both source and target images. We use the masks as additional cues to align the domains by training an auxiliary segmentation task. + +# 3. Benchmark Suite + +There are a few existing datasets for document object detection. However, these datasets usually include annotations only for certain types of objects, e.g., table [12, 5] or mathematical formulas [23]. [7] established a dataset which contains annotations for three types of objects: table, figure and mathematical formula. However, this dataset is no longer publicly available. In addition, the largest existing dataset contains only 2000 page images [7], which is too small for modern deep object detectors. + +Very recently, [35] released a large-scale dataset for document object detection. It contains annotations for more than 3.5 million object instances from over 360 thousand page images extracted from medical journal articles. The annotated objects cover 5 classes: text, title, list, table and figure. The annotations are obtained automatically by + +matching the XML representations created by the publisher and the PDF content. We take advantage of this dataset and randomly select a subset, referred to as PubMed in this work, for our cross-domain experiments. PubMed includes 12871 images and 257830 bounding box annotations. We randomly split the dataset into 9653 images for training and 3218 images for testing. Note that the definition of the "list" class in [35] is a single region that contains all the numbered or bulleted items. This definition is not consistent with that of the other datasets within the benchmark suite. We therefore preprocess the annotations of "list" in [35] and split the ground truth bounding boxes into small ones for every individual items by detecting the list bullets or numbers. + +Another dataset included in the benchmark suite is Chn, a synthesized Chinese document dataset. It is generated by a tool which crawls Chinese Wikipedia pages and converts the content into natural looking well-tagged (bounding box annotations can be obtained from the tags) PDF files. Specifically, the tool converts each Wikipedia HTML page into a document by (a) randomly defining a layout to arrange the HTML content in document pages and (b) selecting the style of that content. The layout generation is controlled by a set of layout parameters that define the overall appearance and includes margins, number of columns, the white-space between the columns and the presence of headers / footers. Content is arranged based on the defined layout, which results in a Document Object Model (DOM) where most of the DOM elements correspond to tags generated in the final PDF. The styling parameters, which define the look and feel of paragraphs, headers etc., include font (family, size and style), as well as coloring schemes for lines (e.g., for tables). It should be noted that styling parameters follow a hierarchical pattern; for example defining the size of the base font automatically sets the font size for all the headers (h1, h2, etc.). Finally, to enforce the generated documents to be as natural looking as possible, the layout and styling parameters are randomly sampled from a distribution computed using real world document statistics. + +After filtering out low quality samples, we obtain 8005 page images, with 203456 bounding box annotations for the same 5 classes as that of PubMed. We further randomly select 5000 and 3005 page images for training and test, re + +![](images/ad38dddcfb1a6368a7ae775f9578bbc4940ad320fff83bad5cb179c2676a898a.jpg) +Figure 2. Summary of the proposed method. We build on FPN [21] and introduce three novel modules (masked in light pink) to align different document domains (English and Chinese in this example). The Feature Pyramid Alignment (FPA) module includes four binary domain classifiers $\{D_1, D_2, D_3, D_4\}$ , corresponding to the four feature layers of the pyramid. Each of these $D_j$ classifies pixels by image domain. The Region Alignment (RA) module is a binary domain classifier $D_i$ , serving to classify the region proposals. The Rendering Layer Alignment (RLA) module is a segmentation network, which predicts rendering layer masks from the FPN layer. All binary domain classifiers follow a Gradient Reverse Layer (GRL) [6], which reverses the loss gradient during training and helps realize min-max optimization in each back-propagation. + +spectively. Figure 1 shows some samples from the dataset. + +For the two datasets above, besides the images and the corresponding bounding box annotations, we also provide the raw PDF files used to generate the page images. Most meta-data are lost when converting PDF pages to images. We thus provide the source PDF files in our benchmark suite to enable future research to take advantage of these meta-data and advance the detection task or other relevant tasks, as Yang et. al. [33] did. They showed that the textual information in PDF files are helpful for document semantic structure extraction, when properly combined with the visual images. We also believe the textual information can also benefit the detection task for multi-modal (visual + textual) methods. + +Moreover, we also provide the PDF rendering layers associated with the PDF pages. A PDF page is in fact rendered by a mixture of textual drawings, vector drawings, and raster drawings. Drawings of the same type lie in the same rendering layer, and we can extract the layers from PDF files. These rendering layers provide structural abstraction of PDF pages and thus shall be helpful for the detection task as well. + +We also utilize a human-annotated dataset for performance evaluation. The dataset includes 19355 page images and 257830 bounding box annotations for legal reports. We randomly select 9684 images for training and the remaining 9671 for testing. This dataset is annotated with the same 5 classes as the other two datasets and we also utilize the rendering layers in this work. We will refer this dataset as legal in future use. + +# 4. Method + +Figure 2 illustrates our proposed method. It is based on the Feature Pyramid Networks (FPN) and includes three novel domain alignment modules, namely, the Feature Pyramid Alignment (FPA) module, the Region Alignment (RA) + +module and the Rendering Layer Alignment (RLA) module. + +# 4.1. Feature Pyramid Networks + +FPN exploits the pyramidal feature hierarchy of convolutional neural networks and builds a feature pyramid of high-level semantics for all the layers. It is independent of the backbone convolutional architecture (we adopt the standard ResNet-101 [14] as the backbone). With the feature hierarchy $\{C_1, C_2, C_3, C_4\}$ from the layer1, layer2, layer3, and layer4 outputs of ResNet-101, FPN iterates from the coarsest feature map, up-samples it by a factor of 2 for the spatial resolution, and merges it (by element-wise addition) with the preceding map, which has undergone a $1 \times 1$ convolution to reduce channel dimensions. The merged feature map is then smoothed by a $3 \times 3$ convolution to produce the final feature map. This iteration process outputs a feature pyramid $\{P_1, P_2, P_3, P_4\}$ , where + +$$ +P _ {i} = \operatorname {c o n v 3} \left(\operatorname {u p} - \operatorname {s a m p l e} \left(P _ {i + 1}\right) + \operatorname {c o n v 1} \left(C _ {i}\right)\right), i = 1, 2, 3, 4, \tag {1} +$$ + +where conv1, conv3, and up_sample are $1 \times 1$ , $3 \times 3$ and upsampling operations, respectively. Note that $P_{5}$ is the result of $1 \times 1$ convolution on $C_{4}$ , i.e., $P_{5} = \text{conv1}(C_{4})$ . + +Region proposals are extracted from all feature pyramid layers $\{P_1, P_2, P_3, P_4\}$ by the region proposal network (RPN). The obtained region proposals are then forwarded to the feature extraction module to obtain a feature vector for each proposal. For an image from the source dataset, we calculate the detection loss using the bounding box ground truth: + +$$ +L _ {d e t} ^ {s} = L _ {r e g} \left(x ^ {s}, y ^ {s}\right) + L _ {c l s} \left(x ^ {s}, y ^ {s}\right), \tag {2} +$$ + +where $x^{s}$ and $y^{s}$ are the image and the ground truth annotation, respectively. The first term is the bounding box regression loss and the second term is the classification loss. + +![](images/56814c961de9a67dd631793c8d5660d8fed448dcd8aeb8aa3bb8fc63e56e923e.jpg) +Figure 3. Generating the rendering layer mask from a PDF page. Given a PDF page, we first use a tool to generate the text, raster and vector rendering layers, which are then binarized to separate the foreground from the background. Next, we merge the binary maps of the three layers and get a raw mask. Last, we perform morphological dilation and close operation to fill in the gaps between text characters and the holes in the raster drawings. + +# 4.2. Feature Pyramid Alignment + +As we can see above, feature maps in the pyramid are a mixture of both high- and low-level features; aligning feature pyramids from different domains therefore results in a joint alignment of both low- and high-level semantics. This is advantageous over existing methods where alignment is performed for low-level features only [29] or high-level features only [3], or both of them separately [15]. Moreover, by virtue of building upon FPN, we inherit its strength of detecting objects of wide range of sizes, which is important for detecting objects in document images, as they can vary significantly in size. For example, "text" objects can occupy almost a whole page (e.g., long paragraphs), while others may be as small as a few characters or digits (e.g., page numbers or short section headings). + +Specifically, FPA includes 4 binary domain classifiers $\{D_1, D_2, D_3, D_4\}$ corresponding to $\{P_1, P_2, P_3, P_4\}$ . These classifiers predict the domain labels (source or target) of the pixels in the feature maps. We train the classifiers and FPN in an adversarial manner so that FPN is domain-agnostic once the domain classifiers cannot tell whether a pixel is from the source or target. To this end, we reverse the gradients with respect to $\{P_1, P_2, P_3, P_4\}$ to optimize the min-max problem in each individual back-propagation [6]. The loss function is as follows: + +$$ +\mathcal {L} _ {p} = \begin{array}{l} - \frac {1}{4 W ^ {s} H ^ {s}} \sum_ {i = 1} ^ {4} \sum_ {w = 1} ^ {W ^ {s}} \sum_ {h = 1} ^ {H ^ {s}} \log \left(D _ {i} \left(P _ {i, w, h} ^ {s}\right)\right) - \\ \frac {1}{4 W ^ {t} H ^ {t}} \sum_ {i = 1} ^ {4} \sum_ {w = 1} ^ {W ^ {t}} \sum_ {h = 1} ^ {H ^ {t}} \log \left(1 - D _ {i} \left(P _ {i, w, h} ^ {t}\right)\right), \end{array} \tag {3} +$$ + +where $W^{s}$ , $H^{s}$ , $W^{t}$ , and $H^{t}$ are the width and height of the source and target feature maps, respectively. $P_{i}^{s}$ and $P_{i}^{t}$ are the $i$ -th layers of the source and target pyramids, respectively. + +# 4.3. Region Alignment + +The above FPA module performs pixel-wise dense alignment of the feature maps, which gives equal treatment to + +the foreground and background regions. However, we are more interested in the foreground regions, as they are more semantically meaningful to the detection task. Region proposals are the likely foreground regions, so we perform further alignment on them. + +As shown in [29], a "weak global alignment" of images from different domains results in better cross-domain detection performance, due to the focus on the "hard-to-align" images. The focal loss [22] is introduced to the domain classifier to give less weight to the easy-to-align images in the loss function. Inspired by this, we include focal loss in our region proposal domain classifier to focus more on the hard-to-align proposals. While [29] apply this strategy in image level, we do this at the region proposal level to emphasize the alignment of the foreground regions. It should be noted that while region proposal alignment has been investigated before in [3], it treats all region proposals equally, which could cause the easy-to-align proposals to dominate the loss, leading to undesirable alignment results. + +With the introduction of the focal loss, our region alignment objective is as follows: + +$$ +\begin{array}{r l} \mathcal {L} _ {r} = & - \frac {1}{R} \sum_ {i = 1} ^ {R} (1 - D _ {r} \left(r _ {i} ^ {s}\right)) ^ {\gamma} \log \left(D _ {r} \left(r _ {i} ^ {s}\right)\right) - \\ & \frac {1}{R} \sum_ {i = 1} ^ {R} \left(D _ {r} \left(r _ {i} ^ {t}\right)\right) ^ {\gamma} \log \left(1 - D _ {r} \left(r _ {i} ^ {t}\right)\right), \end{array} \tag {4} +$$ + +where $R$ is the number of region proposal extracted; the terms $r_i^s$ and $r_i^t$ are the $i$ -th region proposals extracted from the source and target images, respectively; $D_r$ is the binary domain classifier; and, $\gamma$ controls the weight on hard-to-align proposals. As in FPA, we reverse the gradients with respect to the proposals and execute adversarial training of the classifier and FPN in each individual back-propagation. + +# 4.4. Rendering Layer Alignment + +The PDF pages are rendered into three separate layers, where each layer contains the pixels resulting from a single type of content: text, vector, or raster. These layers provide information about the content within a PDF page. More importantly, they are available and consistent for both source + +
textlistheadingtablefigureMAP
FRCNN (source-only)61.744.975.272.065.463.8
SWDA [29]66.023.381.085.171.465.3
SWDA+RLA (Ours)67.448.682.985.359.368.7
+ +Table 1. Impact of adding the proposed RLA module on an existing work. The best results are in bold + +and target images. Thus, they can be used as an additional supervision cue to bridge domain gaps. RLA takes advantage of this and utilizes the rendering layers to generate for each page a mask which specifies the drawing type each pixel belongs to. Figure 3 illustrates this process. + +The mask can be viewed as a segmentation map for the page images and we can learn a model to predict the map from the image. Therefore, the RLA module is a segmentation neural network which takes feature maps $C_4$ as input and outputs a dense possibility map of the drawing types of each pixel. The page masks are used as ground truth. Thus, the rendering layer segmentation objective is as follows: + +$$ +\begin{array}{l} \mathcal {L} _ {s} = - \frac {1}{W _ {m} ^ {s} H _ {m} ^ {s} C} \sum_ {i = 1} ^ {W _ {m} ^ {s}} \sum_ {c = 1} ^ {C} y _ {i, c} \log p _ {i, c} ^ {s} - \tag {5} \\ \frac {1}{W _ {m} ^ {t} H _ {m} ^ {t} C} \sum_ {i = 1} ^ {W _ {m} ^ {t} H _ {m} ^ {t}} \sum_ {c = 1} ^ {C} y _ {i, c} \log p _ {i, c} ^ {t}, \\ \end{array} +$$ + +where $W_{m}^{s}, H_{m}^{s}, W_{m}^{t}$ , and $H_{m}^{t}$ are the width and height of the masks for the source and images, respectively; $p_{i,c}^{s}$ and $p_{i,c}^{t}$ are the probability of the $i$ -th pixel of being class $c$ ; $y_{i,c}$ is the ground truth label; and, $C$ is the number of classes. We find that the vector drawing class is not reliable, as vector drawings are usually too thin to have a concrete semantic meaning. So, we merge it into the background class and keep "background", "text", and "raster" classes, i.e., $C = 3$ . + +# 4.5. Model Training and Inference + +The model is trained end-to-end by minimizing the sum of the above losses: + +$$ +\mathcal {L} = \mathcal {L} _ {\text {d e t}} ^ {s} + \lambda_ {1} \mathcal {L} _ {p} + \lambda_ {2} \mathcal {L} _ {r} + \lambda_ {3} \mathcal {L} _ {s}, \tag {6} +$$ + +where $\lambda_{1},\lambda_{2}$ and $\lambda_{3}$ are three hyper-parameters. + +For model inference, we remove the FPA, RA, and RLA modules and keep only the standard FPN. Then, the inference process is the same as the standard detection model: images are fed to the model and the detection bounding boxes are the output. + +# 5. Experiments + +Implementation details. As introduced above, we build upon the standard feature pyramid networks (FPN) and propose three novel modules to combat domain shift problem. For FPN, we follow the most common practice and use ResNet-101 as the backbone. There are four domain classifiers in the proposed FPA module; they share the same + +
textlistheadingtablefigureMAP
FPN (source-only)60.951.574.669.667.864.9
FPN + FPA68.451.983.468.160.566.5
FPN + FPA + RA65.852.582.374.867.468.6
FPN + FPA + RA + RLA67.553.682.176.673.970.7
+ +Table 2. Ablation study about the effectiveness of the proposed components. The best results are in bold. + +structure but not the weights. We adopt the similar structure as [29] and use three convolution layers. The kernel size of the convolution layers is set as one and the padding size is zero. ReLU activation function is applied to the outputs of the first two convolution layers and Sigmoid is used for that of the last one. The RA module consists of three FC layers. ReLU and Dropout are applied on the outputs of the first two FC layers. For the segmentation network in the RLA module, we use the same structure as the DeepLab-V2 [2] and predict the segmentation mask from the feature map. + +We train the networks with an SGD optimizer and an initial learning rate of 0.001, which is divided by 10 after every 8 epochs out of the total 12 epochs. For all our experiments, we set $\lambda_{1} = \lambda_{2} = 0.1$ and $\lambda_{3} = 0.01$ . Following [29], the focal loss parameter is set as $\gamma = 5.0$ . + +In all cross-domain experiments, we use the training splits of the source and target datasets for training and evaluate on the test split of the target dataset. During training, only the labels for the source dataset are available. We set the shorter side of the image to 600 pixels, and report mean average precision (MAP) with a threshold of 0.5 to evaluate different methods. We implemented all methods with PyTorch [25]. + +# 5.1. Ablation Study + +To address the domain shift problem, we propose three novel modules on top of the standard object detection model, namely, feature pyramid alignment (FPA) module, Region Alignment (RA) module, and the Rendering Layer Alignment (RLA) module. To evaluate the effectiveness and impact of the three modules, we conduct an ablation study on the adaption from Legal and PubMed. + +RLA. RLA takes the rendering layers available in both source and target domains as additional alignment cues and trains the network with an auxiliary segmentation task. To evaluate its effectiveness, we first attach it to a recent cross-domain object detection model SWDA [29] and evaluate the resulting performance. The results in Table 1 show that the MAP is boosted by 3.2 points with this module added. Furthermore, as Table 2 shows, when used as a component of our proposed method, RLA raises the MAP from 68.6 to 70.7. These consistent performance gains substantiate RLA's effectiveness. + +FPA. FPA performs domain alignment by pushing the feature pyramids of images from different domains closer to + +
Legal → ChnChn → Legal
textlistheadingtablefigureMAPtextlistheadingtablefigureMAP
Oracle90.589.990.588.990.590.184.588.882.478.671.981.3
FRCNN (source-only)73.757.974.866.276.569.860.750.930.747.224.142.7
FPN (source-only)75.067.380.365.185.274.659.054.526.453.224.743.6
SWDA [29]74.967.773.874.086.675.452.251.131.958.129.944.6
SWDA + RLA (Proposed)75.473.279.178.787.778.859.257.033.056.028.946.8
Proposed76.875.579.272.588.278.562.762.335.557.926.949.1
+ +Table 3. Cross-domain detection results between Legal to Chn. The "Oracle" results are obtained by FPN trained with labeled training data of the target domain. The best results are in bold. + +
Chn → PubMedPubMed → Chn
textlistheadingtablefigureMAPtextlistheadingtablefigureMAP
Oracle90.668.390.390.790.786.190.589.990.588.990.590.1
FRCNN (source-only)41.314.345.467.457.445.226.617.719.645.551.932.3
FPN (source-only)47.219.547.164.364.748.638.425.026.745.928.732.9
SWDA [29]56.020.352.281.244.550.953.018.535.064.764.347.1
SWDA + RLA (Proposed)50.624.350.574.659.251.848.925.339.860.074.349.7
Proposed55.828.654.179.652.554.136.744.442.164.379.453.4
+ +Table 4. Cross-domain detection results between PubMed to Chn. + +
Legal → PubMedPubMed → Legal
textlistheadingtablefigureMAPtextlistheadingtablefigureMAP
Oracle90.668.390.390.790.786.184.588.882.478.671.981.5
FRCNN (source-only)61.744.975.272.065.463.837.337.327.129.88.328.0
FPN (source-only)60.951.574.669.667.864.935.341.428.530.53.727.8
SWDA [29]66.023.381.085.171.465.337.336.144.048.510.535.3
SWDA + RLA (Proposed)67.448.682.985.359.368.736.839.043.450.711.936.4
Proposed67.553.682.176.673.970.737.149.642.531.112.034.5
+ +Table 5. Cross-domain detection results between Legal and PubMed. + +gethere. Since each layer of the feature pyramids incorporates both low and high features, FPA thus jointly aligns low- and high-level semantics. Table 2 shows that FPA leads to a gain of 1.6 MAP relative to the FPN baseline. + +RA. RA enhances the alignment of foreground regions by aligning the extracted region proposals, with a focal loss based learning objective to focus more on the hard-to-align ones. Table 2 shows that it raises MAP from 66.5 to 68.6. + +# 5.2. Comparative Results + +We conduct cross-domain evaluation between the three datasets, Chn, Legal and PubMed. The first one is a Chinese document dataset and the latter two are English datasets. We first conduct cross-lingual performance evaluation between Chn and Legal, and between Chn and PubMed. Table 3 and Table 4 shows the experimental results. Since Legal and PubMed belong to different English document categories, there is a domain gap between them. Therefore, we also conduct cross-category detection evaluations between these two datasets. Table 5 shows the results. + +We observe similar behavior across the three tables. The FPN baseline usually outperforms the FRCNN baseline. This is because document objects vary significantly in size, which FPN is more able to deal with. SWDA builds on top + +of FRCNN, leading to consistent performance gains. This shows that some domain adaptation techniques are applicable for various image types. Adding the document-specific alignment module RLA to SWDA results in consistent performance gains for all cases. This substantiates the ability of RLA to mitigate the domain shift problem. Our proposed method builds upon FPN and introduces three novel components. The tables demonstrate that it significantly outperforms the FPN baseline and also SWDA for almost all the cases. In addition, with the RLA module, our method surpasses SWDA for almost all experiments. This suggests that our proposed FPA and RA modules are superior to their counterparts in SWDA. Despite these improvements, the results are still far lower than the oracle setting in which FPN is trained on labeled data from the target domains. This shows that domain shifts are indeed a serious problem for DOD and they have not been fully addressed. + +One may have noticed from Table 4 that there is a huge performance jump for SWDA over the FRCNN baseline when adapting PubMed to Chn: MAP is improved from 32.3 to 47.1. Similarly, in Table 5, SWDA raises MAP over the FRCNN baseline from 28.0 to 35.3 when adapting PubMed to Legal. We believe the reason for such huge gains is that PubMed is comprised of page images of scien + +![](images/fc383f6b3d9b6b5234bfdb77b7d309fa994784f734188fba5a297f5d41190a8b.jpg) +Figure 4. Sample detection results. + +![](images/6dbd55e721b3531bfafc89f1e293d485d91c6fff10a4fa2bdcc90f1ef90768ef.jpg) + +
Kitti → CityscapeCityscape → Kitti
SWDA [29]41.870.6
Proposed42.973.3
+ +Table 6. Cross-domain detection results for natural scene images. + +tific journal articles that share similar formatting templates. So, the diversity of this dataset is limited. A model trained with labeled data of this dataset should be able to effectively handle other data within the dataset, as evidenced by the high oracle results, but it is less likely to generalize to other datasets. This problem is not as severe for the other two datasets, Chn and Legal, because the diversity is carefully considered when synthesizing Chn and selecting data of Legal for annotation. So, the impact of domain adaption is much more significant for PubMed than the other two datasets when they are used as the source domain. + +# 5.3. Further Analysis + +Experiments on natural images. Without the proposed RLA module, which is specially designed for the DOD task, our method (FPN plus the FPA and RA modules) can be applied on natural scene images as well. Following the previous methods [3, 15], we conduct cross-domain "car" detection evaluation on the Cityscape [4] and Kitti [10] datasets. There are 14999 images in the Kitti dataset and we chose 7481 images in the training set for both adaptation and evaluation. The Cityscape dataset has 3475 images and we use 2975 images for adaptation training and the remaining 500 images for evaluation. The results in Table 6 show that our method also outperforms SDWA for the natural scene image cross-domain detection task, especially for adaptation from Cityscape and Kitti, where we achieve $2.7\%$ improvement for the AP of car. This set of experiment further substantiates the efficacy of the proposed adaptation modules. + +Visualization of detection results. Figure 4 visualizes some detection results from Chn and PubMed. We can see that the proposed method in most cases can successfully decompose a complex page into semantically meaningful re + +gions, with high localization precision and confident classification scores for objects of extremely diverse sizes. For example, in the first image, both the large table which covers about two-third of the page and the tiny pagination are perfectly detected. However, the proposed method tends to make mistakes for ambiguous objects whose semantic meanings can be correctly determined only within the context. For example, in the fourth (right-most) image, there is a composite figure comprised of six sub-figures. Each sub-figure alone is a figure instance. But when considering the context, it is wrong to detect them as object instances individually. Similar cases also appear in the third image. + +# 6. Conclusion + +We investigate cross-domain document object detection by proposing a benchmark suite and a novel method. The benchmark suite includes different types of datasets on which cross-domain document object detectors can be trained and evaluated. For each dataset, we provide not only the essential components, page images and bounding boxes annotations, but also auxiliary components, raw PDF files and the PDF rendering layers. The proposed model builds upon the standard object detection model with three novel domain alignment modules, namely, the feature pyramid alignment (FPA) module, the Region Alignment (RA) module, and Rendering Layer Alignment (RLA) module. Experiments on the benchmark suite confirm the effectiveness of the proposed novel components and that the proposed method significantly outperforms the baseline methods. In addition, the proposed method also improves over the state-of-the-art method for cross-domain object detection on natural scene images. + +Acknowledgement: This work was partially done during the internship of the first author at Adobe Research and was partially supported by Adobe Research funding. We thank Richard Cohn and Kana Sethu for coding the tool and instructing how to use it for synthesizing documents. + +# References + +[1] Roldano Cattoni, Tarcisio Coianiz, Stefano Messelodi, and Carla Maria Modena. Geometric layout analysis techniques for document image understanding: a review. *ITC-irst Technical Report*, 9703(09), 1998. +[2] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 40(4):834-848, 2017. +[3] Yuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster r-cnn for object detection in the wild. In CVPR, 2018. +[4] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. +[5] Jing Fang, Xin Tao, Zhi Tang, Ruiheng Qiu, and Ying Liu. Dataset, ground-truth and performance metrics for table detection evaluation. In DAS, 2012. +[6] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In ICML, 2015. +[7] Liangcai Gao, Xiaohan Yi, Zhuoren Jiang, Leipeng Hao, and Zhi Tang. Icdar2017 competition on page object detection. In ICDAR, 2017. +[8] Liangcai Gao, Xiaohan Yi, Yuan Liao, Zhuoren Jiang, Zuoyu Yan, and Zhi Tang. A deep learning-based formula detection method for pdf documents. In ICDAR, 2017. +[9] Utpal Garain. Identification of mathematical expressions in document images. In ICDAR, 2009. +[10] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. The International Journal of Robotics Research, 32(11):1231-1237, 2013. +[11] Azka Gilani, Shah Rukh Qasim, Imran Malik, and Faisal Shafait. Table detection using deep learning. In ICDAR, 2017. +[12] Max Göbel, Tamir Hassan, Ermelinda Oro, and Giorgio Orsi. Icdar 2013 table competition. In ICDAR, 2013. +[13] Dafang He, Scott Cohen, Brian Price, Daniel Kifer, and C Lee Giles. Multi-scale multi-task fcn for semantic page segmentation and table detection. In ICDAR, 2017. +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[15] Zhenwei He and Lei Zhang. Multi-adversarial faster-rcnn for unrestricted object detection. In ICCV, 2019. +[16] Naoto Inoue, Ryosuke Furuta, Toshihiko Yamasaki, and Kiyoharu Aizawa. Cross-domain weakly-supervised object detection through progressive domain adaptation. In CVPR, 2018. +[17] Mehran Khodabandeh, Arash Vahdat, Mani Ranjbar, and William G Macready. A robust learning approach to domain adaptive object detection. In ICCV, 2019. + +[18] Seunghyeon Kim, Jaehoon Choi, Taekyung Kim, and Chang-ick Kim. Self-training and adversarial background regularization for unsupervised domain adaptive one-stage object detection. In ICCV, 2019. +[19] Taekyung Kim, Minki Jeong, Seunghyeon Kim, Seokeon Choi, and Changick Kim. Diversify and match: A domain adaptive representation learning paradigm for object detection. In CVPR, 2019. +[20] Xiao-Hui Li, Fei Yin, and Cheng-Lin Liu. Page object detection from pdf document images by deep structured prediction and supervised clustering. In ICPR, 2018. +[21] Tsung-Yi Lin, Piotr Dólar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In CVPR, 2017. +[22] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólár. Focal loss for dense object detection. In ICCV, 2017. +[23] Xiaoyan Lin, Liangcai Gao, Zhi Tang, Xiaofan Lin, and Xuan Hu. Mathematical formula identification in pdf documents. In ICDAR, 2011. +[24] Ning Liu, Dongxiang Zhang, Xing Xu, Long Guo, Lijiang Chen, Wenju Liu, and Dengfeng Ke. Robust math formula recognition in degraded chinese document images. In IC-DAR, 2017. +[25] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. +[26] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A Efros. Context encoders: Feature learning by inpainting. In CVPR, 2016. +[27] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In NuerIPS, 2015. +[28] Aruni RoyChowdhury, Prithvijit Chakrabarty, Ashish Singh, SouYoung Jin, Huaizu Jiang, Liangliang Cao, and Erik Learned-Miller. Automatic adaptation of object detectors to new domains using self-training. In CVPR, 2019. +[29] Kuniaki Saito, Yoshitaka Ushiku, Tatsuya Harada, and Kate Saenko. Strong-weak distribution alignment for adaptive object detection. In CVPR, 2019. +[30] Sebastian Schreiber, Stefan Agne, Ivo Wolf, Andreas Dengel, and Sheraz Ahmed. Deepdesrt: Deep learning for detection and structure recognition of tables in document images. In ICDAR, 2017. +[31] Peter WJ Staar, Michele Dolfi, Christoph Auer, and Costas Bekas. Corpus conversion service: A machine learning platform to ingest documents at scale. In KDD, 2018. +[32] Dieu Ni Tran, Tuan Anh Tran, Aran Oh, Soo Hyung Kim, and In Seop Na. Table detection from document image using vertical arrangement of text blocks. International Journal of Contents, 11(4):77-85, 2015. +[33] Xiao Yang, Ersin Yumer, Paul Asente, Mike Kraley, Daniel Kifer, and C Lee Giles. Learning to extract semantic structure from documents using multimodal fully convolutional neural networks. In CVPR, 2017. + +[34] Xiaohan Yi, Liangcai Gao, Yuan Liao, Xiaode Zhang, Runtao Liu, and Zhuoren Jiang. Cnn based page object detection in document images. In ICDAR, 2017. +[35] Xu Zhong, Jianbin Tang, and Antonio Jimeno Yepes. Publaynet: largest dataset ever for document layout analysis. arXiv preprint arXiv:1908.07836, 2019. +[36] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. +[37] Xinge Zhu, Jiangmiao Pang, Ceyuan Yang, Jianping Shi, and Dahua Lin. Adapting object detectors via selective cross-domain alignment. In CVPR, 2019. \ No newline at end of file diff --git a/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/images.zip b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3e24d9b366f03da284baeb4eda27296d9f9da48a --- /dev/null +++ b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fde67a580877a54b83f72244e7d1778e64a5ac2612a882987ce4588ff9f0d8e +size 572006 diff --git a/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/layout.json b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..4169668e2651d1589ca6ae8aa687b85525e1abae --- /dev/null +++ b/crossdomaindocumentobjectdetectionbenchmarksuiteandmethod/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95f273a3c8e5ae953e53239187d34254c68b3cc4d1bc05f9a886fd06da1a5336 +size 310813 diff --git a/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/2bf1ad85-2c73-4f47-b31f-87129d0517dc_content_list.json b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/2bf1ad85-2c73-4f47-b31f-87129d0517dc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7315ea5c1e2a100ca0e490ad3d0fc0a58e9c88bc --- /dev/null +++ b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/2bf1ad85-2c73-4f47-b31f-87129d0517dc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea31e10caa74bb89234e1c5abcc5ac7060ad85c9a3e58753715a24db513945b1 +size 72411 diff --git a/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/2bf1ad85-2c73-4f47-b31f-87129d0517dc_model.json b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/2bf1ad85-2c73-4f47-b31f-87129d0517dc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..69243651cd45b94a6f42ebd6b3f619d85279fdec --- /dev/null +++ b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/2bf1ad85-2c73-4f47-b31f-87129d0517dc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef7fd80df699743f2a0e1a3d88d96f3c874a0d03c9ce26ed9b7fcc745d1700b5 +size 89216 diff --git a/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/2bf1ad85-2c73-4f47-b31f-87129d0517dc_origin.pdf b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/2bf1ad85-2c73-4f47-b31f-87129d0517dc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b0ba0d00d1dac24e2fc30b09de23bc3aa6b3305e --- /dev/null +++ b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/2bf1ad85-2c73-4f47-b31f-87129d0517dc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:917aa37bbe37896755a2e347cda8be16acae0805540225b68f6d68626de2d0d8 +size 1609923 diff --git a/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/full.md b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..99f1c312891df7e662e8c6492521f50d6f6cbd97 --- /dev/null +++ b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/full.md @@ -0,0 +1,278 @@ +# Cross-domain Face Presentation Attack Detection via Multi-domain Disentangled Representation Learning + +Guoqing Wang $^{1,2}$ , Hu Han $^{1,3,*}$ , Shiguang Shan $^{1,2,3}$ , Xilin Chen $^{1,2}$ + +1 Key Laboratory of Intelligent Information Processing of Chinese Academy of Sciences (CAS), Institute of Computing Technology, CAS, Beijing 100190, China, + +2 University of Chinese Academy of Sciences, Beijing 100049, China + +3 Peng Cheng Laboratory, Shenzhen, China + +guoqing.wang@vip1.ict.ac.cn, {hanhu, sgshan, xlchen}@ict.ac.cn + +# Abstract + +Face presentation attack detection (PAD) has been an urgent problem to be solved in the face recognition systems. Conventional approaches usually assume the testing and training are within the same domain; as a result, they may not generalize well into unseen scenarios because the representations learned for PAD may overfit to the subjects in the training set. In light of this, we propose an efficient disentangled representation learning for cross-domain face PAD. Our approach consists of disentangled representation learning (DR-Net) and multi-domain learning (MD-Net). DR-Net learns a pair of encoders via generative models that can disentangle PAD informative features from subject discriminative features. The disentangled features from different domains are fed to MD-Net which learns domain-independent features for the final cross-domain face PAD task. Extensive experiments on several public datasets validate the effectiveness of the proposed approach for cross-domain PAD. + +# 1. Introduction + +Face recognition (FR) is being widely used in a variety of applications such as smartphone unlock, access control and pay-with-face. The easiness of obtaining a genuine user's face image brings threat to these FR systems, which can be used to presentation attacks (PAs), e.g., photo, video replay, or 3D facial mask. In addition, advances in deep learning have significantly promoted the development of face synthesis technologies like deep facial manipulation attacks [42], feasible using Variational AutoEncoders (VAEs) [22], or Generative Adversarial Network (GAN) [14]. + +Many approaches have been proposed to tackle various + +![](images/10fd77a3a46c9ff80e490687f23799763db744401c92d783a8adb9749e226f8d.jpg) +Figure 1. 2D visualization of the features learned by ResNet-18 [18] for live vs. spoof classification on CASIA [52]. We observe that the testing face features may not gather together as expected in terms of live and spoof; instead they tend to gather together in terms of individual subjects. This suggests that the features learned for PAD are not disentangled from the features for subject classification very well. We believe this is one of the reasons that leads to poor generalization ability of PAD models under new application scenarios. + +face PAs, which assume that there are inherent disparities between live and spoof faces, such as texture in color space [4, 6], image distortion [48], temporal variation [39] or deep semantic features [50, 36]. Although these methods show promising performance under intra-database testing scenarios, their performance dramatically degrades when used in new application scenario (cross-domain PAD). To improve the robustness of PAD under unseen scenarios, some scenario-invariant auxiliary information (such as face depth and heart rhythm) has been exploited for distinguishing between live and spoof faces [2, 30, 29]. The robustness of + +these methods relies on the accuracy of the estimated auxiliary information to some extent. With the success of transfer learning in many object recognition tasks [10], recent studies for PAD seek to utilize transfer learning to achieve end-to-end cross-domain face PAD model or robust features followed by binary classification models [27, 46, 38]. However, the generalization ability of these methods is still limited when the distributions of data in training and testing domains have big disparities, particularly when the spoof attack types in the testing domain do not appear in the training domain. One important reason is that these methods may not disentangle the domain-independent PAD cues from the domain-dependent cues very well. As shown in Fig. 1, the learned features for face PAD may overfit to subject classification, and thus the live face images (or the spoof face images) of different subjects may not be close to each other in the feature space. In this case, we cannot expect the model learned from a source domain can generalize well to unseen domains. While it could be helpful to improve the cross-domain robustness by collecting a huge face PAD dataset containing various subjects and spoof attack types like the MS-Celeb-1M dataset [16] for FR, it can be very expensive and time-consuming in practice. + +In this paper, we hope on improving PAD generalization ability without collecting a huge face PAD dataset, and propose a disentangled representation learning approach for cross-domain PAD. In particular, the proposed approach consists of a disentangled representation learning module (DR-Net) and a multi-domain learning module (MD-Net). DR-Net leverages generative models to learn a pair of disentangled feature learning encoders for learning subject classification (denoted as ID-GAN), and PAD (denoted as PADGAN) features respectively in each source domain. The discriminators of PAD-GAN are discriminative not only for distinguishing between the generated and real face images, but also distinguishing between live and spoof face images. Similarly, the discriminators of ID-GAN is discriminative for distinguishing between individual subjects. Thus, with DR-Net, we can expect to obtain features that are either related to PAD or subject classification. On the other hand, we also want to utilize the knowledge about different PA types to enhance the generalization capability of the model. To achieve this goal, we propose a multi-domain feature learning module (MD-Net) to learn domain-independent features from the disentangled features by DR-Net. + +The main contributions of this work are as follows: (i) we propose a novel disentangled representation learning for cross-domain PAD, which is able to disentangle features informative for PAD from the features informative for subject classification, allowing more subject-independent PAD feature learning; (ii) we propose an effective multi-domain feature learning to obtain domain-independent PAD features, which enhances the robustness the PAD model; and (iii) our + +approach achieves better performance than the state-of-the-art face PAD methods in cross-domain PAD. + +# 2. Related Work + +Face presentation attack detection. Recent face PAD approaches can be generally grouped into conventional approaches, deep learning approaches and domain generalized approaches. Conventional approaches aim to detect attacks based on texture or temporal cues. An early work on face PAD by Li et al. [28] used Fourier spectra analysis to capture the difference between the live and spoof face images. After that, various hand-crafted features such as LBP [32], LPQ [6], SURF [6], HoG [24], SIFT [37] and IDA [48], have been utilized with traditional classifiers, e.g., SVM [43] and LDA [13], for live vs. spoof face classification. To reduce the influence by illumination variations, some approaches convert face images from RGB color space to other space such as HSV and YCbCr [4, 6], and then extract the above features for PAD. Besides, a number of methods also explored temporal cues of the whole face or individual face components for PAD, such as eye blink [41], mouth movement [23] and head rotation [3]. The conventional approaches are usually computationally efficient and explainable, and work well under intra-database testing scenarios. However, their generalization ability into new application scenarios is still not satisfying [36, 37]. + +To overcome the over-fitting issue, researchers are attempting to utilize deep learning models for face PAD in a general-to-specific model transfer scheme [50, 36] because of the great success of deep learning in many other computer vision tasks. In [50], CNNs were fine-tuned with live and spoof face images for face PAD. Liu et al. [30] introduced depth map and rPPG signal estimation from RGB face videos as auxiliary supervision to assist in PAD. Jourabloo et al. [21] inversely decomposed a spoof face into a live face and a noise of spoof, and then utilized the spoof noise for PAD. Zhang et al. [51] introduced a large-scale multi-modal face anti-spoofing dataset namely CASIA-SURF. Based on CASIA-SURF, several end-to-end approaches [35, 40, 47] were proposed to exploit the complementary information from RGB, depth and IR, and all reported the promising results. While deep learning approaches show strong feature learning ability, they still do not have pleasing poor generalization ability into new scenarios. + +Most recently, deep learning based domain generalization approaches for cross-domain face PAD have been proposed. Li et al. [27] proposed an unsupervised domain adaptation PAD framework to transform the source domain feature space to the unlabeled target domain feature space by minimizing MMD [15]. Wang et al. [46] proposed an end-to-end learning approach to improve cross-domain PAD generalization capability by utilizing prior knowl + +![](images/e4568e536e3cba5e3e83346dbdda81a19dfe0888319fd22586214bb5810838cf.jpg) +Figure 2. The overview of our approach for cross-domain PAD. Our approach consists of a disentangled representation learning module (DR-Net) and a multi-domain feature learning module (MD-Net). With the face images from different domains as inputs, DR-Net can learn a pair of encoders for disentangled features for PAD and subject classification respectively. The disentangled features are fed to MD-Net to learn domain-independent representations for robust cross-domain PAD. + +edge from source domain via adversarial domain adaptation. Shao et. al [38] proposed to learn a generalized feature space via a novel multi-adversarial discriminative deep domain generalization framework under a dual-force triplet-mining constraint. Liu et. al [31] defined the detection of unknown spoof attacks as ZSFA and proposed a novel deep tree network to partition the spoof samples into semantic sub-groups in an unsupervised fashion. While the prior domain generalization approaches can improve the model's generalization capability, the representations learned for PAD may still get over-fitting to specific subjects, shooting environment, camera sensors, etc. In light of this, we propose a disentangled representation learning module and multi-domain feature learning module to obtain more discriminative PAD features. + +Disentangled representation learning. Disentangled representation learning aims to design the appropriate objectives to learn disentangled representations. Recently, more and more methods utilize GAN and VAE to learn disentangled representations because of their success in generated tasks. Yan et. al [49] studied a novel problem of attribute-conditioned image generation and proposed a solution with CVAEs. Chen et.al [8] proposed InfoGAN, an information-theoretic extension to GAN that is able to learn disentangled representations in an unsupervised manner. Tran et. al [44] proposed DR-GAN for pose-invariant face recognition and face synthesis. Hu et. al [20] proposed an approach to learn image representations that consist of disentangled factors of variation without exploiting any manual labeling or data domain knowledge. The most related work to the problem we study in this paper is InfoGAN. However, unlike InfoGAN, which maximizing Mutual Information between generated images and input codes, we provide explicit disentanglement and control under the PAD and ID constraints. + +# 3. Proposed Method + +We aim to build a robust cross-domain face PAD model that can mitigate the impact of the subjects, shooting environment and camera settings from the source domain face images. To achieve this goal, we propose an efficient disentangled representation learning for cross-domain face PAD. As shown in Fig. 2, our approach consists of a disentangled representation learning module (DR-Net) and a multidomain feature learning module (MD-Net). DR-Net leverages generative models (i.e., PAD-GAN and ID-GAN in Fig. 2) to learn a pair of encoders for learning disentangled features for subject classification and PAD respectively in each source domain. Then, the disentangled features from multiple domains are fed to MD-Net to learn domain-independent features for the final cross-domain face PAD. + +# 3.1. Disentangled Representation Learning via DR-Net + +As shown in Fig. 1, it is likely to include the subject's identity information in the features learned by CNNs for simple live vs. spoof classification. The main reason is that features related to different tasks can be easily coupled with each other when there are not auxiliary labels for supervising the network learning. Recently, generative models have drawn increasing attentions for obtaining disentangled representation learning when there are no auxiliary labels to use [8, 12]. The idea is to resemble the real distributions of individual classes by learning a generative model based on the limited data per class. This way, the per class distributions can be modeled in a continuous way instead of defined by a few data points available in the training set. In light of this, we propose a generative DR-Net consisting of PAD-GAN and ID-GAN to learn a pair of disentangled representation encoders for learning subject classification and + +![](images/ac1499471cb6bb8dffc37ee4cb399a43c2150da870515802d7f6e096139e392a.jpg) +Figure 3. The diagrams of (a) PAD-GAN and (b) ID-GAN in DR-Net, which can learn disentangled features for PAD and subject classification, respectively. + +![](images/75811a77b3037c3e0e3e5cd2bc5853af76f4936be4134e94f0378d299dea4c7d.jpg) + +PAD features respectively in each source domain. As shown in Fig. 3, PAD-GAN and ID-GAN have the same structure, which is a variant of the conventional GAN architecture. So, we only use PAD-GAN as an example to provide the details. ID-GAN is the same as PAD-GAN except for the number of categories in the classification layer. The classification in PAD-GAN handles two classes (live and spoof), while the classification in ID-GAN handles as many classes as the number of subjects in the dataset. Let $(X,Y)$ denote the face images and its corresponding labels (live vs. spoof), $z_{c} \in P_{noise}$ denote the input noise vector of PAD-GAN. The generator $G_{PAD}$ of PAD-GAN uses $z_{c}$ to generate face images $X_{\text{fake}} = G_{PAD}(z_{c})$ . The discriminator $D_{PAD}$ not only needs to predict whether its input face image is real or generated, but also needs to distinguish between live and spoof face images. The loss function of $D_{PAD}$ consists of two parts, i.e., GAN Loss + +$$ +\begin{array}{l} \mathcal {L} _ {G A N} \left(G _ {P A D}, D _ {P A D}\right) = \mathbb {E} _ {(x, y) \sim (X, Y)} \left[ \log D _ {P A D} (x) \right] \\ + \mathbb {E} _ {z _ {c} \sim P _ {\text {n o i s e}}} [ \log (1 - D _ {P A D} \left(G _ {P A D} \left(z _ {c}\right)\right)) ], \tag {1} \\ \end{array} +$$ + +and classification loss + +$$ +\begin{array}{l} \mathcal {L} _ {C} \left(G _ {P A D}, D _ {P A D}\right) = \mathbb {E} _ {z _ {c} \sim P _ {\text {n o i s e}}, (x, y) \sim (X, Y)} \tag {2} \\ [ \log (D _ {P A D} (G _ {P A D} (z _ {c}))) ] + [ \log (D _ {P A D} (x)) ] ^ {(2)} \\ \end{array} +$$ + +The overall objective of PAD-GAN can be written as + +$$ +\min _ {G _ {P A D}} \max _ {D _ {P A D}} \mathcal {L} _ {P A D} = \mathcal {L} _ {G A N} + \lambda \mathcal {L} _ {C}. \tag {3} +$$ + +We empirically set $\lambda = 1$ to balance the scales of the GAN loss and classification loss in our experiments. + +With DR-Net, we are able to approximate the real distribution of live vs. spoof face images and the distribution of + +individual subjects' face images via the encoders in PAD-GAN and ID-GAN, respectively. As a result, the encoders of PAD-GAN and ID-GAN learned in an adversarial way are expected to obtain features that are purely related to PAD and subject classification, respectively. In other words, each encoder can obtain disentangled representation for a specific task. The traditional binary classification methods only utilize some discrete samples to find the boundary in high dimensional feature space. In this way, we may not obtain good disentangled representations. However, we can utilize the generative model to represent the samples from different categories with a continuous distribution. Our experiments in Section 4.4 validate these assumptions. + +# 3.2. Multi-domain Learning via MD-Net + +Given DR-Net, we can obtain a pair of encoders for PAD and subject classification within each domain. Without loss of generality, we assume there are two source domains, and a simple approach in leveraging the knowledge of the two domains to perform cross-domain PAD is to concatenate the features extracted by the PAD encoder of each domain. However, such an approach may not make full use of the disentangled ID features extracted by the ID encoders, which are also helpful for obtaining domain-independent representations for cross-domain PAD. In light of this, we propose a multi-domain feature learning (MD-Net) to fully exploit the disentangled ID and PAD feature representations from different domains. Fig. 4 shows the training and inference processes of our MD-Net when learning from two source domains and testing on an unseen domain. + +Let $(X_A, Y_A)$ and $(X_B, Y_B)$ denote the face images and the corresponding labels from two domains (A and B), respectively. $E_{ID}^A$ and $E_{PAD}^A$ denote the ID and PAD encoders learned from $(X_A, Y_A)$ . Similarly, $E_{ID}^B$ and $E_{PAD}^B$ denote the ID and PAD encoders learned from $(X_B, Y_B)$ . Then, we can get the PAD features + +$$ +\begin{array}{l} \begin{array}{l} P _ {A} ^ {B} = \mathbb {E} _ {(x, y) \sim (X _ {A}, Y _ {A})} [ E _ {P A D} ^ {B} (x) ], \\ - 4 = - 4. \end{array} \tag {4} \\ P _ {B} ^ {A} = \mathbb {E} _ {(x, y) \sim (X _ {B}, Y _ {B})} [ E _ {P A D} ^ {A} (x) ], \\ \end{array} +$$ + +where $P_A^B$ denotes the PAD features extracted by $E_{PAD}^B$ for the face images in domain A. Similarly, $P_B^A$ denotes the PAD features extracted by $E_{PAD}^A$ for the face images in domain B. Similarly, we can get the disentangled ID feature representations extracted by $E_{ID}^A$ and $E_{ID}^B$ , + +$$ +\begin{array}{l} I _ {A} ^ {A} = \mathbb {E} _ {(x, y) \sim (X _ {A}, Y _ {A})} [ E _ {I D} ^ {A} (x) ], \tag {5} \\ I _ {B} ^ {B} = \mathbb {E} _ {(x, y) \sim (X _ {B}, Y _ {B})} [ E _ {I D} ^ {B} (x) ]. \\ \end{array} +$$ + +We also use the ID features in our MD-Net to enhance the generalization ability of the features for cross-domain PAD. Specifically, as shown in Fig. 4, we leverage the information included in $P_A^B$ , $P_B^A$ , $I_A^A$ , and $I_B^B$ in a cross concatenation. + +![](images/aec7f9dcebcc5c69f1640be866031715543eb9d5db02a11fdf38751f3b624edd.jpg) +Figure 4. The overview of MD-Net for domain-independent feature learning. During network training, the two encoders $(E_{ID}^{A}, E_{PAD}^{A})$ from domain A and two encoders $(E_{ID}^{B}, E_{PAD}^{B})$ from domain B are used to extract disentangled features, i.e., $I_A^A$ , $P_B^A$ , $I_B^B$ , $P_A^B$ . These disentangled features are further enhanced in a cross-verified manner to build concatenated features $U_A$ and $U_B$ , which are used for both subject classification and PAD. The finally learned encoders $(E_{PAD}^{A}, E_{PAD}^{B})$ are used to obtain two PAD features per face image, which are concatenated and used to learn the final live vs. spoof classification model to be used during network inference. Dashed lines indicate fixed network parameters. + +tion manner, and obtain the following features, i.e., + +$$ +U _ {A} = P _ {A} ^ {B} \oplus I _ {A} ^ {A}, \tag {6} +$$ + +$$ +U _ {B} = P _ {B} ^ {A} \oplus I _ {B} ^ {B}. +$$ + +Under the assumptions that the encoders $E_{PAD}$ and $E_{ID}$ can ideally extract PAD and ID features, we expect that the multi-domain feature $U_{A}$ should retain the identity information from the face image in domain A, and retain the live or spoof information from the face image in domain B. Similarly, the multi-domain feature $U_{B}$ should retain the identity information from the face image in domain B, and retain the live or spoof information from the face image in domain A. These properties can be used to enhance the learning of $E_{PAD}$ . For the property of retaining the live or spoof information, we introduce a live vs. spoof classification branch using classifiers $F_{A}$ and $F_{B}$ with cross-entropy loss + +$$ +\begin{array}{l} \mathcal {L} _ {C E} \left(E _ {P A D} ^ {B}, F _ {A}\right) = \mathbb {E} _ {(x, y) \sim (X _ {A}, Y _ {A})} \\ [ - y \log (F _ {A} (U _ {A})) - (1 - y) \log (1 - \log (F _ {A} (U _ {A}))) ], \\ \end{array} +$$ + +$$ +\begin{array}{l} \mathcal {L} _ {C E} \left(E _ {P A D} ^ {A}, F _ {B}\right) = \mathbb {E} _ {(x, y) \sim \left(X _ {B}, Y _ {B}\right)} \\ [ - y \log (F _ {B} (U _ {B})) - (1 - y) \log (1 - \log (F _ {B} (U _ {B}))) ]. \tag {7} \\ \end{array} +$$ + +For the property of retaining identity information, we introduce an image reconstruction branch using decoders $D_{REC}^{A}$ and $D_{REC}^{B}$ with $L_{1}$ loss + +$$ +\begin{array}{l} \mathcal {L} _ {1} \left(E _ {P A D} ^ {B}, D _ {R E C} ^ {A}\right) = \mathbb {E} _ {x _ {A} \sim X _ {A}} \left[ \left\| x _ {A} - D _ {R E C} ^ {A} \left(U _ {A}\right) \right\| _ {1} \right], \\ \mathcal {L} _ {1} \left(E _ {P A D} ^ {A}, D _ {R E C} ^ {B}\right) = \mathbb {E} _ {x _ {B} \sim X _ {B}} \left[ \left\| x _ {B} - D _ {R E C} ^ {B} \left(U _ {B}\right) \right\| _ {1} \right]. \tag {8} \\ \end{array} +$$ + +After the cross-verified learning of MD-Net, the encoders $E_{PAD}$ from DR-Net can be expected to have the ability to generate more general features that are preferred for cross-domain PAD. All the above optimizations in MD-Net are performed in a commonly used multi-task learning manner [17]. + +Finally, for all the face images from domains A and B, we use the learned PAD encoders $E_{PAD}^{A}$ and $E_{PAD}^{B}$ to extract two PAD features per face image, which are then concatenated into one feature and used for learning a live vs. spoof classifier $F_{MD}$ . Similarly, during inference, given a face image from an unseen domain $X_{U}$ , we use $E_{PAD}^{A}$ and $E_{PAD}^{B}$ to extract two PAD features, i.e., $P_{U}^{A}$ and $P_{U}^{B}$ , and use their concatenation to perform live vs. spoof classification using $F_{MD}$ . + +# 4. Experimental Results + +# 4.1. Databases and Protocols + +We provide evaluations on four widely used databases for cross-domain PAD including Idiap REPLAY-ATTACK [9] (Idiap), CASIA Face AntiSpoofing [52] (CASIA), MSU-MFSD [48] (MSU) and OULU-NPU [7] (OULU). Table 1 provides a summary of the four datasets in terms of the PA types, display devices, and the number of subjects in the training and testing sets. + +We regard one dataset as one domain in our experiment. Given the four datasets (Idiap, CASIA, MSU, OULU), we can define three types of protocols to validate the effectiveness of our approach. In protocol I, we train the model + +
DatasetPA typesNo. of Subj.Display devices
traintest
CASIA [52] (abbr.: C)Printed photo Cut photo Replayed video2030iPad
Idiap [9] (abbr.: I)Printed photo Display photo Replayed video3020iPhone 3GS ipad
MSU [48] (abbr.:M)Printed photo Replayed video1817iPad Air iphone 5S
OULU [7] (abbr.:O)Printed photo Display photo Replayed video3520Dell 1905FP Macbook Retina
+ +Table 1. A summary of the PAD databases used in our experiments. + +using all the images from three datasets, and test the model on the fourth dataset (denoted as $[\mathrm{A},\mathrm{B},\mathrm{C}]\rightarrow \mathrm{D})$ . Then, we have four tests in total for protocol I: [O, C, I] $\rightarrow \mathbf{M}$ , [O, M, I] $\rightarrow \mathbf{C}$ , [O, C, M] $\rightarrow \mathbf{I}$ , [I, C, M] $\rightarrow \mathbf{O}$ . In protocol II, we train the model using all the images from two datasets, and test the model on a different dataset (denoted as $[\mathrm{A},\mathrm{B}]\rightarrow \mathrm{C})$ So, there are 12 tests in total for protocol II, e.g., [M, I] $\rightarrow \mathbf{C}$ $[\mathrm{M},\mathrm{I}]\rightarrow \mathrm{O}$ , [M, C] $\rightarrow \mathbf{I}$ and [M, C] $\rightarrow \mathbf{O}$ , etc. In protocol III, we train the model using only the images from one dataset, and test the model on a different dataset (denoted as A-B). Then, there are also 12 tests in total for protocol III, e.g., I $\rightarrow \mathbf{C}$ I $\rightarrow \mathbf{M}$ C $\rightarrow \mathbf{I}$ and C $\rightarrow \mathbf{M}$ , etc. + +# 4.2. Baselines and Evaluation Metric + +We compare our approach with several state-of-the-art methods that can work for cross-domain PAD, e.g., Auxiliary-supervision (Aux) [30] using CNN and RNN [19] to jointly estimate the face depth and rPPG signal from face video, MMD-AAE [26] learning a feature representation by jointly optimization a multi-domain autoencoder regularized by the MMD [15] distance, a discriminator and a classifier in an adversarial training manner, and MADDG [38] learning a generalized feature space by training one feature generator to compete with multiple domain discriminators simultaneously. + +We also use a number of conventional PAD methods as baselines, such as Multi-Scale LBP (MS_LBP) [32], Binary CNN (CNN)[50], Image Distortion Analysis (IDA) [48], Color Texture (CT) [5] and LBPTOP [11]. + +We follow the state-of-the-art methods for cross-domain face PAD [27, 25, 46] and report Half Total Error Rate (HTER) [1] (the average of false acceptance rate and false rejection rate) for cross-domain testing. We also report Area Under Curve (AUC) in order to compare with baseline methods such as [38]. + +# 4.3. Implementation Details + +Network Structure. The PAD-GAN and ID-GAN in DR-Net share the same structure. To be specific, the gener + +ators have one FC layer and seven transposed convolution layers to generate fake images of $256 \times 256 \times 3$ from the 512-D noise vectors. There are four residual blocks in the discriminators and each block has four convolution layers, which have the same settings as the convolution part of the ResNet-18 [18]. The discriminators learned from DR-Net are then used as the disentangled feature encoders to extract the features used by MD-Net. The decoders in MD-Net also have seven transposed convolution layers to generate the reconstructed images of $256 \times 256 \times 3$ from the 2048-D multidomain features. We use a kernel size of 3 for all transposed convolution layers and use ReLU [33] for activation. + +Training Details. We use an open source SeetaFace algorithm to do face detection and landmark localization. All the detected faces are then normalized to $256 \times 256$ based on five facial keypoints (two eye centers, nose, and two mouth corners). We also use an open source imgaug library to perform data augmentation, i.e., random flipping, rotation, resizing, cropping and color distortion. The proposed approach is trained end-to-end and divided into two stages to make the training process stable. At stage-1, we use the face images from different domains to train DR-Net with the joint of GAN loss and classification loss. We choose Adam with the fixed learning rate of $2e^{-3}$ , and a batch size of 128 to train the generators and discriminators. At stage-2, we use the discriminators learned from DR-Net as the disentangled feature encoders to learn MD-Net. We also choose Adam as the optimizers of the encoders and decoders with initial learning rates of $1e^{-5}$ and $1e^{-4}$ . We train 300 and 100 epochs for the two stages, respectively. + +# 4.4. Results + +Protocol I. The cross-domain PAD performance by the proposed approach and the state-of-the-art methods under protocol I are shown in Table 2. We can observe that conventional PAD methods usually perform worse than the domain generalized methods like Auxiliary-supervision [30], MMD-AAE [26], MADDG [38]. The possible reason why conventional PAD methods do not work well is that the distributions of data in training and testing domains have big disparities, particularly when the spoof attack types, illumination or display devices in the testing domain do not appear in the training domain. Auxiliary supervision like using rPPG signal [34] in a multi-task way [45] was introduced in [30], and reported better performance than simply using CNN for binary classification [50]. This is understandable if we look at the feature visualization in Fig. 1. MADDG [38] and our approach perform better than Auxiliary-supervision [30] which suggests that deep domain generalization is useful for cross-domain PAD. However, our approach performs better than MADDG [38] and MMD-AAE [26] because of + +
Method\( [O, C, I] \rightarrow M \)\( [O, M, I] \rightarrow C \)\( [O, C, M] \rightarrow I \)\( [I, C, M] \rightarrow O \)
HTER(%)AUC(%)HTER(%)AUC(%)HTER(%)AUC(%)HTER(%)AUC(%)
MS_LBP [32]29.7678.5054.2844.9850.3051.6450.2949.31
CNN [50]29.2582.8734.8871.9534.4765.8829.6177.54
IDA [48]66.6727.8655.1739.0528.3578.2554.2044.59
CT [5]28.0978.4730.5876.8940.4062.7863.5932.71
LBPTOP [11]36.9070.8042.6061.0549.4549.5453.1544.09
Aux(Depth only) [30]22.7285.8833.5273.1529.1471.6930.1766.61
Aux(All) [30]--28.4-27.6---
MMD-AAE [26]27.0883.1944.5958.2931.5875.1840.9863.08
MADDG [38]17.6988.0624.584.5122.1984.9927.9880.02
Proposed approach17.0290.1019.6887.4320.8786.7225.0281.47
+ +Table 2. Cross-domain PAD performance of the proposed approach and the baseline methods under protocol I. + +
Method[M, I]→C[M, I]→O
HTER(%)AUC(%)HTER(%)AUC(%)
MS_LBP [32]51.1652.0943.6358.07
IDA [48]45.1658.8054.5242.17
CT [5]55.1746.8953.3145.16
LBPTOP [11]45.2754.8847.2650.21
MADDG [38]41.0264.3339.3565.10
Proposed approach31.6775.2334.0272.65
+ +Table 3. Cross-domain PAD performance of the proposed approach and the baseline methods under protocol II. + +multi-domain disentangled representation learning. + +Protocol II. The part of cross-domain PAD performance of the proposed approach and baseline methods under protocol II are shown in Table 3. We notice that our approach also shows the promising results compared to the conventional approaches and MADDG [38]. This suggests that our approach is more able to exploit domain-independent features for cross-domain PAD than MADDG [38]. The possible reason is that our approach utilizes the generative model to disentangle the identity information from the face images. This way may be better than the dual-force triplet-mining constraint proposed in [38] to eliminate identity information. By comparing the cases when CASIA and OULU are the testing sets in Table 2 and Table 3, we get the conclusion that more source domains are available, and thus the advantage of domain generalization can be better exploited by our approach. + +Protocol III. The cross-domain PAD performance by the proposed approach and baseline domain adaptation methods under protocol III are shown in Table 4. We can observe that PAD-GAN has a comparable performance with the domain adaptation methods and a better performance than simply using CNN for binary classification [50]. This further demonstrates that disentangled representation learning is more potential than pure representation learning when the images are coupled with diverse information. However, the domain adaptation methods perform better than PAD-GAN in some cases, especially using CASIA as a training or testing set. The possible reason is that CASIA has cut photos which are not appeared in other datasets. The do + +main adaptation methods can alleviate this issue by learning a common feature space shared by both the source and target domains. + +Visualization and Analysis. We also visualize the generated fake face images by PAD-GAN and ID-GAN in DR-Net. As shown in Fig. 5, we notice that it is hard to tell the identity of the fake face images generated by PAD-GAN (Fig. 3 (a)), and we can only see a rough face shape. By contrast, the fake face images generated by ID-GAN can better keep the identity information than PAD-GAN. This demonstrates the usefulness of DR-Net, which can disentangle the ID and PAD features well from the face images. This again validates that PAD-GAN and ID-GAN in our DR-Net are effective in learning disentangled features for live vs. spoof classification and subject classification, respectively. Such a characteristic is very important for improving cross-domain PAD robustness. Fig. 6 shows some examples of incorrect PAD results by the proposed approach on four datasets. We notice that most errors are caused by the challenging appearance variances due to oversaturated or under-exposure illumination, color distortions, or image blurriness that diminishes the differences between live and spoof face images. + +# 4.5. Ablation Study + +Effectiveness of DR-Net and MD-Net. We study the influences of DR-Net and MD-Net by gradually dropping them from the proposed approach, and denote the corresponding models as 'Proposed w/o DR', 'Proposed w/o MD' and 'Proposed w/o DR & MD'. The results for cross-domain PAD are given in Table 5. We can consider 'CNN' in Table 2 is the method without disentangling identity information, while 'w/o MD' and 'full method' in Table 5 are methods with partial and complete identity information disentanglement, respectively. We can see identity information disentanglement is useful for improving generalization ability. Furthermore, we can see dropping either component can lead to performance drop. This suggests that both components are useful in the proposed face PAD approach. + +Effectiveness of $L_{REC}$ and $L_{CE}$ in MD-Net. We also + +
MethodC → IC → MI → CI → MM → CM → IO → IO → MO → CI → OM → OC → O
CNN [50]45.825.644.448.650.149.947.430.241.245.431.436.4
SA§ [27]39.214.326.333.210.133.3------
KSA§ [27]39.315.112.333.39.134.9------
ADA [46]17.59.341.630.517.75.126.831.519.839.631.229.1
Proposed (PAD-GAN)26.120.239.223.234.38.727.622.021.833.631.724.7
+ +Table 4. HTER in (%) of cross-domain PAD by the proposed approach and baseline domain adaptation approaches under protocol III. + +
Method\( [O, C, I] \rightarrow M \)\( [O, M, I] \rightarrow C \)\( [O, C, M] \rightarrow I \)\( [I, C, M] \rightarrow O \)
HTER(%)AUC(%)HTER(%)AUC(%)HTER(%)AUC(%)HTER(%)AUC(%)
Proposed w/o DR&MD30.2578.4333.9772.3235.2165.8828.7474.27
Proposed w/o DR26.4384.5231.4377.6229.5672.3827.2374.67
Proposed w/o MD18.0787.2624.8585.3422.4485.9626.7876.82
Proposed w/o \( L_{CE} \)18.0787.8424.2785.6422.2186.2326.7776.23
Proposed w/o \( L_{REC} \)18.1488.4121.0386.3021.4786.2626.2178.45
Proposed (full method)17.0290.1019.6887.4320.8786.7225.0281.47
+ +Table 5. Ablation study of the proposed approach in terms of DR-Net, MD-Net, ${L}_{CE}$ and ${L}_{REC}$ losses. + +![](images/a26decb96b435374459a9f785022c0b66d7be89ee6bacd75441848d7e65153c2.jpg) +Figure 5. Examples of generated results by the proposed DR-Net on (a) Idiap, (b) CASIA, (c) MSU and (d) OULU. The first two columns list the results generated by PAD-GAN and ID-GAN. The third column lists the results of the ground-truth. + +conduct the experiments by gradually removing $L_{CE}$ and $L_{REC}$ in MD-Net to validate their usefulness. We denote the corresponding model as 'Proposed w/o $L_{CE}$ ' and 'Proposed w/o $L_{REC}$ '. The results for cross-domain PAD are given in Table 5. We can see that removing either loss can lead to performance drop. However, $L_{CE}$ has a greater influence to the cross-domain PAD performance than $L_{REC}$ . + +# 5. Conclusions + +Cross-domain face presentation attack detection remains a challenging problem due to diverse presentation attack types and environmental factors. We propose an effective + +![](images/3028b7f1f191b50a743fca8681e2833b3657c336192d2818850f54a51ba0a745.jpg) +Figure 6. Examples of incorrect PAD results by the proposed approach on Idiap, CASIA, MSU and OULU. The label "S, G" (or "G, S") denotes a spoof (or live) face image is incorrectly classified as live (or spoof) face image. + +disentangled representation learning for cross-domain presentation attack detection, which consists of disentangled representation learning (DR-Net) and multi-domain feature learning (MD-Net). DR-Net leverages generative model to obtain better modeling of the live and spoof class distributions, allowing effective learning of disentangled features for PAD. MD-Net further learns domain-independent feature representation from the disentangled features for the final cross-domain face PAD task. The proposed approach outperforms the state-of-the-art methods on several public datasets. + +# 6. Acknowledgement + +This research was supported in part by the National Key R&D Program of China (grant 2018AAA0102501), Natural Science Foundation of China (grants 61672496 and 61702481), and Youth Innovation Promotion Association CAS (grant 2018135). + +# References + +[1] A. Anjos and S. Marcel. Counter-measures to photo attacks in face recognition: a public database and a baseline. In Proc. IJCB, pages 1-7, 2011. +[2] Y. Atoum, Y. Liu, A. Jourabloo, and X. Liu. Face anti-spoofing using patch and depth-based CNNs. In Proc. IJCB, pages 319-328, 2017. +[3] W. Bao, H. Li, N. Li, and W. Jiang. A liveness detection method for face recognition based on optical flow field. In Proc. IASP, pages 233-236, 2009. +[4] Z. Boulkenafet, J. Komulainen, and A. Hadid. Face anti-spoofing based on color texture analysis. In Proc. ICIP, pages 2636-2640, 2015. +[5] Z. Boulkenafet, J. Komulainen, and A. Hadid. Face spoofing detection using colour texture analysis. IEEE Trans. Inf. Forensics Security, 11(8):1818-1830, 2016. +[6] Z. Boulkenafet, J. Komulainen, and A. Hadid. Face anti-spoofing using speeded-up robust features and fisher vector encoding. IEEE Signal Proc. Let., 24(2):141-145, 2017. +[7] Z. Boulkenafet, J. Komulainen, L. Li, X. Feng, and A. Hadid. OULU-NPU: A mobile face presentation attack database with real-world variations. In Proc. FG, pages 612-618, 2017. +[8] X. Chen, Y. Duan, R. Houthooft, J. Schulman, I. Sutskever, and P. Abbeel. Infogan: Interpretable representation learning by information maximizing generative adversarial nets. In Proc. NIPS, pages 2172-2180, 2016. +[9] I. Chingovska, A. Anjos, and S. Marcel. On the effectiveness of local binary patterns in face anti-spoofing. In Proc. BIOSIG, 2012. +[10] G. Csurka. Domain adaptation for visual applications: A comprehensive survey. arXiv preprint, arXiv:1702.05374, 2017. +[11] T. de Freitas Pereira, J. Komulainen, A. Anjos, J. M. De Martino, A. Hadid, M. Pietikainen, and S. Marcel. Face liveness detection using dynamic texture. EURASIP Journal on Image and Video Processing, 2014(1):1-15, 2014. +[12] E. L. Denton et al. Unsupervised learning of disentangled representations from video. In Proc. NIPS, pages 4414-4423, 2017. +[13] R. O. Duda, P. E. Hart, and D. G. Stork. Pattern classification. John Wiley & Sons, 2012. +[14] 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, pages 2672–2680, 2014. +[15] A. Gretton, K. M. Borgwardt, M. J. Rasch, B. Scholkopf, and A. Smola. A kernel two-sample test. J. Mach. Learn. Res., 13:723-773, 2012. +[16] Y. Guo, L. Zhang, Y. Hu, X. He, and J. Gao. Ms-celeb-1m: A dataset and benchmark for large-scale face recognition. In Proc. ECCV, pages 87–102, 2016. +[17] H. Han, J. Li, A. K. Jain, S. Shan, and X. Chen. Tattoo image search at scale: Joint detection and compact representation learning. IEEE Trans. Pattern Anal. Mach. Intell, 41(10):2333-2348, Oct. 2019. + +[18] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proc. CVPR, pages 770-778, 2016. +[19] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Computation, 9(8):1735-1780, 1997. +[20] Q. Hu, A. Szabó, T. Portenier, P. Favaro, and M. Zwicker. Disentangling factors of variation by mixing them. In Proc. CVPR, pages 3399-3407, 2018. +[21] A. Jourabloo, Y. Liu, and X. Liu. Face de-spoofing: Anti-spoofing via noise modeling. In Proc. ECCV, pages 290-306, 2018. +[22] D. P. Kingma and M. Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. +[23] K. Kollreider, H. Fronthaler, M. Faraj, and J. Bigun. Realtime face detection and motion analysis with application in "liveness" assessment. IEEE Trans. Inf. Forensics Security, 2(3):548-558, 2007. +[24] J. Komulainen, A. Hadid, and M. Pietikainen. Context based face anti-spoofing. In Proc. BTAS, pages 1-8, 2013. +[25] H. Li, P. He, S. Wang, A. Rocha, X. Jiang, and A. C. Kot. Learning generalized deep feature representation for face anti-spoofing. IEEE Trans. Inf. Forensics Security, 13(10):2639-2652, 2018. +[26] H. Li, S. Jialin Pan, S. Wang, and A. C. Kot. Domain generalization with adversarial feature learning. In Proc. CVPR, pages 5400-5409, 2018. +[27] H. Li, W. Li, H. Cao, S. Wang, F. Huang, and A. C. Kot. Unsupervised domain adaptation for face anti-spoofing. IEEE Trans. Inf. Forensics Security, 13(7):1794-1809, 2018. +[28] J. Li, Y. Wang, T. Tan, and A. K. Jain. Live face detection based on the analysis of fourier spectra. In Proc. SPIE, volume 5404, pages 296-304, 2004. +[29] S. Liu, X. Lan, and P. C. Yuen. Remote photoplethysmography correspondence feature for 3d mask face presentation attack detection. In Proc. ECCV, pages 558-573, 2018. +[30] Y. Liu, A. Jourabloo, and X. Liu. Learning deep models for face anti-spoofing: Binary or auxiliary supervision. In Proc. CVPR, pages 389-398, 2018. +[31] Y. Liu, J. Stehouwer, A. Jourabloo, and X. Liu. Deep tree learning for zero-shot face anti-spoofing. In Proc. CVPR, pages 4680-4689, 2019. +[32] J. Määtä, A. Hadid, and M. Pietikäinen. Face spoofing detection from single images using micro-texture analysis. In Proc. IJCB, pages 1-7, 2011. +[33] V. Nair and G. Hinton. Rectified linear units improve restricted boltzmann machines. In Proc. ICML, pages 807-814, 2010. +[34] X. Niu, H. Han, S. Shan, and X. Chen. Synrhythm: Learning a deep heart rate estimator from general to specific. In Proc. ICPR, pages 3580-3585, 2018. +[35] A. Parkin and O. Grinchuk. Recognizing multi-modal face spoofing with face recognition networks. In Proc. CVPRW, pages 1-8, 2019. +[36] K. Patel, H. Han, and A. K. Jain. Cross-database face anti-spoofing with robust feature representation. In Proc. CCBR, pages 611-619, 2016. +[37] K. Patel, H. Han, and A. K. Jain. Secure face unlock: Spoof detection on smartphones. IEEE Trans. Inf. Forensics Security, 11(10):2268-2283, 2016. + +[38] R. Shao, X. Lan, J. Li, and P. C. Yuen. Multi-adversarial discriminative deep domain generalization for face presentation attack detection. In Proc. CVPR, pages 10023-10031, 2019. +[39] R. Shao, X. Lan, and P. C. Yuen. Deep convolutional dynamic texture learning with adaptive channel-discriminability for 3d mask face anti-spoofing. In Proc. IJCB, pages 748-755, 2017. +[40] T. Shen, Y. Huang, and Z. Tong. Facebagnet: Bag-of-local features model for multi-modal face anti-spoofing. In Proc. CVPRW, pages 1-8, 2019. +[41] L. Sun, G. Pan, Z. Wu, and S. Lao. Blinking-based live face detection using conditional random fields. In Proc. ICB, pages 252-260, 2007. +[42] S. Suwajanakorn, S. Seitz, and I. Kemelmacher-Shlizerman. Synthesizing obama: learning lip sync from audio. ACM Trans. Graph., 36(4):95, 2017. +[43] J. A. Suykens and J. Vandewalle. Least squares support vector machine classifiers. Neural Proc. Lett., 9(3):293-300, 1999. +[44] L. Tran, X. Yin, and X. Liu. Disentangled representation learning gan for pose-invariant face recognition. In Proc. CVPR, pages 1415-1424, 2017. +[45] F. Wang, H. Han, S. Shan, and X. Chen. Deep multi-task learning for joint prediction of heterogeneous face attributes. In Proc. FG, pages 173-179, 2017. +[46] G. Wang, H. Han, S. Shan, and X. Chen. Improving cross-database face presentation attack detection via adversarial domain adaptation. In Proc. ICB, pages 1-8, 2019. +[47] G. Wang, C. Lan, H. Han, S. Shan, and X. Chen. Multimodal face presentation attack detection via spatial and channel attentions. In Proc. CVPRW, pages 1-8, 2019. +[48] D. Wen, H. Han, and A. K. Jain. Face spoof detection with image distortion analysis. IEEE Trans. Inf. Forensics Security, 10(4):746-761, 2015. +[49] X. Yan, J. Yang, K. Sohn, and H. Lee. Attribute2image: Conditional image generation from visual attributes. In Proc. ECCV, pages 776-791, 2016. +[50] J. Yang, Z. Lei, and S. Z. Li. Learn convolutional neural network for face anti-spoofing. arXiv preprint, arXiv:1408.5601, 2014. +[51] S. Zhang, X. Wang, A. Liu, C. Zhao, J. Wan, S. Escalera, H. Shi, Z. Wang, and S. Z. Li. A dataset and benchmark for large-scale multi-modal face anti-spoofing. In Proc. CVPR, pages 919-928, 2019. +[52] Z. Zhang, J. Yan, S. Liu, Z. Lei, D. Yi, and S. Z. Li. A face antispoofing database with diverse attacks. In Proc. ICB, pages 26-31, 2012. \ No newline at end of file diff --git a/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/images.zip b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..6fb65f40a32cea36386083e68267c80593024ed8 --- /dev/null +++ b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c825b4a1ceecc1fd5f42d4246a6b0561414451c214943aad9914246e9d6323f +size 597800 diff --git a/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/layout.json b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7edec5ce4c56de299c6171376fa6c27b3bef1322 --- /dev/null +++ b/crossdomainfacepresentationattackdetectionviamultidomaindisentangledrepresentationlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed11741609977457fb628dca419e5ccf4fe6c309e43fb156744e8abbdadbc714 +size 350827 diff --git a/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/47913f30-be60-47b9-b251-1b47683fc736_content_list.json b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/47913f30-be60-47b9-b251-1b47683fc736_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..efeae5c47b2e3db0bebd3df2398c96d3c575dc2b --- /dev/null +++ b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/47913f30-be60-47b9-b251-1b47683fc736_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a7a44892258a839a37aad6a94714e8f14c91e0497eb3abbccce26de0c915725 +size 81325 diff --git a/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/47913f30-be60-47b9-b251-1b47683fc736_model.json b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/47913f30-be60-47b9-b251-1b47683fc736_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1a8208d5321ac965e0aad06478df49a9e5fa95cf --- /dev/null +++ b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/47913f30-be60-47b9-b251-1b47683fc736_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:44a787fb05a89191de006e67974600a3917e61ad8b130bbf99ce60cd84c1b129 +size 104906 diff --git a/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/47913f30-be60-47b9-b251-1b47683fc736_origin.pdf b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/47913f30-be60-47b9-b251-1b47683fc736_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0ceb8f837a49c263017007a28af294c20c9dc2c6 --- /dev/null +++ b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/47913f30-be60-47b9-b251-1b47683fc736_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02ee4037c7145efbd0dccef3504c815706edde08beb9b1f826e95737b75cc252 +size 4323941 diff --git a/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/full.md b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c0b0f96774c2df6602cedd70e393ae58e0f1f1c3 --- /dev/null +++ b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/full.md @@ -0,0 +1,370 @@ +# Cross-domain Object Detection through Coarse-to-Fine Feature Adaptation + +Yangtao Zheng $^{1,2,3}$ + +Di Huang $^{1,2,3*}$ + +Songtao Liu $^{1,2,3}$ + +Yunhong Wang $^{1,3}$ + +$^{1}$ Beijing Advanced Innovation Center for Big Data and Brain Computing, Beihang University $^{2}$ State Key Laboratory of Software Development Environment, Beihang University $^{3}$ School of Computer Science and Engineering, Beihang University, Beijing 100191, China + +{ytzheng, dhuang, liusongtao, yhwang}@buaa.edu.cn + +# Abstract + +Recent years have witnessed great progress in deep learning based object detection. However, due to the domain shift problem, applying off-the-shelf detectors to an unseen domain leads to significant performance drop. To address such an issue, this paper proposes a novel coarse-to-fine feature adaptation approach to cross-domain object detection. At the coarse-grained stage, different from the rough image-level or instance-level feature alignment used in the literature, foreground regions are extracted by adopting the attention mechanism, and aligned according to their marginal distributions via multi-layer adversarial learning in the common feature space. At the fine-grained stage, we conduct conditional distribution alignment of foregrounds by minimizing the distance of global prototypes with the same category but from different domains. Thanks to this coarse-to-fine feature adaptation, domain knowledge in foreground regions can be effectively transferred. Extensive experiments are carried out in various cross-domain detection scenarios. The results are state-of-the-art, which demonstrate the broad applicability and effectiveness of the proposed approach. + +# 1. Introduction + +In the past few years, Convolutional Neural Networks (CNN) based methods have significantly improved the accuracies of plenty of computer vision tasks [21, 38, 49]. These remarkable gains often rely on large-scale benchmarks, such as ImageNet [11] and MS COCO [35]. Due to a phenomenon known as domain shift or dataset bias [59], current CNN models suffer from performance degradation when they are directly applied to novel scenes. In practice, we are able to alleviate such an impact by building a task-specific dataset that covers sufficiently diverse samples. Unfortunately, it is rather expensive and time-consuming to an- + +![](images/c6b38174420c20ebd7c79df436e22acf579e6ddaa5b4c054af80a6dc559b175c.jpg) +Figure 1. Illustration of the proposed coarse-to-fine feature adaptation approach. It consists of two components, i.e., Attention-based Region Transfer (ART) and Prototype-based Semantic Alignment (PSA). The ART module figures out foregrounds from entire images in different domains and then aligns the marginal distributions on them. Further, the PSA module builds the prototype for each category to achieve semantic alignment. (Best viewed in color.) + +notate a large number of high-quality ground truths. + +To address this dilemma, one promising way is to introduce Unsupervised Domain Adaptation (UDA) to transfer essential knowledge from an off-the-shelf labeled domain (referred to as the source domain) to a related unseen but unlabeled one (the target domain) [44]. Recently, UDA methods have been greatly advanced by deep learning techniques, and they mostly focus on generating domain-invariant deep representation by reducing cross-domain discrepancy (e.g. Maximum Mean Discrepancy [20] or $\mathcal{H}$ -divergence [1]), which have proved very competent at image classification [40, 15, 51, 12, 27] and semantic segmentation [23, 42, 64, 6]. Compared to them, object detection is more complex, which is required to locate and classify all instances of different objects within images; therefore, how to effectively adapt a detector is indeed a challenging issue. + +In the literature, there are many solutions tackling this problem, including Semi-Supervised Learning (SSL) based [4], pixel-level adaptation based [31, 25, 50], and feature- + +level adaptation based [8, 22, 68, 52, 74]. The SSL based method reduces the domain gap through consistency regularization in a teacher-student scheme. However, the teacher does not always convey more meaningful knowledge than the student [28], and the detector thus tends to accumulate errors, leading to deteriorated detection performance. Pixel-level based methods first conduct style transfer [73] to synthesize a target-like intermediate domain, aiming to limit visual shift, and then train detectors in a supervised manner. Nevertheless, it still remains a difficulty to guarantee the quality of generated images, especially in some extreme cases, which may hurt the adapted results. Alternatively, feature-level adaptation based methods mitigate the domain shift by aligning the features across domains. Such methods work more conveniently with competitive scores, making them dominate the existing community. + +In this category, domain adaptive Faster R-CNN [8] is a pioneer. It incorporates both image-level and instance-level feature adaptation into the detection model. In [52], Strong-Weak feature adaptation is launched on image-level. This method mainly makes use of the focal loss to transfer hard-to-classify examples, since the knowledge in them is supposed to be more intrinsic for both domains. Although they deliver promising performance, image-level or instance-level feature adaptation is not so accurate as objects of interest locally distribute with diverse shapes. [74] introduces K-means clustering to mine transferable regions to optimize the adaptation quality. While attractive, this method highly depends on the pre-defined cluster number and the size of the grouped regions, which is not flexible, particularly to real-world applications. Furthermore, in the object detection task, there are generally multiple types of objects, and each has its own sample distribution. But these methods do not take such information into account and regard the distributions of different objects as a whole for adaptation, thereby leaving space for improvement. + +In this paper, we present a coarse-to-fine feature adaptation framework for cross-domain object detection. The main idea is shown in Figure 1. Firstly, considering that foregrounds between different domains share more common features compared to backgrounds [30], we propose an Attention-based Region Transfer (ART) module to highlight the importance of foregrounds, which works in a class-agnostic coarse way. We extract foreground objects of interest by leveraging the attention mechanism in high-level features, and underline them during feature distribution alignment. Through multi-layer adversarial learning, effective domain confusion can be performed with the complex detection model. Secondly, category information of objects tends to further refine preceding feature adaptation, and in this case it is necessary to distinguish different kinds of foreground objects. Meanwhile, there is no guarantee that foregrounds of source and target images in the same + +batch have consistent categories, probably incurring object mis-matches in some mini-batch, making semantic alignment in UDA rather tough. Consequently, we propose a Prototype-based Semantic Alignment (PSA) module to build the global prototype for each category across domains. The prototypes are adaptively updated at each iteration, thus suppressing the negative influence of false pseudo-labels and class mis-matches. + +In summary, the contributions are three-fold as follows: + +- A new coarse-to-fine adaptation approach is designed for cross-domain two-stage object detection, which progressively and accurately aligns deep features. +- Two adaptation modules, i.e., Attention-based Region Transfer (ART) and Prototype-based Semantic Alignment (PSA), are proposed to learn domain knowledge in foreground regions with category information. +- Extensive experiments are carried out in three major benchmarks in terms of some typical scenarios, and the results are state-of-the-art, demonstrating the effectiveness of the proposed approach. + +# 2. Related Work + +Object Detection. Object detection is a fundamental step in computer vision and has received increasing attention during decades. Most of traditional methods [63, 10, 13] depend on handcrafted features and sophisticated pipelines. In the era of deep learning, object detection can be mainly split into the one-stage detectors [48, 37, 34, 36] and the two-stage ones [18, 17, 49, 33]. However, those generic detectors do not address the domain shift problem that hurts detection performance in real-world scenes. + +Domain Adaptation. Domain adaptation [2, 1] aims to boost performance in the target domain by leveraging common knowledge from the source domain, which has been widely studied in many visual tasks [67, 12, 72, 41, 7, 14]. With the advent of CNNs, many solutions reduce domain shift by learning domain-invariant features. Methods along this line can be divided into two streams: criterion-based [61, 39, 57] and adversarial learning-based [15, 60, 3, 46]. The former aligns the domain distributions by minimizing some statistical distances between deep features, and the latter introduces the domain classifier to construct minimax optimization with the feature extractor. Despite great success is achieved, the majority of them can only handle relatively simple tasks, such as image classification. + +Cross-domain Object Detection. A number of traditional studies [66, 62, 43, 70] focus on adapting a specific model (e.g., for pedestrian or vehicle detection) across domains. Later, [47] proposes the adaptive R-CNN by subspace alignment [19]. More Recently, the methods can be mainly grouped into four categories, including (1) Feature-level based: [8] presents domain adaptive Faster R-CNN to + +![](images/f8e4109b465987bd3a0b135c31822ad23b8f01526e98083eed5db7d4680a94fb.jpg) +Figure 2. Overview of the proposed feature adaptation framework. We address the problem of domain shift on foreground regions by coarse-to-fine scheme with the ART and PSA modules. First, we utilize the attention map learned from the RPN module to localize foregrounds. Combined with multiple domain classifiers, the ART module puts more emphasis on aligning feature distributions of foreground regions, which achieves a coarse-grained adaptation in a category-agnostic way. Second, the PSA module makes use of ground truth labels (for source) and pseudo labels (for target) to maintain global prototypes for each category, and delivers fine-grained adaptation on foreground regions in a category-ware mode. + +alleviate image-level and instance-level shifts, and [22, 68] extend this idea to multi-layer feature adaptation. [52] exploits strong-weak alignment components to attend strong matching in local features and weak matching in global features. [74] mines discriminative regions that contain objects of interest and align their features across domains. (2) SSL based: [4] integrates object relations into the measure of consistency cost with the mean teacher [58] model. (3) Pixel-level based: [25, 50] employ CycleGAN to translate the source domain to the target-like style. [31] uses domain diversification and multi-domain invariant representation learning to address the imperfect translation and source-biased problem. (4) Others: [29] establishes a robust learning framework that formulates the cross-domain detection problem as training with noisy labels. [30] introduces weak self-training and adversarial background score regularization for domain adaptive one-stage object detection. [71] minimizes the Wasserstein distance to improve the stability of adaptation. [54] explores a gradient detach based stacked complementary loss to adapt detectors. + +As mentioned, feature-level adaptation is the main branch in cross-domain object detection, and its performance is currently limited by inaccurate feature alignment. The proposed method concentrates on two-stage detectors and substantially improves the quality of feature alignment by a coarse-to-fine scheme, where the ART module learns the adapted importance of foreground areas and the PSA module encodes the distribution property of each class. + +# 3. Method + +# 3.1. Problem Formulation + +In the task of cross-domain object detection, we are given a labeled source domain $\mathcal{D}_S = \{(x_i^s,y_i^s)\}_{i = 1}^{N_s}$ , where $x_{i}^{s}$ and $y_{i}^{s} = (b_{i}^{s},c_{i}^{s})$ denote the $i$ -th image and its corresponding labels, i.e., the coordinates of the bounding box $b$ and its associated category $c$ respectively. In addition, we have access to an unlabeled target domain $\mathcal{D}_T = \{x_i^t\}_{i = 1}^{N_t}$ . We assume that the source and target samples are drawn from different distributions (i.e., $\mathcal{D}_S\neq \mathcal{D}_T$ ) but the categories are exactly the same. The goal is to improve the detection performance in $\mathcal{D}_T$ using the knowledge in $\mathcal{D}_S$ . + +# 3.2. Framework Overview + +As shown in Figure 2, we introduce a feature adaptation framework for cross-domain object detection, which contains a detection network and two adaptation modules. + +Detection Network. We select the reputed and powerful Faster R-CNN [49] model as our base detector. Faster R-CNN is a two-stage detector that consists of three major components: 1) a backbone network $G$ that extracts image features, 2) a Region Proposal Network (RPN) that simultaneously predicts object bounds and objectness scores, and 3) a Region-of-Interest (RoI) head, including a bounding box regressor $B$ and a classifier $C$ for further refinement. The overall loss function of Faster R-CNN is defined as: + +$$ +\mathcal {L} _ {\text {d e t}} (x) = \mathcal {L} _ {\text {r p n}} + \mathcal {L} _ {\text {r e g}} + \mathcal {L} _ {\text {c l s}} \tag {1} +$$ + +where $\mathcal{L}_{rpn}$ , $\mathcal{L}_{reg}$ , and $\mathcal{L}_{cls}$ are the loss functions for the RPN, RoI based regressor and classifier, respectively. + +Adaptation Modules. Different from most of the existing studies which typically reduce domain shift in the entire feature space, we propose to conduct feature alignment on foregrounds that are supposed to share more common properties across domains. Meanwhile, in contrast to current methods that regard the samples of all objects as a whole, we argue that the category information contributes to this task and thus highlight the distribution of each category to further refine feature alignment. To this end, we design two adaptation modules, i.e., Attention-based Region Transfer (ART) and Prototype-based Semantic Alignment (PSA), to fulfill a coarse-to-fine knowledge transfer in foregrounds. + +# 3.3. Attention-based Region Transfer + +The ART module is designed to raise more attention to align the distributions across two domains within the regions of foregrounds. It is composed of two parts: the domain classifiers and the attention mechanism. + +To align the feature distributions across domains, we integrate multiple domain classifiers $D$ into the last three convolution blocks in the backbone network $G$ , where a two-player minimax game is constructed. Specifically, the domain classifiers $D$ try to distinguish which domain the features come from, while the backbone network $G$ aims to confuse the classifiers. In practice, $G$ and $D$ are connected by the Gradient Reverse Layer (GRL) [15], which reverses the gradients that flow through $G$ . When the training process converges, $G$ tends to extract domain-invariant feature representation. Formally, the objective of adversarial learning in the $l$ -th convolution block can be written as: + +$$ +\begin{array}{l} \mathcal {L} _ {A D V} ^ {l} = \min _ {\theta_ {G _ {l}}} \max _ {\theta_ {D _ {l}}} \mathbb {E} _ {x _ {s} \sim \mathcal {D} _ {S}} \log D _ {l} \left(G _ {l} \left(x _ {s}\right)\right) \tag {2} \\ + \mathbb {E} _ {x _ {t} \sim \mathcal {D} _ {T}} \log (1 - D _ {l} (G _ {l} (x _ {t}))) \\ \end{array} +$$ + +where $\theta_{G_l}$ and $\theta_{D_l}$ are the parameters of $G_{l}$ and $D_{l}$ respectively. $D_{l}(\cdot)^{(h,w)}$ stands for the probability of the feature in location $(h,w)$ from the source domain. + +Recall that the detection task is required to localize and classify objects, and RoIs are usually more important than backgrounds. However, the domain classifiers align all the spatial locations of the whole image without focus, which probably degrades adaptation performance. To deal with this problem, we propose an attention mechanism to achieve foreground-aware distribution alignment. As mentioned in [49], the RPN in Faster R-CNN serves as the attention to tell the detection model where to look, and we naturally utilize the high-level feature in RPN to generate the attention map, as shown in Figure 3. To be specific, given an image $x$ from an arbitrary domain, we denote $F_{rpn}(x) \in \mathbb{R}^{H \times W \times C}$ as the output feature map of the convolutional layer in the + +![](images/50a873a2347e484be236d0b25f5952d208842ea648c0a7a5974f26dc3c37dec9.jpg) +Figure 3. Illustration of the attention mechanism. We first extract the feature map from the RPN module. Then, we construct a spatial attention map by averaging values across the channel dimension. At last, filtering is applied to suppress the noise. + +RPN module, where $H \times W$ and $C$ are the spatial dimensions and the number of channels of the feature map, respectively. Then, we construct a spatial attention map by averaging activation values across the channel dimension. Further, we filter out (set to zero) those values that are less than the given threshold, which are more likely to belong to the background regions. The attention map $A(x) \in \mathbb{R}^{H \times W}$ is formulated as: + +$$ +M (x) = S \left(\frac {1}{C} \sum_ {c} \left| F _ {r p n} ^ {c} (x) \right|\right) \tag {3} +$$ + +$$ +T (x) = \frac {1}{H W} \sum_ {h, w} M (x) ^ {(h, w)} \tag {4} +$$ + +$$ +A (x) = I (M (x) > T (x)) \otimes M (x) \tag {5} +$$ + +where $M(x)$ stands for the attention map before filtering. $S(\cdot)$ is the sigmoid function and $I(\cdot)$ is the indication function. $F_{rpn}^{c}(x)$ represents the $c$ -th channel of the feature map. $\otimes$ denotes the element-wise multiplication. Threshold $T(x)$ is set to the mean value of $M(x)$ . + +As the size of the attention map is not compatible with the features in different convolution blocks, we adopt bilinear interpolation to perform up-sampling, thus producing the corresponding attention maps. Due to the fact that the attention map may not always be so accurate, if a foreground region is mistaken for background, its attention weight is set to zero and cannot contribute to adaptation. Inspired by the residual attention network in [65], we add a skip connection to the attention map to enhance its performance. + +The total objective of the ART module is defined as: + +$$ +\mathcal {L} _ {A R T} = \sum_ {l, h, w} \left(1 + U _ {l} \left(A (x) ^ {(h, w)}\right)\right) \cdot \mathcal {L} _ {A D V} ^ {l, h, w} \tag {6} +$$ + +where $U_{l}(\cdot)$ is the up-sampling operation and $\mathcal{L}_{ADV}^{l,h,w}$ stands for the adversarial loss on pixel $(h,w)$ in the $l$ -th convolution block. Combining adversarial learning with the attention mechanism, the ART module aligns the feature distributions of foreground regions that are more transferable for the detection task. + +# 3.4. Prototype-based Semantic Alignment + +Since the attention map from RPN carries no information about classification, the ART module aligns the feature distributions of foregrounds in a category-agnostic way. To achieve class-aware semantic alignment, a straightforward method is to train domain classifiers for each category. Nevertheless, there are two main disadvantages: (1) training multiple class-specific classifiers is inefficient; (2) false pseudo-labels (e.g., backgrounds or misclassified foregrounds) occurred in the target domain may hurt the performance of semantic alignment. + +Inspired by the prototype-based methods in few-shot learning [56] and cross-domain image classification [69, 5, 45], we propose the PSA module to handle the above problems. Instead of directly training classifiers, PSA tries to minimize the distance between the pair of prototypes $(P_k^S, P_k^T)$ with the same category across domains, thus maintaining the semantic consistency in the feature space. Formally, the prototypes can be defined as: + +$$ +P _ {k} ^ {S} = \frac {1}{\left| G T _ {k} \right|} \sum_ {r \in G T _ {k}} F (r) \tag {7} +$$ + +$$ +P _ {k} ^ {T} = \frac {1}{\left| R o I _ {k} \right|} \sum_ {r \in R o I _ {k}} F (r) \tag {8} +$$ + +where $P_{k}^{S}$ and $P_{k}^{T}$ represent the prototypes of the $k$ -th category in the source and target domain respectively. $F(r)$ denotes the feature of foreground region $r$ after the second fully-connected (FC) layer in the RoI head. We use the ground truth $GT_{k}$ to extract the foreground regions in the source domain. Due to the absence of target annotations, we employ the $RoI_{k}$ provided by the RoI head module as the pseudo labels in the target domain. $|\cdot|$ indicates the number of regions. + +The benefits of prototypes are two-fold: (1) the prototypes have no extra trainable parameters and can be calculated in linear time; (2) the negative influence of false pseudo-labels can be suppressed by the correct ones whose number is much larger when generating the prototypes. It should be noted that the prototypes above are built over all samples. In the training process, the size of each mini-batch is usually small (e.g., 1 or 2) for the detection task, and the foreground objects of source and target images in the same batch may have inconsistent categories, making categorical alignment not practical for all classes at this batch. For example, two images (one for each domain) are randomly selected for training, but Car only appears in the source image. As a consequence, we cannot align the prototypes of Car across domains in this batch. + +To tackle the problem, we dynamically maintain global prototypes, which are adaptively updated by local prototypes at each mini-batch as follows: + +$$ +\alpha = \operatorname {s i m} \left(P _ {k} ^ {(i)}, G P _ {k} ^ {(i - 1)}\right) \tag {9} +$$ + +Algorithm 1: The coarse-to-fine feature adaptation framework for cross-domain object detection. +Input: Labeled source domain $\mathcal{D}_S$ Unlabeled target domain $\mathcal{D}_T$ Batch size $B$ Category number $C$ Output: An adaptive detector $F(:,\theta)$ +1 Calculate the initial global prototypes $GP_{k}^{S(0)}$ and $GP_{k}^{T(0)}$ using the pretrained detector based on $\mathcal{D}_S$ +2 for $i = 1$ to max_iter do +3 $X_S,Y_S\gets$ Sample $(\mathcal{D}_S,B / 2)$ +4 $X_T\gets$ Sample $(\mathcal{D}_T,B / 2)$ +5 Supervised Learning: +6 Calculate $\mathcal{L}_{det}$ according to Eq. (1) +7 Coarse-grained Adaptation: +8 Calculate $A(X_S)$ and $A(X_T)$ by Eq. (5) +9 Calculate $\mathcal{L}_{ART}$ by Eq. (6) +10 Fine-grained Adaptation: +11 $\hat{Y}_T\gets F(X_T;\theta)$ +12 for $k = 1$ to $C$ do +13 Calculate $P_k^{S(i)}$ and $P_k^{T(i)}$ by Eq. (7) and (8) +14 Update $GP_{k}^{S(i)}$ and $GP_{k}^{T(i)}$ by Eq. (10) +15 Calculate $\mathcal{L}_{PSA}$ according to Eq. (11) +16 Optimize the detection model by Eq. (12) + +$$ +G P _ {k} ^ {(i)} = \alpha P _ {k} ^ {(i)} + (1 - \alpha) G P _ {k} ^ {(i - 1)} \tag {10} +$$ + +where $\text{sim}(x_1, x_2) = \left( \frac{x_1^\top \cdot x_2}{\| x_1 \| \| x_2 \|} + 1 \right) / 2$ denotes the cosine similarity. $P_k^{(i)}$ represents the local prototypes of the $k$ -th category at $i$ -th iteration. It is worth noting that we calculate the initial global prototypes $G P_k^{(0)}$ by Eq. (7) (for source) and Eq. (8) (for target) based on the pretrained model from the labeled source domain. + +We do not directly align the local prototypes, but minimize the $L_{2}$ distance between the source global prototypes $GP_{k}^{S}$ and the target global prototypes $GP_{k}^{T}$ to achieve semantic alignment. The objective of the PSA module at $i$ -th iteration can be formulated as following: + +$$ +\mathcal {L} _ {P S A} = \sum_ {k} \| G P _ {k} ^ {S (i)} - G P _ {k} ^ {T (i)} \| ^ {2} \tag {11} +$$ + +# 3.5. Network Optimization + +The training procedure of our proposed framework integrates three major components, as shown in Algorithm 1. + +1. Supervised Learning. The supervised detection loss $\mathcal{L}_{det}$ is only applied to the labeled source domain $\mathcal{D}_S$ . +2. Coarse-grained Adaptation. We utilize the attention mechanism to extract the foregrounds in images. Then, we focus on aligning the feature distributions of those regions by optimizing $\mathcal{L}_{ART}$ . + +Cityscapes $\rightarrow$ FoggyCityscapes + +
MethodArch.BusBicycleCarMotorPersonRiderTrainTruckmAPmAP*Gain
MTOR [4]R38.635.644.028.330.641.440.621.935.126.98.2
RLDA [29]I45.336.049.226.935.142.227.030.036.531.94.6
DAF [8]V35.327.140.520.025.031.020.222.127.618.88.8
SCDA [74]V39.033.648.528.033.538.023.326.533.826.27.6
MAF [22]V39.933.943.929.228.239.533.323.834.018.815.2
SWDA [52]V36.235.343.530.029.942.332.624.534.320.314.0
DD-MRL [31]V38.432.244.328.430.840.534.527.234.617.916.7
MDA [68]V41.836.544.830.533.244.228.728.236.022.813.2
PDA [25]V44.135.954.429.136.045.525.824.336.919.617.3
Source OnlyV25.026.830.615.524.129.44.610.620.8--
3DC (Baseline)V37.937.151.633.132.945.627.928.636.820.816.0
Ours w/o ARTV41.635.451.536.933.545.226.628.237.420.816.6
Ours w/o PSAV45.237.351.833.333.946.725.529.637.920.817.1
OursV43.237.452.134.734.046.929.930.838.620.817.8
OracleV49.537.052.736.036.147.156.032.143.3--
+ +Table 1. Results (\%) of different methods in the Normal-to-Foggy adaptation scenario. “V”, “R” and “I” represent the VGG16, ResNet50 and Inception-v2 backbones respectively. “Source Only” denotes the Faster R-CNN model trained on the source domain only. “3DC” stands for the Faster R-CNN model integrated with three domain classifiers, which is our baseline method. “Oracle” indicates the model trained on the labeled target domain. mAP* shows the result of “Source Only” for each method, and Gain displays its the improvement after adaptation. The best results are bolded and the second best results are underlined among the methods with the VGG16 backbone. + +3. Fine-grained Adaptation. At first, pseudo labels are predicted in the target domain. We further update the global prototypes for each category adaptively. Finally, semantic alignment on foreground objects is achieved by optimizing $\mathcal{L}_{PSA}$ . + +With the terms aforementioned, the overall objective is: + +$$ +\mathcal {L} _ {\text {t o t a l}} = \mathcal {L} _ {\text {d e t}} + \lambda_ {1} \mathcal {L} _ {\text {A R T}} + \lambda_ {2} \mathcal {L} _ {\text {P S A}} \tag {12} +$$ + +where $\lambda_{1}$ and $\lambda_{2}$ denote the trade-off factors for the ART module and the PSA module, respectively. + +# 4. Experiments + +# 4.1. Datasets and Scenarios + +Datasets. Four datasets are used in evaluation. (1) Cityscapes [9] is a benchmark for semantic urban scene understanding. It contains 2,975 training images and 500 validation images with pixel-level annotations. Since it is not designed for the detection task, we follow [8] to use the tightest rectangle of an instance segmentation mask as the ground truth bounding box. (2) FoggyCityscapes [53] derives from Cityscapes by adding synthetic fog to the original images. Thus, the train/val split and annotations are the same as those in Cityscapes. (3) SIM10k [26] is a synthetic dataset containing 10,000 images, which is rendered from the video game Grand Theft Auto V (GTA5). (4) KITTI [16] is another popular dataset for autonomous driving. It consists of 7,481 labeled images for training. + +Scenarios. Following [8], we evaluate the framework under three adaptation scenarios as follows: + +(1) Normal-to-Foggy (Cityscapes $\rightarrow$ FoggyCityscapes). It aims to perform adaptation across different weather conditions. During the training phase, we use the training set + +of Cityscapes and FoggyCityscapes as the source and target domain respectively. Results are reported in the validation set of FoggyCityscapes. + +(2) Synthetic-to-Real (SIM10k $\rightarrow$ Cityscapes). Synthetic images offer an alternative to alleviate the data annotation problem. To adapt the synthetic scenes to the real one, we utilize the entire SIM10k dataset as the source domain and the training set of Cityscapes as the target domain. Since only Car is annotated in both domains, we report the performance of Car in the validation set of Cityscapes. +(3) Cross-Camera (Cityscapes $\rightarrow$ KITTI). Images captured by different devices or setups also incur the domain shift problem. To simulate this adaptation, we use the training set of Cityscapes as the source domain and the training set of KITTI as the target domain. Note that the classification standards of categories in the two domains are different, we follow [68] to classify $\{Car, Van\}$ as Car, $\{\text{Pedestrian, Person sitting}\}$ as Person, Tram as Train, Cyclist as Rider in KITTI. The results are reported in the training set of KITTI, which is the same as in [8, 68]. + +# 4.2. Implementation Details + +In all experiments, we adopt the Faster R-CNN with the VGG16 [55] backbone pre-trained on ImageNet [11]. We resize the shorter sides of all images to 600 pixels. The batch size is set to 2, i.e., one image per domain. The detector is trained with SGD for 50k iterations with the learning rate of $10^{-3}$ , and it is then dropped to $10^{-4}$ for another 20k iterations. Domain classifiers are trained by the Adam optimizer [32] with the learning rate of $10^{-5}$ . The factor $\lambda_{1}$ is set at 1.0. Since prototypes in the target domain are unreliable at the beginning, the PSA module is employed after 50k iterations with $\lambda_{2}$ set at 0.01. We report mAP with an IoU threshold of 0.5 for evaluation. + +
SIM10k → Cityscapes
MethodArch.AP on CarAP*Gain
RLDA [29]I42.631.111.5
MTOR [4]R46.639.47.2
DAF [8]V39.030.18.9
MAF [22]V41.130.111.0
SWDA [52]V42.334.67.7
MDA [68]V42.834.38.5
SCDA [74]V43.034.09.0
Source OnlyV35.0--
3DC (Baseline)V42.335.07.3
Ours w/o ARTV42.735.07.7
Ours w/o PSAV43.435.08.4
OursV43.835.08.8
OracleV59.9--
+ +# 4.3. Results + +We conduct extensive experiments and make comparison to the state-of-the-art cross-domain object detection methods, including (1) Semi-Supervised Learning: MTOR [4], (2) Robust Learning: RLDA [29], (3) Feature-level adaptation: DAF [8], SCDA [74], MAF [22], SWDA [52] and MDA [68], and (4) Pixel-level adaptation + Feature-level adaptation: DD-MRL [31] and PDA [25]. Moreover, we also provide ablation studies to validate the effectiveness of each module. Our baseline method is referred as 3DC, which is the Faster R-CNN model integrated with three domain classifiers. We alternately remove the ART and PSA module from the entire framework and report the performance. Note that removing the ART means we only remove the attention map while domain classifiers are still kept. + +Normal-to-Foggy. As shown in Table 1, we achieve an mAP of $38.6\%$ on the weather transfer task, which is the best result among all the counterparts. Since detection performance before adaptation is different for each method, we point out that "Gain" is also a key criterion for fair comparison, which is ignored by previous work. In particular, we achieve a remarkable increase of $+17.8\%$ over the source only model. Among all the feature-level adaptation methods, we improve the mAP by $+2.6\%$ compared to MDA [68]. Although we do not leverage extra pixel-level adaptation, our method still outperforms previous state-of-the-art PDA [25] by $+1.7\%$ . Besides, with the help of coarse-to-fine feature adaptation on foregrounds, the proposed method brings improvements on all the categories than the 3DC model does, which shows that feature alignment on foregrounds can boost performance. Additionally, we find that the proposed method is comparable to or even better than the oracle model in several categories. It suggests that the performance which is similar to that of supervised learning methods can be achieved, if we effectively transfer knowledge across domains. + +Synthetic-to-Real. Table 2 displays the results on the Synthetic-to-Real task. We obtain an average precision of + +Table 2. Results $(\%)$ of the Synthetic-to-Real adaptation scenario. + +
Cityscapes → KITTI
MethodArch.PersonRiderCarTruckTrainmAPmAP*Gain
DAF [8]V40.916.170.323.621.234.434.00.4
MDA [68]V53.024.572.228.725.340.734.06.7
Source OnlyV48.123.274.312.29.233.4--
3DC (Baseline)V45.827.073.926.418.438.333.44.9
Ours w/o ARTV50.227.373.229.517.139.533.46.1
Ours w/o PSAV50.527.873.326.820.539.833.46.4
OursV50.429.773.629.721.641.033.47.6
OracleV71.186.688.490.790.185.4--
+ +Table 3. Results $(\%)$ of the Cross-Camera adaptation scenario. + +$43.8\%$ on Car and find that there is a slight gain of $+0.8\%$ compared to SCDA [74]. The reason is that knowledge transfer is much easier for single category, and many other methods can also adapt well. Further, one may wonder why the PSA module is still effective for single category adaptation, and we argue that it serves as another attention mechanism that focuses on foreground regions, which conveys some complementary clues to the ART module in this case. Cross-Camera. In Table 3, we illustrate the performance comparison on the cross-camera task. The proposed method reaches an mAP of $41.0\%$ with a gain of $+7.6\%$ over the non-adaptive model. Due to the fact that scenes are similar across domains and the Car sample dominate the two datasets, we can observe that the score on Car is already good for the source only model. Compared with DAF [8] and MDA [68], our method reduces the influence of negative transfer in Car detection. Meanwhile, our method also outperforms the baseline model (3DC) in the rest categories. + +# 4.4. Further Analysis + +Feature distribution discrepancy of foregrounds. The theoretical result in [2] suggests that $\mathcal{A}$ -distance can be used as a metric of domain discrepancy. In practice, we calculate the Proxy $\mathcal{A}$ -distance to approximate it, which is defined as $d_{\mathcal{A}} = 2(1 - \epsilon)$ . $\epsilon$ is the generalization error of a binary classifier (linear SVM in our experiments) that tries to distinguish which domain the input features come from. Figure 5 displays the distances for each category on the Normal-to-Foggy task with the features of ground truth foregrounds extracted from the models of Source Only, SWDA and Ours. Compared with the non-adaptive model, SWDA and Ours reduce the distances in all the categories by large margins, which demonstrates the necessity of domain adaptation. Besides, since we explicitly optimize the prototypes of each category by PSA, we achieve a smaller feature distribution discrepancy of foregrounds than the others do. + +Error analysis of highest confident detections. To further validate the effect of the proposed framework for cross-domain object detection, we analyze the errors of the models of Source Only, SWDA and Ours caused by highest confident detections on the Normal-to-Foggy task. We follow [24, 8, 4] to categorize the detections into three error + +![](images/72010b15f35b098597cc8af1147a2e1c8afccce17d8b3154d54edd6e28fabc56.jpg) + +![](images/04082c8d9f93e2b612581e8af22739144b3f5aa4712f3cd5ce4f03c9410d6489.jpg) + +![](images/9d670e207d785c2ab0400c7c255514a3899b4f887edbc75a29271b4ac54a92b4.jpg) +(a) Source Only + +![](images/a0bdc7a6be11a283d4500b836756cb4de88dba54a9beefbce143b66d58eb90c8.jpg) + +![](images/45e06748b4f2c71635cc2f0856edd92036b979dad81ce8806e6ce40ca40e368d.jpg) + +![](images/9bd14ebf4a53d78ce552d7e2bb69a3d380e2e3e081c85bbccb115418e101d77a.jpg) +(b) SWDA + +![](images/1c0d4baf68537e9de13c74b1cf4f3f687437b1b699c51479606589e82a42f760.jpg) + +![](images/8d708a3b7d404d61e368c4928a104390f7ebf9add4a51f5ca266e5dcad9ecdc1.jpg) + +![](images/810c2ce80471eeea6cda43c76a431d71e8a956e2de1aaaf0556e73e030a19726.jpg) +(c) Ours + +![](images/fe858ca901fc8f1a103130faf33fbefc2b53653983530cd2bc44450a08029650.jpg) + +![](images/0674a8377337555389a76f6d11061c44c1aafb1b32c1d9eefd7e70cda939d042.jpg) + +![](images/ace8f78654cef2a519d849de615b029c08de55a27985e779829a342f80f53c88.jpg) +(d) Attention Map + +![](images/0abecd36fb7ef72194cc104f0d1078675373d2318a36f7b82c55f399dface1fd.jpg) +Figure 4. Qualitative results on the Normal-to-Foggy adaptation scenario. (a)-(c): The detection results of the Source Only model, SWDA and the proposed method. (d): Visualization of the corresponding attention maps (best viewed by zooming in). +Figure 5. Feature distribution discrepancy of foregrounds. + +types: 1) Correct (IoU with $\mathrm{GT} \geq 0.5$ ), 2) Mislocalization $(0.3 \leq \mathrm{IoU}$ with $\mathrm{GT} < 0.5)$ , and 3) Background (IoU with $\mathrm{GT} < 0.3$ ). For each category, we select top- $K$ predictions to analyze the error type, where $K$ is the number of ground truths in this category. We report the mean percentage of each type across all categories in Figure 6. We can see that the Source Only model seems to take most of backgrounds as false positives (green color). Compared with SWDA, we improve the percentage of correct detections (blue color) from $39.3\%$ to $43.0\%$ and reduce other error types simultaneously. The results indicate that the proposed framework can effectively increase true positives and reduce false positives, resulting in better detection performance. + +Qualitative results. Figure 4 shows some qualitative results. Due to the domain shift problem, the Source Only model simply detects some salient objects as shown in (a). From (b) to (c), we can observe that the proposed method not only increases true positives (detects more cars in the first and second row), but also reduces false positives (discards persons in the third row), which is consistent with previous analysis. Further, we visualize the attention maps generated from the ART module. Despite some noise, the + +![](images/6995c962bbb3a36d3b749c6070913cd100397ab039afa966af1f118334f41869.jpg) +Figure 6. Error analysis of highest confident detections. + +attention maps well locate the foreground regions, which is beneficial to knowledge transfer across domains. + +# 5. Conclusion + +In this paper, we present a novel coarse-to-fine feature adaptation approach to address the issue of cross-domain object detection. The proposed framework achieves the goal with the incorporation of two delicately designed modules, i.e., ART and PSA. The former highlights the importance of the foreground regions figured out by the attention mechanism in a category-agnostic way, and aligns their feature distributions across domains. The latter takes the advantage of prototypes to perform fine-grained adaptation of foregrounds at the semantic level. Comprehensive experiments are conducted on various adaptation scenarios and state-of-the-art results are reached, demonstrating the effectiveness of the proposed approach. + +Acknowledgment. This work is funded by the National Key Research and Development Plan of China under Grant 2018AAA0102301, the Research Program of State Key Laboratory of Software Development Environment (SKLSDE-2019ZX-03), and the Fundamental Research Funds for the Central Universities. + +# References + +[1] S. Ben-David, J. Blitzer, K. Crammer, A. Kulesza, F. Pereira, and J. W. Vaughan. A theory of learning from different domains. Machine Learning, 79(1-2):151-175, 2010. +[2] S. Ben-David, J. Blitzer, K. Crammer, and F. Pereira. Analysis of representations for domain adaptation. In NeurIPS, 2007. +[3] K. Bousmalis, N. Silberman, D. Dohan, D. Erhan, and D. Krishnan. Unsupervised pixel-level domain adaptation with generative adversarial networks. In CVPR, 2017. +[4] Q. Cai, Y. Pan, C.-W. Ngo, X. Tian, L. Duan, and T. Yao. Exploring object relation in mean teacher for cross-domain detection. In CVPR, 2019. +[5] C. Chen, W. Xie, W. Huang, Y. Rong, X. Ding, Y. Huang, T. Xu, and J. Huang. Progressive feature alignment for unsupervised domain adaptation. In CVPR, 2019. +[6] M. Chen, H. Xue, and D. Cai. Domain adaptation for semantic segmentation with maximum squares loss. In ICCV, 2019. +[7] M.-H. Chen, Z. Kira, G. AlRegib, J. Yoo, R. Chen, and J. Zheng. Temporal attentive alignment for large-scale video domain adaptation. In ICCV, 2019. +[8] Y. Chen, W. Li, C. Sakaridis, D. Dai, and L. Van Gool. Domain adaptive faster r-cnn for object detection in the wild. In CVPR, 2018. +[9] M. Cordts, M. Omran, S. Ramos, T. Rehfeld, M. Enzweiler, R. Benenson, U. Franke, S. Roth, and B. Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. +[10] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005. +[11] 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. +[12] Z. Ding, S. Li, M. Shao, and Y. Fu. Graph adaptive knowledge transfer for unsupervised domain adaptation. In ECCV, 2018. +[13] P. Felzenszwalb, D. McAllester, and D. Ramanan. A discriminatively trained, multiscale, deformable part model. In CVPR, 2008. +[14] Y. Fu, Y. Wei, G. Wang, Y. Zhou, H. Shi, and T. S. Huang. Self-similarity grouping: A simple unsupervised cross domain adaptation approach for person re-identification. In ICCV, 2019. +[15] Y. Ganin and V. Lempitsky. Unsupervised domain adaptation by backpropagation. In ICML, 2015. +[16] A. Geiger, P. Lenz, and R. Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, 2012. +[17] R. Girshick. Fast r-cnn. In ICCV, 2015. +[18] R. Girshick, J. Donahue, T. Darrell, and J. Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, 2014. +[19] R. Gopalan, R. Li, and R. Chellappa. Domain adaptation for object recognition: An unsupervised approach. In ICCV, 2011. + +[20] A. Gretton, K. Borgwardt, M. J. Rasch, B. Scholkopf, and A. J. Smola. A kernel method for the two-sample problem. In NeurIPS, 2008. +[21] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. +[22] Z. He and L. Zhang. Multi-adversarial faster-rcnn for unrestricted object detection. In ICCV, 2019. +[23] J. Hoffman, E. Tzeng, T. Park, J.-Y. Zhu, P. Isola, K. Saenko, A. A. Efros, and T. Darrell. Cycada: Cycle-consistent adversarial domain adaptation. In ICML, 2018. +[24] D. Hoiem, Y. Chodpathumwan, and Q. Dai. Diagnosing error in object detectors. In ECCV, 2012. +[25] H.-K. Hsu, W.-C. Hung, H.-Y. Tseng, C.-H. Yao, Y.-H. Tsai, M. Singh, and M.-H. Yang. Progressive domain adaptation for object detection. In CVPR Workshops, 2019. +[26] M. Johnson-Roberson, C. Barto, R. Mehta, S. N. Sridhar, K. Rosaen, and R. Vasudevan. Driving in the matrix: Can virtual worlds replace human-generated annotations for real world tasks? In ICRA, 2017. +[27] G. Kang, L. Jiang, Y. Yang, and A. G. Hauptmann. Contrastive adaptation network for unsupervised domain adaptation. In CVPR, 2019. +[28] Z. Ke, D. Wang, Q. Yan, J. Ren, and R. W. Lau. Dual student: Breaking the limits of the teacher in semi-supervised learning. In ICCV, 2019. +[29] M. Khodabandeh, A. Vahdat, M. Ranjbar, and W. G. Macready. A robust learning approach to domain adaptive object detection. In ICCV, 2019. +[30] S. Kim, J. Choi, T. Kim, and C. Kim. Self-training and adversarial background regularization for unsupervised domain adaptive one-stage object detection. In ICCV, 2019. +[31] T. Kim, M. Jeong, S. Kim, S. Choi, and C. Kim. Diversify and match: A domain adaptive representation learning paradigm for object detection. In CVPR, 2019. +[32] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. +[33] T.-Y. Lin, P. Dollar, R. Girshick, K. He, B. Hariharan, and S. Belongie. Feature pyramid networks for object detection. In CVPR, 2017. +[34] T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollár. Focal loss for dense object detection. In ICCV, 2017. +[35] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollar, and C. L. Zitnick. Microsoft coco: Common objects in context. In ECCV, 2014. +[36] S. Liu, D. Huang, and Y. Wang. Receptive field block net for accurate and fast object detection. In ECCV, 2018. +[37] W. Liu, D. Anguelov, D. Erhan, C. Szegedy, S. Reed, C. Y. Fu, and A. C. Berg. Ssd: Single shot multibox detector. In ECCV, 2016. +[38] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. +[39] M. Long, Y. Cao, J. Wang, and M. I. Jordan. Learning transferable features with deep adaptation networks. In ICML, 2015. +[40] M. Long, J. Wang, G. Ding, J. Sun, and P. S. Yu. Transfer feature learning with joint distribution adaptation. In ICCV, 2014. + +[41] Y. Luo, P. Liu, T. Guan, J. Yu, and Y. Yang. Significance-aware information bottleneck for domain adaptive semantic segmentation. In ICCV, 2019. +[42] Y. Luo, L. Zheng, T. Guan, J. Yu, and Y. Yang. Taking a closer look at domain shift: Category-level adversaries for semantics consistent domain adaptation. In CVPR, 2019. +[43] F. Mirrashed, V. I. Morariu, B. Siddiquie, R. S. Feris, and L. S. Davis. Domain adaptive object detection. In WACV, 2013. +[44] S. J. Pan and Q. Yang. A survey on transfer learning. TKDE, 22(10):1345-1359, 2010. +[45] Y. Pan, T. Yao, Y. Li, Y. Wang, C.-W. Ngo, and T. Mei. Transferrable prototypical networks for unsupervised domain adaptation. In CVPR, 2019. +[46] Z. Pei, Z. Cao, M. Long, and J. Wang. Multi-adversarial domain adaptation. In AAAI, 2018. +[47] A. Raj, V. Namboodiri, and T. Tuytelaars. Subspace alignment based domain adaptation for rcnn detector. In BMVC, 2015. +[48] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi. You only look once: Unified, real-time object detection. In CVPR, 2016. +[49] S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. T-PAMI, 39(6):1137-1149, 2017. +[50] A. L. Rodriguez and K. Mikolajczyk. Domain adaptation for object detection via style consistency. In BMVC, 2019. +[51] K. Saito, Y. Ushiku, and T. Harada. Asymmetric tri-training for unsupervised domain adaptation. In ICML, 2017. +[52] K. Saito, Y. Ushiku, T. Harada, and K. Saenko. Strong-weak distribution alignment for adaptive object detection. In CVPR, 2019. +[53] C. Sakaridis, D. Dai, and L. Van Gool. Semantic foggy scene understanding with synthetic data. IJCV, 126(9):973-992, 2018. +[54] Z. Shen, H. Maheshwari, W. Yao, and M. Savvides. Scl: Towards accurate domain adaptive object detection via gradient detach based stacked complementary losses. arXiv preprint arXiv:1911.02559, 2019. +[55] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint, arXiv:1409.1556, 2014. +[56] J. Snell, K. Swersky, and R. Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017. +[57] B. Sun and K. Saenko. Deep coral: Correlation alignment for deep domain adaptation. In ECCV, 2016. +[58] A. Tarvainen and H. Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semisupervised deep learning results. In NeurIPS, 2017. +[59] A. Torralba and A. A. Efros. Unbiased look at dataset bias. In CVPR, 2011. +[60] E. Tzeng, J. Hoffman, K. Saenko, and T. Darrell. Adversarial discriminative domain adaptation. In CVPR, 2017. +[61] E. Tzeng, J. Hoffman, N. Zhang, K. Saenko, and T. Darrell. Deep domain confusion: Maximizing for domain invariance. arXiv preprint arXiv:1412.3474, 2014. + +[62] D. Vázquez, A. M. López, and D. Ponsa. Unsupervised domain adaptation of virtual and real worlds for pedestrian detection. In ICPR, 2012. +[63] P. Viola and M. Jones. Rapid object detection using a boosted cascade of simple features. In CVPR, 2001. +[64] T.-H. Vu, H. Jain, M. Bucher, M. Cord, and P. Perez. Advent: Adversarial entropy minimization for domain adaptation in semantic segmentation. In CVPR, 2019. +[65] F. Wang, M. Jiang, C. Qian, S. Yang, C. Li, H. Zhang, X. Wang, and X. Tang. Residual attention network for image classification. In CVPR, 2017. +[66] M. Wang and X. Wang. Automatic adaptation of a generic pedestrian detector to a specific traffic scene. In CVPR, 2011. +[67] Y. Xia, D. Huang, and Y. Wang. Detecting smiles of young children via deep transfer learning. In ICCV Workshops, 2017. +[68] R. Xie, F. Yu, J. Wang, Y. Wang, and L. Zhang. Multi-level domain adaptive learning for cross-domain detection. In ICCV Workshops, 2019. +[69] S. Xie, Z. Zheng, L. Chen, and C. Chen. Learning semantic representations for unsupervised domain adaptation. In ICML, 2018. +[70] J. Xu, S. Ramos, D. Vázquez, and A. M. López. Domain adaptation of deformable part-based models. T-PAMI, 36(12):2367-2380, 2014. +[71] P. Xu, P. Gurram, G. Whipps, and R. Chellappa. Wasserstein distance based domain adaptation for object detection. arXiv preprint arXiv:1909.08675, 2019. +[72] S. Zhao, H. Fu, M. Gong, and D. Tao. Geometry-aware symmetric domain adaptation for monocular depth estimation. In CVPR, 2019. +[73] J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. +[74] X. Zhu, J. Pang, C. Yang, J. Shi, and D. Lin. Adapting object detectors via selective cross-domain alignment. In CVPR, 2019. \ No newline at end of file diff --git a/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/images.zip b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..bfd946241f74b9d95235dc387d77c8c47ff89c33 --- /dev/null +++ b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2421526124fb8d767483871d5bb9d5db3852ff74f4a3a4769e1192e9e7ddbed9 +size 551042 diff --git a/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/layout.json b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f0f3ed0c7b9e2267385526c668bca6743bb51026 --- /dev/null +++ b/crossdomainobjectdetectionthroughcoarsetofinefeatureadaptation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c19aa656bd2dcc44bb0dc710a49f039ed4dac97e32143da4c756ca637d1c0b6 +size 471420 diff --git a/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/455ebe50-9b75-4e37-859a-0a57b5c0ee1e_content_list.json b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/455ebe50-9b75-4e37-859a-0a57b5c0ee1e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..dc36569a4c9a66ab69a9d4aab7480225196e2921 --- /dev/null +++ b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/455ebe50-9b75-4e37-859a-0a57b5c0ee1e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1bbddf24fdb55eebf2c691c8477d21372ea64f8b0705ac9b05f4e54c6bf9f513 +size 81778 diff --git a/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/455ebe50-9b75-4e37-859a-0a57b5c0ee1e_model.json b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/455ebe50-9b75-4e37-859a-0a57b5c0ee1e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..706cdc6cb9d029ca98061fd17221864af5eca13d --- /dev/null +++ b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/455ebe50-9b75-4e37-859a-0a57b5c0ee1e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d59f0baf530a41b1dc5ddc4f5503febbe43def1887cfabdef78fa98590fff40 +size 98508 diff --git a/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/455ebe50-9b75-4e37-859a-0a57b5c0ee1e_origin.pdf b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/455ebe50-9b75-4e37-859a-0a57b5c0ee1e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9829dd3ab51e896ec3f3e591169c627324c0fc06 --- /dev/null +++ b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/455ebe50-9b75-4e37-859a-0a57b5c0ee1e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db7900c3eec9ffe7e1a07ff2ac0364ed0d6f09fdffa54957f8c890cdc2cf13c7 +size 992928 diff --git a/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/full.md b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/full.md new file mode 100644 index 0000000000000000000000000000000000000000..76ff1eaeb7e7e16e42bb700d3010a55b47918e6b --- /dev/null +++ b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/full.md @@ -0,0 +1,292 @@ +# Cross-Domain Semantic Segmentation via Domain-Invariant Interactive Relation Transfer + +Fengmao Lv $^{1*}$ † Tao Liang $^{1,2\dagger}$ Xiang Chen $^{2}$ Guosheng Lin $^{3}$ + +1Center of Statistical Research & School of Statistics, Southwestern University of Finance and Economics, China + +$^{2}$ Content Platform of Center & Content Development Platform, Tencent, China + +$^{3}$ School of Computer Science and Engineering, Nanyang Technological University, Singapore + +{fengmaolv,taoliangdpg}@126.com chx245296678@gmail.com gslin@ntu.edu.sg + +# Abstract + +Exploiting photo-realistic synthetic data to train semantic segmentation models has received increasing attention over the past years. However, the domain mismatch between synthetic and real images will cause a significant performance drop when the model trained with synthetic images is directly applied to real-world scenarios. In this paper, we propose a new domain adaptation approach, called Pivot Interaction Transfer (PIT). Our method mainly focuses on constructing pivot information that is common knowledge shared across domains as a bridge to promote the adaptation of semantic segmentation model from synthetic domains to real-world domains. Specifically, we first infer the image-level category information about the target images, which is then utilized to facilitate pixel-level transfer for semantic segmentation, with the assumption that the interactive relation between the image-level category information and the pixel-level semantic information is invariant across domains. To this end, we propose a novel multi-level region expansion mechanism that aligns both the image-level and pixel-level information. Comprehensive experiments on the adaptation from both GTAV and SYNTHIA to Cityscapes clearly demonstrate the superiority of our method. + +# 1. Introduction + +Towards thorough autonomous-driving, road scene segmentation, which aims to acquire detailed understanding about road environments, is a key functionality. Over the + +past few years, deep convolutional neural networks have gained great advances in semantic segmentation [21, 2, 19]. However, to train a good segmentation model, it usually requires a huge amount of time and labor effort to obtain sufficient pixel-level annotations of real-world images beforehand. To reduce the labeling consumption, one can turn to collect photo-realistic synthetic data from game simulators (e.g., Grand Theft Auto V), where the full pixel-level annotations can be generated automatically [27, 28]. But due to the clear domain difference between the synthetic (source) images and real-world (target) images, it will cause a dramatic performance drop if the model trained with the synthetic images is directly applied to real-world scenarios. + +In order to promote the adaptation of semantic segmentation model from synthetic domains to real-world domains, we propose a novel domain adaptation approach dubbed Pivot Interaction Transfer (PIT) by constructing pivot information that is common knowledge shared across domains to bridge the domain gap. To this end, we first infer the image-level category information about the target images, which can be less challenging to estimate due to the strong idiosyncrasies of urban traffic scenes (e.g., the region size and spatial layout of buildings, lights, persons, etc.) [41]. There exists a strong interaction between the image-level categories and the pixel-level semantic information: the image-level category information provides global estimation of the categories appeared in the whole image, and in the meanwhile, suppresses implausible pixel-level label prediction for segmentation; on the other hand, the specific pixel-level label information in each image will immediately reveal the image-level categories. Since the images of urban traffic scenes have very strong idiosyncrasies [41], the interactive relation between the image-level categories and the pixel-level semantic information can be invariant + +regardless of different domains. Hence, we can treat this domain-invariant information as the transferrable factor that could be utilized to facilitate pixel-level transfer for semantic segmentation. Unlike the prior works that focus on learning domain-invariant representations of instances by using domain adversarial training [15, 32, 42, 8, 30], our method constructs the transferrable factors across different domains explicitly. + +Our model includes two interactive components: 1) the fine-grained component produces the segmentation masks for semantic segmentation; 2) the coarse-grained component generates class activation maps through learning from the image-level category information. As displayed in Fig. 1, the coarse-grained component contains multiple region expansion units, each of which can produce a different class activation map by using a specific aggregation operation. To model the interactive relation between the two components, we adopt a reconstruction mechanism to reconstruct the class activation map of the fine-grained component by the class activation maps of the coarse-grained component. The knowledge transfer insight lies in sharing the reconstruction module between the source and target domains, with the intuition that the interactive relations between the category information of the two different granularity levels are domain-invariant. To this end, the reconstruction loss in the target domain promotes effective information flow from the inferred image-level category information to the pixel-level prediction. Unlike the prior works [42, 8, 34], our method does not involve the minimax games in adversarial training which are usually hard to solve. + +The main contributions of this work are as follows: + +- We propose a new domain adaptation approach by constructing pivot information that is common knowledge shared across domains to promote the adaptation of semantic segmentation models. +- We propose a multi-level region expansion mechanism to model the domain-invariant interaction between the image-level categories and the pixel-level semantic information. +- Comprehensive experiments on the adaptation from both GTAV and SYNTHIA to Cityscapes demonstrate that our method can obtain better results than the existing state-of-the-art works. + +# 2. Related Works + +# 2.1. Semantic segmentation + +Semantic segmentation is a very important visual task. Based on Fully Convolutional Networks (FCN) [21], diverse advanced designs, e.g. multi-scale aggregation [2, 19, 40], context relation [44, 20], etc, are proposed to improve the performance of semantic segmentation neural networks. In addition, post-processing techniques such as conditional + +random fields [45] can also be utilized as an effective tool to further improve the segmentation performance. However, the training of segmentation networks requires a large amount of real-world images with pixel-level annotations, which are usually difficult to collect. + +# 2.2. Domain adaptation + +Machine learning works based on the assumption that the training and test data are drawn from the identical distribution. It will cause a dramatic performance drop if the training and test datasets have clear domain discrepancy. Domain adaptation focuses on how to bridge the domain gap and obtain good generalization performance on the target data. Over the past years, domain adaptation is mainly studied in image recognition [12, 43, 4, 17]. In general, the main idea of the existing domain adaptation methods is to learn domain-invariant representations in deep neural networks [22, 12, 43] or generate pseudo labels of target images to adapt the prediction models [29, 11]. + +# 2.3. Domain adaptation for semantic segmentation + +Exploiting photo-realistic synthetic data to train semantic segmentation models has received increasing attention over the recent years. Similar to classification, one of the primary approaches towards domain adaptation for semantic segmentation is to learn domain-invariant representation of instances by domain adversarial training [8, 6, 30, 42, 10, 35, 23]. Alternative approaches are also explored. To be specific, the domain gap can also be reduced through directly translating the source images into target-style images with Generative Adversarial Networks (GANs) [25, 14, 7, 18]. Recently, the structural consistency between domains is exploited to promote the adaptation of semantic segmentation neural networks [34, 5, 1, 24, 37]. Additionally, domain adaptation can be implemented by learning from a pre-defined curriculum as well [31, 41]. Some other works are inspired by the methods in semi-supervised learning, such as self-training [47] or entropy minimization [3, 36]. + +# 3. Motivation + +Pivot knowledge. With only sufficient pixel-level labels in the source domain, the distribution mismatch between domains makes it infeasible to directly apply a model trained with synthetic images to real-world images. Following the domain adaptation methods in image classification, the prior works propose to learn domain-invariant feature space of instances by using domain adversarial training [15, 32, 42, 8, 30]. However, this is not suitable for semantic segmentation since it remains unclear what comprises the data instances, i.e. the proxy to evaluate domain discrepancy, in semantic segmentation [41]. + +![](images/43ae49099234bdf3c1e3c335aeb41da1646741b6d58299b3498c0678ec6e59de.jpg) +Figure 1: The overall architectural of our proposed model. The images from source and target domains will be input to both the fine-grained and coarse-grained components. Our method addresses the adaptation of semantic segmentation neural networks through modeling domain-invariant interaction between the fined-grained component using pixel-level category information and the coarse-grained component using image-level category information. In the corse-grained component, the region expansion units are specified by different colors. The notation "Conv" denotes a convolutional layer. + +Unlike the prior methods, this work aims to address the adaptation of semantic segmentation neural networks by explicitly constructing pivot information that is invariant across different domains. Thanks to the strong idiosyncrasies of urban traffic scenes, it is less challenging to infer the image-level category information of target images than producing the pixel-level predictions [41]. Immediately, it is clear that there exists a strong association between image-level categories and pixel-level semantic information [46, 16]. We argue that the interactive relation between the category information of the two different granularity levels is invariant across domains. This assumption can be reasonable since the images of urban traffic scenes share many similarities regardless of different domains. For example, as shown in Fig. 1, the synthetic and real-world images have very similar appearance in both spatial layout and local context for one specific category, e.g. road, car, building, etc. Motivated by this, we consider the interaction between the image-level categories and the pixel-level semantic information as the pivot information for domain adaptation. + +Multi-level region expansion transfer. A crucial point lies in how to model this interaction. To this end, our model includes two components to learn from the category information of different granularity levels, as shown in Fig. + +1. The fine-grained component produces the segmentation masks for semantic segmentation, while the coarse-grained component generates class activation maps through learning from the image-level category information. The key insight in learning from image-level information is to localize a specific category and expand its region to coincide with the boundary. However, for urban traffic scenes, it is usually difficult to determine the extent of region expansion since the region size varies a lot across different categories. Motivated by this, we propose to design multiple region expansion units in the coarse-grained component, each of which can produce a different class activation map by using a specific aggregation operation. The class activation map of each region expansion unit can reveal some aspect of the pixel-level ground truth, but they are generally inaccurate. + +To associate the fine-grained and coarse-grained components, we integrate the class activation maps of the coarse-grained component with a weighting scheme and enforce them to reconstruct the class activation map of the fine-grained component. The transfer insight is reflected by sharing this reconstruction module between the source and target domains. To this end, the reconstruction loss in the target domain promotes effective information flow from the inferred image-level category information to the pixel-level prediction. Hence, the interactive relation captured from the source images can be transferred to the target domain, + +which helps to infer the pixel-level labels given the inferred image-level category information. + +# 4. Pivot interaction transfer + +# 4.1. Problem statement + +Denote by $I_{s} \in \mathbb{R}^{H \times W \times 3}$ a source image and $\mathbf{Y}_{s} \in \{0,1\}^{H \times W \times C}$ the corresponding pixel-level labels, where $H$ , $W$ and $C$ are the height, width and category number, respectively. In the problem of domain adaptation for semantic segmentation, we are given a labeled source dataset $\mathcal{D}_S = \{(I_s, Y_s)\}_{s \in S}$ and an unlabeled target dataset $\mathcal{D}_{\mathcal{T}} = \{I_t\}_{t \in \mathcal{T}}$ for training. Our goal is to learn a good segmentation network that can achieve desirable pixel-level prediction performance over the target domain. + +# 4.2. Approach + +Image-level category information. Following [41], we extract image features from Inception-ResNet-v2 [33] and use multinomial logistic regression to infer the image-level category information of target images. We train the logistic regression model using the soft label $\mathbf{y}_s \in [0, 1]^C$ , which is calculated as follows: + +$$ +\boldsymbol {y} _ {s} (c) = \frac {1}{H W} \sum_ {i = 1} ^ {H} \sum_ {j = 1} ^ {W} \boldsymbol {Y} _ {s} (i, j, c). +$$ + +It is clear that $\mathbf{y}_s$ reflects the occupancy proportion of each category over an image. For a target image, we directly take the output of the multinomial logistic regression model as its image-level category information, which is denoted by $\mathbf{y}_t$ . + +Fine-grained component. As displayed in Fig. 1, our model includes two interactive components to learn from different granularity levels. Both the fine-grained and coarse-grained components share a common feature extractor, i.e. the fully convolutional backbone, which transforms the input images $\mathbf{X}_m$ to high-level semantic features $\mathbf{F}_m$ , where $m \in S \cup \mathcal{T}$ . Then, the fine-grained component further transforms $\mathbf{F}_m$ via a convolution layer and a bilinear interpolation layer to produce the class activation map $\mathbf{S}_m \in \mathbb{R}^{H \times W \times C}$ . The final pixel-level labels are produced by feeding $\mathbf{S}_m$ to the softmax layer: $\hat{\mathbf{Y}}_m = \mathrm{softmax}(\mathbf{S}_m)$ . + +Coarse-grained component. The coarse-grained component includes $K$ region expansion units, each of which transforms $\pmb{F}_{m}$ via a convolution layer and a bi-linear interpolation layer to produce a class activation map $S_{m}^{k}\in$ $\mathbb{R}^{H\times W\times C}$ . Then, a Log-Sum-Exp (LSE) aggregation layer [26] will process $S_{m}^{k}$ to generate an image-level vector $\pmb{s}^k\in \mathbb{R}^{C\times 1}$ : + +$$ +\boldsymbol {s} ^ {k} (c) = \log \left[ \frac {1}{H W} \sum_ {i = 1} ^ {H} \sum_ {j = 1} ^ {W} \exp \left(r ^ {k} \cdot \boldsymbol {S} _ {m} ^ {k} (i, j, c)\right) \right]. \tag {1} +$$ + +The final image-level labels are produced by feeding $s_m^k$ to the sigmoid layer: $\hat{\pmb{y}}_m^k = \mathrm{sigmoid}(\pmb{s}_m^k)$ . + +Each region expansion unit is trained with the image-level category information independently. The aggregation layer can drive the network towards good pixel-level assignments over the class activation map $S_{m}^{k}$ . In order to produce class activation maps that can reveal different aspects of the pixel-level ground truth, each unit uses a different aggregation operation, which is reflected by the value of $r^{k}$ in Eq. 1. In principle, the LSE aggregation operation acts as a smooth version of the max pooling aggregation. The hyper-parameter $r^{k}$ is the smooth parameter that controls how smoothly the activation value of each pixel contributes to the aggregation output value $s^{k}(c)$ . Specifically, the aggregation operation with a large value of $r^{k}$ tends to select the regions with large activation values to generate the output. Hence, the region expansion unit can only expand a small region over $S_{m}^{k}$ for each image-level category. On the other hand, the one with a small value of $r^{k}$ tends to equally consider every spatial position in the activation map to generate the output and hence makes the region expansion unit expand a large region over $S_{m}^{k}$ . The class activation map of each region expansion unit can reveal some aspect of the pixel-level ground truth, but none of them is absolutely accurate, since the region size varies a lot across different categories in the images of urban traffic scenes. With multiple LSE expansion units, network is able to learn to perform different level of expansion and adapt to the object regions. + +Interaction transfer. The individual components for image-level and pixel-level prediction cannot exploit the interactive relations between the category information of different granularity levels. Hence, we propose a reconstruction mechanism to model the interactions between these two components. To this end, we integrate the class activation maps of the coarse-grained component with a weighting scheme and enforce them to reconstruct the class activation map of the fine-grained component, which is formulated as follows: + +$$ +d _ {m} = \left\| \sum_ {k = 1} ^ {K} w ^ {k} \cdot \pmb {S} _ {m} ^ {k} - \pmb {S} _ {m} \right\| ^ {2}, +$$ + +where $w^{k}$ are learnable parameters. The reconstruction mechanism can promote to exchange knowledge across the two components and capture the domain-invariant interaction between the image-level categories and the pixel-level semantic information. + +Training. In unsupervised domain adaptation, only the source images have pixel-level labels. Hence, we train the fine-grained component with source images: + +$$ +\mathcal {L} _ {f} = \sum_ {m \in \mathcal {S}} \mathcal {L} _ {s e g} (\mathbf {Y} _ {m}, \hat {\mathbf {Y}} _ {m}), +$$ + +where $\mathcal{L}_{seg}$ is the pixel-wise cross-entropy loss. The coarse-grained component is trained with both source and target images: + +$$ +\mathcal {L} _ {c} = \sum_ {m \in \mathcal {S} \cup \mathcal {T}} \sum_ {k = 1} ^ {K} \sum_ {c = 1} ^ {C} \mathcal {L} _ {i m g} (\boldsymbol {y} _ {m} (c), \hat {\boldsymbol {y}} _ {m} ^ {k} (c)), +$$ + +where $\mathcal{L}_{img}$ is the cross-entropy loss trained with soft labels. The image-level labels of the target images are produced by the multinomial logistic regression model trained with source images. The reconstruction loss involves both the source and target domains: + +$$ +\mathcal {L} _ {r} = \sum_ {m \in \mathcal {S} \cup \mathcal {T}} d _ {m}. +$$ + +To sum up, with the above sub-objectives, our final loss function can be formulated as follows: + +$$ +\mathcal {L} = \mathcal {L} _ {f} + \lambda_ {c} \mathcal {L} _ {c} + \lambda_ {r} \mathcal {L} _ {r}, +$$ + +where $\lambda_{c}$ and $\lambda_{r}$ are trade-off parameters that weigh the importance of the corresponding terms. + +# 5. Experiments + +# 5.1. Experimental setup + +We follow the common protocol of previous works [34, 5, 1] and conduct experiments on the standard benchmark settings, including both "GTAV to Cityscapes" and "SYNTHIA to Cityscapes". Specifically, we take GTAV or SYNTHIA datasets with pixel-level annotations as the source domain and Cityscapes dataset without any annotations as the target domain. + +Cityscapes is a dataset that contains real-world photos from the urban traffic scenes of 50 different cities in Germany [9]. Its official data split includes 2,975 training images and 500 validation ones, each of which has a resolution of $2048 \times 1024$ . There exist 19 possible semantic labels for each pixel. Following the prior works [1, 34], we evaluate the performance on the validation set of Cityscapes. + +GTAV is a dataset that contains synthetic images rendered from the game engine of Grand Theft Auto V [27]. It includes 24,966 images with a resolution of $1914 \times 1052$ . The pixel-level labels, which are generated automatically by computer graphics techniques, are fully compatible with Cityscapes. In experiments, 19 common categories between GTAV and Cityscapes are of interest. + +SYNTHIA is another synthetic dataset that contains 9,400 photo-realistic images with a resolution of $1280 \times 960$ rendered from virtual scenes [28]. Like GTAV, the pixel-level labels are automatically produced and compatible with Cityscapes. Following the previous works [34, 5], we use + +the SYNTHIA-RAND-CITYSCAPES subset in the experiments and evaluate performance on 16 common categories between SYNTHIA and Cityscapes. + +# 5.2. Implementation details + +We conduct experiments employing deeplab-v2 with ResNet-101 [2] and FCN8s with VGG-16 [21], both of which are pre-trained on ImageNet, as the base networks. Similar to [34], the images of GTAV and Cityscapes are resized to the resolution of $1280 \times 640$ and $1024 \times 512$ , respectively. The resolution of SYNTHIA images remains unchanged. To validate the robustness of our method, we adopt the same hyper-parameter setting in both "GTAV to Cityscapes" and "SYNTHIA to Cityscapes". The model is trained by the Stochastic Gradient Decent (SGD) optimizer with the initial learning rate of $2.5 \times 10^{-5}$ and the momentum of 0.9. The maximum iteration number is set to 200,000 and the batch size is set to 4. The learning rate decreases according to the polynomial decay policy with power of 0.9. We use 3 region expansion units in our model, with the hyper-parameters $r^k$ set to $\{0.5, 1, 1.5\}$ . The values of $\lambda_r$ and $\lambda_c$ are set to 0.5. + +The implementation of the logistic regression model follows [41]. In the regression head, there is only one layer. SGD optimizer with the initial learning rate of $1.0 \times 10^{-4}$ and the momentum of 0.9 is used. The learning rate scheduler follows exponential decay policy with the decay rate of 0.99 and the minimum learning rate of $1.0 \times 10^{-6}$ . + +# 5.3. Performance comparison + +Our proposed method is compared with the existing state-of-the-art methods, including [23, 35, 7, 37, 1, 24, 3, 36, 14, 47, 6, 34, 8, 13, 42, 39]. Of these, the works [23, 35, 42, 6, 8, 39] mainly focus on leaning domain-invariant representation of instances; the works [7, 14] directly translate the source images into target-style images with GANs; the works [37, 5, 1, 24, 34] exploit the structural consistency between domains through conducting domain-adversarial training at the output space of semantic segmentation networks; the works [3, 36, 47] are inspired by the semi-supervised learning methods such as self-training or entropy minimization; and Saleh et al. [13] stands out from the other works by domain flow generation. We adopt the mean Intersection-Over-Union (mIoU) value as the metric of evaluation. + +GTAV to Cityscapes. We display the comparisons of unsupervised domain adaptation from GTAV to Cityscapes in Table 1. The following observations can be drawn. First, domain adaptation approaches can outperform the "source only" models that are trained with only the source images by a large performance gain. This observation validates the effectiveness of using domain adaptation techniques to promote the adaptation of semantic segmentation networks. + +Table 1: Comparison on "GTAV to Cityscapes" in terms of per-class IoUs and mIoU (%). + +
MethodBase ModelroadslwkbldngwallfencepolelightsignvgttntrmskypersonridercartruckbustrainmeyolbeyolmIoU
Source only [39]VGG-1672.525.171.26.613.412.311.04.776.116.467.743.18.070.411.34.80.013.90.427.8
Source only(ours)66.523.368.217.112.114.516.04.079.616.764.240.32.170.820.516.82.08.90.028.6
DPR [35]87.335.779.532.014.521.524.813.780.432.070.550.516.981.020.828.14.115.54.137.5
ROAD [6]85.431.278.627.922.221.923.711.480.729.368.948.514.178.019.123.89.48.30.035.9
SIBAN [23]83.413.077.820.417.524.622.89.681.329.677.342.710.976.022.817.95.714.22.034.2
DCAN [39]82.326.777.423.720.520.430.315.980.925.469.552.611.179.624.921.21.317.06.736.2
CrDoCo [7]89.133.280.126.925.018.323.412.877.029.172.455.120.279.922.319.51.020.118.738.1
CyCADA [14]85.237.276.521.815.023.822.921.580.531.360.750.59.076.917.128.24.59.80.035.4
AdaptSeg [34]87.329.878.621.118.222.521.511.079.729.671.346.86.580.123.026.90.010.60.335.0
CLAN [24]88.030.679.223.420.526.123.014.881.634.572.045.87.980.526.629.90.010.70.036.6
AdvEnt [36]86.928.778.728.525.217.120.310.980.026.470.247.18.481.526.017.218.911.71.636.1
CBST [47]90.450.872.018.39.527.228.614.182.425.170.842.614.576.95.912.51.214.028.636.1
PIT(ours)86.235.082.131.122.123.229.428.579.331.881.952.123.280.429.526.930.720.51.241.8
Source only [35]ResNet-10175.816.877.212.521.025.530.120.181.324.670.353.826.449.917.225.96.525.336.036.6
Source only(ours)75.220.277.722.620.925.727.818.380.19.873.156.023.065.427.06.82.721.834.336.2
DPR [35]92.351.982.129.225.124.533.833.082.432.882.258.627.284.333.446.32.229.532.346.5
SIBAN [23]88.535.479.526.324.328.532.518.381.240.076.558.125.882.630.334.43.421.621.542.6
FCAN [42]-------------------46.6
AdaptSeg [34]86.536.079.923.423.323.935.214.883.433.375.658.527.673.732.535.43.930.128.142.4
CLAN [24]87.027.179.627.323.328.335.524.283.627.474.258.628.076.233.136.76.731.931.443.2
DISE [1]91.547.582.531.325.633.033.725.882.728.882.762.430.885.227.734.56.425.224.445.4
AdvEnt [36]89.433.181.026.626.827.233.524.783.936.778.858.730.584.838.544.51.731.632.445.5
MSL [3]89.443.082.130.521.330.334.724.085.339.478.263.022.984.636.443.05.534.733.546.4
DLOW [13]87.133.580.524.513.229.829.526.682.626.781.855.925.378.033.538.70.022.934.542.3
PIT(ours)87.543.478.831.230.236.339.942.079.237.179.365.437.583.246.045.625.723.549.950.6
+ +Moreover, our method can achieve significantly better results than that of the compared state-of-the-art works. In particular, our method is good at predicting foreground objects, such as "light", "person", "motorcycle", "sign", "rider", "truck", "train", etc. It is because that the image-level predictions in cose-grained component can explicitly encourage the region activation for these foreground classes in the class activation map and thus improve the performance. + +In Fig. 2, we further display the qualitative segmentation results. We can see that the segmentation masks obtained by our method can reflect a good understanding of the road traffic scenes. Both the dominant background classes (e.g. "road", "sidewalk" and "building") and foreground objects (e.g. "light", "person" and "car") can be well predicted. + +SYNTHIA to Cityscapes. Comparisons are also conducted on the "SYNTHIA to Cityscapes" setting. From Table 2, it is clear that our method can outperform the compared methods with a large performance gain. We can draw the similar discussions as in "GTAV to Cityscapes". Our approach is also potential to be applied to other domain adaptation scenarios like semantic segmentation cross weather conditions, lighting conditions or cities in autonomous driving, due to the relatively constant appearance of each category. + +# 5.4. Analysis + +We further report the ablation study results to demonstrate the contributions of each design in our proposed method in Table 3. The first row displays the performance + +of the full PIT model. From the next two rows, it is clear that both the two losses, $\mathcal{L}_c$ and $\mathcal{L}_r$ , are essential to obtain a good segmentation model. Specifically, for the second row, when the coarse-grained component does not learn from the image-level categories, the reconstruction loss cannot capture correct interactions for transfer. For the third row, when the fined-grained and coarse-grained components do not interact with each other, the model will fail to exploit the underlying domain-invariant correlations between them. Furthermore, we evaluate the performance decoupling the source images from the reconstruction loss, which is displayed in the fourth row. It is clear that this will cause a significant performance drop, which demonstrates that the interactions between the two different granularity levels are mainly captured by the source domain, and then transferred to the target domain. This result confirms our assumption that the interactive relation between the image-level and pixel-level category information is the pivot information shared by different domains. In the next three rows, we evaluate the performance using one expansion unit to model the interactive relation. We can see that only one region expansion unit is insufficient to exploit the pivot knowledge for transfer. We draw two reasons for this. First, with one region expansion unit, the reconstruction loss can only model a very simple interactive relation, i.e. a scaling relation, between the class activation maps of the two components. Second, for urban traffic scenes, since the region size varies a lot across different categories, one single region expansion unit can only capture some aspect of the pixel-level + +Table 2: Comparison on "SYNTHIA to Cityscapes" in terms of per-class IoUs and mIoU (\%). The mIoU* column denotes the mean IoU over 13 categories excluding those marked by *. + +
MethodBase Modelroadsdwkbldhgwall*fence*pole*lightsienvgttnskypersonridercarbusmcyclbcyclemloUmloU*
Source only [39]VGG-1610.811.466.61.60.116.95.514.174.276.246.011.545.415.16.013.425.930.4
Source only(ours)8.69.676.31.30.55.56.73.974.371.339.97.370.017.43.56.225.130.3
DPR [35]72.629.577.23.50.421.01.47.973.379.045.714.569.419.67.416.533.739.6
SIBAN [23]70.125.780.9---3.87.272.380.543.35.073.316.01.73.6-37.2
DCAN [39]79.930.470.81.60.622.36.723.076.973.941.916.761.711.510.338.635.441.6
CWDA [8]62.725.678.3---1.25.481.381.037.46.463.516.11.24.6-35.7
AdaptSeg [34]78.929.275.5---0.14.872.676.743.48.871.116.03.68.4-37.6
CLAN [24]80.430.774.7---1.48.077.179.046.58.973.818.22.29.9-39.3
AdvEnt [36]67.929.471.96.30.319.90.62.674.974.935.49.667.821.44.115.531.436.6
CBST [47]69.628.769.512.10.125.411.913.682.081.949.114.566.06.63.732.435.436.1
PIT(ours)81.726.978.46.30.219.813.417.476.774.147.522.476.021.719.627.738.144.9
Source only [35]ResNet-10155.623.874.69.20.224.46.112.174.879.055.319.139.623.313.725.033.538.6
Source only(ours)57.421.574.63.20.74.67.89.772.680.053.721.838.522.111.824.831.538.2
DPR [35]82.438.078.68.70.626.03.911.175.584.653.521.671.432.619.331.740.046.5
SIBAN [23]82.524.079.4---16.512.779.282.858.318.079.325.317.625.9-46.3
AdaptSeg [34]84.342.777.5---4.77.077.982.554.321.072.332.218.932.3-46.7
CLAN [24]81.337.080.1---16.113.778.281.553.421.273.032.922.630.7-47.8
DISE [1]91.753.577.12.50.227.16.27.678.481.255.819.282.330.317.134.3-41.5
DADA [37]89.244.881.46.80.326.28.611.181.884.054.719.379.740.714.038.842.649.8
AdvEnt [36]85.642.279.78.70.425.95.48.180.484.157.923.873.336.414.233.041.248.0
MSL [3]82.940.780.310.20.825.812.818.282.582.253.118.079.031.410.435.641.448.2
PIT(ours)83.127.681.58.90.321.826.433.876.478.864.227.679.631.231.031.344.051.8
+ +Table 3: Ablation study of the proposed PIT in terms of mIOU (\%). The notation $-\mathcal{L}_r(S)$ indicates decoupling the source data from the reconstruction loss. + +
Model designGTAVSYNTHIA
VGG-16Res-101VGG-16Res-101
Full model41.850.638.144.0
- Lc(S + T)35.940.834.836.2
- Lr(S + T)34.238.032.137.3
- Lr(S)36.438.535.239.9
Unit 1 (r = 0.5)38.244.935.340.1
Unit 2 (r = 1)39.245.234.841.1
Unit 3 (r = 1.5)37.545.736.139.6
+ +Table 4: Comparisons with different number of region expansion units in terms of mIOU $(\%)$ . + +
Number (r-k)GTAVSYNTHIA
VGG-16Res-101VGG-16Res-101
1{0.5}38.244.935.340.1
2{0.5,1}40.248.237.342.5
3{0.5,1.0,1.5}41.850.638.144.0
4{0.5,1.0,1.5,2.0}41.350.737.043.5
+ +ground truth. Hence, the coarse-grained component cannot learn enough information for transfer. We display the class activation map of each region expansion unit in Fig. 3. It is clear that the class activation map of each region expansion unit can reveal some aspect of the pixel-level ground truth, but none of them is absolutely accurate. + +Moreover, we conduct comparisons with different number of region expansion units as shown in Table 4. We can see that the performance is improved gradually when we increase the number of region expansion units from 1 to + +Table 5: Comparisons of different domain adaptation settings in terms of mIOU (\%). UDA denotes the unsupervised domain adaptation setting and WDA denotes the weakly-supervised domain adaptation setting. + +
Setting (method)GTAVSYNTHIA
VGG-16Res-101VGG-16Res-101
UDA (ours)41.850.638.144.0
WDA (ours)43.852.942.447.3
WDA (ODC [38])37.4-35.7-
+ +3. The performance begins to drop when we use 4 region expansion units. We ascribe it to the reason that the interactions between image-level and pixel-level information have already been captured by using 3 region expansion units. It will introduce more parameters and cause the problem of overfitting if more expansion units are used. + +# 5.5. Weakly-supervised domain adaptation + +The accuracy of the image-level categories of the target domain is essential to obtain good performance. Obviously, our method is also suitable for the weakly-supervised domain adaptation setting, in which the image-level labels of the target domain are available during training. The image-level labels reveal whether a specific category exists in a target image. We report the comparisons of different domain adaptation settings in Table 5. We can see that our method obtains even better results given the image-level ground truth of target images. However, the performance of the unsupervised setting is generally close to that of the weakly-supervised setting. This reflects that the multinomial logistic regression model can predict the image-level + +![](images/12750165da6ebab97793272d4fea7db9c2f477465b7979092c80a91c5dfb5ef2.jpg) + +![](images/4b4f2309262fb764b5a837a7e4e9b59fc4e759bbd7c847310a3113b186b2032a.jpg) + +![](images/75578dda69c84cbb9f55d2ef27ca3f2c7f739a530bbf608c2a4b3262d444f72c.jpg) + +![](images/b40c4dfcaafee5a93df53a27e74b4ecd6a13a145817b63ddb7189a4769453a46.jpg) + +![](images/e101a708524c50b19d167bd7e4059e4d9654d65a1827134417f2014bbda4c442.jpg) + +![](images/38aafeaf9647ceb121f42f96cfd8eff0f38e814222cad672cc153ba2a7ee0371.jpg) + +![](images/b9dbc74cbbd60eff8c88fdd287d254f340101c195be7d01ce7388936edd121b7.jpg) + +![](images/51191ffadace539747d698d0c1df9d3394e16aeea45ec3f58c42216d0cfd0f8e.jpg) + +![](images/e5e45ea5d858171b92a76cb81bf56e49207bbad378bc9b615583d6a06e27faf3.jpg) +(a) target image + +![](images/8f3282a158e473ce0ac0a63a0eb81f418c022b886d3933c3777c33571d5dad38.jpg) +(b) ground truth + +![](images/62376614fb298e14cc9dfbd6299f8646c1df2a64a04d14a2c97449a4475c8e19.jpg) +(c) source only + +![](images/59db040e4428df26349f5929200559403c5eeb7db62a440259813049e3b1019f.jpg) +(d) PIT + +![](images/6a0e97996d795fe08a0fd98746be200ebec57cfa49e6828b4903011b92c0f237.jpg) +Figure 2: Qualitative results on "GTAV to Cityscapes", (a) target images, (b) ground truth, (c) segmentation results of the "source only" baseline, (d) segmentation results of the proposed PIT method. +Figure 3: The class activation map of each region expansion unit. + +categories of target images well. Additionally, compared to Objects Domain Classifier (ODC) that utilizes box-level label from the target domain as weak supervision [38], our method obtains better results, even though the box-level labels convey much more information than image-level weak supervision. + +# 6. Conclusion + +In this paper, we propose a new domain adaptation approach by constructing pivot information that is common knowledge shared across domains to promote the adaptation of semantic segmentation neural networks. To this end, we design a multi-level region expansion mechanism to model the domain-invariant interaction between the image-level categories and the pixel-level semantic information. Unlike the prior works that focus on learning domain-invariant rep + +resentations of instances by using domain adversarial training, our method constructs the transferrable factors across different domains explicitly. Additionally, our method does not rely on the adversarial training which is often hard to optimize. We conduct extensive experiments on the adaptation from both GTAV and SYNTHIA to Cityscapes. The experimental results clearly demonstrate that our method obtains better results than the existing state-of-the-art works. + +Acknowledgements. This work was supported by the National Natural Science Foundation of China (No.11829101 and 11931014) and the Fundamental Research Funds for the Central Universities of China (No.JBK1806002). G. Lin's participation was supported by the National Research Foundation Singapore under its AI Singapore Programme [AISG-RP-2018-003]. F. Lv devotes this work to his father for the thanks to his parenting and company. + +# References + +[1] Wei-Lun Chang, Hui-Po Wang, Wen-Hsiao Peng, and Wei-Chen Chiu. All about structure: adapting structural information across domains for boosting semantic segmentation. In CVPR, pages 1900-1909, 2019. +[2] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE Trans. Pattern Anal. Mach. Intell., 40(4):834-848, 2018. +[3] Minghao Chen, Hongyang Xue, and Deng Cai. Domain adaptation for semantic segmentation with maximum squares loss. In ICCV, pages 2090-2099, 2019. +[4] Qingchao Chen, Yang Liu, Zhaowen Wang, Ian Wassell, and Kevin Chetty. Re-weighted adversarial adaptation network for unsupervised domain adaptation. In CVPR, pages 7976-7985, 2018. +[5] Yuhua Chen, Wen Li, Xiaoran Chen, and Luc Van Gool. Learning semantic segmentation from synthetic data: a geometrically guided input-output adaptation approach. In CVPR, pages 1841-1850, 2019. +[6] Yuhua Chen, Wen Li, and Luc Van Gool. Road: reality oriented adaptation for semantic segmentation of urban scenes. In CVPR, pages 7892-7901, 2018. +[7] Yun-Chun Chen, Yen-Yu Lin, Ming-Hsuan Yang, and Jia-Bin Huang. Crdoco: pixel-level domain transfer with cross-domain consistency. In CVPR, pages 1791-1800, 2019. +[8] Yi-Hsin Chen, Wei-Yu Chen, Yu-Ting Chen, Bo-Cheng Tsai, Yu-Chiang Frank Wang, and Min Sun. No more discrimination: cross city adaptation of road scene segmenters. In ICCV, pages 2011-2020, 2017. +[9] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In CVPR, pages 3213-3223, 2016. +[10] Liang Du, Jingang Tan, Hongye Yang, Jianfeng Feng, Xiangyang Xue, Qibao Zheng, Xiaqing Ye, and Xiaolin Zhang. Ssf-dan: separated semantic feature based domain adaptation network for semantic segmentation. In ICCV, pages 982-991, 2019. +[11] Geoffrey French, Michal Mackiewicz, and Mark Fisher. Self-ensembling for visual domain adaptation. In ICLR, 2018. +[12] Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In ICML, pages 1180-1189, 2015. + +[13] Rui Gong, Wen Li, Yuhua Chen, and Luc Van Gool. Dlow: domain flow for adaptation and generalization. In CVPR, pages 2477-2486, 2019. +[14] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. In ICML, 2018. +[15] Judy Hoffman, Dequan Wang, Fisher Yu, and Trevor Darrell. Fcns in the wild: Pixel-level adversarial and constraint-based adaptation. arXiv preprint arXiv:1612.02649, 2016. +[16] Alexander Kolesnikov and Christoph H Lampert. Seed, expand and constrain: three principles for weakly-supervised image segmentation. In ECCV, pages 695-711, 2016. +[17] Seungmin Lee, Dongwan Kim, Namil Kim, and Seong-Gyun Jeong. Drop to adapt: learning discriminative features for unsupervised domain adaptation. In ICCV, pages 91-100, 2019. +[18] Yunsheng Li, Lu Yuan, and Nuno Vasconcelos. Bidirectional learning for domain adaptation of semantic segmentation. In CVPR, pages 6936-6945, 2019. +[19] Guosheng Lin, Anton Milan, Chunhua Shen, and Ian Reid. Refinenet: multi-path refinement networks for high-resolution semantic segmentation. In CVPR, pages 1925-1934, 2017. +[20] Wei Liu, Andrew Rabinovich, and Alexander C Berg. Parsenet: looking wider to see better. arXiv preprint arXiv:1506.04579, 2015. +[21] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, pages 3431-3440, 2015. +[22] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael Jordan. Learning transferable features with deep adaptation networks. In ICML, pages 97-105, 2015. +[23] Yawei Luo, Ping Liu, Tao Guan, Junqing Yu, and Yi Yang. Significance-aware information bottleneck for domain adaptive semantic segmentation. ICCV, 2019. +[24] Yawei Luo, Liang Zheng, Tao Guan, Junqing Yu, and Yi Yang. Taking a closer look at domain shift: category-level adversaries for semantics consistent domain adaptation. In CVPR, pages 2507-2516, 2019. +[25] Zak Murez, Soheil Kolouri, David Kriegman, Ravi Ramamoorthi, and Kyungnam Kim. Image to image translation for domain adaptation. In CVPR, pages 4500-4509, 2018. +[26] Pedro O Pinheiro and Ronan Collobert. From image-level to pixel-level labeling with convolutional networks. In CVPR, pages 1713-1721, 2015. + +[27] Stephan R Richter, Vibhav Vineet, Stefan Roth, and Vladlen Koltun. Playing for data: ground truth from computer games. In ECCV, pages 102-118, 2016. +[28] German Ros, Laura Sellart, Joanna Materzynska, David Vazquez, and Antonio M Lopez. The synthia dataset: a large collection of synthetic images for semantic segmentation of urban scenes. In CVPR, pages 3234-3243, 2016. +[29] Kuniaki Saito, Yoshitaka Ushiku, and Tatsuya Harada. Asymmetric tri-training for unsupervised domain adaptation. In ICML, pages 2988-2997, 2017. +[30] Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier discrepancy for unsupervised domain adaptation. In CVPR, pages 3723-3732, 2018. +[31] Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Guided curriculum model adaptation and uncertainty-aware evaluation for semantic nighttime image segmentation. In ICCV, pages 7374-7383, 2019. +[32] Swami Sankaranarayanan, Yogesh Balaji, Arpit Jain, Ser Nam Lim, and Rama Chellappa. Unsupervised domain adaptation for semantic segmentation with gans. arXiv preprint arXiv:1711.06969, 2017. +[33] 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. +[34] Yi-Hsuan Tsai, Wei-Chih Hung, Samuel Schulter, Kiyuk Sohn, Ming-Hsuan Yang, and Manmohan Chandraker. Learning to adapt structured output space for semantic segmentation. In CVPR, pages 7472-7481, 2018. +[35] Yi-Hsuan Tsai, Kihyuk Sohn, Samuel Schulter, and Manmohan Chandraker. Domain adaptation for structured output via discriminative patch representations. In ICCV, 2019. +[36] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Pérez. Advent: adversarial entropy minimization for domain adaptation in semantic segmentation. In CVPR, pages 2517-2526, 2019. +[37] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Perez. Dada: depth-aware domain adaptation in semantic segmentation. In ICCV, 2019. +[38] Qi Wang, Junyu Gao, and Xuelong Li. Weakly supervised adversarial domain adaptation for semantic segmentation in urban scenes. IEEE Trans. Image Processing, 28(9):4376-4386, 2019. +[39] Zuxuan Wu, Xintong Han, Yen-Liang Lin, Mustafa Gokhan Uzunbas, Tom Goldstein, Ser Nam Lim, and + +Larry S Davis. Dcan: Dual channel-wise alignment networks for unsupervised scene adaptation. In ECCV, pages 518-534, 2018. +[40] Fisher Yu and Vladlen Koltun. Multi-scale context aggregation by dilated convolutions. In ICLR, 2016. +[41] Yang Zhang, Philip David, Hassan Foroosh, and Boqing Gong. A curriculum domain adaptation approach to the semantic segmentation of urban scenes. IEEE Trans. Pattern Anal. Mach. Intell., 2019. +[42] Yiheng Zhang, Zhaofan Qiu, Ting Yao, Dong Liu, and Tao Mei. Fully convolutional adaptation networks for semantic segmentation. In CVPR, pages 6810-6818, 2018. +[43] Yabin Zhang, Hui Tang, Kui Jia, and Mingkui Tan. Domain-symmetric networks for adversarial domain adaptation. In CVPR, pages 5031-5040, 2019. +[44] Hengshuang Zhao, Jianping Shi, Xiaojuan Qi, Xiaogang Wang, and Jiaya Jia. Pyramid scene parsing network. In CVPR, pages 2881-2890, 2017. +[45] Shuai Zheng, Sadeep Jayasumana, Bernardino Romera-Paredes, Vibhav Vineet, Zhizhong Su, Dalong Du, Chang Huang, and Philip HS Torr. Conditional random fields as recurrent neural networks. In ICCV, pages 1529-1537, 2015. +[46] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In CVPR, pages 2921-2929, 2016. +[47] Yang Zou, Zhiding Yu, BVK Vijaya Kumar, and Jinsong Wang. Unsupervised domain adaptation for semantic segmentation via class-balanced self-training. In ECCV, pages 289-305, 2018. \ No newline at end of file diff --git a/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/images.zip b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..82d7617cfd66c43107898ff3fda0c1610a3a66b2 --- /dev/null +++ b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ffef89e2b5d0a0d65446aab85f4a16abc035e9e1dceab364278aa4cbc31e3622 +size 719600 diff --git a/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/layout.json b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..541cb2c14d1791af20156bcd65b8e20ca4912a00 --- /dev/null +++ b/crossdomainsemanticsegmentationviadomaininvariantinteractiverelationtransfer/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00839f2578e2b84af5d9f07fa232565a25d509ac39865062e68491ecb2b62427 +size 345359 diff --git a/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/d1d7b457-c058-4b83-92d2-e89e45321797_content_list.json b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/d1d7b457-c058-4b83-92d2-e89e45321797_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..444198afeed5acdf40d31d97cc4016f14086349c --- /dev/null +++ b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/d1d7b457-c058-4b83-92d2-e89e45321797_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b10bb6db54171042660ac0b8d717e62a24550fd9bd6852ff3911c2ef6eefb0b8 +size 76551 diff --git a/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/d1d7b457-c058-4b83-92d2-e89e45321797_model.json b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/d1d7b457-c058-4b83-92d2-e89e45321797_model.json new file mode 100644 index 0000000000000000000000000000000000000000..7fe55ae8dd70c516cd70baf33768b5382feb186e --- /dev/null +++ b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/d1d7b457-c058-4b83-92d2-e89e45321797_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d3c20a958a1f8bdf452495eb8b1b39e136e20e3cd06e67ffb708f849bf6a8a1 +size 92135 diff --git a/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/d1d7b457-c058-4b83-92d2-e89e45321797_origin.pdf b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/d1d7b457-c058-4b83-92d2-e89e45321797_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a1f060b8b158f244b5417676e5d8d509382a6dd3 --- /dev/null +++ b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/d1d7b457-c058-4b83-92d2-e89e45321797_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf374afffa806a3c1f38b5fc3b3cfccd10192ba8f6d82b6f52a879c12c988056 +size 759525 diff --git a/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/full.md b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/full.md new file mode 100644 index 0000000000000000000000000000000000000000..e40fed1ee174e490e9f5ecf2a59530e05187ad5c --- /dev/null +++ b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/full.md @@ -0,0 +1,360 @@ +# Cross-Modal Cross-Domain Moment Alignment Network for Person Search + +Ya Jing, $^{1,3}$ Wei Wang, $^{1,3*}$ Liang Wang, $^{1,2,3}$ Tieniu Tan $^{1,2,3}$ + +1Center for Research on Intelligent Perception and Computing (CRIPAC), National Laboratory of Pattern Recognition (NLPR) + +$^{2}$ Center for Excellence in Brain Science and Intelligence Technology (CEBSIT), Institute of Automation, Chinese Academy of Sciences (CASIA) + +3University of Chinese Academy of Sciences (UCAS) + +ya.jing@cripac.ia.ac.cn, {wangwei, wangliang, tint} @nlpr.ia.ac.cn + +# Abstract + +Text-based person search has drawn increasing attention due to its wide applications in video surveillance. However, most of the existing models depend heavily on paired image-text data, which is very expensive to acquire. Moreover, they always face huge performance drop when directly exploiting them to new domains. To overcome this problem, we make the first attempt to adapt the model to new target domains in the absence of pairwise labels, which combines the challenges from both cross-modal (text-based) person search and cross-domain person search. Specially, we propose a moment alignment network (MAN) to solve the cross-modal cross-domain person search task in this paper. The idea is to learn three effective moment alignments including domain alignment (DA), cross-modal alignment (CA) and exemplar alignment (EA), which together can learn domain-invariant and semantic aligned cross-modal representations to improve model generalization. Extensive experiments are conducted on CUHK Person Description dataset (CUHK-PEDES) and Richly Annotated Pedestrian dataset (RAP). Experimental results show that our proposed model achieves the state-of-the-art performances on five transfer tasks. + +# 1. Introduction + +Person search is a fundamental task in video surveillance and has gained great attention in recent years due to its wide applications. Existing methods of person search mainly focus on image-based person search also called person re-identification (Person Re-ID) [36], which aims to predict whether two images from different cameras belong to the same person. Great successes have been achieved with the development of deep neural networks [9]. + +![](images/ba99c57b1112839b668117c8c8537636d52a08fa0907941c3b2a32a9abc41a25.jpg) +Figure 1. Our proposed (d) cross-modal cross-domain text-based person image search combines the challenges from both (b) cross-domain image-based person search and (c) cross-modal text-based person image search. + +However, most of the person Re-ID models are trained in a supervised learning manner based on manually labeled pairwise datasets, which are expensive or impossible to collect in practice. This limits the applications where only unlabeled data is available. A feasible method is to transfer the learned models in labeled source domain to a new unlabeled target domain, which is called cross-domain person Re-ID [27] as shown in Fig. 1 (b). Nevertheless, due to the dataset bias, it is still difficult to generalize the model trained on labeled dataset to an unlabeled dataset. As a result, how to relieve the domain shift becomes increasingly important. To address this issue, several attempts have been proposed recently. They aim to learn a discriminative representation for target set with labeled source dataset and unlabeled target dataset. A common practice [27, 34] is to transform the source image into target domain style and thus utilizes the supervised learning. + +Moreover, person Re-ID needs at least one image of + +the queried person which in many cases is very difficult to obtain. Since textual descriptions are more accessible, text-based person search [15] can solve query person image missing problem, which is also a cross-modal task as shown in Fig. 1 (c). Text-based person search aims to retrieve the corresponding person images to a textual description from a large-scale person database, which faces the challenges of semantic gap between image and text. Similar to image-based person search, text-based person search still has the problem of lacking labeled pairwise data and needs domain adaptation from labeled source domain to unlabeled target domain. Furthermore, text-based person search also faces the domain shifts in images between different datasets on account of different collecting surveillance scenarios. + +In this paper, we propose a new task of cross-modal cross-domain text-based person image search as shown in Fig. 1 (d), which combines the challenges from both cross-domain image-based person search and cross-modal text-based person image search. To the best of our knowledge, there is no such task proposed in previous work. Furthermore, we propose a moment alignment network (MAN) for this task, which contains three alignment modules to reduce the domain discrepancy in a complementary way: domain alignment (DA), cross-modal alignment (CA) and exemplar alignment (EA). Fig. 2 shows the architecture of MAN. + +Specifically, we first learn four classifiers for source/target image/text classification. Considering the alignment and preserved semantic structure between the class-level mean of data distribution and classifier parameter introduced in [20], we take classifier parameter of a category as the mean of the data distribution of that category, also called class mean. Through measuring the similarity between sample representation in target domain and class means (classifier parameters) in source domain, we can compute pseudo labels for unlabeled target data, which are used as supervision information of the target classifiers. Particularly, we call the class means (classifier parameters) and their variance as class moments which will be used for alignments. + +Next, we compute three alignments. First, to directly alleviate the domain discrepancy, we propose a domain alignment by minimizing the distance of the class moments between source and target domains. Based on the domain alignment strategy, the learned representations are constrained to be invariant across domains. Second, due to the semantic gap between person image and textual description, we propose a cross-modal alignment by minimizing the distance of the class moments between image and text in target domain. Note that the cross-modal alignment in source domain is implemented by minimizing the ranking loss function [3]. Third, considering that the representations in target domain learned from pseudo labels may be not optimally discriminative, we propose an exemplar alignment to further enhance the clustering characteristics of represen + +tations in target domain by maximizing the probability of a target exemplar belonging to its class. By modelling these three alignments jointly, we can learn domain-invariant and semantic aligned cross-modal representations. + +Our proposed method is evaluated on CUHK Person Description dataset (CUHK-PEDES) [15] and Richly Annotated Pedestrian dataset (RAP) [12], and achieves the state-of-the-art results on five transfer tasks. + +In summary, the main contributions are three-fold: + +(1) We make the first attempt to conduct domain adaptive text-based person search, which is a challenging cross-modal cross-domain task. (2) We propose a novel cross-modal cross-domain moment alignment network, where domain alignment, cross-modal alignment, and exemplar alignment are jointly modeled to reduce the domain discrepancy and semantic gap in a complementary way. (3) The experimental results indicate that our MAN achieves the best performances. And extensive ablation studies demonstrate the effectiveness of each component in the MAN for domain adaptive text-based person search. + +# 2. Related Work + +In this section, we introduce the related works, including text-based person search, cross-domain person Re-ID and unsupervised domain adaptation. + +# 2.1. Text-Based Person Search + +Li et al. [15] propose the task of text-based person search and further employ a CNN (Convolutional Neural Network) [10]-LSTM (Long Short-Term Memory) [7] network with gated neural attention for this task. To exploit the person identification, Li et al. [14] propose an identity-aware two-stage network. PWM+ATH [1] utilizes a patch-word matching model to exploit the local similarity. Different from the above methods which all aim to learn the correspondence between image and text by attention mechanism, Dual Path [33] employs an identification loss for instance-level image-text matching. CMPM+CMPC [31] devises a cross-modal projection matching (CMPM) loss and a cross-modal projection classification (CMPC) loss for learning discriminative image-text embeddings. TIMAM [21] employs an adversarial discriminator that aims to identify whether the input is originating from the visual or textual modality to learn discriminative modality-invariant embeddings. In contrast to them, we learn the unsupervised domain adaptive text-based person search, which does not need paired image-text data in target domain. + +# 2.2. Cross-Domain Person Re-ID + +Cross-domain person Re-ID is proposed due to the expensive or impossible identity labeling, which aims to learn a generalized retrieval model by labeled source dataset and + +![](images/d279e8d7c1947976a0b77f4532a032af61002f08ccf92e69af8ef0fd8c2a73b2.jpg) +Figure 2. The architecture of our proposed cross-modal cross-domain moment alignment network (MAN). A visual CNN and a bidirectional LSTM are utilized to encode the image and text, respectively. The classifier parameter is utilized to represent the class-level mean of the data distribution, i.e., class mean. Note that the class means and their variance are called as class moments. Subsequently, three moment alignments including domain alignment, cross-modal alignment, and exemplar alignment are proposed to relieve the domain shift. Moreover, we calculate a pseudo label for each target sample to guide the learning of target classifiers. Best viewed in color. + +![](images/6126c286c60ccd7428ef3333d456d884547b83ba1e41ef45b3ca85f66e07a86e.jpg) + +unlabeled target dataset. To reduce the domain shift between datasets, several methods are proposed. TJ-AIDL [26] learns an attribute-semantic and identity-discriminative feature space transferrable to unseen domains. PTGAN [27] and HHL [34] both utilize Generative Adversarial Networks (GAN) [4] to transfer the source domain images into target domain style. Then the model is trained on these translated images and suitable for the target domain. ECN [35] investigates into the intra-domain invariance of the target domain. Another line of works [13, 30] focus on learning pseudo identity labels in target domain. Yu et al. [30] propose to learn a soft multilabel for each unlabeled person by the comparison with a set of known reference persons from an auxiliary dataset. Different from them, we study the domain adaptation in text-based person search, which needs to mine not only the cross-domain alignment but also the cross-modal alignment. In addition, we are probably the first to study the domain adaptive text-based person search. + +# 2.3. Unsupervised Domain Adaptation + +Domain adaptive person search is closely related to the unsupervised domain adaptation (UDA) [18, 22, 24, 19]. ADDA [24] designs a domain classifier based on adversarial learning objectives to reduce the domain gap. TPN [19] utilizes Transferrable Prototypical Networks for adaptation such that the prototypes for each class in source and target domains are close in the embedding space and the score distributions predicted by prototypes separately on source and target data are similar. However, most of UDA methods assume that the classes are shared between source and target + +domains, which cannot be applied to person search. The completely different identities between source and target domains make domain adaptive person search more challenging than UDA. + +# 3. Cross-Modal Cross-Domain Moment Alignment Network + +In this section, we first explain the proposed cross-modal cross-domain moment alignment network in detail. Afterwards, we introduce the learning procedure of the model. + +# 3.1. Notations and Definitions + +In domain adaptive text-based person search, we are given a labeled source dataset $X^{s} = \{I^{s} = \{I_{i}^{s},y_{i}^{s}\}_{i = 1}^{N_{I}^{s}},T^{s} = \{T_{j}^{s},y_{j}^{s}\}_{j = 1}^{N_{T}^{s}}\}$ , where $N_{I}^{s}$ and $N_{T}^{s}$ are the numbers of images $I^{s}$ and texts $T^{s}$ , respectively. Each sample is provided with an identity $y$ . Additionally, we are also provided with an unlabeled target dataset $X^{t} = \{I^{t} = \{I_{i}^{t}\}_{i = 1}^{N_{I}^{t}},T^{t} = \{T_{j}^{t}\}_{j = 1}^{N_{T}^{t}}\}$ , where identity annotation is not available. It is worth noting that the target persons are completely non-overlapping with the source persons due to different surveillance scenarios. Based on this, our goal is to learn a deep neural network which can retrieve the corresponding person images by query text in target domain. + +# 3.2.Class Moments + +Given source and target data, a visual CNN and a bidirectional Long Short-Term Memory network (bi-LSTM) are utilized to encode the images and texts, respectively. + +Note that the feature extraction networks are shared between source and target domains. Following it, four classifiers are learned for source/target image/text classification. + +Due to the shift in data distributions across different domains, the performance drops a lot when directly exploiting the model trained on source dataset to target dataset. To measure the data distribution, an optional approach in UDA is to compute the prototypes [19] based on the samples in a mini-batch at each iteration, which results in the fact that the maximum number of classes the model can support is less than the batch size. Therefore, this approach cannot be applied to the cross-domain text-based person search proposed in this paper. Generally, there are more classes in person search than those in previous UDA tasks, which results in the fact that the samples in a mini-batch cannot contain all the classes. The categorical information in each minibatch is insufficient and may has huge bias between the estimated distribution and the true distribution. Considering that there exists an alignment and preserved semantic structure between the class-level mean of data distribution and the classifier parameter, we propose to utilize the classifier parameter learned on source and target datasets to approximately represent the mean of data distribution in each class (also called class mean), which can eliminate the mini-batch constraints and obtain up-to-date class representations. + +$$ +\mu_ {I _ {k}} ^ {s} = p _ {I _ {k}} ^ {s}, \mu_ {T _ {k}} ^ {s} = p _ {T _ {k}} ^ {s}, \tag {1} +$$ + +$$ +\mu_ {I _ {k}} ^ {t} = p _ {I _ {k}} ^ {t}, \mu_ {T _ {k}} ^ {t} = p _ {T _ {k}} ^ {t}, \tag {2} +$$ + +where $\mu_{I_k}^s$ and $p_{I_k}^s$ denote the class mean and classifier parameter of the $k$ -th class in visual source domain, respectively. Based on class means, we can calculate the variances between them: + +$$ +\sigma_ {I} ^ {s} = \frac {1}{C} \sum_ {k = 1} ^ {C} \left(\mu_ {I _ {k}} ^ {s} - \frac {\sum_ {k = 1} ^ {C} \mu_ {I _ {k}} ^ {s}}{C}\right) ^ {2}, \tag {3} +$$ + +$$ +\sigma_ {I} ^ {t} = \frac {1}{C} \sum_ {k = 1} ^ {C} \left(\mu_ {I _ {k}} ^ {t} - \frac {\sum_ {k = 1} ^ {C} \mu_ {I _ {k}} ^ {t}}{C}\right) ^ {2}, \tag {4} +$$ + +$$ +\sigma_ {T} ^ {t} = \frac {1}{C} \sum_ {k = 1} ^ {C} \left(\mu_ {T _ {k}} ^ {t} - \frac {\sum_ {k = 1} ^ {C} \mu_ {T _ {k}} ^ {t}}{C}\right) ^ {2}, \tag {5} +$$ + +where $C$ is the number of classes in source domain. The $\sigma_T^s$ is not utilized because there is no domain shift between source texts and target texts. In addition, the cross-modal alignment in source domain is implemented by minimizing the ranking loss. Particularly, the class means (classifier parameters) and their variances are called class moments used in alignment. The mean between class means is not utilized since we find that it cannot improve the performance. + +For unlabeled target samples, we utilize the self-labeling [11], where the pseudo label is assigned for target sample + +by class means in source domain: + +$$ +y _ {I _ {k}} ^ {t} = \frac {\exp \left(\cos \left(f \left(I ^ {t}\right) , \mu_ {I _ {k}} ^ {s}\right)\right)}{\sum_ {r = 1} ^ {C} \exp \left(\cos \left(f \left(I ^ {t}\right) , \mu_ {I _ {r}} ^ {s}\right)\right)}, \tag {6} +$$ + +$$ +y _ {T _ {k}} ^ {t} = \frac {\exp (\cos (f (T ^ {t}) , \mu_ {T _ {k}} ^ {s}))}{\sum_ {r = 1} ^ {C} \exp (\cos (f (T ^ {t}) , \mu_ {T _ {r}} ^ {s}))}, \tag {7} +$$ + +where $y_{I_k}^t$ is the $k$ -th entry of pseudo label for target image $I^t$ , cos means the cosine similarity, and $f$ indicates the activation of the final fully-connected layer (FC in Fig. 2). Note that the learned pseudo label is a soft label since different classes across domains, and is further used as supervision information of the target classifiers. + +# 3.3. Domain Alignment + +In domain adaptive text-based person search, due to the fact that the vocabularies of different datasets differ little from each other, the domain shift is mainly caused by different person appearance distributions across domains. To eliminate the image distribution variations, we propose a domain alignment network by relieving the divergence of domain statistics. The basic idea is that the moments calculated on different domains are the same if the distributions of source and target domains are identical. Different from modelling the global distribution of domain representations where crucial class-level information may be lost, we enforce the class-level domain alignment to ensure the samples with similar visual features being mapped nearby in the feature space. In other words, a fine-grained alignment of domain distributions is performed on class level. + +Based on the analysis above, we propose a cross-domain consistent loss: + +$$ +L _ {C D C} = \sum_ {k = 1} ^ {C} d \left(\mu_ {I _ {k}} ^ {s}, \mu_ {I _ {k}} ^ {t}\right) + \gamma_ {1} d \left(\sigma_ {I} ^ {s}, \sigma_ {I} ^ {t}\right), \tag {8} +$$ + +where $d(.,.)$ indicates the distance between two class moments and $\gamma$ is a hyperparameter to control the importance of each distance. We use the squared Euclidean distance in our experiments: + +$$ +d \left(x _ {1}, x _ {2}\right) = \left\| x _ {1} - x _ {2} \right\| ^ {2}. \tag {9} +$$ + +The justification is that the cluster mean yields optimal cluster representatives when a Bregman divergence (e.g. squared Euclidean distance and Mahalanobis distance) is used [23]. + +Through explicitly restricting the distance between domain statistics, the feature extractor is guided to learn domain-invariant representations. + +# 3.4. Cross-Modal Alignment + +The domain alignment only restricts the cross-domain visual statistics but ignores the latent semantic alignmen + +t between image and text, which is the key to this cross-modal matching task. In source domain, the pairwise ranking loss [3] is utilized to ensure the cross-modal alignment. Due to the lack of labels, the ranking loss cannot be employed in target domain. Like domain alignment, we adopt the class-level cross-modal moment alignment module to ensure the target samples with similar semantic being closer in the feature space. Based on the class moments, the cross-modal consistent loss is defined as follows: + +$$ +L _ {C M C} = \sum_ {k = 1} ^ {C} d \left(\mu_ {I _ {k}} ^ {t}, \mu_ {T _ {k}} ^ {t}\right) + \gamma_ {2} d \left(\sigma_ {I} ^ {t}, \sigma_ {T} ^ {t}\right). \tag {10} +$$ + +Thus the learned representations can be independent from their data modalities. + +# 3.5. Exemplar Alignment + +In target domain, due to the lack of ground truth labels, the learned representations may be not optimally discriminative. Considering the fact that a target exemplar belongs to one of the target classes, we propose an exemplar alignment module by enforcing each exemplar to be close to its nearest class means to enhance the clustering characteristics of representations. We first calculate the cosine similarities between $f(I^t)$ and target class means. Then the probability that $I^t$ belongs to class $k$ is calculated as follows: + +$$ +q (k \mid I ^ {t}) = \frac {\exp \left(\cos \left(f \left(I ^ {t}\right) , \mu_ {I _ {k}} ^ {t}\right)\right)}{\sum_ {r = 1} ^ {C} \exp \left(\cos \left(f \left(I ^ {t}\right) , \mu_ {I _ {r}} ^ {t}\right)\right)}. \tag {11} +$$ + +The exemplar consistent loss is defined as: + +$$ +L _ {E C} = - \log \left(\max q \left(k \mid I ^ {t}\right) \mid_ {k = 1} ^ {C}\right), \tag {12} +$$ + +which aims to maximize the probability of the class that target exemplar belongs to. In this way, we can further improve the robustness of our model. + +# 3.6. Model training and testing + +For labeled source dataset, ranking loss with the hardest negative samples [3] is utilized to ensure the cross-modal alignment by making positive pair being closer than the hardest negative pair: + +$$ +\begin{array}{l} L _ {r} \left(I ^ {s}, T ^ {s}\right) = \max \left(\alpha - S \left(I ^ {s}, T ^ {s}\right) + S \left(I ^ {s}, T _ {\widehat {h}} ^ {s}\right), 0\right) \tag {13} \\ + m a x (\alpha - S (I ^ {s}, T ^ {s}) + S (I _ {\hat {h}} ^ {s}, T ^ {s}), 0), \\ \end{array} +$$ + +where $T_{\hat{h}}^{s}$ is the hardest text sample in a mini-batch for the source image $I^{s}$ , $S$ denotes the similarity score between image and text, i.e., cosine score, and $\alpha$ is a margin. + +Besides ranking loss, the identification loss is also adopted for the identity-level matching. The image and text iden + +tification losses $L_{I^s}$ and $L_{T^s}$ are defined as follows: + +$$ +L _ {I ^ {s}} = - \frac {1}{n _ {I} ^ {s}} \sum_ {i = 1} ^ {n _ {I} ^ {s}} y _ {i} ^ {s} \log \left(\operatorname {s o f t m a x} \left(W _ {i d i} g \left(I _ {i} ^ {s}\right)\right)\right), \tag {14} +$$ + +$$ +L _ {T ^ {s}} = - \frac {1}{n _ {T} ^ {s}} \sum_ {i = 1} ^ {n _ {T} ^ {s}} y _ {i} ^ {s} \log \left(\operatorname {s o f t m a x} \left(W _ {i d t} g \left(T _ {i} ^ {s}\right)\right)\right), \tag {15} +$$ + +where $n_I^s$ is the number of source images in a training batch, $g$ denotes the activation of classifier, and $W_{idi}$ is the transformation matrix to categorize the visual representations. + +Then the total source loss is defined as: + +$$ +L _ {S} = L _ {r} + \beta \left(L _ {I} + L _ {T}\right), \tag {16} +$$ + +where $\beta$ aims to control the relative importance of each loss function. + +By combining the losses defined above, the final objective of our MAN is formulated as: + +$$ +L = L _ {S} + \lambda_ {1} L _ {C D C} + \lambda_ {2} L _ {C M C} + \lambda_ {3} L _ {E C}. \tag {17} +$$ + +Based on this objective, we can obtain two deep embedding networks (CNN and bi-LSTM), where the learned cross-modal representations are domain-invariant and semantic aligned. + +The training procedure is split into two stages. At the first stage, only the $L_{S}$ is adopted and the model is trained in source domain. At the second stage, we utilize the final objective $L$ to train our model, where both source data and target data are used. This procedure not only ensures the accuracy in source domain, but also transfers the knowledge learned in source domain to target domain. + +During testing, we calculate the visual and textual representations via CNN and bi-LSTM, respectively. Then the similarity scores between them are ranked to retrieve the corresponding person images based on the query text. + +# 4. Experiments + +We conduct extensive evaluations of MAN on CUHK-PEDES dataset [15] and RAP dataset [12]. Performance comparisons with the state-of-the-art methods as well as the ablation studies are presented. + +The CUHK-PEDES dataset [15] is currently the only dataset for text-based person search, where the images are collected from five different existing person re-identification datasets, CUHK03 [17], Market-1501 [32], SSM [28], VIPER [5], and CUHK01 [16]. Since these five datasets are collected from different surveillance scenarios, there are domain shifts between them. + +To further verify the effectiveness of our MAN, we conduct the experiments on RAP dataset [12], which is collected from 25 cameras in an indoor shopping mall. For distant cameras, due to the large changes of viewpoints, backgrounds, cloth appearances and lighting conditions, there + +![](images/b5cd400ed3fdabb867cc579809f93d1e935ee13f7bb04d84d8b3cd0fee666639.jpg) +SSM + +![](images/67e7a81f011ea211836af3cb04dde6808fedc52f7f2daf995c6fab8cad51b61a.jpg) + +![](images/0d93f404eab849b1db637ac77c48aeed9e57720c318b02cb0e00607b1c29f5e7.jpg) +CUHK03 + +![](images/a15526e63cebee254d9893ad9ca50c3cc299a16bb9a307ab6c63098a8e0bc581.jpg) + +![](images/1f6d79af751e9cc020d115f83cecbcc47d16e799e401e16b0e7037f142be749d.jpg) + +![](images/6c13f7629198982ef4f72c2960a7fcbc617262280f504d7ef152f656401c88f5.jpg) +Market-1501 +RAP-1 + +![](images/08fee68774f551e38a71cf6ec9976ab7331d727c86916f7054c1a194345d8e1a.jpg) +CUHK01 +VIPER +RAP-2 +Figure 3. Example images from CUHK-PEDES and RAP datasets. Best viewed by zooming in. + +exists distribution bias between the images captured by different cameras. We choose two sets of images (RAP-1 and RAP-2) to perform domain/view adaptation, where the camera viewpoints of these two image sets are very different. The domain/view gap between these two sets has been proved by the performance gap between supervised learning (SL) in target domain and transfer learning from labeled source domain to unlabeled target domain (SO) in Table 2. Note that the two sets collected from different cameras have different pedestrian identities in our setting to perform domain adaptive person search. + +# 4.1. Datasets and Metrics + +CUHK-PEDES. The CUHK-PEDES dataset contains 40,206 images and 80,440 textual descriptions of 13,003 identities. To learn the domain adaptation in text-based person search, we regard CUHK-PEDES as five independent datasets, where each dataset is considered as a domain. Note that we choose SSM (S) as the source dataset and consider four transfer tasks $\mathrm{S} \rightarrow \mathrm{C}03$ (CUHK03), $\mathrm{S} \rightarrow \mathrm{M}$ (Market-1501), $\mathrm{S} \rightarrow \mathrm{V}$ (VIPER) and $\mathrm{S} \rightarrow \mathrm{C}01$ (CUHK01). + +RAP. We choose two sets of images from different cameras to perform domain adaptation, where images from 10 cameras (i.e., CAM31, CAM30, CAM29, CAM28, CAM27, CAM25, CAM22, CAM21, CAM20, and CAM19) are regarded as the source dataset (RAP-1) and images from other 5 cameras (i.e., CAM01, CAM06, CAM09, CAM10 and CAM11) are regarded as the target dataset (RAP-2). As a result, there are 12,985 and 3,084 images in RAP-1 and RAP-2, respectively. To perform text-based person search, we choose 104 attributes out of 152 except age, customer, employee, viewpoint, occlusion and position. Moreover, we concatenate all selected attributes about an image into a sentence to describe this image. + +Several example images are shown in Fig. 3 to illustrate the domain gap. + +Metrics. We choose top-1, top-5 and top-10 accuracies to evaluate the performance of text-based person search. Specifically, given a query text, all test images are ranked by the similarities with the text. If the corresponding images are within the top-k images, we regard it as a successful search. + +# 4.2. Implementation Details + +We resize the input image to $384 \times 128$ and utilize ResNet-50 [6] to encode it. For the textual representation, we build a vocabulary by collecting all the words in sentences. Then the word is embedded to a 300-dimensional vector and entered into a 1024-dimensional bi-LSTM. In addition, the dimension of feature space is set to 1024. + +At the first training stage, we first fix ResNet-50 and train the other parts of the model with learning rate $\mathrm{lr} = 1e^{-3}$ . Then we train the whole model with learning rate $\mathrm{lr} = 2e^{-4}$ . At the second training stage, we directly train the whole model with learning rate $2e^{-4}$ . The Adam optimizer [8] is employed for optimization. The hyperparameters $\gamma$ , $\beta$ and $\lambda$ are empirically set to 1. Moreover, the batch size for each domain and margin are set to 128 and 0.2, respectively. + +Specially, for the $\mathrm{S}\rightarrow \mathrm{C}03$ and RAP-1 $\rightarrow$ RAP-2 transfer tasks, we train the model at the first training stage for 400, and 300 epochs, respectively. At the second training stage, we train the model for 80 and 60 epochs, respectively. We take about 7 hours to train the model. + +# 4.3. Comparison with the State-of-the-art Methods + +Compared Methods. To verify the merit of our MAN, we compare with the following representative approaches in various experimental settings: (1) The labeled target data is utilized to train the model, e.g., Supervised Learning (SL). (2) Only the labeled source data is utilized to train the model, e.g., Source Only (SO), CMPM+CMPC [31], Attribute query (AQ) and Adv-attReID [29]. CMPM+CMPC is a traditional text-based person search method with high performance, which utilizes a cross-modal projection matching (CMPM) loss and a cross-modal projection classification (CMPC) loss to learn discriminative image-text representations. Attribute query (AQ) retrieves the corresponding person images based on the attributes of the person. Adv-attReID is a traditional attributed-based person search method with high performance, which imposes an attribute-guided attention mechanism for images and a semantic consistent adversary strategy for attributes. (3) The labeled source data and unlabeled target data are both utilized to train the model, e.g., SPGAN [2], ADDA [24] and ECN [35]. SPGAN translates the labeled images from source domain to target domain in an unsupervised manner, and then trains Re-ID model with the translated images by supervised method. ADDA designs a domain classifier based on adversarial learning objectives. ECN investigates into the intra-domain invariance of the target domain and proposes three types of invariance, i.e., exemplar-invariance, camera-invariance and neighborhood-invariance. + +It is noteworthy that since we are probably the first to conduct domain adaptive text-based person search, there is no method reporting the performance on CUHK-PEDES and RAP. As a result, we perform the experiments based + +Table 1. Methods comparison when tested on C03, M, V and C01. Supervised Learning (SL): Model trained with labeled target data utilizing $L_{S}$ . Source Only (SO): Model trained with only labeled source data utilizing $L_{S}$ . Top-1, top-5 and top-10 accuracies (\%) are reported. The best performance is bold. + +
MethodS→C03S→MS→VS→C01
Top-1Top-5Top-10Top-1Top-5Top-10Top-1Top-5Top-10Top-1Top-5Top-10
SL54.779.487.168.590.195.267.891.896.459.381.588.4
SO41.565.878.162.784.591.259.183.293.444.369.580.8
CMPM+CMPC[31]42.369.279.963.485.192.257.884.792.444.870.981.7
SPGAN[2]44.772.582.663.385.392.460.785.793.345.371.283.1
ADDA[24]45.172.882.563.985.792.361.486.093.245.771.683.0
ECN[35]45.873.282.864.386.193.462.586.493.746.672.183.2
MAN(ours)48.574.884.365.187.494.664.287.294.348.273.283.6
+ +Table 2. Performances when tested on RAP-1→RAP-2 and RAP-2→RAP-1 transfer tasks. + +
MethodRAP-1→RAP-2RAP-2→RAP-1
Top-1Top-5Top-10Top-1Top-5Top-10
SL46.573.281.533.458.769.2
SO42.368.978.419.137.647.0
+ +on the above methods and modify them to fit our task. + +Results on the CUHK-PEDES dataset. We compare our proposed MAN with the state-of-the-art methods on four transfer tasks from CUHK-PEDES dataset. Table 1 shows the results, where $S \rightarrow C03$ means that $S$ is the source dataset and $C03$ is the target dataset. Note that Source Only and CMPM+CMPC [31] are two methods without domain adaptation. Compared with the strong baseline (CMPM+CMPC) which achieves high performances in text-based person search, our MAN still improves the experimental results. Particularly, the performances of Source Only can be regarded as a lower bound. Incorporating the domain adaptation can obviously outperform the Source Only, which demonstrates the advantage of relieving the domain discrepancy. Moreover, our proposed MAN achieves the best performances of all domain adaptation methods on every transfer task, which proves the effectiveness of our MAN. Specifically, compared with the methods (SPGAN and ADDA) which both utilize Generative Adversarial Networks to eliminate the domain shift, our MAN significantly outperforms them. The improved performances illustrate the superiorities of class-level moment alignment network in restricting the cross-domain statistics, where the features with similar semantic are constrained being mapped nearby and thus are learned more domain-invariant. Furthermore, compared with ECN which exploits intra-domain alignment, our MAN also achieves better performances, which basically indicates the advantage of jointly modelling the interdomain, intra-domain and inter-modal moment alignments in cross-modal cross-domain person search. Note that although our MAN achieves the best performances compared with existing domain adaptation methods, which is inferior to the supervised cross-modal matching methods (Super + +Table 3. Methods comparison when tested on RAP dataset (RAP-1→RAP-2). + +
MethodTop-1Top-5Top-10
SL46.573.281.5
SO42.368.978.4
AQ32.160.670.3
Adv-attReID [29]25.347.256.9
SPGAN[2]42.668.479.0
ADDA[24]43.369.479.4
ECN[35]43.569.179.6
MAN(ours)44.269.880.1
+ +vised Learning). This suggests that there is still room for improvement in the methods of domain adaptation. + +Results on the RAP dataset. To prove the domain gap between RAP-1 and RAP-2, we perform extensive experiments as shown in Table 2. The performance gap between SL (Supervised Learning) and SO (Source Only) proves that there is indeed domain shift between the two datasets. + +Table 3 shows the comparison results on RAP-1 $\rightarrow$ RAP-2 transfer task. According to the performance gap between SL (Supervised Learning) and SO (Source Only), RAP-1 $\rightarrow$ RAP-2 is a more balanced transfer task than transfer tasks in CUHK-PEDES dataset. Based on this, our model still outperforms the existing domain adaptation methods but with less improvement compared to the results on CUHK-PEDES dataset. This further demonstrates that the proposed MAN can learn domain-invariant representations. In addition, we report the results of attribute query method (AQ), which is set similar to SO except the query type. The reduced performances mean that the relationship between attributes is significant to the learning of textual representation. Moreover, our MAN also achieves better performances compared with traditional attributed-based person search method Adv-attReID [29]. + +# 4.4. Ablation Study + +To systematically investigate the effectiveness of each component in MAN, we perform a set of ablation studies + +![](images/8fab8e1bdcfc616c8d60459791c91aeb61a26caa437ad56286f68ee7ba00fdab.jpg) +Figure 4. The t-SNE visualization of image and text features learned by Source Only, MAN and Supervised Learning on S→C03 transfer task. + +on $\mathrm{S}\rightarrow \mathrm{C}03$ transfer task. The results are illustrated in Table 4. We first investigate the importance of domain alignment (DA) by performing experiments on MAN (wo DA), where DA is completely missing. It can be seen that the top-1 accuracy declines $2.2\%$ , which proves the effectiveness of domain alignment in benefitting the domain-invariant representations learning. When comparing MAN with MAN (wo CA) where the cross-modal alignment is missing, we can observe that MAN significantly outperforms the MAN (wo CA) in top-1 accuracy ( $48.5\% / 46.8\%$ ). The improved performances indicate that cross-modal alignment can help our model learn more discriminative cross-modal representations by modelling the constraints between image and text, and thus benefits the performances. To investigate the importance of exemplar alignment, we perform experiments on MAN (wo EA). The results indicate that it is appropriate to alleviate domain discrepancy by enhancing the clustering characteristics of representations in target domain. In addition, we report the results of discarding the $\sigma$ in moment alignment. The performance is inferior to the MAN by $0.5\%$ , which illustrates the superiorities of $\sigma$ in relieving the divergence of data distributions. + +In summary, we can observe that all the components are designed reasonably and the performance degrades when any of these components is removed. + +# 4.5. Visual Results + +To figure out whether our model can learn the cross-modal features in target domain well, we utilize t-SNE [25] to visualize the feature distribution learned by Source Only, MAN and Supervised Learning on S→C03 transfer task (randomly select 7 classes). As shown in Fig. 4 (c), we can see that the learned image-text features are distributed along radial spokes, where the corresponding visual and textual features lie in the same direction due to the usage of cosine similarity between image and text. From the comparison between Fig. 4 (a) and Fig. 4 (b), we can clearly observe that the features learned by Source Only can not be discriminated very well, where some features from different classes are mixed up in the feature space. In contrast, the features learned by our MAN are more discriminative and + +Table 4. Ablation analysis of different components in the proposed MAN on S→C03 transfer task. The wo means without. + +
MethodTop-1Top-5Top-10
SO41.565.878.1
MAN(wo DA)46.373.282.7
MAN(wo CA)46.873.483.0
MAN(wo EA)47.373.883.4
MAN(wo σ)48.074.183.7
MAN48.574.884.3
+ +dispersed for different classes. This illustrates that our model can enlarge the inter-class dispersion in target domain by three moment alignments. + +# 5. Conclusion + +In this work, we propose a novel moment alignment network for domain adaptive text-based person search. To the best of our knowledge, this is the first attempt to investigate this problem. To achieve the goal, we propose three effective moment alignments including domain alignment, cross-modal alignment, and exemplar alignment in target domain. These three alignment mechanisms are complementary to each other to learn domain-invariant and semantic aligned cross-modal representations. We perform extensive experiments on five transfer tasks from CUHK-PEDES and RAP datasets and demonstrate the effectiveness of our model by significant performance improvements. + +# 6. Acknowledgments + +This work is jointly supported by National Key Research and Development Program of China (2016YFB1001000), National Natural Science Foundation of China (61420106015, 61572504, 61721004), Shandong Provincial Key Research and Development Program (Major Scientific and Technological Innovation Project) (NO.2019JZZY010119), and Science and Technology Project of SGCC Research on feature recognition and prediction of typical ice and wind disaster for transmission lines based on small sample machine learning method. + +# References + +[1] Tianlang Chen, Chenliang Xu, and Jiebo Luo. Improving text-based person search by spatial matching and adaptive threshold. In WACV, 2018. +[2] Weijian Deng, Liang Zheng, Qixiang Ye, Guoliang Kang, Yi Yang, and Jianbin Jiao. Image-image domain adaptation with preserved self-similarity and domain-dissimilarity for person re-identification. In CVPR, 2018. +[3] Fartash Faghri, David J. Fleet, Jamie Ryan Kiros, and Sanja Fidler. Vse++: Improving visual-semantic embeddings with hard negatives. In BMVC, 2018. +[4] 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. +[5] Douglas Gray, Shane Brennan, and Hai Tao. Evaluating appearance models for recognition, reacquisition, and tracking. In IEEE International Workshop on Performance Evaluation for Tracking and Surveillance, pages 1-7, 2007. +[6] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. +[7] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural Computation, 1997. +[8] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. Computer Science, 2014. +[9] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NeurIPS, 2012. +[10] Yann LeCun, Léon Bottou, Yoshua Bengio, Patrick Haffner, et al. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, 1998. +[11] Dong-Hyun Lee. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on Challenges in Representation Learning, ICML, 2013. +[12] Dangwei Li, Zhang Zhang, Xiaotang Chen, and Kaiqi Huang. A richly annotated pedestrian dataset for person retrieval in real surveillance scenarios. IEEE transactions on image processing, pages 1575-1590, 2018. +[13] Minxian Li, Xiatian Zhu, and Shaogang Gong. Unsupervised person re-identification by deep learning tracklet association. In ECCV, 2018. +[14] Shuang Li, Tong Xiao, Hongsheng Li, Wei Yang, and Xiaogang Wang. Identity-aware textual-visual matching with latent co-attention. In ICCV, 2017. +[15] Shuang Li, Tong Xiao, Hongsheng Li, Bolei Zhou, Dayu Yue, and Xiaogang Wang. Person search with natural language description. In CVPR, 2017. +[16] Wei Li, Rui Zhao, and Xiaogang Wang. Human reidentification with transferred metric learning. In ACCV, pages 31-44, 2012. +[17] Wei Li, Rui Zhao, Tong Xiao, and Xiaogang Wang. Deepreid: Deep filter pairing neural network for person re-identification. In CVPR, pages 152–159, 2014. + +[18] Mingsheng Long, Yue Cao, Jianmin Wang, and Michael I Jordan. Learning transferable features with deep adaptation networks. In ICML, 2015. +[19] Yingwei Pan, Ting Yao, Yehao Li, Yu Wang, Chong-Wah Ngo, and Tao Mei. Transferrable prototypical networks for unsupervised domain adaptation. In CVPR, 2019. +[20] Siyuan Qiao, Chenxi Liu, Wei Shen, and Alan L Yuille. Few-shot image recognition by predicting parameters from activations. In CVPR, 2018. +[21] Nikolaos Sarafianos, Xiang Xu, and Ioannis A Kakadiaris. Adversarial representation learning for text-to-image matching. In ICCV, 2019. +[22] Rui Shu, Hung H Bui, Hirokazu Narui, and Stefano Ermon. A dirt-t approach to unsupervised domain adaptation. In I-CLR, 2018. +[23] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017. +[24] Eric Tzeng, Judy Hoffman, Kate Saenko, and Trevor Darrell. Adversarial discriminative domain adaptation. In CVPR, 2017. +[25] Laurens Van Der Maaten. Accelerating t-sne using tree-based algorithms. The Journal of Machine Learning Research, pages 3221-3245, 2014. +[26] Jingya Wang, Xiatian Zhu, Shaogang Gong, and Wei Li. Transferable joint attribute-identity deep learning for unsupervised person re-identification. In CVPR, 2018. +[27] Longhui Wei, Shiliang Zhang, Wen Gao, and Qi Tian. Person transfer gan to bridge domain gap for person re-identification. In CVPR, 2018. +[28] Tong Xiao, Shuang Li, Bochao Wang, Liang Lin, and Xiaogang Wang. End-to-end deep learning for person search. arXiv preprint arXiv:1604.01850, 2016. +[29] Zhou Yin, Wei-Shi Zheng, Ancong Wu, Hong-Xing Yu, Hai Wan, Xiaowei Guo, Feiyue Huang, and Jianhuang Lai. Adversarial attribute-image person re-identification. In IJCAI, 2018. +[30] Hong-Xing Yu, Wei-Shi Zheng, Ancong Wu, Xiaowei Guo, Shaogang Gong, and Jian-Huang Lai. Unsupervised person re-identification by soft multilabel learning. In CVPR, 2019. +[31] Ying Zhang and Huchuan Lu. Deep cross-modal projection learning for image-text matching. In ECCV, 2018. +[32] Liang Zheng, Liyue Shen, Lu Tian, Shengjin Wang, Jiahao Bu, and Qi Tian. Person re-identification meets image search. arXiv preprint arXiv:1502.02171, 2015. +[33] Zhedong Zheng, Liang Zheng, Michael Garrett, Yi Yang, and Yi-Dong Shen. Dual-path convolutional image-text embedding. In arXiv preprint arXiv:1711.05535, 2017. +[34] Zhun Zhong, Liang Zheng, Shaozi Li, and Yi Yang. Generalizing a person retrieval model hetero-and homogeneously. In ECCV, 2018. +[35] Zhun Zhong, Liang Zheng, Zhiming Luo, Shaozi Li, and Yi Yang. Invariance matters: Exemplar memory for domain adaptive person re-identification. In CVPR, 2019. +[36] Qin Zhou, Heng Fan, Shibao Zheng, Hang Su, Xinzhe Li, Shuang Wu, and Haibin Ling. Graph correspondence transfer for person re-identification. In AAAI, 2018. \ No newline at end of file diff --git a/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/images.zip b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a80a43088c1fc56c58943d326b163427a80072df --- /dev/null +++ b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d4413898937b0bd29fb1c9ccd212d79da40a164bafef1b6f4d78921da4a4677 +size 415331 diff --git a/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/layout.json b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1d666534bffee0cdee9b0ee1fb9ac39345d21440 --- /dev/null +++ b/crossmodalcrossdomainmomentalignmentnetworkforpersonsearch/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f44c25ea721424e0c6031ef5b3199b210ab0f00e8241b1a7dc37fba25123c35c +size 354226 diff --git a/crossmodaldeepfacenormalswithdeactivableskipconnections/85e13cde-49fc-4847-b7e8-6bd693d84e68_content_list.json b/crossmodaldeepfacenormalswithdeactivableskipconnections/85e13cde-49fc-4847-b7e8-6bd693d84e68_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..88c1b025aeb6c112c6ae9543977bd84745e2e082 --- /dev/null +++ b/crossmodaldeepfacenormalswithdeactivableskipconnections/85e13cde-49fc-4847-b7e8-6bd693d84e68_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac4f516214f84560924bb033adaf33916198b409333b4acfa6e2c387550f44f3 +size 101710 diff --git a/crossmodaldeepfacenormalswithdeactivableskipconnections/85e13cde-49fc-4847-b7e8-6bd693d84e68_model.json b/crossmodaldeepfacenormalswithdeactivableskipconnections/85e13cde-49fc-4847-b7e8-6bd693d84e68_model.json new file mode 100644 index 0000000000000000000000000000000000000000..88abc4aed7ca7130d979db451c50189e543a6ad3 --- /dev/null +++ b/crossmodaldeepfacenormalswithdeactivableskipconnections/85e13cde-49fc-4847-b7e8-6bd693d84e68_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a0ba25b5163a7a10d4dda156be0b8c2ce43fd10383967e15390a6d689f7fb61 +size 121754 diff --git a/crossmodaldeepfacenormalswithdeactivableskipconnections/85e13cde-49fc-4847-b7e8-6bd693d84e68_origin.pdf b/crossmodaldeepfacenormalswithdeactivableskipconnections/85e13cde-49fc-4847-b7e8-6bd693d84e68_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..133037b9fbbb3317b5ffaad0b2f21d3efa32698a --- /dev/null +++ b/crossmodaldeepfacenormalswithdeactivableskipconnections/85e13cde-49fc-4847-b7e8-6bd693d84e68_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b207e810ff8c0a8d689bc0b661fbb33a116e2de05f4b2d40873710d30541cee +size 1986556 diff --git a/crossmodaldeepfacenormalswithdeactivableskipconnections/full.md b/crossmodaldeepfacenormalswithdeactivableskipconnections/full.md new file mode 100644 index 0000000000000000000000000000000000000000..072eb943ef69601d00f5ce687fe7b134b5ad5768 --- /dev/null +++ b/crossmodaldeepfacenormalswithdeactivableskipconnections/full.md @@ -0,0 +1,486 @@ +# Cross-modal Deep Face Normals with Deactivable Skip Connections + +Victoria Fernández Abrevaya\*, Adnane Boukhayma\*†, Philip H. S. Torr³, Edmond Boyer¹ + +1 Inria, Univ. Grenoble Alpes, CNRS, Grenoble INP, LJK, France + +2 Inria, Univ. Rennes, CNRS, IRISA, M2S, France + +3 University of Oxford, UK + +{victoria.fernandez-abrevaya, adnane.boukhayma, edmond.boyer}@inria.fr + +philip.torr@eng.ox.ac.uk + +# Abstract + +We present an approach for estimating surface normals from in-the-wild color images of faces. While data-driven strategies have been proposed for single face images, limited available ground truth data makes this problem difficult. To alleviate this issue, we propose a method that can leverage all available image and normal data, whether paired or not, thanks to a novel cross-modal learning architecture. In particular, we enable additional training with single modality data, either color or normal, by using two encoder-decoder networks with a shared latent space. The proposed architecture also enables face details to be transferred between the image and normal domains, given paired data, through skip connections between the image encoder and normal decoder. Core to our approach is a novel module that we call deactivable skip connections, which allows integrating both the auto-encoded and image-to-normal branches within the same architecture that can be trained end-to-end. This allows learning of a rich latent space that can accurately capture the normal information. We compare against state-of-the-art methods and show that our approach can achieve significant improvements, both quantitative and qualitative, with natural face images. + +# 1. Introduction + +3D reconstruction of the human face is a long-standing problem in computer vision, with a wide range of applications including biometrics, forensics, animation, gaming, and human digitalization. In many of these applications monocular inputs are considered in order to limit the acquisition constraints, hence enabling uncontrolled environments as well as efficient information usage for e.g. facial telecommunication and entertainment. Although significant + +![](images/4d0a7b224388c8eb10ad92888ccfdfe009d6192c0e775ac7e7a8018fcaf29eb8.jpg) + +![](images/4bc933d2ea3a60423e2944460b466ab3ed8a7ea1d437b00f417c87447eebbda8.jpg) + +![](images/416d3162dae13720efa7321d4e6f66c95b3950cb0f7736d649151e0aaf392ecf.jpg) +Figure 1: Our model predicts accurate normals from a single input image that can be used to enhance a coarse geometry (e.g. PRN [15]). + +![](images/248230de9fd18e17722e274cfa36d3e5884f51f49b117ceae40f816db3570793.jpg) + +![](images/a8b24cc39c34f5b50f177c8becc9b9d449cdc3cf91d30389aecd32d71821bec2.jpg) + +![](images/f4fed35c3f500a2582c675f9cf2955609919c01c5adf39d26866c9c04a897517.jpg) + +![](images/b484382c58940212d88e61a6c7c5300a98226aa741e6c2ecb13645f799330b99.jpg) + +![](images/212af66b24afc095ed27da25725d62a86f90831056da7a46584eeda6735c9a66.jpg) + +![](images/d43e7716a65da70144ae8b339696c3dd7e88af08135472d816db3259be34d6cf.jpg) + +progress has been recently made by the scientific community, recovering detailed 3D face models given only single images is still an open problem. + +Monocular face reconstruction is in essence an ill-posed problem which requires strong prior knowledge. Assuming a simple shading model, seminal shape-from-shading (SfS) approaches [21, 65] were estimating shape normals by considering local pixel intensity variations. Fine scale surface details can be recovered using this strategy, however the applicability to in-the-wild images is limited by the simplified image formation model that is assumed. Later on, a more global strategy was proposed with parametric face models [7, 60]. They allow fitting a template face controlled by only a few coefficients, resulting hence in improved robustness. While being widely adopted, parametric models are inherently restricted in expressiveness and have difficulties + +in recovering small surface details, as a consequence of their low dimensional representation. Recently, deep learning methods that exploit large-scale face image datasets have been investigated with the aim of a better generalization. While most work in this category are trained to estimate the coefficients of a parametric model [54, 53, 19, 28, 44], a few other approaches infer directly per-pixel depth [45], UV position maps [15] or surface normals [58, 46]. + +As observed in previous work [48, 66], regressing depth information alone can lead to suboptimal results, especially detail-wise, as the inherent scale ambiguity with single images can make convergence difficult for neural networks. On the other hand, the estimation of normals appears to be an easier task for such networks, given that normals are strongly correlated to pixel intensities and depend mostly on local information, a fact already exploited by SfS techniques. Still, only a few approaches have been proposed in this line for facial images [47, 46], mostly due to the limited available ground-truth data. We propose here a method that overcomes this limitation and can leverage all data available through the use of cross-modal learning. Our experiments demonstrate that this strategy can estimate more accurate and sharper facial surface normals from single images. + +The proposed approach recovers accurate normals corresponding to the facial region within an RGB image, with the goal of enhancing an existing coarse reconstruction, [15] in our experiments. We cast the problem as a color-to-normal image translation, which can be in principle solved by combining an image encoder $E_{I}$ with a normal decoder $D_{N}$ as in [58], and including skip connections between $E_{I}$ and $D_{N}$ [42] in order to transfer details from the image domain to the normals domain. However, training such a network can prove difficult unless a large dataset of image/normal pairs, that ideally contains images in-the-wild, is available. In practice few such datasets are currently publicly available, e.g. [64], which were moreover captured under controlled conditions. To improve generalization, we propose to augment the architecture with a normal encoder $E_{N}$ and an image decoder $D_{I}$ , where all encoders/decoders share the same latent space. This augmented architecture provides additional constraints on the latent space with the auto-encoded image-to-image and normal-to-normal branches, allowing therefore for a much wider range of training datasets. In order to keep advantage of the skip connections between $E_{I}$ and $D_{N}$ , while avoiding the resulting bonded connections between $E_{N}$ with $D_{N}$ that hamper the architecture, we introduce the deactivable skip connections. This allows skip connections to be turned on and off during training according to the type of data. + +In summary, this work contributes (1) a framework that leverages cross-modal learning for the estimation of normals from a single face image in-the-wild; (2) the introduc + +tion of the deactivable skip connection; and (3) an extensive evaluation that shows that our approach outperforms state-of-the-art methods on the Photoface [64] and Florence [3] datasets, with up to nearly $10\%$ improvements in angular error on the Florence dataset, as well as visually compelling reconstructions. + +# 2. Related Work + +We focus the discussion below on methods that consider 3D face reconstruction, or normal estimation, given single RGB images. + +Reconstruction with Parametric Models 3D reconstruction from a single image is ill-posed and many methods resort therefore to strong priors with parametric face models such as blendshape [16, 9, 55] or statistical models, typically the 3D Morphable Model (3DMM) [7]. These models are commonly used within an analysis-by-synthesis optimization [41, 22, 13, 8, 18] or, more recently, using deep learning to regress model parameters [39, 40, 54, 59, 19, 15, 28, 52, 44], or alternatively to regress other face information using 3DMM training data, for instance volumetric information [25], UV position map [15], normal map [58], depth map [45], or the full image decomposition [47, 46, 29]. This strategy has proven robustness, however it is constrained by the parametric representation that offers limited expressiveness and fails in recovering fine scale details. + +In order to improve the quality of the reconstructions several works have proposed to add medium-scale correctives on top of the parametric model [33, 17, 53], to train a local wrinkle regressor [9], or to learn deep nonlinear 3DMM [57, 67] that can capture higher-frequency details. Our method also enables to enhance a face prediction through the estimation of more accurate normals. + +Normal Estimation with Shape from Shading Shapefrom-shading (SfS) [21, 65] is a well-studied technique that aims at recovering detailed 3D surfaces from a single image based on shading cues. It estimates surface normals using the image irradiance equation, as well as illumination model parameters when these are unknown. SfS is inherently limited by the simplified image formation model assumed but has inspired numerous works that build on the correlation between pixel intensity and normals, either explicitly or implicitly. For instance, a few works on faces combined SfS with a data-driven model, e.g. [49, 27, 50], which helps to avoid some of the limitations such as ill-posedeness and ambiguities e.g. [6]. The recent works of Shu et al. [47] and Sengupta et al. [46] use deep neural networks to decompose in-the-wild facial images into surface normals, albedo and shading, assuming Lambertian reflectance and using a semi-supervised learning approach inspired by SfS. Our work follows a similar direction and estimates the normal information from a single image, but unlike [47, 46] we do + +not rely on an image formation model and let instead the network learn such a transformation from real data. + +Normal Estimation with Deep Networks Closely related to our work are methods that recover surface normals from an image using deep neural networks, e.g. [61, 14, 63, 32, 5, 37, 66, 38, 12, 48, 2]. Yoon et al. [63] and Bansal et al. [4] focus on the normal prediction task in order to recover detailed surfaces. Eigen and Fergus [14] simultaneously regress depth, normal and semantic segmentation using a multi-scale approach. Zhang and Funkhouser [66] predict surface normal and occlusion boundaries to later optimize for depth completion; a similar direction was followed by [38] for outdoor scenes. Trigeorgis et al. [58] estimate facial normals with a supervised approach trained on synthetic data. Our approach differs from the aforementioned methods with a new architecture that enables cross-modal learning, hence improving performances in monocular 3D face normal estimation. + +Geometry Enhancement using Deep Networks Methods have been proposed that directly enhance face models using deep neural networks. Richardson et al. [40] use two networks where the first estimates a coarse shape and the second one refines the depth map from the previous branch, using an SfS-inspired unsupervised loss function. Sela et al. [45] recover the depth and correspondence maps coupled with an off-line refinement step. The works of [62, 23] estimate high frequency details by training with very accurate ground-truth data, which requires a careful acquisition process and high-quality inputs. Tran et al. [56] estimate a per-pixel bump map, where the ground-truth data is obtained by applying an SfS method offline. The work of [10] learns to estimate a geometric proxy and a displacement map for details primarily for high resolution images $(2048 \times 2048)$ . While they mention limitations with low resolution images, we show results with resolutions as low as $256 \times 256$ . + +# 3. Method + +We propose to predict face normals from a single color image using a deep convolutional encoder-decoder network. A natural solution to this purpose is to combine an image encoder $E_{I}$ with a normal decoder $D_{N}$ , as in e.g. [58]. However training such an architecture requires pairs of normal and color images in correspondence. Although a few public datasets are available that contain high-quality 3D or normal ground-truth information for faces, for instance ICT-3DRFE [51] or Photoface [64], they were obtained under controlled conditions and do not, therefore, really cover the distribution of images in-the-wild. On the other hand, numerous large datasets of natural images are publicly available, for example CelebA [34] and AffectNet [35], yet without the associated accurate and detailed ground-truth normal values. Whereas other works have approached this + +![](images/38e054e1ddf06133a4bc59aab8e8a9c7eb4dbc9af3f553238322da259bbd5bcc.jpg) +Figure 2: Overview of the proposed approach. Our cross-modal architecture allows exploitation of paired and unpaired image/normal data for image-to-normal translation (Red), by means of further image-to-image (Green) and normal-to-normal (Blue) regularizations during training. The deactivable skip connections allow to transfer details from the image encoder $E_{I}$ to the normal decoder $D_{N}$ without having to link the normal encoder $E_{N}$ to the normal decoder $D_{N}$ . + +by augmenting the training corpus with synthetic groundtruth [58, 46], we propose instead a method based on cross-modal learning that can leverage all available data, even unpaired. + +# 3.1. Cross-modal Architecture + +As depicted in Fig. 2, we use two encoder/decoder networks, one for images $E_{I} / D_{I}$ and one for normals $E_{N} / D_{N}$ , sharing the same latent space. This architecture is trained with image-to-image, normal-to-normal and imaged-to-normal supervision simultaneously in order to obtain a rich and robust latent representation. To this purpose, we exploit paired images of normal and color information on faces, as available from [51, 64], in addition to individual images of either color or normal information, from e.g. CelebA-HQ [26] and BJUT-3D [1]. To improve the overall performance we augment this architecture with long skip connections between $E_{I}$ and $D_{N}$ , as it favors the transfer of details between the image and normal domains, and since it has been shown to significantly increase performance in several image translation tasks e.g. [24]. In practice we use a U-Net+ResNet [42, 20] architecture that combines the benefits of both short and long skip connections. + +Training such an architecture end-to-end raises an obstacle: the skip connections from $E_{I}$ to $D_{N}$ ( $E_{I} \rightarrow D_{N}$ ), which are based on concatenating feature maps, impose, by construction, to also have skip connections between the encoder and decoder of the normal modality, i.e. $E_{N} \rightarrow D_{N}$ . This is counterproductive in practice: by setting skip connections within the same modality, it is in fact easier for the normal autoencoder to transfer features from the earliest layers of its encoder to the last layers of its decoder + +![](images/9b2c3b29f493a3de764eaaaf65ff0b3d5516c5a4372a4ad89064989d1d7f1f49.jpg) +(a) Standard skip connection + +![](images/2fb314af342f3dd594f0b3a7c2d3d3f0ffa150ba93595f132eb2da413f20d397.jpg) +(b) Deactivable skip connection +Figure 3: Instead of concatenating the encoder features (red) and decoder features (blue), as with standard skip connections, we fuse the encoder features with part of the decoder features (light blue), to be able to deactivate this operation when needed. + +through the skip connection, thus depriving the deeper layers of any meaningful gradients during training. Not only will this fail to improve the latent face representation, but it will also alter the coefficients of the normal decoder for the image-to-normal inference task. + +For this reason, we introduce the deactivable skip connections as shown in Fig. 3 and detailed in Sec. 3.2. This allows us to train the framework end-to-end by setting long connections solely between $E_{I}$ and $D_{N}$ , thus learning a rich latent space that encodes facial features from both color and normal images while profiting from all available data. + +# 3.2. Deactivable Skip Connections + +As mentioned earlier, skip connections are well suited to our problem as they allow sharing of low-level information at multiple scales while still preserving the general structure. In the implementation of standard skip connections, as in [42, 24], the decoder features at the $(n - i)^{th}$ layer $F_{D}^{n - i}$ are the concatenation of the processed previous layer features $f(F_{D}^{n - i - 1})$ and the encoder features at layer $i$ , $F_{E}^{i}$ where $n$ is the total number of layers (see Fig.3a). + +Let $m\left(F_{E_I}^i\right)$ be the number of feature maps at the $i^{th}$ layer of $E_I$ . The proposed architecture (Fig. 2) requires to set connections from the image encoder $E_I$ to the normal decoder $D_N$ , and as a consequence, each layer features $F_{D_N}^{n - i}$ of $D_N$ are expected to always have an additional $m\left(F_{E_I}^i\right)$ channels. In order to gain generalization over each domain, both the color and the normal images can be auto-encoded during training. However, since the concatenation is expected during training on the decoder $D_N$ side, features of the normal encoder $E_N$ must be concatenated as well, which is as discussed detrimental to our model. + +The Deactivable Skip Connections are designed such that, during training, the transfer of feature maps from encoders to decoders can be selectively activated or deactivated. Compared to a decoder equipped with standard skip connections, the processed features $f\left(F_{D}^{n - i - 1}\right)$ of our decoder include $m\left(F_{E}^{i}\right)$ extra channels (light blue in Fig.3b). During a normal-to-normal pass, the skip connections are deactivated and the $(n - i)^{th}$ layer features of the normal decoder correspond to the processed previous layer features e.g. $F_{D}^{n - i} = f\left(F_{D}^{n - i - 1}\right)$ . During an image-to-normal pass, the skip connection is activated: we first perform an element-wise max-pooling between the $i^{th}$ layer features of the encoder $F_{E}^{i}$ and the last $m\left(F_{E}^{i}\right)$ channels of the processed $(n - i - 1)^{th}$ layer features of the decoder $f\left(F_{D}^{n - i - 1}\right)$ , as illustrated in Fig. 3b. The result is stacked back with the remaining of the processed previous layer features thus forming the final $(n - i)^{th}$ decoder layer features $F_{D}^{n - i}$ . Doing so allows to transfer the information from encoder to decoder without degrading performances when the transfer operation does not occur, as when auto-encoding normals. + +# 3.3. Training + +We train the framework end-to-end using both supervised and unsupervised data, where the latter includes individual image and normal datasets. During training, the skip connections are deactivated when doing a normal-to-normal pass. For the supervised case, and for unsupervised normals, the loss function is the cosine distance between the output and the ground-truth, which in our experiments gave better results than the $L1 / L2$ norm: + +$$ +\mathcal {L} _ {n r m} (N, \hat {N}) = 1 - \frac {1}{| N |} \sum_ {(i, j)} \frac {N (i , j) ^ {\top} \cdot \hat {N} (i , j)}{| | N (i , j) | | _ {2} | | \hat {N} (i , j) | | _ {2}}, \tag {1} +$$ + +where $N(i,j)$ and $\hat{N}(i,j)$ are the normal vectors at pixel $(i,j)$ in the ground-truth and output normal images $N$ and $\hat{N}$ respectively, and $|N|$ is the number of pixels in $N$ . For unsupervised image data we use the $L2$ loss: + +$$ +\mathcal {L} _ {i m g} (I, \hat {I}) = | | I - \hat {I} | | _ {2} ^ {2}, \tag {2} +$$ + +where $\hat{I}$ is the output color image and $I$ the ground-truth. In both cases, the loss is applied only on facial regions segmented using masks obtained as explained in Sec.4.1. + +In practice, as we can only perform a training iteration for one input modality at a time, either an input batch of images or normals, we train our model as follows: when loading a batch of images with image/normal ground-truth pairs, we perform a normal-to-normal iteration first, followed by an image-to-normal plus image-to-image iteration, where both losses in the latter iteration are summed with equal + +weights. When loading a batch of images only, we perform an image-to-image iteration. Finally, with a batch of normals only, we naturally proceed with a normal-to-normal iteration alone. + +# 4. Evaluation + +We report below on the accuracy of the normals estimated with our approach on standard datasets [64, 3]. We compare against state-of-the-art methods on normal estimation and 3D reconstruction, and show significant improvements in terms of normal prediction accuracy. This is supported by compelling reconstructions of images in-the-wild from 300-W [43], as can be seen in Figs. 4 and 5. + +Following previous works [46, 58], we evaluate with the mean angular error between the output and the ground-truth normals, as well as percentage of pixels within the facial region with an angular error of less than $20^{\circ}$ , $25^{\circ}$ and $30^{\circ}$ . For qualitative comparisons we show both the output normal map, as well as the mesh results obtained by enhancing the output of PRN [15] using normal mapping [11]: we append the predicted normals to the the PRN meshes pixelwise thus rendering enhanced geometric shading. + +# 4.1. Implementation Details + +The framework was implemented in PyTorch [36], and all experiments were run on a GTX Titan Black. The networks were trained for 40 epochs using ADAM solver [31] with a learning rate of $10^{-4}$ . We use a ResNet-18 [20] architecture and set five skip connections, one at the output of the initial layer and the rest at the output of each of the four residual blocks. Each mini-batch during training consists of data of the same type, i.e. images only, normals only or image-normal pairs, as this worked best for us empirically. + +Similar to prior work, input images are crops of fixed size around the face. We extract 2D keypoints with a face detector [30] and create masks on the facial region by finding the tightest square of edge size $l$ around the convex hull of the points. The images are then cropped with a square patch of size $1.2 \times l$ centered at the same 2D location as the previously detected box, and subsequently resized to $256 \times 256$ . The code will be made publicly available. + +# 4.2. Datasets + +Our training set comprises multiple datasets: ICT-3DRFE [51] and Photoface [64] which provide image/normal pairs, CelebA-HQ [26] which only contains 2D images, and BJUT-3D [1], which consists of high-quality 3D scans. + +We generated 8625 image/normal pairs from ICT-3DRFE by randomly rotating the 345 3D models and relighting them using the provided albedos. We sampled random rotation axes and angles in $[- \pi / 4, \pi / 4]$ , random lighting directions with positive $z$ , and random intensities in + +[0, 2]. For Photoface, following the setting in [58, 46], we randomly selected a training subset of 353 people resulting in 9478 image/normal pairs. We also generated 5000 high resolution facial images from CelebA-HQ, which is used to train the image-to-image branch exclusively. In addition, we render 3000 normal images from the 500 scans of BJUT-3D, rotated with random axes and angles in $[- \pi / 4, \pi / 4]$ . We only render normal images from this dataset as the original scan color images are not provided. + +For evaluation purposes we use the remaining testing subset of Photoface, which consists of 100 subjects not seen during training and 1489 image/normal pairs. This subset challenges the reconstruction with very severe lighting conditions. Following the work of [15], we create an additional evaluation set by rendering 530 color and normal facial images from the 53 3D models of the Florence dataset [3], rotated with random axes and angles in $[- \pi / 4, \pi / 4]$ . This allows to evaluate on a completely unseen dataset. Finally, we use the 300-W dataset [43] of 2D face images to assess qualitative performances in-the-wild. Note that for both training and testing, we limited ourselves to 3D face datasets of high quality and details. + +
Mean±std< 20°< 25°< 30°
Pix2V [45]33.9±5.624.8%36.1%47.6%
Extreme [56]27.0±6.437.8%51.9%64.5%
3DMM [58]26.3±10.24.3%56.1%89.4%
3DDFA [68]26.0±7.240.6%54.6%66.4%
SfSNet [46]25.5±9.343.6%57.5%68.7%
PRN [15]24.8±6.843.1%57.4%69.4%
Ours22.8±6.549.0%62.9%74.1%
UberNet [32]29.1±11.530.8%36.5%55.2%
NiW [58]22.0±6.336.6%59.8%79.6%
Marr Rev [4]28.3±10.131.8%36.5%44.4%
SfSNet-ft [46]12.8±5.483.7%90.8%94.5%
Ours-ft12.0±5.385.2%92.0%95.6%
+ +Table 1: Quantitative comparisons on the Photoface dataset [64] with mean angular errors (degrees) and percentage of errors below $20^{\circ}$ , $25^{\circ}$ and $30^{\circ}$ . -ft means that the method was fine-tuned on Photoface. + +# 4.3. Comparisons + +We compare our results to methods that explicitly recover surface normals, either for facial images (SfSNet [46], NiW [58]) or for general scenes (Marr Rev [4], UberNet [32]). We also compare against state-of-the-art approaches for 3D face reconstruction, namely the classic 3DMM fitting method used in [58], 3DDFA [68], the bump map regression based approach of [56] and the combined regression+shape-from-shading approach of [45]. + +Quantitative results can be found in Table 1 for Photo- + +![](images/33d80a9f2137e2751c7de9148a77210c06b323223aedc0c98dad24c434a99609.jpg) + +![](images/02684ff8358c08e605228cc894e23c9b0ff7e48a0e9defe2f2d36e0e988d7336.jpg) + +![](images/ba2b53cc7020ba9c3ed59d5f2af11027454fdf3cdc316d33dd6c039fdd1b11ea.jpg) + +![](images/e18e5ee5d66719a67ec6c8d4d0605ade42b675c51caa5d418a17d3953fedb26e.jpg) + +![](images/fadd145617c69cb9f29bea3367a655f98e646ff13e7c6635de2f9a11754cecca.jpg) + +![](images/3acc5cf9cd50624fe45b132cea97a0b238b55966bf10b641117e6d9691409f4e.jpg) + +![](images/c46a060bfcc0c53cc5f1fce1b4fe91b0bb21ce8dc5ecaca54986032a81ff58f8.jpg) +(a) input + +![](images/64b6ec388a8018f5890f9527417592698f80665d4461545b5f2a55428dd962ea.jpg) + +![](images/54b6cd3f67bb72c61bea1ec33e32a48627352c28c09912e004f81a358977185f.jpg) + +![](images/897fdd4f45bc4667be80461748772107702a160b77ecbaadcfc93910032f773a.jpg) + +![](images/8ce2bbc42303fc8de7d21f2cc0bdaeccd24c7f81db41152498aff85063b7bfbf.jpg) + +![](images/17543ff704c6ed150831444835b0b94b90d7e11a2eddefa8532eb6dfab0e1059.jpg) + +![](images/d9fdb68744a103977dfe7d00c3ae98838c2d2f107ff97f9f4da46d402dd53b0e.jpg) + +![](images/0583d2b6d5ea60d22dbd5538251e2aae94f43b6b01df57cd04ef1a575e790323.jpg) +(b) Ours + +![](images/9c7e5ac6b51fee9fd4ef76e461c5cfbd9c6f4feb860acf771220aa95d34b16e9.jpg) + +![](images/46904681c257e66830fc205aa3a6d29345f111f0afa1421709ccb3f96e0e21d7.jpg) + +![](images/3fe02a2a284153092294edf99330ca529305a199985d78882fd4ddf4bf091afe.jpg) + +![](images/36b9b65142eb61bce613210cad82f7d857ce63107780ee493970d635c14b0109.jpg) + +![](images/b57990de6870bcf847faa33bd624442e1779140266cdfe6fdda13bfd00cf59fe.jpg) + +![](images/3054d3aaabc447d1a2e32780babfd6300c5b32ea75dab0ada668f886276f2595.jpg) + +![](images/2a89d5556f7b7838c4e825bdd5cf9ed02132d225d05345db895698237e8bf95c.jpg) +(c) SfSnet + +![](images/2f9e81b1a8699a5f608db789bd4344b584ba9534421a6edf833e10619c13a971.jpg) + +![](images/309b3a928be4f33c395e792cbd52dcdd6ddfa67c39b60809cb20937798e9b949.jpg) + +![](images/4c8374e428c3031ffdf256e2218f5968e386fe91410623ab85b5c2ad07dcb033.jpg) + +![](images/983cae4aa5781eb3f14fabedca498f75d8577396501517fb09ecbe64c9922af2.jpg) + +![](images/44560e7207c13685527f5c351565681ac163e675b417f9274bbcb3fb352e7870.jpg) + +![](images/177c694dc1ec01a4ceb5fe2c43961daa487e9092c0152307370d95dd5a745983.jpg) + +![](images/843a17e70255a375bf144b1ae1abad61fa014c8b546ec2aebaa20658cc1ff9df.jpg) +(d) PRN + +![](images/9bb8316ad5a1bae8be0ab5b3d004e3a24337262737bc0b0f5b772957b2c25329.jpg) + +![](images/406c6598a225b1597476a04001d68912a0e63105c14ff41cca5b97c35d5362a3.jpg) + +![](images/8252731f1f097c3de88012539ee01d08dcab69b646fc750e8f31ffaceab79d5b.jpg) + +![](images/d0ffe39439d1bd439bff317bbdf6ad57f3beb306e663a56b45e7574798124e3c.jpg) + +![](images/a3a0cc60b8138e91384244524ae593a1bfb219a6791d31969f6dbf2616a76014.jpg) + +![](images/1414f1208e1094e221db59bd89ca12f72c428e00d66b47cb935144b1bfd8ba08.jpg) + +![](images/abaa5bbcdef20bde84cbc0a2b493adc52978d0ad95d1088c52c3e1523c2ce22b.jpg) +(e) Extreme + +![](images/ccbe9a41d0e4f19e6c92fcfc7843417f9f32853681377baca4eaa72a89815b85.jpg) + +![](images/80e4ccc9d2cec33cf54a14a4f4820bb362843d84366c87318ca0018fc8cdb94e.jpg) + +![](images/fd290ad1b3a98ced4bff4addd7f8c7dc836d4af6e1cacdcfdaeec32788ef36fe.jpg) + +![](images/fa474525945e92c4cec9bcd12272149d104bc23b9d8499a451d52873887d421b.jpg) + +![](images/f8f6bb95a9a43f28ee2f7f97cf54dcdb77c611ba53bf30e96c0752daada8e4f5.jpg) + +![](images/f97680a25c2e3e4423086d3e9bef029ed535cfc70fe257fcbf878fccba8d8739.jpg) + +![](images/48a413a1589494effecbeaf01a7f1fe00c15b6a66ae288ae60e62c22afc64a08.jpg) +(f) $\mathrm{Pix2V}$ +Figure 4: Qualitative comparisons on normals in the 300-W dataset [43]. + +![](images/dfbeb24989508579404f6940bdd2108c12c9bac3060e8b3db7cf3b0b8652eb0d.jpg) + +![](images/4bdcd02da7bb18fa22ea18f61f4e13f6783c1eb3f0db883f6b036b2ef5e148e0.jpg) + +![](images/b1cbc2a07f1c62f2a71a7da310ff6797921b3fcf85162ad482e4c4025cbfd6f1.jpg) + +![](images/01d1bff2f0c3b7ed8683745a03f6b37c4a80ab98289370c8befabff15ed10329.jpg) + +![](images/7d9f55fa4e9c5933928a4462baa567319f3f784cc390b4c66d71160270ee6bf1.jpg) + +![](images/ca07ca68df805f9209002d2593cd517418f03a4beb27e44501e76ba11f566d98.jpg) + +![](images/4559a454f30039ac2d0d05dc1bae759d129a2e9ff23054fb60ee44ba3023066e.jpg) +(g) 3DDFA + +
Mean±std< 20°< 25°< 30°
Extreme [56]19.2±2.264.7%75.9%83.3%
SfSNet [46]18.7±3.263.1%77.2%86.7%
3DDFA [68]14.3±2.379.7%87.3%91.8%
PRN [15]14.1±2.1679.9%88.2%92.9%
Ours11.3±1.589.3%94.6%96.9%
+ +Table 2: Quantitative comparisons on the Florence dataset [3] with mean angular errors (degrees) and percentage of errors below $20^{\circ}$ , $25^{\circ}$ and $30^{\circ}$ . + +face and Table 2 for Florence datasets. We show results of our method both with (Ours-ft) and without (Ours) fine-tuning of the training split of Photoface in the upper and lower parts of Table 1 respectively. The same is done with SfSNet. The error values on Photoface for the methods of [46, 58, 45, 4, 32] are as reported in [46], and we use the publicly available implementations of [56, 68, 15] + +for the others. For the Florence dataset we use the publicly available implementations. Note that, to be able to evaluate the per-pixel normal accuracy, we can only compare to 3D reconstruction methods whose output is aligned with the image. For a fair comparison, all methods were given facial images of size $256 \times 256$ as input, resized if necessary. + +The proposed approach shows the best values both in mean angular error and percentage under $20^{\circ}$ , $25^{\circ}$ and $30^{\circ}$ degrees, only outperformed by 3DMM on errors under $30^{\circ}$ . As noted by the authors in [58], 3DMM fitting performs well under $30^{\circ}$ because of the coarseness of the model and the keypoint supervision, but its performance on tighter angles drops drastically as it lacks precision. We found that, although [45, 56] usually provide seemingly detailed reconstructions, the actual normals of these methods lack accuracy as witnessed by their numbers. + +Our good performance is also confirmed by qualitative comparisons over images in-the-wild in various head poses and under arbitrary lighting conditions as can be seen in + +![](images/c33e5da0e83b7726a3e6c3cd397cf3183ccaf587b0db66c086ce5e3d77aeeff6.jpg) +(a) Input + +![](images/ddabdcc126c1f54d5a36137c0959b0f03065f68dfb6b7fdd9291444b4c230e60.jpg) +(b) Ours+PRN +Figure 5: Qualitative comparisons on geometries in the 300-W dataset [43]. + +![](images/44228b4e86625bf75796aabc6a46d0712c91f969235a978fe28b82eee40e91fb.jpg) +(c) SfSNet+PRN + +![](images/d4d843ea75c5bb12e65758c2456983d271cac8b9f4eb181d831cd495693f30cb.jpg) +(d) PRN + +![](images/29243cd6de846e0e4fcfb3c03cc652af541fdd0057a387f72fd2f65bf0ef1ac5.jpg) +(e) Extreme + +![](images/51aa26504489b1c84f1827f44cb04a548e823c68e56eca4f75d522c9678f72e3.jpg) +(f)Pix2Vertex + +![](images/d92fbad273f87c78eb5adc2612fbee71f8f52a4eed1c7577a03febee22c7a270.jpg) +(g) 3DDFA + +Figs. 4 and 5. For comparisons with mesh results (Fig. 5), we show for both our approach and SfSNet [46] the normal mapping over the same base mesh, obtained using PRN [15], and we refer to these as Ours+PRN and SfSNet+PRN respectively. We show our meshes from two views to illustrate that the output is not optimized for a particular viewpoint, a known limitation with SfS. Compared to SfSNet we recover much more refined details that significantly enhance the base mesh. Compared to Extreme [56] our approach does not include unnecessary additional noise. As observed by other authors, Pix2Vertex [45] cannot handle difficult poses or illuminations, and sometimes simply fails to converge. Both PRN and 3DDFA can correctly recover the general structure of the face, although their goal was not to recover surface details as we do. + +We believe our improved results are due to the fact that we do not rely on a parametric model for training data generation, as was done in e.g. [46], as well as the strongly regularized latent space that is learned through the two en + +coder/decoder networks, in addition to the skip connections that can transfer the necessary details. + +# 4.4. Ablation + +We evaluate here the influence of the proposed architectural components. In particular, we compare against the alternatives shown in Fig. 6: our model without skip connections (Fig. 6b), without the normal encoder $E_N$ (Fig. 6c), and without both the normal encoder $E_N$ and image decoder $D_I$ (Fig. 6d), i.e. a basic encoder-decoder architecture. Since there is no need in the last two cases for deactivable skip connections we use standard ones. We show quantitative results in Table 7, and qualitative examples in Fig. 8. + +Our final model outperforms the alternatives both quantitatively and qualitatively which validates the proposed cross-modal architecture design, and the benefit of the introduced deactivable skip connections. + +For example, we can see in the geometric shape of the + +![](images/7492e954ab0140af1cf09b14f29aee5ac4ea2d1d218207cf1e99f8dc1bc6f96f.jpg) +(a) Ours + +![](images/dec906d01685afe58c0da9842f5bfc2d1adad4ab97749bb888c20273f601420f.jpg) +(b) w/o skip co. + +![](images/4f57977cb7bcc6589273c93b7663f3616141465ae9acab007fa4bff3e75b1588.jpg) +Figure 6: Architectures for the ablation test: (a) our proposed architecture, (b) without skip connections, (c) without the normal encoder and (d) without the normal encoder and the image decoder. + +![](images/d4627eca224b023978059d3668702fe84f34b48bd9f00af52a36af1cbc778993.jpg) +(c) $\mathrm{w / o}E_N$ +(d) w/o $E_N$ , $D_I$ + +
Mean±std< 20°< 25°< 30°
w/o skip co.(Fig.6b)24.4 ±6.746.6%60.6%72.0%
w/o EN,DI(Fig.6d)23.3 ±6.347.7%61.9%73.3%
w/o EN(Fig.6c)23.0 ±6.847.6%61.5%73.1%
Ours (Fig.6a)22.8±6.549.0%62.9%74.1%
+ +(a) On Photoface [64] + +
Mean±std< 20°< 25°< 30°
w/o skip co.(Fig.6b)12.6±1.485.8%92.6%95.8%
w/o EN(Fig.6c)12.4±1.686.0%92.6%95.9%
w/o EN,DI(Fig.6d)12.0±1.287.8%94.1%96.7%
Ours (Fig.6a)11.3±1.589.3%94.6%96.9%
+ +(b) On Florence [3] + +eyelids in the first row of Fig. 8 and the shading in the second row that our final model gets the best from each of the alternatives. Our correct global shape estimate is comparable to that of the cross-modal model without skip connections, although the latter is smoother and clearly lacks details. Additionally we can see that removing the image decoder $D_{I}$ and normal encoder $E_{N}$ (i.e. a standard encoder-decoder with skip connections) gives poor results for images-in-the-wild, due to the domain gap between training and evaluation. This can be visualized particularly in the artifacts appearing on the third and fourth examples, or the inaccurate shadings of the second example. Finally, our fine details are comparable to those of the model with skip connections but without the normal encoder $E_{N}$ , which in turn has a reduced ability to represent the shape accurately, since it has not learned an additional prior on the geometric aspects of the face. + +# 4.5. Limitations + +The proposed method still has limitations, some of which are shown in Fig. 9. These belong to extreme situa- + +![](images/fd6db55b3a4782e98187491d0d7b5c338211a2e1468e413fb0a397b7f9da2a7d.jpg) + +![](images/cd403b838e8ef8e8c164cde03ed005b8d599ea03d2d419f63bb6ba35310fa980.jpg) + +![](images/0eb3593ef2f9ba999f557e6f3a79538b7f939d8ef6e78a280fba651ee14f0299.jpg) + +![](images/f502ad9a14d871900897ed16bcd6672da140261ca929d3047ac48e1cecb199c2.jpg) +(a) Input +Figure 8: Qualitative comparisons between architectures: (b) our proposed architecture, (c) without the normal encoder and the image decoder, (d) without the normal encoder, and (e) without skip connections. + +![](images/9ccd7df2bc5bb41567cb6ebea2e9ee07dd486da5eee4f5c3275a069e06356fbb.jpg) + +![](images/42a14840ce4d2acd6f10465c859f40ab4bcf19cb2c8f9e56ee06dda483704b7a.jpg) + +![](images/b991e124f9a9ce539e18e8a7dafc89bb00afa1940516f9c3061b2b426409a3c5.jpg) + +![](images/5e2c96434015d20957b563732055feec55047f02255f28ae661448998bc60caa.jpg) +(b) ours + +![](images/4aab05ed9b9bbcda1c49be79a0392e9ddce7e262b57427baf0e292b0b7bc972e.jpg) + +![](images/2d9215b3540131253fa6081030825a26b1a3efb8bdf02601f24da3db67fc5455.jpg) + +![](images/89d23f335dfab7a70e1dd64212ba27362729356b3322837687b60ff5acb907b1.jpg) + +![](images/b5ba2005ab7c05f11a2d367327f8c89dd3f00ffd505a574ff57f54a0109f3d72.jpg) +(c) w/o $E_N D_I$ + +![](images/9ba1adc4bd75918dc6ba551844bae55340a6fa6f8b6cb86a8bc282bca44267c0.jpg) + +![](images/bde0a2eb02cf0fd36b947fdbee209509f12dea902512b64f6e86f417b6dd8ba1.jpg) + +![](images/e835fd7bf683aac068273935cada0a468a2c052066e9d12f11bc83b88bb9c4bf.jpg) + +![](images/e55c7ddaf8cadd97883857abf3f70f76251a6a60ba515ec334c5e2f6b4e1b3ec.jpg) +(d) w/o $E_N$ + +![](images/8dce07e566cb8769a2aeafd7b13e2e6238c9d88258239bc328b158d0faedc3b2.jpg) + +![](images/95cb6a0b0721f2070cbc356dfb41b46ebd1092622427bf940e4eec0f67699307.jpg) + +![](images/8c03d017355235ede56e51f116e837c332ae4bb8bb023c41ca00c848e70b420d.jpg) + +![](images/d69710eb71b385f1cc7f54287437d8e4323a9d19f2a82cd8c52c20dc29a363fe.jpg) +(e) w/o skip co. + +tions that represent outliers to the training data, including faces in very severe lighting/shades (Fig.9a,9b), occlusion (Fig.9c,9d), very low quality images (Fig.9e) and unusual facial textures (Fig.9f). + +![](images/193931712859e589a4981ccd8161a2f142ee2117b4b8ed1014060ef4c4dbb982.jpg) +Figure 7: Quantitative comparisons between architectures: the proposed architecture (Ours), without skip connections $(w / o$ skip co.), without the normal encoder $(w / o E_N)$ and without the normal encoder and the image decoder $(w / o E_N, D_I)$ . +(a) + +![](images/b0de9c3f2517e575980835aad7ae4045fb12ffe6c18c3153be953b6a537ce3f1.jpg) +(b) +Figure 9: Failure cases. + +![](images/c36193fa3735228d102aed4c3f0101b339bff614ccf017e5d8f6ea27f08b84de.jpg) +(c) + +![](images/f851e6d05232597f4ae526dfe76974bc2e5cc73b6f0337065ce303a79291c406.jpg) +(d) + +![](images/dee80cc48c48da35f07431268b2bc733ec8125c72d87143b3bac86c699a34945.jpg) +(e) + +![](images/e996a43380ad2e88ce7c8c05554c88e3b091ca2b0749e51cfd4ef69e1ba2ffd2.jpg) +(f) + +# 5. Conclusion + +We presented a novel deep-learning based approach for the estimation of facial normals in-the-wild. Our method is centered on a new architecture that combines the robustness of cross-modal learning and the detail transfer ability of skip connections, enabled thanks to the proposed deactivable skip connections. By leveraging both paired and unpaired data of image and normal modalities during training, we achieve state-of-the-art results on angular estimation errors and obtain visually compelling enhanced 3D reconstructions on challenging images in-the-wild. Among the limitations of our work are the inability to properly handle occlusions (as it is mostly a local method) and to recover finer-details, e.g. pore-level details, which are directions that will be tackled in future work. + +# References + +[1] The bjut-3d large-scale chinese face database. 3, 5 +[2] Thiemo Alldieck, Gerard Pons-Moll, Christian Theobalt, and Marcus Magnor. Tex2shape: Detailed full human body geometry from a single image. In Proceedings of the IEEE International Conference on Computer Vision, 2019. 3 +[3] Andrew D. Bagdanov, Alberto Del Bimbo, and Iacopo Masi. The florence 2d/3d hybrid face dataset. In ACM Workshop on Human Gesture and Behavior Understanding, 2011. 2, 5, 6, 8 +[4] 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, 2016. 3, 5, 6 +[5] Jan Bednarik, Pascal Fua, and Mathieu Salzmann. Learning to reconstruct texture-less deformable surfaces from a single view. In Proceedings of International Conference on 3D Vision, 2018. 3 +[6] Peter N Belhumeur, David J Kriegman, and Alan L Yuille. The bas-relief ambiguity. International Journal of Computer Vision, 1999. 2 +[7] Volker Blanz, Thomas Vetter, et al. A morphable model for the synthesis of 3d faces. In Proceedings of ACM Siggraph, 1999. 1, 2 +[8] James Booth, Anastasios Roussos, Evangelos Ververas, Epameinondas Antonakos, Stylianos Ploumpis, Yannis Panagakis, and Stefanos Zafeiriou. 3d reconstruction of inthe-wild faces in images and videos. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018. 2 +[9] Chen Cao, Derek Bradley, Kun Zhou, and Thabo Beeler. Real-time high-fidelity facial performance capture. ACM Transactions on Graphics, 2015. 2 +[10] Zhang Chen, Guli Zhang, Ziheng Zhang, Kenny Mitchell, Jingyi Yu, et al. Photo-realistic facial details synthesis from single image. In Proceedings of the IEEE International Conference on Computer Vision, 2019. 3 +[11] Jonathan Cohen, Marc Olano, and Dinesh Manocha. Appearance-preserving simplification. In Proceedings of the Annual Conference on Computer Graphics and Interactive Techniques, 1998. 5 +[12] Dapeng Du, Limin Wang, Huiling Wang, Kai Zhao, and Gangshan Wu. Translate-to-recognize networks for rgb-d scene recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3 +[13] Bernhard Egger, Sandro Schonborn, Andreas Schneider, Adam Kortylewski, Andreas Morel-Forster, Clemens Blumer, and Thomas Vetter. Occlusion-aware 3d morphable models and an illumination prior for face image analysis. International Journal of Computer Vision, 2018. 2 +[14] David Eigen and Rob Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In Proceedings of the IEEE international conference on computer vision, 2015. 3 +[15] Yao Feng, Fan Wu, Xiaohu Shao, Yanfeng Wang, and Xi Zhou. Joint 3d face reconstruction and dense alignment with position map regression network. In Proceedings of the Eu + +ropean Conference on Computer Vision, 2018. 1, 2, 5, 6, 7 +[16] Pablo Garrido, Levi Valgaerts, Chenglei Wu, and Christian Theobalt. Reconstructing detailed dynamic face geometry from monocular video. ACM Transactions on Graphics, 2013. 2 +[17] Pablo Garrido, Michael Zollhöfer, Dan Casas, Levi Valgaerts, Kiran Varanasi, Patrick Pérez, and Christian Theobalt. Reconstruction of personalized 3d face rigs from monocular video. ACM Transactions on Graphics, 2016. 2 +[18] Baris Gecer, Stylianos Ploumpis, Irene Kotsia, and Stefanos Zafeiriou. Ganfit: Generative adversarial network fitting for high fidelity 3d face reconstruction. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2 +[19] Kyle Genova, Forrester Cole, Aaron Maschinot, Aaron Sarna, Daniel Vlasic, and William T Freeman. Unsupervised training for 3d morphable model regression. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2 +[20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016. 3, 5 +[21] Berthold KP Horn and Michael J Brooks. Shape from shading. 1989. 1, 2 +[22] Patrik Huber, Guosheng Hu, Rafael Tena, Pouria Mortazavian, P Koppen, William J Christmas, Matthias Ratsch, and Josef Kittler. A multiresolution 3d morphable face model and fitting framework. In Proceedings of the International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications, 2016. 2 +[23] Loc Huynh, Weikai Chen, Shunsuke Saito, Jun Xing, Koki Nagano, Andrew Jones, Paul Debevec, and Hao Li. Mesoscopic facial geometry inference using deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3 +[24] 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, 2017. 3, 4 +[25] Aaron S Jackson, Adrian Bulat, Vasileios Argyriou, and Georgios Tzimiropoulos. Large pose 3d face reconstruction from a single image via direct volumetric cnn regression. In Proceedings of the IEEE International Conference on Computer Vision, 2017. 2 +[26] 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. 3, 5 +[27] Ira Kemelmacher-Shlizerman and Ronen Basri. 3d face reconstruction from a single image using a single reference face shape. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2010. 2 +[28] Hyeongwoo Kim, Pablo Garrido, Ayush Tewari, Weipeng Xu, Justus Thies, Matthias Niessner, Patrick Pérez, Christian Richardt, Michael Zollhöfer, and Christian Theobalt. Deep video portraits. ACM Transactions on Graphics, 2018. 2 + +[29] Hyeongwoo Kim, Michael Zollhöfer, Ayush Tewari, Justus Thies, Christian Richardt, and Christian Theobalt. Inverse-facenet: Deep monocular inverse face rendering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2 +[30] Davis E. King. Dlib-ml: A machine learning toolkit. Journal of Machine Learning Research, 2009. 5 +[31] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.5 +[32] Iasonas Kokkinos. Ethernet: Training a universal convolutional neural network for low-, mid-, and high-level vision using diverse datasets and limited memory. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 3, 5, 6 +[33] Hao Li, Jihun Yu, Yuting Ye, and Chris Bregler. Realtime facial animation with on-the-fly correctives. ACM Transactions on Graphics, 2013. 2 +[34] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In Proceedings of the IEEE International Conference on Computer Vision, 2015. 3 +[35] Ali Mollahosseini, Behzad Hasani, and Mohammad H Ma-hoor. Affectnet: A database for facial expression, valence, and arousal computing in the wild. IEEE Transactions on Affective Computing, 2017. 3 +[36] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems. 2019. 5 +[37] 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, 2018. 3 +[38] Jiaxiong Qiu, Zhaopeng Cui, Yinda Zhang, Xingdi Zhang, Shuaicheng Liu, Bing Zeng, and Marc Pollefeys. Deep surface normal guided depth prediction for outdoor scene from sparse lidar data and single color image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 3 +[39] Elad Richardson, Matan Sela, and Ron Kimmel. 3d face reconstruction by learning from synthetic data. In Proceedings of the international conference on 3D vision, 2016. 2 +[40] Elad Richardson, Matan Sela, Roy Or-El, and Ron Kimmel. Learning detailed face reconstruction from a single image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 2, 3 +[41] Sami Romdhani and Thomas Vetter. Estimating 3d shape and texture using pixel intensity, edges, specular highlights, texture constraints and a prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2005. 2 + +[42] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, 2015. 2, 3, 4 +[43] Christos Sagonas, Georgios Tzimiropoulos, Stefanos Zafeiriou, and Maja Pantic. 300 faces in-the-wild challenge: The first facial landmark localization challenge. In Proceedings of the IEEE International Conference on Computer Vision Workshops, 2013. 5, 6, 7 +[44] Soubhik Sanyal, Timo Bolkart, Haiwen Feng, and Michael J Black. Learning to regress 3d face shape and expression from an image without 3d supervision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2 +[45] Matan Sela, Elad Richardson, and Ron Kimmel. Unrestricted facial geometry reconstruction using image-to-image translation. In Proceedings of the IEEE International Conference on Computer Vision, 2017. 2, 3, 5, 6, 7 +[46] Soumyadip Sengupta, Angjoo Kanazawa, Carlos D Castillo, and David W Jacobs. Sfsnet: Learning shape, reflectance and illuminance of facesin the wild'. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2, 3, 5, 6, 7 +[47] Zhixin Shu, Ersin Yumer, Sunil Hadap, Kalyan Sunkavalli, Eli Shechtman, and Dimitris Samaras. Neural face editing with intrinsic image disentangling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 2 +[48] David Smith, Matthew Loper, Xiaochen Hu, Paris Mavroidis, and Javier Romero. Facsimile: Fast and accurate scans from an image in less than a second. In Proceedings of the IEEE International Conference on Computer Vision, 2019. 2, 3 +[49] William AP Smith and Edwin R Hancock. Recovering facial shape using a statistical model of surface normal direction. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2006. 2 +[50] Patrick Snape and Stefanos Zafeiriou. Kernel-pca analysis of surface normals for shape-from-shading. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2014. 2 +[51] Giota Stratou, Abhijeet Ghosh, Paul Debevec, and Louis-Philippe Morency. Effect of illumination on automatic expression recognition: a novel 3d reconfigurable facial database. In The IEEE International Conference on Automatic Face and Gesture Recognition, 2011. 3, 5 +[52] Ayush Tewari, Florian Bernard, Pablo Garrido, Gaurav Bharaj, Mohamed Elgharib, Hans-Peter Seidel, Patrick Pérez, Michael Zollhofer, and Christian Theobalt. Fml: face model learning from videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2 +[53] Ayush Tewari, Michael Zollhöfer, Pablo Garrido, Florian Bernard, Hyeongwoo Kim, Patrick Pérez, and Christian Theobalt. Self-supervised multi-level face model learning for monocular reconstruction at over 250 hz. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 2 + +[54] Ayush Tewari, Michael Zollhofer, Hyeongwoo Kim, Pablo Garrido, Florian Bernard, Patrick Perez, and Christian Theobalt. Mofa: Model-based deep convolutional face autoencoder for unsupervised monocular reconstruction. In Proceedings of the IEEE International Conference on Computer Vision, 2017. 2 +[55] Diego Thomas and Rin-Ichiro Taniguchi. Augmented blendshapes for real-time simultaneous 3d head modeling and facial motion capture. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2016. 2 +[56] Anh Tuan Tran, Tal Hassner, Iacopo Masi, Eran Paz, Yuval Nirkin, and Gerard G Medioni. Extreme 3d face reconstruction: Seeing through occlusions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2018. 3, 5, 6, 7 +[57] Luan Tran, Feng Liu, and Xiaoming Liu. Towards high-fidelity nonlinear 3d face morphable model. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2 +[58] George Trigeorgis, Patrick Snape, Iasonas Kokkinos, and Stefanos Zafeiriou. Face normals" in-the-wild" using fully convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 2, 3, 5, 6 +[59] Anh Tuan Tran, Tal Hassner, Iacopo Masi, and Gerard Medioni. Regressing robust and discriminative 3d morphable models with a very deep neural network. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 2 +[60] Daniel Vlasic, Matthew Brand, Hanspeter Pfister, and Jovan Popovic. Face transfer with multilinear models. In ACM Transactions on Graphics, 2005. 1 +[61] 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, 2015. 3 +[62] Shuco Yamaguchi, Shunsuke Saito, Koki Nagano, Yajie Zhao, Weikai Chen, Kyle Olszewski, Shigeo Morishima, and Hao Li. High-fidelity facial reflectance and geometry inference from an unconstrained image. ACM Transactions on Graphics, 2018. 3 +[63] Youngjin Yoon, Gyeongmin Choe, Namil Kim, Joon-Young Lee, and In So Kweon. Fine-scale surface normal estimation using a single nir image. In Proceedings of the European Conference on Computer Vision, 2016. 3 +[64] Stefanos Zafeiriou, Mark Hansen, Gary Atkinson, Vasileios Argyriou, Maria Petrou, Melvyn Smith, and Lyndon Smith. The photoface database. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2011. 2, 3, 5, 8 +[65] Ruo Zhang, Ping-Sing Tsai, James Edwin Cryer, and Mubarak Shah. Shape-from-shading: a survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1999, 1, 2 +[66] 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, 2018. 2, 3 + +[67] Yuxiang Zhou, Jiankang Deng, Irene Kotsia, and Stefanos Zafeiriou. Dense 3d face decoding over 2500fps: Joint texture & shape convolutional mesh decoders. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2 +[68] Xiangyu Zhu, Xiaoming Liu, Zhen Lei, and Stan Z Li. Face alignment in full pose range: A 3d total solution. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. 5, 6 \ No newline at end of file diff --git a/crossmodaldeepfacenormalswithdeactivableskipconnections/images.zip b/crossmodaldeepfacenormalswithdeactivableskipconnections/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a5fff6e793f4aba0f14e61ff6bb9d09a0c284964 --- /dev/null +++ b/crossmodaldeepfacenormalswithdeactivableskipconnections/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b25ca6e7a614da25c948d74ca83ada544d64be3c844f082400bc2c20fb0025a3 +size 736969 diff --git a/crossmodaldeepfacenormalswithdeactivableskipconnections/layout.json b/crossmodaldeepfacenormalswithdeactivableskipconnections/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..89f3d7b64b7b8cc1813bbe755fa42ae40aa6a7c9 --- /dev/null +++ b/crossmodaldeepfacenormalswithdeactivableskipconnections/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a86affdf680c0cfabcd3072f1d3c65a584043b02d9bd12ca700c85c38d986846 +size 591408 diff --git a/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/c007d402-e8a6-4892-bea9-eb5933caac10_content_list.json b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/c007d402-e8a6-4892-bea9-eb5933caac10_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7be3deeba9cf37665cfa6a38119b40c9f4e7a0a2 --- /dev/null +++ b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/c007d402-e8a6-4892-bea9-eb5933caac10_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85792ecc3f835e9656a749b61b56b8603bf65946ee7d9f96b37901e6a4f722ec +size 89059 diff --git a/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/c007d402-e8a6-4892-bea9-eb5933caac10_model.json b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/c007d402-e8a6-4892-bea9-eb5933caac10_model.json new file mode 100644 index 0000000000000000000000000000000000000000..10c7d59a62601326f667b9404e6d210ef0d22ae4 --- /dev/null +++ b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/c007d402-e8a6-4892-bea9-eb5933caac10_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8fffa2c7b7a53096dd4008a36778f465e24ed07a7e51c2580235421cef8e37e1 +size 108591 diff --git a/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/c007d402-e8a6-4892-bea9-eb5933caac10_origin.pdf b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/c007d402-e8a6-4892-bea9-eb5933caac10_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..97203e9656f4db364387b31c18dc9423a084e830 --- /dev/null +++ b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/c007d402-e8a6-4892-bea9-eb5933caac10_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91d372421c8fb77d6ba4173c70f8bc3fa285b8c1dafc217d745c597a227d964b +size 1366587 diff --git a/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/full.md b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/full.md new file mode 100644 index 0000000000000000000000000000000000000000..ba21a9e9c3129a97320bc1c52c563fa3bbc680b3 --- /dev/null +++ b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/full.md @@ -0,0 +1,376 @@ +# Cross-modality Person re-identification with Shared-Specific Feature Transfer + +Yan Lu $^{1,2}$ , Yue Wu $^{3}$ , Bin Liu $^{1,2,\text{☑}}$ , Tianzhu Zhang $^{1}$ , Baopu Li $^{4}$ , Qi Chu $^{1,2}$ , Nenghai Yu $^{1,2}$ $^{1}$ School of Information Science and Technology, University of Science and Technology of China, Hefei, China + $^{2}$ Key Laboratory of Electromagnetic Space Information, Chinese Academy of Science, Hefei, China + $^{3}$ Damo Academy, Alibaba Group, Beijing, China + $^{4}$ Baidu Research(USA), 1195 Baodeaux Dr, Sunnyvale, CA, USA + +luyan17@mail.ustc.edu.cn, matthew.wy@alibaba-inc.com, baopuli@baidu.com {flowice, tzzhang, qchu, ynh}@ustc.edu.cn + +# Abstract + +Cross-modality person re-identification (cm-ReID) is a challenging but key technology for intelligent video analysis. Existing works mainly focus on learning modality-shared representation by embedding different modalities into a same feature space, lowering the upper bound of feature distinctiveness. In this paper, we tackle the above limitation by proposing a novel cross-modality shared-specific feature transfer algorithm (termed cm-SSFT) to explore the potential of both the modality-shared information and the modality-specific characteristics to boost the re-identification performance. We model the affinities of different modality samples according to the shared features and then transfer both shared and specific features among and across modalities. We also propose a complementary feature learning strategy including modality adaption, project adversarial learning and reconstruction enhancement to learn discriminative and complementary shared and specific features of each modality, respectively. The entire cm-SSFT algorithm can be trained in an end-to-end manner. We conducted comprehensive experiments to validate the superiority of the overall algorithm and the effectiveness of each component. The proposed algorithm significantly outperforms state-of-the-arts by $22.5\%$ and $19.3\%$ mAP on the two mainstream benchmark datasets SYSU-MM01 and RegDB, respectively. + +# 1. Introduction + +Person re-identification (ReID) aims to find out images of the same person to the query image from a large gallery. Many works focus on feature learning [17, 37] and metric learning [3, 24] on the RGB modality. These methods + +![](images/8c66e40f641da512141c9e372938a8b39d91d67e05f5e9b7f36d3423e5ee804d.jpg) +Figure 1. Illustration of the difference between our algorithm and modality-shared feature learning methods. The modality-shared feature learning methods abandon lots of useful specific cues because the modality-specific information cannot be extracted from the other modality. Our algorithm tries to introduce modality-specific features based on the cross-modality near neighbor affinity modeling, effectively utilizing both shared and specific information for each sample. + +have achieved great success, especially with the most recent deep learning technology [39]. However, the dependency on bright lighting environments limits their applications in real complex scenarios. The performance of these methods degrades dramatically in dark environments where most cameras cannot work well [47]. Hence, other kinds of visual sensors like infrared cameras are now widely used as a complement to RGB cameras to overcome these difficulties, yielding popular research interest on RGB-Infrared cross-modality person ReID (cm-ReID). + +Compared to conventional ReID task, the major difficulty of cm-ReID is the modality discrepancy resulting + +from intrinsically distinct imaging processes of different cameras. Some discriminative cues like colors in RGB images are missing in infrared images. Previous methods can be summarized into two major categories to overcome the modality discrepancy: modality-shared feature learning and modality-specific feature compensation. The shared feature learning aims to embed images of whatever modality into a same feature space [47, 50, 51]. The specific information of different modalities such as colors of RGB images and thermal of infrared images are eliminated as redundant information [4]. However, the specific information like colors plays an important role in conventional ReID. With shared cues only, the upper bound of the discrimination ability of the feature representation is limited. As a result, modality-specific feature compensation methods try to make up the missing specific information from one modality to another. Dual-level Discrepancy Reduction Learning (D²RL) [45] is the typical work to generate multi-spectral images to compensate for the lacking specific information by utilizing the generative adversarial network (GAN) [8]. However, a person in the infrared modality can have different colors of clothes in the RGB space. There can be multiple reasonable results for image generation. It's hard to decide which one is the correct target to be generated for re-identification without memorization of the limited gallery set. + +In this paper, we tackle the above limitations by proposing a novel cross-modality shared-specific feature transfer algorithm (termed cm-SSFT) to explore the potential of both the modality-shared information and the modality-specific characteristics to boost the re-identification performance. It models the affinities between intra-modality and inter-modality samples and utilizes them to propagate information. Every sample accepts the information from its inter-modality and intra-modality near neighbors and meanwhile shares its own information with them. This scheme can compensate for the lack of specific information and enhance the robustness of the shared feature, thus improving the overall representation ability. Comparison with the shared feature learning methods are shown in Figure 1. Our method can exploit the specific information that is unavailable in traditional shared feature learning. Since our method is dependent on the affinity modeling of neighbors, the compensation process can also overcome the choice difficulty of generative methods. Experiments show that the proposed algorithm can significantly outperform state-of-the-arts by $22.5\%$ and $19.3\%$ mAP, as well as $19.2\%$ and $14.4\%$ Rank-1 accuracy on the two most popular benchmark datasets SYSU-MM01 and RegDB, respectively. + +The main contributions of our work are as follows: + +- We propose an end-to-end cross-modality shared-specific feature transfer (cm-SSFT) algorithm to utilize both the modality shared and specific information, achieving the state-of-the-art cross-modality per + +son ReID performance. + +- We put forward a feature transfer method by modeling the inter-modality and intra-modality affinity to propagate information among and across modalities according to near neighbors, which can effectively utilize the shared and specific information of each sample. +- We provide a novel complementary learning method to extract discriminative and complementary shared and specific features of each modality, respectively, which can further enhance the effectiveness of the cm-SSFT. + +# 2. Related Work + +Person ReID. Person ReID [53] aims to search target person images in a large gallery set with a query image. The recent works are mainly based on deep learning for more discriminative features [6, 18, 49, 56]. Some of them treat it as a partial feature learning task and pay much attention to more powerful network structures to better discover, align, and depict the body parts [10, 38, 39, 26]. Other methods are based on metric learning, focusing on proper loss functions, like the contrastive loss [40], triplet loss [17], quadruplet loss [2], etc. Both kinds of methods try to discard the unrelated cues, such as pose, viewpoint and illumination changing out of the features and the metric space. Recent disentangle based methods extend along this direction further by splitting each sample to identity-related and identity-unrelated features, obtaining purer representations without redundant cues [12, 54]. + +The aforementioned methods process each sample independently, ignoring the connections between person images. Recent self-attention [41, 29] and graph-based methods [1, 34, 35, 48] tried to model the relationship between sample pairs. Luo et al. proposed the spectral feature transformation method to fuse features between different identities [29]. Shen et al. proposed a similarity guided graph neural network [35] and deep group-shuffling random walk [34] to fuse the residual features of different samples to obtain more robust representation. Liu et al. utilized the near neighbors to tackle the unsupervised ReID [28]. + +Cross-modality matching. Cross-modality matching aims to match samples from different modalities, such as cross-modality retrieval [9, 16, 21, 27] and cross-modality tracking [57]. Cross-modality retrieval has been widely studied for heterogeneous face recognition [15] and text-to-image retrieval [9, 16, 21, 22, 27]. [15] proposed a two-stream based deep invariant feature representation learning method for heterogeneous face recognition. + +Cross-modality person ReID. Cross-modality person ReID aims to match queries of one modality against a gallery set of another modality [44], such as text-image ReID [23, 32, 33], RGB-Depth ReID [11, 46] and RGB-Infrared (RGB-IR) ReID [4, 7, 13, 19, 20, 25, 42, 43, 45, + +![](images/ff6620752414f337b3633d1f0d8505a3b80a1a5a15cb4b8cdfdb74f19d03836a.jpg) +Figure 2. Framework of the cross-modality shared-specific feature transfer algorithm. + +47, 50, 51, 52]. Wu et al. built the largest SYSU-MM01 dataset for RGB-IR person ReID evaluation [47]. Ye et al. advanced a two-stream based model and bi-directional top-ranking loss function for the shared feature embedding [50, 51]. To make the shared features purer, Dai et al. suggested a generative adversarial training method for the shared feature learning [4]. These methods only concentrate on the shared feature learning and ignore the potential values of specific features. Accordingly, some other works try to utilize modality-specific features and focus on cross-modality GAN. Kniaz et al. proposed ThermalGAN to transfer RGB images to IR images and extracted features in IR domain [20]. Wang et al. put forward dual-level discrepancy reduction learning based on a bi-directional cycle GAN to reduce the gap between different modalities [45]. More recently, Wang et al. [42] constructed a novel GAN model with the joint pixel-level and feature-level constraint, which achieved the state-of-the-art performance. However, it is hard to decide which one is the correct target to be generated from the multiple reasonable choices for ReID. + +# 3. Cross-Modality Shared-Specific Feature Transfer + +The framework of the proposed cross-modality shared-specific feature transfer algorithm (cm-SSFT) is shown in Figure 2. Input images are first fed into the two-stream feature extractor to obtain the shared and specific features. Then the shared-specific transfer network (SSTN) models the intra-modality and inter-modality affinities. It then propagates the shared and specific features across modalities to compensate for the lacked specific information and enhance the shared features. To obtain discriminative and complementary shared and specific features, two project adversarial and reconstruction blocks and one modality-adaptation module are added on the feature extractor. The overall algorithm is trained in an end-to-end manner. + +To better illustrate how the proposed algorithm works, we distinguish the RGB modality, infrared modality and + +shared space with $R, I$ and $S$ in superscript. We use $H$ and $P$ to denote sHared and sSpecific features, respectively. + +# 3.1. Two-stream feature extractor + +As shown in Figure 2, our two-stream feature extractor includes the modality-shared stream (in blue blocks) and the modality-specific stream (green blocks for RGB and yellow blocks for IR). Each input image $X^{m}$ ( $m \in \{R, I\}$ ) will pass the convolutional layers and the feature blocks to generate the shared feature and specific feature. For better performances, we separate the shared and specific stream at the shallow convolutional layers instead of the deeper fully-connected layers [50]: + +$$ +\begin{array}{l} H ^ {m} = \operatorname {F e a t} ^ {S} \left(\operatorname {C o n v} _ {2} ^ {S} \left(\operatorname {C o n v} _ {1} ^ {m} \left(X ^ {m}\right)\right)\right), \\ P ^ {m} = \operatorname {F e a t} ^ {m} \left(\operatorname {C o n v} _ {2} ^ {m} \left(\operatorname {C o n v} _ {1} ^ {m} \left(X ^ {m}\right)\right)\right). \tag {1} \\ \end{array} +$$ + +To make sure that the two kinds of features are both discriminative, we add the classification loss $\mathcal{L}_c$ on each kind of features respectively: + +$$ +\begin{array}{l} \mathcal {L} _ {c} \left(H ^ {m}\right) = \mathbb {E} _ {i, m} \left[ - \log \left(p \left(y _ {i} ^ {m} \mid H _ {i} ^ {m}\right)\right) \right], \\ \mathcal {L} _ {c} \left(P ^ {m}\right) = \mathbb {E} _ {i, m} \left[ - \log \left(p \left(y _ {i} ^ {m} \mid P _ {i} ^ {m}\right)\right) \right], \\ \end{array} +$$ + +where $p(y_i^m |*)$ is the predicted probability of belonging to the ground-truth class $y_i^m$ for the input image $X^m$ . The classification loss ensures that features can distinguish the identities of the inputs. Besides, we add a single modality triplet loss $(\mathcal{L}_{smT})$ [17] on specific features and a cross-modality triplet loss $(\mathcal{L}_{cmT})$ [4, 51] on shared features for better discriminability: + +$$ +\begin{array}{l} \mathcal {L} _ {s m T} (P) = \sum_ {i, j, k} \max \left[ \rho_ {2} + \left| \left| P _ {i} ^ {R} - P _ {j} ^ {R} \right| \right| - \left| \left| P _ {i} ^ {R} - P _ {k} ^ {R} \right| \right|, 0 \right] \\ + \sum_ {i, j, k} \max \left[ \rho_ {2} + \left| \left| P _ {i} ^ {I} - P _ {j} ^ {I} \right| \right| - \left| \left| P _ {i} ^ {I} - P _ {k} ^ {I} \right| \right|, 0 \right], \tag {3} \\ \end{array} +$$ + +$$ +\begin{array}{l} \mathcal {L} _ {c m T} (H) = \sum_ {i, j, k} \max \left[ \rho_ {1} + \left| \left| H _ {i} ^ {R} - H _ {j} ^ {I} \right| \right| - \left| \left| H _ {i} ^ {R} - H _ {k} ^ {I} \right| \right|, 0 \right] \\ + \sum_ {i, j, k} \max \left[ \rho_ {1} + \left| \left| H _ {i} ^ {I} - H _ {j} ^ {R} \right| \right| - \left| \left| H _ {i} ^ {I} - H _ {k} ^ {R} \right| \right|, 0 \right], \tag {4} \\ \end{array} +$$ + +where $\rho_{1}$ and $\rho_{2}$ are the margins of $\mathcal{L}_{cmT}$ and $\mathcal{L}_{smT}$ , respectively. $i, j, k$ represent indices of the anchor, positive of the anchor and negative of the anchor of triplet loss ( $y_{i} = y_{j}, y_{i} \neq y_{k}$ ). + +# 3.2. Shared-Specific Transfer Network + +The two-stream network extracts the shared and specific features for each modality. For unified feature representation, we pad and denote the features of each modality with a three-segment format: [RGB-specific; shared; Infrared-specific] as follows: + +$$ +Z _ {i} ^ {R} = \left[ P _ {i} ^ {R}; H _ {i} ^ {R}; \mathbf {0} \right], \quad Z _ {i} ^ {I} = \left[ \mathbf {0}; H _ {j} ^ {I}; P _ {j} ^ {I} \right]. \tag {5} +$$ + +Here, 0 denotes the padding zero vector, which means that samples of the RGB modality have no specific features of infrared modality, and vice versa. $[\bullet ;\bullet ]$ means concatenation in the column dimension. For cross-modality retrieval, we need to transfer the specific features from one modality to another to compensate for these zero-padding vectors. Motivated by graph convolutional network (GCN), we utilize the near neighbors to propagate information and meanwhile maintain the context structure of the overall sample space. The proposed shared-specific transfer network can make up the lacking specific features and enhance the robustness of the overall representation jointly. As shown in Figure 2, SSTN first models the affinity of samples according to the two kinds of features. Then it propagates both intra-modality and inter-modality information with the affinity model. Finally, the feature learning stage guides the optimization of the whole process with classification and triplet losses. + +Affinity modeling. We use the shared and specific features to model the pair-wise affinity. We take the specific features to compute the intra-modality affinity and the shared features for inter-modality as follows: + +$$ +A _ {i j} ^ {m, m} = d (P _ {i} ^ {m}, P _ {j} ^ {m}), \quad A _ {i j} ^ {m, m ^ {\prime}} = d (H _ {i} ^ {m}, H _ {j} ^ {m ^ {\prime}}), \qquad (6) +$$ + +where $A_{ij}^{m,m}$ is the intra-modality affinity between the $i$ -th sample and the $j$ -th sample, both of which belong to the $m$ modality. $A_{ij}^{m,m'}$ is the inter-affinity. $d(a,b)$ is the normalized euclidean distance metric function: + +$$ +d (a, b) = 1 - 0. 5 \cdot \left\| \frac {a}{\| a \|} - \frac {b}{\| b \|} \right\|. \tag {7} +$$ + +The intra-similarity and inter-similarity represent the relation between each sample with others of both the same and different modalities. We define the final affinity matrix as: + +$$ +A = \left[ \begin{array}{l l} \mathcal {T} (A ^ {R, R}, k) & \mathcal {T} (A ^ {R, I}, k) \\ \hline \dots & \dots \\ \mathcal {T} (A ^ {I, R}, k) & \mathcal {T} (A ^ {I, I}, k) \end{array} \right], \tag {8} +$$ + +where $\mathcal{T}(\bullet, k)$ is the near neighbor chosen function. It keeps the top- $k$ values for each row of a matrix and sets the others to zero. + +Shared and specific information propagation. The affinity matrix represents the similarities across samples. SSTN utilizes this matrix to propagate features. Before this, features of the RGB and infrared modalities are concatenated in the row dimension, each row of which stores a feature of a sample: + +$$ +Z = \left[ \begin{array}{l} Z ^ {R} \\ \dots \\ Z ^ {I} \end{array} \right]. \tag {9} +$$ + +Following the GCN approach, we obtain the diagonal matrix $D$ of the affinity matrix $A$ with $d_{ii} = \sum_{j} A_{ij}$ . The padded features are first propagated with the near neighbor structure $(D^{-\frac{1}{2}} AD^{-\frac{1}{2}} Z)$ and then fused by a learnable nonlinear transformation. After feature fusion, the propagated features will include shared features and specific features of both the two modalities. The propagated features $\widetilde{Z}$ are calculated as: + +$$ +\widetilde {Z} = \left[ \begin{array}{l} \widetilde {Z} ^ {R} \\ - \widetilde {Z} ^ {I} \end{array} \right] = \sigma \left(D ^ {- \frac {1}{2}} A D ^ {- \frac {1}{2}} Z W\right), \tag {10} +$$ + +where $\sigma$ is the activation function which is ReLU in our implementation. $W$ is the learnable parameters of SSTN. These propagated features are finally fed into a feature learning stage to optimize the whole learning process. The transferred features $T$ are denoted as: + +$$ +T = \left[ \begin{array}{l} T ^ {R} \\ \dots \dots \\ T ^ {I} \end{array} \right] = \operatorname {F e a t} ^ {t} (\widetilde {Z}). \tag {11} +$$ + +Following the common feature learning principle, we use the classification loss for feature learning: + +$$ +\mathcal {L} _ {c} \left(T ^ {m}\right) = \mathbb {E} _ {i, m} \left[ - \log \left(p \left(y _ {i} ^ {m} \mid T _ {i} ^ {m}\right)\right) \right]. \tag {12} +$$ + +In addition, we use the triplet loss on the transferred feature to increase the discrimination ability. Since the transferred features include both shared features and specific features of two modalities. We add both the cm-triplet loss $\mathcal{L}_{cmT}(T)$ and sm-triplet loss $\mathcal{L}_{smT}(T)$ on it for better discrimination: + +$$ +\begin{array}{l} \mathcal {L} _ {t} (T) = \mathcal {L} _ {c m T} (T) + \mathcal {L} _ {s m T} (T) \\ = \sum_ {i, j, k} \max \left[ \rho_ {1} + \left| \left| T _ {i} ^ {R}, T _ {j} ^ {I} \right| \right| - \left| \left| T _ {i} ^ {R}, T _ {k} ^ {I} \right| \right|, 0 \right] \\ + \sum_ {i, j, k} \max \left[ \rho_ {1} + \left| \left| T _ {i} ^ {I}, T _ {j} ^ {R} \right| \right| - \left| \left| T _ {i} ^ {I}, T _ {k} ^ {R} \right| \right|, 0 \right] \tag {13} \\ + \sum_ {i, j, k} \max [ \rho_ {2} + | | T _ {i} ^ {R}, T _ {j} ^ {R} | | - | | T _ {i} ^ {R}, T _ {k} ^ {R} | |, 0 ] \\ + \sum_ {i, j, k} \max \left[ \rho_ {2} + \left| \left| T _ {i} ^ {I}, T _ {j} ^ {I} \right| \right| - \left| \left| T _ {i} ^ {I}, T _ {k} ^ {I} \right| \right|, 0 \right]. \\ \end{array} +$$ + +# 3.3. Shared and specific complementary learning + +SSTN explores a new way to utilize both shared the specific features to generate more discriminative representation. However, the overall performance may still suffer from the information overlap between shared and specific features. Firstly, if shared features contain much modality-specific information, the reliability of the inter-similarity matrix in equation (6) will be affected, leading to inaccurate feature transfer. Secondly, if the specific features are highly related to the shared features, the specific features can only provide little complement to the shared features. The redundant information in the specific features will also affect the sensitivity of the intra-modality similarity matrix in equation (6) due to the shared information. To alleviate these two problems, we utilize the modality adaptation [4] to filter out modality-specific information from the shared features. We also propose a project adversarial strategy and reconstruction enhancement for complementary modality-specific feature learning. + +Modality adaptation for shared features. To purify the shared features to be unrelated to modalities, we utilize the modality discriminator [4] with three fully-connected layers to classify the modality of each shared feature: + +$$ +\mathcal {L} _ {m a} = \mathbb {E} _ {i, m} [ - \log (p (m | H _ {i} ^ {m}, \Theta_ {D})) ], \tag {14} +$$ + +where $\Theta_{D}$ represents parameters of the modality discriminator. $p(m|H_i^m)$ is the predicted probability of feature $H_{i}^{m}$ belonging to modality $m$ . In the discrimination stage, the modality discriminator will try to classify the modality of each shared feature. In the generation stage, the backbone network will generate features to fool the discriminator. This min-max game will make the shared features not contain any modality-related information. + +Project adversarial learning for specific features. To make the specific features uncorrelated with the shared features, we propose the project adversarial strategy. In the training stage, we project the specific features to the shared features of the same sample. The projection error is used as the loss function + +$$ +\mathcal {L} _ {p a} = \mathbb {E} _ {i, m} \left[ \| \Theta^ {m} \cdot P _ {i} ^ {m} - H _ {i} ^ {m} \| \right], \tag {15} +$$ + +where $\Theta_p^m$ represents the projection matrix for modality $m$ . In this equation, "·" means matrix multiply. Similarly, in the discrimination stage, optimization of $\Theta_p^m$ will try to project the specific features to the corresponding shared features. While in the generation stage, the backbone network will generate specific features uncorrelated with shared features to fool the projection. This adversarial training can make the feature spaces of the two kinds of features linearly independent. Alternatively minimizing and maximizing the projection loss will lead the backbone network to learn specific patterns different from shared features. + +Reconstruction enhancement. Modality adaption and project adversarial learning make sure that the shared and + +specific features do not contain correlated information between each other. To enhance both features to be complementary, we use a decoder network after features of each modality to reconstruct the inputs. We concatenate the shared and specific features and feed them to the decoder $\mathcal{D}e$ : + +$$ +\hat {X} ^ {m} = \mathcal {D} e ^ {m} ([ P ^ {m}; H ^ {m} ]), \tag {16} +$$ + +where $[\bullet ;\bullet ]$ means feature concatenation. The $L_{2}$ loss is used to evaluate the quality of the reconstructed images: + +$$ +\mathcal {L} _ {r e} = \mathbb {E} _ {i, m} \left[ L _ {2} \left(X _ {i} ^ {m}, \hat {X} _ {i} ^ {m}\right) \right]. \tag {17} +$$ + +The reconstruction task makes a constraint on the overall information loss. Combined with project modality adaption and adversarial learning, shared and specific features are guided to be self-discriminate and mutual-complementary. + +# 3.4. Optimization + +Our proposed algorithm is trained in an end-to-end manner with the adversarial min-max games. We mix the loss function based on the principle that the classification and the triplet share the same importance. So the feature learning losses of each part are as follows: + +$$ +\mathcal {L} (H) = \mathcal {L} _ {c} \left(H ^ {m}\right) + 0. 5 \cdot \mathcal {L} _ {c m T}, +$$ + +$$ +\mathcal {L} (P) = 0. 5 \cdot \left(\mathcal {L} _ {c} \left(P ^ {R}\right) + \mathcal {L} _ {c} \left(P ^ {I}\right)\right) + 0. 5 \cdot \mathcal {L} _ {s m T}, \tag {18} +$$ + +$$ +\mathcal {L} (T) = \mathcal {L} _ {c} (T) + 0. 2 5 \cdot \mathcal {L} _ {t} (T). +$$ + +Furthermore, we think that the backbone feature extractor and SSTN share the same importance. Hence, the overall feature learning loss is as follows: + +$$ +\mathcal {L} _ {\text {f e a t}} = \mathcal {L} (H) + \mathcal {L} (P) + \mathcal {L} (T). \tag {19} +$$ + +Therefore, the overall loss functions of the min and the max steps of each part are as follows: + +$$ +\mathcal {L} _ {\text {m i n}} = \mathcal {L} _ {\text {f e a t}} + \lambda_ {1} \mathcal {L} _ {\text {r e}} - \lambda_ {2} \mathcal {L} _ {\text {m a}} - \lambda_ {3} \mathcal {L} _ {\text {p a}}, \tag {20} +$$ + +$$ +\mathcal {L} _ {m a x} = - \lambda_ {2} \mathcal {L} _ {m a} - \lambda_ {3} \mathcal {L} _ {p a}. +$$ + +The optimization process includes two sub-processes: (1) fix each discriminator and minimize $\mathcal{L}_{min}$ . (2) fix all modules excluding the three discriminators and maximize the $\mathcal{L}_{max}$ . Support $\Theta_{N}$ denotes the parameters of the overall networks except all the other discriminators. The alternative learning process is: + +$$ +\hat {\Theta} _ {N} = \underset {\Theta_ {N}} {\arg \min } \mathcal {L} _ {\text {m i n}} \left(\Theta_ {N}, \hat {\Theta} _ {D}, \hat {\Theta} ^ {m}\right), \tag {21} +$$ + +$$ +\hat {\Theta} _ {D}, \hat {\Theta} ^ {m} = \underset {\Theta_ {D}, \Theta^ {m}} {\arg \max} \mathcal {L} _ {m a x} (\hat {\Theta_ {N}}, \Theta_ {D}, \Theta^ {m}). +$$ + +In order to ensure the training effectiveness, every batch contains the equal number of RGB and infrared samples. The details of the sampling strategy are introduced in the implementation details. In the test stage, we utilize the two-stream network to extract disentangled features from the RGB set and the infrared set. We use SSTN to transfer modality-shared and modality-specific features. All features are $L_{2}$ -normalized and we use the Euclidean distance to compute the final ReID performance. + +Table 1. Comparison on SYSU-MM01. r1, r10, r20 denote Rank-1, 10, 20 accuracies $(\%)$ . + +
MethodAll-searchIndoor-search
Single-shotMulti-shotSingle-shotMulti-shot
r1r10r20mAPr1r10r20mAPr1r10r20mAPr1r10r20mAP
HOG[5]2.7618.331.94.243.8222.837.62.163.2224.744.57.254.7529.249.43.51
LOMO[24]3.6423.237.34.534.7028.243.12.285.7534.454.910.27.3640.460.35.64
Zero-Padding[47]14.854.171.315.919.161.478.410.920.668.485.826.924.475.991.318.6
TONE+HCML[50]14.353.269.216.2------------
BDTR[51]17.055.472.019.7------------
D-HSME[13]20.762.878.023.2------------
IPVT+MSR[19]23.251.261.722.5------------
cmGAN[4]27.067.580.627.831.572.785.022.331.677.289.242.237.080.992.132.8
D2RL[45]28.970.682.429.2------------
DGD+MSR[7]37.483.493.338.143.986.995.730.539.689.397.750.946.693.698.840.1
JSIA-ReID[43]38.180.789.936.945.185.793.829.543.886.294.252.952.791.196.442.7
AlignGAN[42]42.485.093.740.751.589.495.733.945.987.694.454.357.192.797.445.3
cm-SSFT (Ours)61.689.293.963.263.491.295.762.070.594.997.772.673.096.399.172.4
+ +# 4. Experiments + +In this section, we conduct comprehensive experiments to validate the effectiveness of the proposed cross-modality shared-specific feature transfer algorithm as well as each of its components. + +# 4.1. Experimental settings + +Datasets. SYSU-MM01 is a large-scale and frequently used RGB-IR cross-modality ReID dataset [47]. Images are collected from four RGB cameras and two IR cameras, in both indoor and outdoor environments. The training set contains 395 persons, with 22,258 RGB images and 11,909 IR images. The test set contains 96 persons, with 3,803 IR images for query and 301/3010 (one-shot/multi-shot) randomly selected RGB images as the gallery. There are two accordingly evaluation modes for RGB-IR ReID: indoor-search and all-search [47]. RegDB is collected by dual camera systems [31]. There are 412 identities and 8,240 images in total, with 206 identities for training and 206 identities for testing. Each identity has 10 different thermal (IR) images and 10 different visible (RGB) images. There are also two evaluation modes. One is Visible to Thermal to search IR images from a Visible image. The other mode is Thermal to Visible to search RGB images from a infrared image. This dataset has 10 trials with different splits of the dataset. We evaluate our model on the 10 trials to achieve statistically stable results. + +Evaluation protocols. All the experiments follow the standard evaluation protocol in existing RGB-IR cross-modality ReID methods. Queries and galleries images are from different modalities. And then, the standard cumulated matching characteristics (CMC) curve and mean average precision (mAP) are adopted. + +Implementation details. We use Resnet50 [14] as the backbone network, with the first convolutional layer, the 1st and 2nd bottlenecks as $\mathrm{Conv}_1$ . $\mathrm{Conv}_2$ is the 3rd and 4th bottlenecks. $k$ in Eq. (22) is set to 4. $\lambda_1$ , $\lambda_2$ and $\lambda_3$ are set to 1.0, 0.2 and 0.2, respectively. We change the stride of the last convolutional layer in the backbone to 1 to ben + +efit the learning of reconstruction decoders which are composed of 4 sub-pixel convolutional layers with channels all set to 64 [36]. We adopt the data and network augmentation methods in BoT for ReID [30] to enhance the performance. For fairness, we also give out results without any augmentation. The augmentations include: (1) the feature blocks are all set to BNN neck [30]; (2) the input images are augmented with random erasing [55]. The whole algorithm is optimized with Adam for 120 epochs with a batch size of 64 and a learning rate of 0.00035, decaying 10 times at 40, 70 epoch. Each mini-batch is comprised of 8 identities with 4 RGB images and 4 infrared images for each identity. + +# 4.2. Comparison with state-of-the-art methods. + +In this subsection, we compare our proposed algorithm with the baselines as well as the state-of-the-art methods, including Zero-Padding [47], TONE [50], BDTR [51], cmGAN [4], $\mathrm{D}^2\mathrm{RL}[45]$ , MSR[7], D-HSME[13], IPVT[19], JSIA-ReID[43] and AlignGAN[42]. + +The results on SYSU-MM01 are shown in Table 1. The proposed algorithm outperforms other methods by a large margin. Specifically, in all-search mode, our method surpasses AlignGAN by $19.2\%$ on Rank-1 accuracy and $22.5\%$ on mAP in the single-shot setting. The multi-shot setting exhibits a similar phenomenon. Compared with single-shot evaluation, mAP of most other methods drop significantly by about $5\%$ or even more. But our method only drops $1.2\%$ . This validates that the features extracted by our algorithm are much more discriminative, which can provide higher recall than other methods when the gallery size increases. For indoor-search mode, our method also gets the best performance on all the evaluation metrics, demonstrating the robustness of the proposed algorithm. + +The results on RegDB are shown in 2. Our method always suppresses others by a large margin. For the Visible to Thermal mode, our method surpasses the state-of-the-art method by $14.4\%$ on Rank-1 and $19.3\%$ on mAP. For Thermal to Visible, the advantages are $14.7\%$ on Rank-1 and $18.3\%$ on mAP. + +Table 2. Comparison on RegDB. + +
MethodVisible to ThermalThermal to Visible
r1mAPr1mAP
HOG[5]13.510.3--
LOMO[24]0.802.28--
Zero-Padding[47]17.818.916.717.9
TONE+HCML[50]24.420.821.722.2
BDTR[51]33.531.832.731.1
D2RL[45]43.444.1--
DGD+MSR[7]48.448.7--
JSIA-ReID[43]48.549.348.148.9
D-HSME[13]50.947.050.246.2
IPVT+MSR[19]58.847.6--
AlignGAN[42]57.953.656.353.4
cm-SSFT (Ours)72.372.971.071.7
+ +Table 3. Ablation study on RegDB. + +
ShLSpLSaSMoAPAREShTSpTr1mAP
1✓-------42.445.0
2✓✓------48.149.3
3✓✓✓-----52.353.1
4✓✓✓✓----56.157.2
5✓✓✓✓✓---58.757.9
6✓✓✓✓✓✓--60.359.4
7✓✓✓---✓✓60.860.1
8✓✓✓✓--✓✓67.567.6
9✓✓✓✓✓-✓✓71.171.2
10✓✓✓✓✓✓✓-65.866.1
11✓✓✓✓✓✓-✓64.965.3
12✓✓✓✓✓✓✓✓72.372.9
+ +# 4.3. Ablation study + +In this subsection, we study the effectiveness of each component of the proposed algorithm. + +Effectiveness of structure of feature extractor. We first evaluate how much improvement can be made by the structure of feature extractor. We ablate the specific feature extraction stream and evaluate the performance of the shared features only to see the influence. The results are shown in the $1^{\text{st}}$ and $2^{\text{nd}}$ row of Table 3, represented as ShL (shared feature learning) and SpL (specific feature learning). The specific streams can bring about $5.7\%$ increment of Rank-1 accuracy because they can back-propagate modality-specific gradients to the low-level feature maps. We also test the influences casued by separating streams at shallow layers. The result in $3^{\text{rd}}$ (SaS: Separating at Shallow) shows that it can make bring $4.2\%$ gains for the more discriminative features. + +Influence of complementary learning. We evaluate the effectiveness of each module in the complementary learning. Since the complementary learning can affect both the features of the feature extractor and SSTN, we design two sets of experiments to observe the impact respectively. The influences on the feature extractor are shown in rows $4\sim 6$ of Table 3. The results of SSTN are shown in rows $7\sim 9$ . We can see that all modules (the modality-adaptation (MoA), the project adversarial (PA) and reconstruction enhancement (RE)) can make both backbone shared features and SSTN features more discriminative. The whole complementary learning scheme can bring about $8\%$ and $12\%$ in + +Table 4. Performances without data or network augmentation. + +
SettingsMM01RegDB
r1mAPr1mAP
SOTA(AlignGAN)'s baseline29.633.032.734.9
SOTA(AlignGAN)42.440.757.953.6
baseline (wo aug)25.527.229.530.8
cm-SSFT (wo aug)52.452.162.263.0
baseline (w aug)38.239.842.445.0
cm-SSFT (w aug)61.663.272.372.9
+ +Table 5. Performances comparison with single query. + +
MethodMM01RegDB
S-shotM-shotV-TT-V
r1mAPr1mAPr1mAPr1mAP
Single query47.754.157.459.165.465.663.864.2
All queries61.663.263.462.072.372.971.071.7
+ +crements for the feature extractor and SSTN, respectively. + +Effectiveness of feature transfer. We aim to quantify the contribution of the proposed feature transfer strategy. Firstly, we want to know whether the proposed transfer method itself only works on shared features. By comparing row 6 with row 10 (only transfer the shared feature, defined as ShT) in Table 3, we can see that feature transfer brings in $5.5\%$ Rank-1 and $6.7\%$ mAP improvements. Secondly, we want to verify whether modality-specific features can positively contribute valuable information to the final representation. According to row 10 and row 12 (transfer both two kinds of features. SpT means transferring specific features.) of Table 3, we can see that the overall performance gains $6.5\%$ and $6.8\%$ increments on Rank-1 and mAP. For further verifying the effectiveness of the specific feature transfer, we also try only transferring the specific features. The results are shown in row 11 and show that only transferring the specific features can also achieve satisfy performances. The feature transfer stage not only contributes an overall $12.0\%$ Rank-1 and $13.5\%$ mAP improvements but also verifies that modality-specific features can be well-explored for better re-identification. + +Influence of data and network augmentation. For fair comparison, we also give results without random-erasing in data augmentation. For each feature block, we also use a commonly used fully-connected layer to replace the BN-Neck. The results are shown in Table 4. It can be seen that, without the augmentation, our baseline is weaker than the baseline of the state-of-the-art (AlignGAN [42]) method (because we don't use dropout). But our model still can suppress SOTA by $10.0\%$ on Rank-1 and $12.1\%$ on mAP on the SYSU-MM01 dataset. On the RegDB dataset, our method can suppress $4.3\%$ on Rank-1 and $9.4\%$ on mAP. The data and network augmentations can bring about $13\%$ increments on the backbone and $9\%$ on our method. Without them, our model still achieves the state-of-the-art performances, proving the effectiveness of our method. + +![](images/55614b4e39738d2bc6589fdd0ab84bae20a3b0a7a917a218519382d3ee0f88f8.jpg) +Figure 3. Reconstruction examples. The $1^{st}$ to $4^{th}$ rows correspond to original images, shared feature reconstructions, specific reconstructions and all feature reconstruction results, respectively. + +# 4.4. Visualization of shared and specific features. + +We take advantage of the reconstruction decoder to visualize the information of the modality shared and specific features. We remove $P^m$ and $H^m$ in Eq.(16) to observe the changes in the reconstructed images, respectively. The outputs are shown in Figure 3. We can see that shared feature reconstruction results are different and visually complementary to the specific features. For RGB images, the shared features contain less color information which is found in the images reconstructed by RGB-specific features. The specific features carried more color information but are less smooth. For infrared images, we can also observe that the specific features are different from the shared features. The combination of two kinds of features produces high-quality images. This proves that the shared and specific features produced by our feature extractor are complementary with each other. + +# 4.5. Application in real scenarios + +The SSTN in our cm-SSFT passes information between different modality samples. Every sample fuses the information from its inter-modality and intra-modality $k$ near neighbors. Such setting hypothesizes that other query samples are treated as the auxiliary set. However, in some real application scenarios, there may be no or only a few auxiliary dates. In order to prove that our method is not limited in the experimental environments with some strong hypothesis, we show how to apply cm-SSFT to such single query scenarios, which also achieves state-of-the-art performances. We train the cm-SSFT algorithm exactly the same as illustrated in this paper. While in the testing stage, the SSTN only propagates information between only one query image with the gallery images. We slightly stabilize the affinity model $A$ as follows: + +$$ +Z = \left[ \begin{array}{l} z ^ {q} \\ - \dots \\ Z ^ {G} \end{array} \right], A = \left[ \begin{array}{l l} k \cdot A ^ {q, q} & \mathcal {T} (A ^ {q, G}, k) \\ - \dots & \dots \\ k \cdot A ^ {G, q} & \mathcal {T} (A ^ {G, G}, k) \end{array} \right]. \tag {22} +$$ + +![](images/0f7bc28ff377b998cd3c0dd4ee2f7f4fc13013c68a31489b3d1f755ec128e637.jpg) +Figure 4. Influence of number of queries. Dashed lines correspond to the SOTA method. Solid lines correspond to ours. + +It can be seen that we amplify $k$ times the left column blocks of the affinity matrix, which is to balance the information of the two modalities. The experiments are shown in Table 5. The performance has dropped compared with all queries due to inadequate intra-modality specific information compensation. But our method still achieves better performances than state-of-the-arts and our baseline. + +Besides, we also test the influence of the auxiliary set. The experiments are run on MM01 dataset for its large query set. We randomly sample $n$ images from the query sets and watch the performance changing. For a specific $n$ , we run 10 times to get the average performance. $n$ is ranging from 1 (single query) to all query size. The results are shown in Figure 4. We can see that with the size of the auxiliary set growing, the performance saturates quickly. + +# 5. Conclusion + +In this paper, we proposed a cross-modality shared-specific feature transfer algorithm for cross-modality person ReID, which can utilize the specific features ignored by conventionally shared feature learning. It propagates information among and across modalities, which not only compensates for the lacking specific information but also enhances the overall discriminative. We also proposed a complementary learning strategy to learn self-discriminate and complementary feature. Extensive experiments validate the superior performance of the proposed algorithm, as well as the effectiveness of each component of the algorithm. + +# 6. Acknowledgement + +This work was supported by the Fundamental Research Funds for the Central Universities (WK2100330002, WK3480000005) and the Major Scientific Research Project of Zhejiang Lab (No.2019DB0ZX01). + +# References + +[1] Song Bai, Xiang Bai, and Qi Tian. Scalable person re-identification on supervised smoothed manifold. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2530–2539, 2017. +[2] Weihua Chen, Xiaotang Chen, Jianguo Zhang, and Kaiqi Huang. Beyond triplet loss: a deep quadruplet network for person re-identification. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), volume 2, 2017. +[3] Ying-Cong Chen, Wei-Shi Zheng, and Jianhuang Lai. Mirror representation for modeling view-specific transform in person re-identification. In Twenty-fourth international joint conference on artificial intelligence, 2015. +[4] Pingyang Dai, Rongrong Ji, Haibin Wang, Qiong Wu, and Yuyu Huang. Cross-modality person re-identification with generative adversarial training. In *IJCAI*, pages 677–683, 2018. +[5] Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. In international Conference on computer vision & Pattern Recognition (CVPR'05), volume 1, pages 886-893. IEEE Computer Society, 2005. +[6] Pengfei Fang, Jieming Zhou, Soumava Kumar Roy, Lars Petersson, and Mehrtash Harandi. Bilinear attention networks for person retrieval. In Proceedings of the IEEE International Conference on Computer Vision, pages 8030-8039, 2019. +[7] Zhanxiang Feng, Jianhuang Lai, and Xiaohua Xie. Learning modality-specific representations for visible-infrared person re-identification. IEEE Transactions on Image Processing, 29:579-590, 2019. +[8] 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. +[9] Jieuxiang Gu, Jianfei Cai, Shafiq R Joty, Li Niu, and Gang Wang. Look, imagine and match: Improving textual-visual cross-modal retrieval with generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7181–7189, 2018. +[10] Jianyuan Guo, Yuhui Yuan, Lang Huang, Chao Zhang, Jin-Ge Yao, and Kai Han. Beyond human parts: Dual part-aligned representations for person re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 3642–3651, 2019. +[11] Frank Hafner, Amran Bhuiyan, Julian FP Kooij, and Eric Granger. A cross-modal distillation network for person re-identification in rgb-depth. arXiv preprint arXiv:1810.11641, 2018. +[12] Chanho Eom Ham et al. Learning disentangled representation for robust person re-identification. arXiv preprint arXiv:1910.12003, 2019. +[13] Yi Hao, Nannan Wang, Jie Li, and Xinbo Gao. Hsme: Hypersphere manifold embedding for visible thermal person re-identification. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8385–8392, 2019. + +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 770-778, 2016. +[15] Ran He, Xiang Wu, Zhenan Sun, and Tieniu Tan. Wasserstein cnn: Learning invariant features for nir-Vis face recognition. IEEE transactions on pattern analysis and machine intelligence, 2018. +[16] Xiangteng He, Yuxin Peng, and Liu Xie. A new benchmark and approach for fine-grained cross-media retrieval. In Proceedings of the 27th ACM International Conference on Multimedia, pages 1740-1748. ACM, 2019. +[17] Alexander Hermans, Lucas Beyer, and Bastian Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017. +[18] Ruibing Hou, Bingpeng Ma, Hong Chang, Xinqian Gu, Shiguang Shan, and Xilin Chen. Interaction-and-aggregation network for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9317–9326, 2019. +[19] Jin Kyu Kang, Toan Minh Hoang, and Kang Ryoung Park. Person re-identification between visible and thermal camera images based on deep residual cnn using single input. IEEE Access, 7:57972–57984, 2019. +[20] Vladimir V Kniaz, Vladimir A Knyaz, Jiri Hladuvka, Walter G Kropatsch, and Vladimir Mizginov. Thermalgan: Multimodal color-to-thermal image translation for person re-identification in multispectral dataset. In Proceedings of the European Conference on Computer Vision (ECCV), pages 0–0, 2018. +[21] 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. +[22] Chao Li, Cheng Deng, Ning Li, Wei Liu, Xinbo Gao, and Dacheng Tao. Self-supervised adversarial hashing networks for cross-modal retrieval. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4242-4251, 2018. +[23] Shuang Li, Tong Xiao, Hongsheng Li, Bolei Zhou, Dayu Yue, and Xiaogang Wang. Person search with natural language description. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1970-1979, 2017. +[24] Shengcai Liao, Yang Hu, Xiangyu Zhu, and Stan Z Li. Person re-identification by local maximal occurrence representation and metric learning. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2197–2206, 2015. +[25] Jian-Wu Lin and Hao Li. Hpiln: A feature learning framework for cross-modality person re-identification. arXiv preprint arXiv:1906.03142, 2019. +[26] Kan Liu, Bingpeng Ma, Wei Zhang, and Rui Huang. A spatio-temporal appearance representation for vice-based pedestrian re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 3810–3818, 2015. + +[27] Xin Liu, Zhikai Hu, Haibin Ling, and Yiu-ming Cheung. Mtfh: A matrix tri-factorization hashing framework for efficient cross-modal retrieval. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2019. +[28] Zimo Liu, Dong Wang, and Hutchuan Lu. Stepwise metric promotion for unsupervised video person re-identification. In Proceedings of the IEEE international conference on computer vision, pages 2429–2438, 2017. +[29] Chuanchen Luo, Yuntao Chen, Naiyan Wang, and Zhaoxiang Zhang. Spectral feature transformation for person re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 4976–4985, 2019. +[30] Hao Luo, Youzhi Gu, Xingyu Liao, Shenqi Lai, and Wei Jiang. Bag of tricks and a strong baseline for deep person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019. +[31] Dat Tien Nguyen, Hyung Gil Hong, Ki Wan Kim, and Kang Ryoung Park. Person recognition system based on a combination of body images from visible light and thermal cameras. Sensors, 17(3):605, 2017. +[32] Kai Niu, Yan Huang, Wanli Ouyang, and Liang Wang. Improving description-based person re-identification by multi-granularity image-text alignments. arXiv preprint arXiv:1906.09610, 2019. +[33] Nikolaos Sarafianos, Xiang Xu, and Ioannis A Kakadiaris. Adversarial representation learning for text-to-image matching. In Proceedings of the IEEE International Conference on Computer Vision, pages 5814-5824, 2019. +[34] Yantao Shen, Hongsheng Li, Tong Xiao, Shuai Yi, Dapeng Chen, and Xiaogang Wang. Deep group-shuffling random walk for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2265–2274, 2018. +[35] Yantao Shen, Hongsheng Li, Shuai Yi, Dapeng Chen, and Xiaogang Wang. Person re-identification with deep similarity-guided graph neural network. In Proceedings of the European Conference on Computer Vision (ECCV), pages 486-504, 2018. +[36] Wenzhe Shi, Jose Caballero, Ferenc Huszár, Johannes Totz, Andrew P Aitken, Rob Bishop, Daniel Rueckert, and Zehan Wang. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1874–1883, 2016. +[37] Yumin Suh, Jingdong Wang, Siyu Tang, Tao Mei, and Kyoung Mu Lee. Part-aligned bilinear representations for person re-identification. In Proceedings of the European Conference on Computer Vision (ECCV), pages 402–419, 2018. +[38] Yifan Sun, Qin Xu, Yali Li, Chi Zhang, Yikang Li, Shengjin Wang, and Jian Sun. Perceive where to focus: Learning visibility-aware part-level features for partial person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 393–402, 2019. +[39] Yifan Sun, Liang Zheng, Yi Yang, Qi Tian, and Shengjin Wang. Beyond part models: Person retrieval with refined + +part pooling (and a strong convolutional baseline). In Proceedings of the European Conference on Computer Vision (ECCV), pages 480-496, 2018. +[40] Rahul Rama Varior, Mrinal Haloi, and Gang Wang. Gated siamese convolutional neural network architecture for human re-identification. In Proceedings of the European Conference on Computer Vision (ECCV), pages 791–808, 2016. +[41] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pages 5998-6008, 2017. +[42] Guan'an Wang, Tianzhu Zhang, Jian Cheng, Si Liu, Yang Yang, and Zengguang Hou. Rgb-infrared cross-modality person re-identification via joint pixel and feature alignment. In Proceedings of the IEEE International Conference on Computer Vision, pages 3623–3632, 2019. +[43] Guan-An Wang, Tianzhu Zhang, Yang Yang, Jian Cheng, Jianlong Chang, Xu Liang, and Zengguang Hou. Cross-modality paired-images generation for rgb-infrared person re-identification. In AAAI-20 AAAI Conference on Artificial Intelligence, 2020. +[44] Zheng Wang, Zhixiang Wang, Yang Wu, Jingdong Wang, and Shin'ichi Satoh. Beyond intra-modality discrepancy: A comprehensive survey of heterogeneous person re-identification. arXiv preprint arXiv:1905.10048, 2019. +[45] Zhixiang Wang, Zheng Wang, Yinqiang Zheng, Yung-Yu Chuang, and Shin'ichi Satoh. Learning to reduce dual-level discrepancy for infrared-visible person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 618–626, 2019. +[46] Ancong Wu, Wei-Shi Zheng, and Jian-Huang Lai. Robust depth-based person re-identification. IEEE Transactions on Image Processing, 26(6):2588-2603, 2017. +[47] Ancong Wu, Wei-Shi Zheng, Hong-Xing Yu, Shaogang Gong, and Jianhuang Lai. Rgb-infrared cross-modality person re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 5380-5389, 2017. +[48] Jinlin Wu, Yang Yang, Hao Liu, Shengcai Liao, Zhen Lei, and Stan Z Li. Unsupervised graph association for person re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 8321-8330, 2019. +[49] Bryan Ning Xia, Yuan Gong, Yizhe Zhang, and Christian Poellabauer. Second-order non-local attention networks for person re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 3760–3769, 2019. +[50] Mang Ye, Xiangyuan Lan, Jiawei Li, and Pong C Yuen. Hierarchical discriminative learning for visible thermal person re-identification. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. +[51] Mang Ye, Zheng Wang, Xiangyuan Lan, and Pong C Yuen. Visible thermal person re-identification via dual-constrained top-ranking. In IJCAI, pages 1092–1099, 2018. +[52] Shizhou Zhang, Yifei Yang, Peng Wang, Xiuwei Zhang, and Yanning Zhang. Attend to the difference: Cross-modality person re-identification via contrastive correlation. arXiv preprint arXiv:1910.11656, 2019. + +[53] Liang Zheng, Yi Yang, and Alexander G Hauptmann. Person re-identification: Past, present and future. arXiv preprint arXiv:1610.02984, 2016. +[54] Zhedong Zheng, Xiaodong Yang, Zhiding Yu, Liang Zheng, Yi Yang, and Jan Kautz. Joint discriminative and generative learning for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2138–2147, 2019. +[55] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. arXiv preprint arXiv:1708.04896, 2017. +[56] Sanping Zhou, Fei Wang, Zeyi Huang, and Jinjun Wang. Discriminative feature learning with consistent attention regularization for person re-identification. In Proceedings of the IEEE International Conference on Computer Vision, pages 8040–8049, 2019. +[57] Yabin Zhu, Chenglong Li, Yijuan Lu, Liang Lin, Bin Luo, and Jin Tang. Fanet: Quality-aware feature aggregation network for rgb-t tracking. arXiv preprint arXiv:1811.09855, 2018. \ No newline at end of file diff --git a/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/images.zip b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ebb29f10706fbe5b2fd93ca18533cb0ba3c5246f --- /dev/null +++ b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d8465a37e577aa2646d32ca82c08f3b9ba66c6ab074ac68667342de3472929c +size 573356 diff --git a/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/layout.json b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0026330df80bd99c7a1daef6435d29b9721a0934 --- /dev/null +++ b/crossmodalitypersonreidentificationwithsharedspecificfeaturetransfer/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:528531e011a2c2c3b10d4d1b2d9e4a330591e55d69bb856e13d2a15befa3f83a +size 424392 diff --git a/crossmodalpatternpropagationforrgbttracking/737412e0-cccc-48b6-b0a1-644ce7cae61b_content_list.json b/crossmodalpatternpropagationforrgbttracking/737412e0-cccc-48b6-b0a1-644ce7cae61b_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2a9237fc78d9598179951e689dd7da37c8b8e988 --- /dev/null +++ b/crossmodalpatternpropagationforrgbttracking/737412e0-cccc-48b6-b0a1-644ce7cae61b_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4a868cf9c01256618f9f28f285d8f7be2f8833b680715d3358e177c7864961a +size 74912 diff --git a/crossmodalpatternpropagationforrgbttracking/737412e0-cccc-48b6-b0a1-644ce7cae61b_model.json b/crossmodalpatternpropagationforrgbttracking/737412e0-cccc-48b6-b0a1-644ce7cae61b_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c953bd8413e13393cbb02841644042549d76a056 --- /dev/null +++ b/crossmodalpatternpropagationforrgbttracking/737412e0-cccc-48b6-b0a1-644ce7cae61b_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0f273512bda7326b539c7fcb251614178079c157a52d4b9dd3e500a52b74e10 +size 91471 diff --git a/crossmodalpatternpropagationforrgbttracking/737412e0-cccc-48b6-b0a1-644ce7cae61b_origin.pdf b/crossmodalpatternpropagationforrgbttracking/737412e0-cccc-48b6-b0a1-644ce7cae61b_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c73c127d5bfbd094b52843a45bb87d46f2b22273 --- /dev/null +++ b/crossmodalpatternpropagationforrgbttracking/737412e0-cccc-48b6-b0a1-644ce7cae61b_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9dccec49c42563aeed75545953c7bc47918b532d7b1d92b4a0417f99fd3c6b3 +size 1338812 diff --git a/crossmodalpatternpropagationforrgbttracking/full.md b/crossmodalpatternpropagationforrgbttracking/full.md new file mode 100644 index 0000000000000000000000000000000000000000..b72572831aa27985f74b3508831d617ba8de2341 --- /dev/null +++ b/crossmodalpatternpropagationforrgbttracking/full.md @@ -0,0 +1,294 @@ +# Cross-Modal Pattern-Propagation for RGB-T Tracking + +Chaoqun Wang, Chunyan Xu\*, Zhen Cui\*, Ling Zhou, Tong Zhang, Xiaoya Zhang, Jian Yang, PCALab, 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 + +# Abstract + +Motivated by our observations on RGB-T data that pattern correlations are high-frequently recurred across modalities also along sequence frames, in this paper, we propose a cross-modal pattern-propagation (CMPP) tracking framework to diffuse instance patterns across RGB-T data on spatial domain as well as temporal domain. To bridge RGB-T modalities, the cross-modal correlations on intra-modal paired pattern-affinities are derived to reveal those latent cues between heterogenous modalities. Through the correlations, the useful patterns may be mutually propagated between RGB-T modalities so as to fulfill inter-modal pattern-propagation. Further, considering the temporal continuity of sequence frames, we adopt the spirit of pattern propagation to dynamic temporal domain, in which long-term historical contexts are adaptively correlated and propagated into the current frame for more effective information inheritance. Extensive experiments demonstrate that the effectiveness of our proposed CMPP, and the new state-of-the-art results are achieved with the significant improvements on two RGB-T object tracking benchmarks. + +# 1. Introduction + +Visual object tracking is a fundamental and challenging task in the field of computer vision, has achieved significant progresses over the past few years with the breakthrough of deep neural network [8, 9, 19, 36, 39]. However, there are still various existing difficulties in the scenes of low illumination, heavy occlusion and dark night, etc. As the essential loss of object information, the current RGB-based trackers are often overwhelmed in these scenes. On the contrary, thermal infrared images can greatly reduce the influences of lightings, and effectively compensate to RGB images for identifying objects. This refers to the dual-modal RGB-T + +![](images/504d64db5d7362aa64828af5c6e782305a175fcebb67a3b371b6e5a696cb85c2.jpg) +Figure 1: The statistical observation across visible RGB and thermal infrared images. (a) Visual exhibition. The points colored white are similar pairs across visible RGB and thermal infrared images, while the pairs of black points correspond to dissimilar pairs. (b) Statistical finding. Similar/dissimilar pairs across two modalities as well as their average statistics are with fairly high matching rates, which provide strong cues for cross-modal pattern-propagation. + +tracking, which has arisen increasing attention more recently due to the ease of use of thermal camera. + +The existing RGB-T tracking methods [23, 24, 25, 29, 30, 31, 32] usually follow the conventional weighted fusion on dual-modal (patch) features, or extend those classic RGB-based tracking techniques. For instance, the weights of modalities are integrated into sparse representation to be learnt in [24, 27]; after splitting candidate regions into patches, patch weights are adaptively learnt to construct target representation in [25, 31, 32]; some critical channels of all modalities are selected in [29, 46] according to their confidence. In [30], the part-based RGB tracking method is revised for dual-modal case, where the patches from two modalities are ranked in their importance for driving a confident tracking. However, all these methods do not deliberate also utilize the inner pattern-correlations cross modalities and even sequence frames, whilst the pattern-correlations are high-frequently recurred therein. + +To this end, we conduct statistical analysis about pattern correlations on two large RGB-T tracking datasets, RG- + +BT234 [25] and GTOT [24]. The quantitative statistical results cross RGB and thermal images are shown in Fig. 1. The affinity of pair pixels is defined by the Euclidean metric on their gray values. The larger the affinity value is, the more similar this pair of pixels are. According to the affinity values, we define those similar pairs and dissimilar pairs within each RGB or thermal image. Further a counterpart of inter-modal pairs are determined on the condition of the same affinity values at the same space position. In other word, the counterpart defines a matched relation pattern, viewed as a second-order correlation. All matched inter-modal pairs (i.e., pair counterparts) are summarized to produce the statistical ratios cross RGB and thermal modalities. From this figure, we can observe that the pattern counterparts of inter-modal pairs are high-frequently occurred for the similar and dissimilar pairs. This case is named as inter-modal pattern-correlation, which is a second-order relationship (i.e., relation on relation). Besides, another explicit observation is that image patches tend to redundantly recur many times across adjacent sequence frames because of the continuity of sequence. Thus we can define the pattern affinities across sequence frames, which is one-order intra-modal pattern-correlation. + +Just motivated by the above observations, in this paper, we propose a cross-modal pattern-propagation (CMPP) tracking framework to diffuse instance patterns across RGB and thermal infrared modalities, as well as within single modality. In virtue of the cross-modal second-order statistical correlations, we propose an inter-modal pattern-propagation method to transmit patterns across heterogeneous modalities. To bridge them, the cross-modal correlations on within-image affinities are derived to reveal those associative patterns between different modalities. Through the correlations, the useful patterns may be mutually propagated between modalities so that feature information can be compensated for each other. In view of the temporal continuity of sequence frames, further, we extend the spirit of pattern propagation from cross-modal spatial domain to temporal domain to construct dynamical pattern propagations. In a sequence, long-term historical contexts are adaptively correlated and propagated into the current frame for more effective information inheritance during the online tracking. Extensive experiments demonstrate that our CMPP is greatly superior to those baselines as well as the state-of-the-art methods. + +In summary, our contributions are three folds: + +- Based on our findings on RGB-T images, we propose a cross-modal pattern-propagation framework to excavate and utilize those latent pattern cues for online RGB-T object tracking. +- We jointly build inter-modal pattern-propagation via a second-order affinity correlations for the interaction + +across modalities, and long-term context-propagation through high-order dynamic correlations for historical information inheritance. + +- We report the new state-of-the-art results on two RGB-T object tracking benchmarks with the significant improvement. + +# 2. Related Work + +Visual Object Tracking. Recently correlation filter based and CNN-based trackers achieve state-of-the-art performances on the public visual object tracking benchmarks [41, 42]. MOSSE [2] firstly used adaptive filter for visual tracking, then numerous correlation filter based trackers sprung up and performed excellent in the yield of visual object tracking. Henriques et al. [17] used kernel trick, Danelljan et al. [12] exploited color attributes as target features, and SAMF [33], KCF [18] used scale estimation to handle various target scale problems. CNN-based methods regard tracking task as detection process. MDNet [36] trained a general offline binary classification model using multi-domain learning to distinguish target from the background. RT-MDNet [19] introduced RoIAlign method to extract more accurate representation for target. Park et al. [37]exploited meta learning algorithm into MDNet, which adjusted initial model via temporal information in tracking sequence for quick optimization. These trackers performed well but overwhelmed in the conditions of low illumination, smog and dark night, etc., limited by the inherent defects of RGB images. + +RGB-T Object Tracking. RGB-T object tracking is getting more and more attention due to the promotion of thermal infrared data in tracking performance [13]. Sparse representation based trackers performed well because of its capability of suppressing noises and errors [24, 40, 23]. Wu et al. [40] concatenated the candidate regions of multimodal data and sparsely represented target in template space; Li et al. [24] proposed a collaborative sparse representation model to jointly optimize the sparse coefficients and modality weights. Furthermore, Li et al. [30] considered heterogeneous property between multi-modal source in cross-modal ranking model, to learn patch-based weights and construct target representation. Using neural network to adaptively fuse multiple data also achieves excellent performance. Li et al. [29] proposed a fusion net to select critical feature channels for confident tracking; Zhu et al. [45] proposed a feature aggregation network to weight multi-modal and multi-scale features for robust target representation. These methods utilize multi-modal data to construct target representation by extracting factors or balancing their confidences. They neglected the inner pattern-correlations across multi-modal data, which are high-frequently recurred and can be utilized for mutually complementing each other. + +![](images/d23c60077c62bbb5b5f6b7020398a63d215e245cda87907aeb10b66e5cc68c7e.jpg) +Figure 2: Our proposed CMPP framework for RGB-T object tracking. There are two main modules to fulfill spatially cross-modal and temporally sequent pattern propagation, corresponding to inter-modal pattern-propagation and long-term context propagation respectively. The former builds and utilizes the correlations between pairwise bundling patterns, while the latter leverages the continuity of pattern sequences. More details could be referred in Section 3. Zoom the figure for clear details. + +# 3. Our Method + +In this section, we introduce the proposed cross-modal pattern-propagation method. We first overview the overall architecture, and then illustrate how to perform inter-modal pattern-propagation process for cross-modal spatial fusion, finally expound long-term context propagation module for temporal sequence encoding. + +# 3.1. The Architecture + +The overall network architecture of our proposed CMP-P is shown as Fig. 2. In the online RGB-T object tracking, given a pair of frames $\{x_t^{\mathcal{R}}, x_t^{\mathcal{T}}\}$ at time $t$ , we need to estimate the localization of tracked object. The candidate bounding boxes are first sampled around an initial location of object, which is determined by the location at time $t - 1$ . To extract more discriminative representation, we adopt VGG-M network [3] to filter each candidate region and produce multi-channel convolution feature maps. By omitting the index of candidates, we abuse the notation $\{\mathbf{X}_t^{\mathcal{R}}, \mathbf{X}_t^{\mathcal{T}}\}$ as the convolution features of one pair of dual-modal candidates for more clear illustration below. Our aim is to predict whether the candidates $\{\mathbf{X}_t^{\mathcal{R}}, \mathbf{X}_t^{\mathcal{T}}\}$ are the most possible object. + +In view of candidates $\{\mathbf{X}_t^{\mathcal{R}},\mathbf{X}_t^{\mathcal{T}}\}$ , we propose an inter-modal pattern-propagation (IMPP) method to mutually diffuse patterns for each other. To bridge the difference between them, we attempt to leverage those latent cues of second-order correlations as observed in Fig 1. Concretely, the affinities of pairwise patterns within each candidate are computed to mine and utilize the cues of bundling patterns, + +which refers to intra-modal correlation computation. Next, the bundling patterns are compared across two modalities by using their affinities, and the inter-modal correlations are derived to favor cross-modal pattern propagation. The details could be found in Section 3.2. + +For online object tracking, the historical sequent frames can benefit the localization of moving object. To this end, we further extend the spirit of pattern-propagation into the dynamic sequence, and propose long-term context propagation (LTCP, in Section 3.3) to adaptively inherit previous historical information. Concretely, given the predicted dual-modal objects $\{x_{t - i_l},\dots ,x_{t - i_1}\}$ at the former $l$ frames, we take IMPP to integrate them to produce the diffused features $\{\widetilde{\mathbf{X}}_{t - i_l},\dots ,\widetilde{\mathbf{X}}_{t - i_1}\}$ . The cross-modal diffused features are adaptively propagated into the current candidate and further integrated with its diffused features $\widetilde{\mathbf{X}}_t$ as the final response, which are fed into a binary classification network. The binary classification network has three fully connected layers followed by cross-entropy loss to estimate the possibility of the candidates as background or foreground. The first $k$ confident candidates are used for regressing the final location of object as used in MDNet [36]. + +Besides, we consider that different depth convolutional layers carry with different level feature information, where the shallow convolutional layer expresses more local texture information, while deep convolutional layer captures more global semantic information. For this, integrating multi-scale pyramidal feature maps is customary to boost the performance of many tasks such as object detection [1, 22, 35], classification [38, 7, 34], and semantic seg + +mentation [5, 4, 44]. To this end, we downscale multi-layer convolution feature maps into the smallest-scale map according to the method proposed in [6], and then concatenate them to fed into our proposed propagation method. + +# 3.2. Inter-Modal Pattern-Propagation + +Suppose a candidate region contains $n$ pixel points, each pixel position is associated with a multi-dimensional feature vector. We build graph topology on the candidate region, where each pixel is viewed as one vertex. Abstractly, we formulate inter-modal pattern propagation as + +$$ +v _ {i} ^ {\mathcal {T}} \leftarrow f \left(v _ {i} ^ {\mathcal {T}}\right) + \lambda^ {\mathcal {T}} \sum_ {j \in \mathcal {N} \left(v _ {i}\right)} w _ {i j} f \left(v _ {j} ^ {\mathcal {R}}\right), \tag {1} +$$ + +$$ +v _ {i} ^ {\mathcal {R}} \leftarrow f \left(v _ {i} ^ {\mathcal {R}}\right) + \lambda^ {\mathcal {R}} \sum_ {j \in \mathcal {N} \left(v _ {i}\right)} w _ {i j} f \left(v _ {j} ^ {\mathcal {T}}\right), \tag {2} +$$ + +$$ +w _ {i j} = \mathcal {C} \left(\mathcal {A} \left(f \left(v _ {i} ^ {\mathcal {T}}\right), f \left(v _ {j} ^ {\mathcal {T}}\right)\right), \mathcal {A} \left(f \left(v _ {i} ^ {\mathcal {R}}\right), f \left(v _ {j} ^ {\mathcal {R}}\right)\right)\right), \tag {3} +$$ + +where $f(\cdot)$ are feature extractors of vertices $\{v_i^{\mathcal{T}}, v_i^{\mathcal{R}}\}$ , $\mathcal{A}(\cdot, \cdot)$ is an affinity computation function between two vertices within a single-modal image, $\mathcal{C}(\cdot, \cdot)$ is a cross-modal correlation function between those pairwise vertices. The score/weight $w_{ij}$ indicates a certain latent cue between one pattern-pair of RGB image and the other pattern-pair of the corresponding thermal infrared image at the same spatial position. The higher the weight is, the stronger the cue is among them. If $w_{ij} = 0$ , the corresponding pairs have no any cues. Usually, we constrain the weight $w_{ij} > 0$ with the global sparsity, which means non-dense edge connections. Thus, we can construct the neighbor relationship $\mathcal{N}(v_i)$ based on the produced weights $\{w_{ij}\}$ . The pattern propagation processes in Eqn. (1) and Eqn. (2) take the summation aggregation through weighting on those adjacent patterns of the counterpart modality, which followed by the pattern of modality therein. The hyperparameters $\lambda^{\mathcal{T}}$ and $\lambda^{\mathcal{R}}$ are the balance factors during the pattern propagation. + +As multi-channel RGB-T features have the grid-shape structure, we convert the calculation into the matrix formulation. Given a pair of dual-modal candidates $\{\mathbf{X}^{\mathcal{R}},\mathbf{X}^{\mathcal{T}}\in$ $\mathbb{R}^{H\times W\times C}\}$ , where we omit the time information $t$ for simplification. Thus the number of vertices is $n = H\times W$ To conveniently define the matrix computation, we take a format operation $[\mathbf{X}^T ]$ .. $\mathbb{R}^{H\times W\times C}\to \mathbb{R}^{n\times C}$ , which stacks spatial positions in a row-by-row way. The inter-modal pattern correlations relationship between visible RGB and thermal infrared features can be formulated as + +$$ +\mathcal {C} = \sigma \left(\mathcal {A} ^ {\mathcal {T}} \odot \mathcal {A} ^ {\mathcal {R}}\right) / \mathbf {F}, \tag {4} +$$ + +$$ +\mathcal {A} ^ {\mathcal {T}} = \mathcal {S} ([ f _ {1} ^ {\mathcal {T}} (\mathbf {X} ^ {\mathcal {T}}) ] \times [ f _ {2} ^ {\mathcal {T}} (\mathbf {X} ^ {\mathcal {T}}) ] ^ {\intercal}), \tag {5} +$$ + +$$ +\mathcal {A} ^ {\mathcal {R}} = \mathcal {S} \left(\left[ f _ {1} ^ {\mathcal {R}} \left(\mathbf {X} ^ {\mathcal {R}}\right) \right] \times \left[ f _ {2} ^ {\mathcal {R}} \left(\mathbf {X} ^ {\mathcal {R}}\right) \right] ^ {\intercal}\right), \tag {6} +$$ + +where $\odot$ denotes the element-wise multiplication, $\sigma$ is the exponential function, $\mathbf{F} = \sigma (\mathcal{A}^{\mathsf{T}}\odot \mathcal{A}^{\mathcal{R}})\times \mathbf{1}\times \mathbf{1}^{\mathsf{T}}$ is the + +![](images/f7f4aae9d130f7750f47415b81c1501bd8f2e16d27bfe4e52be66164c977f9bb.jpg) +(a) Illustration of inter-modal pattern-propagation process. + +![](images/d1189ec5bca0e3c4c4601096a8be30617401ca851851872777ab4e4099010882.jpg) +(b) Illustration of long-term context-propagation process. + +Figure 3: Two critical pattern-propagation modules. (a) Inter-modal pattern correlations are defined on intramodal correlations, which compute the affinities of paired bundling patterns in single modality. Based the correlations, the patterns of one modality could be propagated into the other modality, or oppositely. (b) The patterns of historical frames are correlated and propagated into the candidate at the current frame feature for the use of long-term contexts. $\times$ and $\odot$ denote matrix multiplication and elementwise product respectively. + +normalization factor, $f_1^{\mathcal{T}}, f_2^{\mathcal{T}}, f_1^{\mathcal{R}}, f_2^{\mathcal{R}}$ are the convolutional layers with $1 \times 1$ kernel to be learnt in the network, the affinity matrices $\mathcal{A}^{\mathcal{T}}, \mathcal{A}^{\mathcal{R}}$ are computed by the inner production on the feature matrices therein, and $S(\cdot)$ is the sparsity operation to choose those important pairs for the construction of sparse graph (e.g., set a threshold $\tau$ to mask those values less than $\tau$ as zeros). Further, we define the pattern propagation across the two modalities as + +$$ +\left[ \tilde {\mathbf {X}} ^ {\mathcal {T}} \right] = \left[ \mathbf {X} ^ {\mathcal {T}} \right] + \lambda^ {\mathcal {T}} \times \mathcal {C} \times \left[ g ^ {\mathcal {R}} \left(\mathbf {X} ^ {\mathcal {R}}\right) \right], \tag {7} +$$ + +$$ +[ \widetilde {\mathbf {X}} ^ {\mathcal {R}} ] = [ \mathbf {X} ^ {\mathcal {R}} ] + \lambda^ {\mathcal {R}} \times \mathcal {C} \times [ g ^ {\mathcal {T}} (\mathbf {X} ^ {\mathcal {T}}) ], \tag {8} +$$ + +where the nonlinear transformation $g^{\mathcal{T}}$ , $g^{\mathcal{R}}$ are the convolutional layers with $1 \times 1$ kernel, $\lambda^{\mathcal{R}}$ , $\lambda^{\mathcal{T}}$ are adaptively learnt balance factors. At last, we concatenate the two new-fused features $\widetilde{\mathbf{X}}^{\mathcal{T}}$ , $\widetilde{\mathbf{X}}^{\mathcal{R}}$ to form the RGB-T response output $\widetilde{\mathbf{X}}$ . The concrete network module is shown in Fig. 3(a). + +# 3.3. Long-Term Context Propagation + +Context information is very important in tracking task for avoiding model drift [47, 14]. To this end, we construct a historical information pool, which consists of those objects with high confidence and is usually dynamically updated with sequence variations. We expect that the historical context patterns can be propagated into the candidates of the current frame to boost online object tracking performance. Given anyone pair of dual-modal candidates $\{x^{\mathcal{R}}, x^{\mathcal{T}}\}$ , we can derive their fused feature $\widetilde{\mathbf{X}}$ based on the above IMP-P module. Suppose the historical pool is the feature set of $l$ objects, $\{\widetilde{\mathbf{X}}_{t - i_l}, \widetilde{\mathbf{X}}_{t - i_{l-1}}, \dots, \widetilde{\mathbf{X}}_{t - i_1}\}$ , we can define the pattern correlations between them and the current candidate $\widetilde{\mathbf{X}}_t$ . As they are all in the same feature space, we directly compare inter-frame patterns. Formally, + +$$ +[ \widetilde {\mathbf {X}} _ {t} ] \leftarrow [ \widetilde {\mathbf {X}} _ {t} ] + \frac {\gamma}{\mathbf {G}} \sum_ {k = 1} ^ {l} \mathcal {C} _ {t, t - i _ {k}} [ \widetilde {\mathbf {X}} _ {t - i _ {k}} ], \tag {9} +$$ + +$$ +\mathcal {C} _ {t, t - i _ {k}} = \mathcal {S} \left(\left[ h _ {1} \left(\widetilde {\mathbf {X}} _ {t}\right) \right] \times \left[ h _ {2} \left(\widetilde {\mathbf {X}} _ {t - i _ {k}}\right) \right] ^ {\intercal}\right), \tag {10} +$$ + +where the nonlinear transformation $h_1, h_2$ are designed as the convolutional layers with $1 \times 1$ kernel to be learnt, $\mathbf{G}$ is the normalization factor, which scales the sum of correlation weights to be equal to 1 for each spatial position, $\gamma$ is a balance factor, and the correlation weight $\mathcal{C}_{t,t - i_k}$ represents the relationship between the current candidate and the previous historical frame $t - i_k$ . By adaptively learning the weights, the historical patterns can be properly propagated into the current candidate to enhance the feature information for more robust object tracking. The concrete network module is provided in Fig. 3(b). + +# 4. Implementation Details + +We implement our proposed CMPP on the PyTorch platform with E5-2650@2.20GHz CPU and NVIDIA GeForce GTX 2080Ti GPU. We use MDNet [36] as the backbone to build our network, and elaborate the training as well as online tracking strategy as follows. + +# 4.1. Training Procedure + +Pre-training. In this stage, we firstly remove LTCP module and initialize the parameters of first three sequential convolutional layers using the pre-trained VGG-M [3] network. Then we crop positive and negative samples in training sequences and optimize the cross-entropy loss by the Stochastic Gradient Descent (SGD) [20] algorithm where + +each domain is handled separately. In the iteration, we randomly choose 8 frames, from which we crop 32 positive (IoU in $0.7 \sim 1.0$ ) and 96 negative (IoU in $0 \sim 0.5$ ) samples and construct minibatch in each video sequence. For multidomain learning, we set K fully connected layer branches for K video sequences and train the network for 100K iterations. We set the learning rate to 0.0001 for parameters of the IMPP module and 0.001 for the rest. The weight decay and momentum are fixed to 0.0005 and 0.9, respectively. + +Training. We initialize our model using the pre-trained network and train the whole model in this stage. For a video sequence, we crop 32 positive and 96 negative samples from a single frame as minibatch, and then crop 16 positive samples from 4 previous frames as the historical objects. We fine-tune the parameters of IMPP module and three sequential convolutional layers with learning rate of 1e-6 while set it to 0.0001 and 0.001 for parameters of LTCP module and the rest respectively. + +# 4.2. Online Tracking + +In tracking, the K branches for multi-domain learning are replaced by a single branch. Then the CMPP fine-tunes the pre-trained network on the first frame. In the fine-tuning stage, we crop 500 positive and 5000 negative samples with the given ground-truth bounding box and train the model for 30 iterations. The learning rate is 0.0005 for parameters of the first two fully connected layers and 0.005 for parameters of the last one. After that we utilize the output features to train a ridge regression module for bounding box regression. For the $t$ -th frame, we crop 256 sample regions as candidates $\{x_{t}^{i}\}$ under the guidance of predicted result in the $(t - 1)$ -th frame. Then we can obtain their positive and negative scores. We find $k$ candidates $(k = 5)$ with the maximum positive scores and employ the bounding box regressor to improve target localization accuracy, their mean value can be seen as the optimal target state $x^{*}$ , more details can be referred in [36]. Moreover, historical pool is constructed when online tracking begins. In each frame, we insert the reliable prediction region whose positive score over zero into the tail of historical pool, and pop the top one if there are more than $l$ frames in historical pool. + +# 5. Experiment + +# 5.1. Datasets and Evaluation Metrics + +We implement our proposed CMPP framework on two large RGB-T tracking benchmarks, GTOT [24] and RGBT234 [25], to demonstrate its effectiveness. The GTOT dataset contains 50 spatially and temporally aligned visible RGB and thermal infrared sequences, while the RGBT234 dataset includes 234 RGB-T videos and 12 annotated attributes, which totally reach 234K frames. We select the whole GTOT dataset as the training set when evaluating on + +RGBT234 and randomly select 70 videos of the RGBT234 dataset as the training set when evaluating on GTOT. + +We utilize two widely used metrics, precision rate (PR) and success rate (SR), to evaluate the tracking performance. In a specific, PR is the percentage of frames whose Euclidean distance between the predicted bounding box and ground-truth within a manually set threshold (5 pixels in G-TOT and 20 pixels in RGBT234). SR is the percentage of frames whose overlap ratio between the predicted bounding box and ground-truth larger than a specified threshold, and we compute the SR score by the area under curves (AUC). + +# 5.2. Comparison with State-of-the-art Trackers + +Overall performance. We implement our CMPP on G-TOT and RGBT234 benchmarks, and compare the tracking performances with state-of-the-art trackers, i.e., RGB-B trackers (including C-COT [11] and ECO [10]) and RGB-T trackers (including MANet [26], DAPNet [46], DAFNet [15], MaCNet [43], FANet [45], SGT [28], Struck [16] $^+$ RGBT, SOWP [21] $^+$ RGBT, KCF [18] $^+$ RGBT, L1-PF [40], and MDNet [36] $^+$ RGBT). MDNet $^+$ RGBT is our baseline. We directly concatenate the multi-scale RGBB and thermal infrared features and train the model on the training set. The overall tracking performances are shown in Fig. 4. Our CMPP achieves significant outstanding performance over other state-of-the-art trackers for all metrics on both two benchmarks. Specifically, on the RGBT234 benchmark, our CMPP achieves $82.3\% / 57.5\%$ in PR/SR, and has $6.0\% / 5.9\%$ promotion over baseline, while on the GTOT benchmark, our CMPP achieves $92.6\% / 73.8\%$ in PR/SR, and has $9.3\% / 6.2\%$ improvement against the baseline. The excited performance and significant promotion demonstrate the effectiveness of our proposed framework. + +Attribute-based performance. To further demonstrate the effectiveness of our proposed CMPP method, we plot the attribute-based performance on RGBT234. RGBT234 dataset contains 12 annotated attributes, including no occlusion (NO), partial occlusion (PO), heavy occlusion (HO), low illumination (LI), low resolution (LR), thermal crossover (TC), deformation (DEF), fast motion (FM), scale variation (SV), motion blur (MB), camera moving (CM) and background clutter (BC). The tracking results are shown in Table 1. We can observe that the proposed method significantly outperforms other trackers in the most annotated attributions. Specifically, in the challenge of low illumination, low resolution, thermal crossover and fast motion, our CMPP achieves around $10\%$ promotion in PR/SR against baseline. In these scenes, single modal data is unreliable, such as RGB images with low illumination and thermal infrared images with thermal crossover. Considering all intra-modal affinity relationships, our CMPP can obtain confident inter-modal correlations, which are utilized to extract reliable instance patterns from the high quality images + +![](images/5b4479778cfeaa7e424413385fed00985e6309d40deaff5a539878c9e6df736a.jpg) +(a) comparison on RGBT234 + +![](images/241de90e725a8aa621481059552f979a52900b6c613512fc34a7f743abb65778.jpg) + +![](images/2000693816d4c3c791004f94d0dc4ba6a5dd017f5eeb80f03a8e5e798660b101.jpg) +(b) comparison on GTOT + +![](images/e9446d078bc878afcc8c27c1f9be28b99f3d6fdd9b5b75cb4f668075fedc8223.jpg) +Figure 4: Overall performances comparison with state-of-the-art trackers on RGBT234 (a) and GTOT (b). + +and propagate them into the ropey ones to enhance their discrimination. Besides, in the challenge of thermal crossover (TC), the single modal tracker C-COT achieves the best performance because the thermal infrared data is extremely unreliable and is viewed as noise. Even so, our CMPP can still achieve a comparable performance after fusing the branch of unconfident thermal infrared data, which again demonstrates the effectiveness of our CMPP. + +# 5.3. Ablation Study + +Single/dual-modal data. To demonstrate the effectiveness of multi-modal data, we plot the tracking performances of CMPP+RGB, CMPP+T, and CMPP. CMPP+RGB and CMPP+T denote the experiments of our method with RGB and thermal infrared modality respectively. The tracking performances are shown in Fig. 5(a). The CMPP is significantly better than the experiments with single modality input, and demonstrates the great promotion of multiple modalities data in the visual object tracking task. + +Prune experiments. To validate the effectiveness of our major contributions, we implement two variants, including 1) w/o-LTCP, that prunes long-term context propagation module, 2) w/o-IMPP, that prunes inter-modal patternpropagation module. The comparison results on RGBT234 are shown in Fig. 5(b). We draw two conclusions from the results. 1) The w/o-LTCP and w/o-IMPP frameworks outperform baseline(MDNet+RGBT) as well as other state-ofthe-art RGB-T trackers, demonstrating the effectiveness of our proposed IMPP and LTCP modules respectively, 2) The CMPP method performs better than the pruned frameworks, demonstrating that the IMPP and LTCP can improve track + +Table 1: Attribute-based PR/SR scores(%) on RGBT234 dataset against state-of-the-art trackers. The best, second and third performances are represented in red, green, and blue respectively. + +
ECO [10]C-COT [11]FANet [45]DAPNet [46]MaCNet [43]DAFNet [15]MDNet+RGBTCMPP
NO88.0/65.588.8/65.684.7/61.190.0/64.492.7/66.590.0/63.689.5/62.695.6/67.8
PO72.2/53.474.1/54.178.3/54.782.1/57.481.1/57.285.9/58.879.6/53.585.5/60.1
HO60.4/43.260.9/42.770.8/48.166.0/45.770.9/48.868.6/45.967.0/44.973.2/50.3
LI63.5/45.064.8/45.472.7/48.877.5/53.077.7/52.781.2/54.274.5/48.186.2/58.4
LR68.7/46.473.1/49.474.5/50.875.0/51.078.3/52.381.8/53.875.8/48.986.5/57.1
TC82.1/60.984.0/61.079.6/56.276.8/54.377.0/56.381.1/58.373.9/51.183.5/58.3
DEF62.2/45.863.4/46.370.4/50.371.7/51.873.1/51.474.1/51.570.8/50.075.0/54.1
FM57.0/39.562.8/41.863.3/41.767.0/44.372.8/47.174.0/46.566.4/43.378.6/50.8
SV74.0/55.876.2/56.277.0/53.578.0/54.278.7/56.179.1/54.476.8/52.081.5/57.2
MB68.9/52.367.3/49.567.4/48.065.3/46.771.6/52.570.8/50.067.8/48.075.4/54.1
CM63.9/47.765.9/47.366.8/47.466.8/47.471.7/51.772.3/50.671.0/50.175.6/54.1
BC57.9/39.959.1/39.971.0/47.871.7/48.477.8/50.179.1/49.374.4/48.983.2/53.8
ALL70.2/51.471.4/51.476.4/53.276.6/53.779.0/55.479.6/54.476.3/51.682.3/57.5
+ +ing performance from different aspects and jointly promote the tracking results to a certain extent. + +Model parameters comparison. The length of historical frames $l$ and balance factor $\gamma$ in the long-term context propagation module are critical hyperparameters in our proposed framework. We manually set $l = \{8,16,32,64\}$ and $\gamma = \{0.01,0.02,0.03,0.04,0.05\}$ to analyze their influences. The tracking performances on RGBT234 are shown in Table 2. The tracker achieves the best performance with $\gamma = 0.02$ and $l = 32$ . By observing the tracking performances, we can find that the tracker performs better when there are more historical frames involved, because the LTCP module can properly propagate more historical confident information from longer previous frames to the current frame. Conversely, the performances are worse when the balance factor $\gamma$ is too large ( $\gamma = 0.05$ ) or too small ( $\gamma = 0.01$ ), because too much propagation historical information might overwhelm the current feature, while too less propagation historical information tends to result in the model drift. + +Modality-missed experiments. Our CMPP module can obtain reliable instance patterns and propagate across multiple modalities to enhance target representation, even when a branch of modality data is lost. The main reason is that the unharmed modality can timely compensate for the lost one through the use of inter-modal correlations as shown in Fig. 3(a). To test this case, we conduct the modality-missed experiments by disturbing an image pair with a certain probability. Concretely, we randomly mask RGB or thermal infrared image at a time step to simulate the modality losing, which is named modality-missed experiment and performed on RGBT234 dataset. + +We manually set mask ratios $r = \{0.1, 0.2, 0.3, 0.4, 0.5\}$ and plot the success ratio (SR) variation curve of our CMPP and baseline. The experiment results are shown in Fig. 7. + +![](images/4922d703f5d7a93a1f2b18720fb9494e9f9735c9d359f8e3386c45ea4146dd52.jpg) +(a) single/dual-modalities experiments + +![](images/c1556cfe923f309261637a1e9e2556d13e97be79ace4f369658c718cbc5c19c8.jpg) + +![](images/5e8a715504be950a9b89aa3be8775ca31e2e546d91fb798c22656f3e3a2d5486.jpg) +(b) prune experiments + +![](images/37d1fc747a3cc276a6f3adf3423fea214f30e0acf79725e0f1949500163cb9fa.jpg) +Figure 5: Performances comparison of single/dual-modalities (a) and prune (b) experiments on RGBT234. + +Our CMPP obviously decreases slower than baseline with the increase of mask ratio. Compared with the case of no mask, the decline of our CMPP framework and baseline are $2.7\%$ and $4.8\%$ respectively, even when masking $50\%$ frames. The experiments demonstrate the robustness of our CMPP to the case of modality losing. + +# 5.4. Qualitative performances + +The visual comparisons between our proposed CMPP method and the other state-of-the-art trackers are shown in Fig. 6, including MDNet [36] $+$ RGBT, SOWP [21] $+$ RGBT, SGT [28], and C-COT [11]. Our approach performs obvi + +![](images/affb667dac940750c080b8f4b4b68c6940827196c3342a9716697d437ddd0854.jpg) +Figure 6: Qualitative comparison between CMPP and other state-of-the-art trackers on four video sequences. + +![](images/787a6634678a46f5474f5d6f7626b7feb510a47ed02ff043014b700c7146d0b2.jpg) + +![](images/bd1ff1b9f9d0cf0f0137191a1142d3579d8686721c2b5a64dcf85d63969e2251.jpg) + +![](images/b5e21d475c0a9880d0da223658ffd10a59759017a7ec3148057e235bbfff30b2.jpg) + +Table 2: Performances (PR/SR) comparison of different parameters on RGBT234. The best, second and third performance are represented in red, green, and blue respectively. + +
PR/SR(%)l=8l=16l=32l=64
γ=0.0181.1/56.679.1/55.780.7/56.380.1/56.0
γ=0.0280.2/56.180.8/56.382.3/57.582.2/57.2
γ=0.0379.5/55.781.4/56.980.8/56.680.2/56.2
γ=0.0480.3/56.180.7/56.781.6/57.082.1/57.3
γ=0.0581.3/56.780.1/56.181.1/56.479.7/56.0
+ +ously better than other trackers in various challenges, such as heavy occlusion, low illumination, low resolution, and background clutter. For instance, Fig. 6(a) and Fig. 6(b) show the tracking results of video sequences with low illumination and background clutter. Our tracker can localize the target well while others lose the tracked target when the light condition sharply changes. In Fig. 6(c) and Fig. 6(d), which have background clutter, low resolution and heavy occlusion attributes, our approach can benefit from the joint intra-modal and inter-modal pattern propagation strategies to achieve excellent object localization. + +# 5.5. Efficiency Analysis + +Our method mainly contains two modules: IMPP and LTCP. The complexities are $\mathcal{O}(H^2 W^2 C + EHWC)$ and $\mathcal{O}(H^2 W^2 CL)$ respectively, where $H, W, C, L$ are height, width, channel number and memory pool size, and $E \ll HW$ is the nonzero-value number in the sparse matrix $\mathcal{C}$ . In practice, our CMPP is 1.3FPS on RGBT234 while the baseline is 1.5FPS, on par with MDNet-based RGBT trackers such as MANet (1.1FPS) and FANet (1.3FPS). Actually, the backbone network (MDNet) dominates the running time. + +# 6. Conclusion + +In this paper, we proposed a cross-modal patternpropagation (CMPP) RGB-T tracking method, consisting of an inter-modal pattern-propagation (IMPP) and a long- + +![](images/aa390400b963cc678213ce9a51492e8b033743b2843fe198a5ce4c0697a4c3ab.jpg) +Figure 7: Performances (SR) comparison between CMPP and MDNet+RGBT with a specified mask ratio. + +term context propagation (LTCP) module. In virtue of intramodal affinity relationships of dual modalities, the IMPP module can derive confident inter-modal correlations to obtain reliable instance patterns and propagate them across dual modalities to enhance original features. Such an IMPP process effectively integrates dual-modal information, and results in the robustness of tracking even for modality losing. In LTCP module, long-term context information can be well inherited under the guidance of correlations between previous historical frames and the current frame, and thus can relieve model drift to some extent in online tracking phase. We conducted extensive experiments on two large RGB-T datasets, and validated the effectiveness of our method as well as the main modules therein. In the future, we will extend our idea to more modalities to further boost tracking performance. + +# Acknowledgement + +This work was supported by the National Natural Science Foundation of China (Grants Nos. 61972204, 61772276, 61906094, U1713208) and the Natural Science Foundation of Jiangsu Province (Grants Nos. K20191283, BK20190019). + +# References + +[1] Sean Bell, C Lawrence Zitnick, Kavita Bala, and Ross Girshick. Inside-outside net: Detecting objects in context with skip pooling and recurrent neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2874-2883, 2016. +[2] David S Bolme, J Ross Beveridge, Bruce A Draper, and Yui Man Lui. Visual object tracking using adaptive correlation filters. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 2544-2550. IEEE, 2010. +[3] Ken Chatfield, Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Return of the devil in the details: Delving deep into convolutional nets. arXiv preprint arXiv:1405.3531, 2014. +[4] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Semantic image segmentation with deep convolutional nets and fully connected crfs. arXiv preprint arXiv:1412.7062, 2014. +[5] Liang-Chieh Chen, Yi Yang, Jiang Wang, Wei Xu, and Alan L Yuille. Attention to scale: Scale-aware semantic image segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3640-3649, 2016. +[6] Yunpeng Chen, Marcus Rohrbach, Zhicheng Yan, Yan Shuicheng, Jiashi Feng, and Yannis Kalantidis. Graph-based global reasoning networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 433-442, 2019. +[7] Yanbei Chen, Xiatian Zhu, and Shaogang Gong. Person re-identification by deep learning multi-scale representations. In Proceedings of the IEEE international conference on computer vision, pages 2590–2600, 2017. +[8] Zhen Cui, Youyi Cai, Wenming Zheng, Chunyan Xu, and Jian Yang. Spectral filter tracking. IEEE Transactions on Image Processing, 28(5):2479-2489, 2018. +[9] Zhen Cui, Shengtao Xiao, Jiashi Feng, and Shuicheng Yan. Recurrently target-attending tracking. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1449–1458, 2016. +[10] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. Eco: Efficient convolution operators for tracking. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6638-6646, 2017. +[11] Martin Danelljan, Andreas Robinson, Fahad Shahbaz Khan, and Michael Felsberg. Beyond correlation filters: Learning continuous convolution operators for visual tracking. In European Conference on Computer Vision, pages 472-488. Springer, 2016. +[12] Martin Danelljan, Fahad Shahbaz Khan, Michael Felsberg, and Joost Van de Weijer. Adaptive color attributes for real-time visual tracking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1090-1097, 2014. +[13] Rikke Gade and Thomas B Moeslund. Thermal cameras and applications: a survey. Machine vision and applications, 25(1):245-262, 2014. + +[14] Junyu Gao, Tianzhu Zhang, and Changsheng Xu. Graph convolutional tracking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4649-4659, 2019. +[15] Yuan Gao, Chenglong Li, Yabin Zhu, Jin Tang, Tao He, and Futian Wang. Deep adaptive fusion network for high performance rgbt tracking. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 0-0, 2019. +[16] Sam Hare, Stuart Golodetz, Amir Saffari, Vibhav Vineet, Ming-Ming Cheng, Stephen L Hicks, and Philip HS Torr. Struck: Structured output tracking with kernels. IEEE transactions on pattern analysis and machine intelligence, 38(10):2096-2109, 2015. +[17] João F Henriques, Rui Caseiro, Pedro Martins, and Jorge Batista. Exploiting the circulant structure of tracking-by-detection with kernels. In European conference on computer vision, pages 702-715. Springer, 2012. +[18] João F Henriques, Rui Caseiro, Pedro Martins, and Jorge Batista. High-speed tracking with kernelized correlation filters. IEEE transactions on pattern analysis and machine intelligence, 37(3):583-596, 2014. +[19] Ilchae Jung, Jeany Son, Mooyel Baek, and Bohyung Han. Real-time mdnet. In Proceedings of the European Conference on Computer Vision (ECCV), pages 83-98, 2018. +[20] Nikhil Ketkar. Stochastic gradient descent. In Deep learning with Python, pages 113-132. Springer, 2017. +[21] Han-Ul Kim, Dae-Youn Lee, Jae-Young Sim, and Chang-Su Kim. Sowp: Spatially ordered and weighted patch descriptor for visual tracking. In Proceedings of the IEEE International Conference on Computer Vision, pages 3011-3019, 2015. +[22] Tao Kong, Anbang Yao, Yurong Chen, and Fuchun Sun. Hypernet: Towards accurate region proposal generation and joint object detection. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 845-853, 2016. +[23] Xiangyuan Lan, Mang Ye, Shengping Zhang, Huiyu Zhou, and Pong C Yuen. Modality-correlation-aware sparse representation for rgb-infrared object tracking. Pattern Recognition Letters, 2018. +[24] Chenglong Li, Hui Cheng, Shiyi Hu, Xiaobai Liu, Jin Tang, and Liang Lin. Learning collaborative sparse representation for grayscale-thermal tracking. IEEE Transactions on Image Processing, 25(12):5743-5756, 2016. +[25] Chenglong Li, Xinyan Liang, Yijuan Lu, Nan Zhao, and Jin Tang. Rgb-t object tracking: benchmark and baseline. Pattern Recognition, 96:106977, 2019. +[26] Chenglong Li, Andong Lu, Aihua Zheng, Zhengzheng Tu, and Jin Tang. Multi-adapter rgbt tracking. arXiv preprint arXiv:1907.07485, 2019. +[27] Chenglong Li, Xiang Sun, Xiao Wang, Lei Zhang, and Jin Tang. Grayscale-thermal object tracking via multitask laplacian sparse representation. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 47(4):673-681, 2017. +[28] Chenglong Li, Xiao Wang, Lei Zhang, Jin Tang, Hejun Wu, and Liang Lin. Weighted low-rank decomposition for robust grayscale-thermal foreground detection. IEEE Transactions + +on Circuits and Systems for Video Technology, 27(4):725-738, 2016. +[29] Chenglong Li, Xiaohao Wu, Nan Zhao, Xiaochun Cao, and Jin Tang. Fusing two-stream convolutional neural networks for rgb-t object tracking. Neurocomputing, 281:78-85, 2018. +[30] Chenglong Li, Chengli Zhu, Yan Huang, Jin Tang, and Liang Wang. Cross-modal ranking with soft consistency and noisy labels for robust rgb-t tracking. In Proceedings of the European Conference on Computer Vision (ECCV), pages 808-823, 2018. +[31] Chenglong Li, Chengli Zhu, Jian Zhang, Bin Luo, Xiaohao Wu, and Jin Tang. Learning local-global multi-graph descriptors for rgb-t object tracking. IEEE Transactions on Circuits and Systems for Video Technology, 2018. +[32] Chenglong Li, Chengli Zhu, Shaofei Zheng, Bin Luo, and Jing Tang. Two-stage modality-graphs regularized manifold ranking for rgb-t tracking. Signal Processing: Image Communication, 68:207-217, 2018. +[33] Yang Li and Jianke Zhu. A scale adaptive kernel correlation filter tracker with feature integration. In European conference on computer vision, pages 254-265. Springer, 2014. +[34] Jiawei Liu, Zheng-Jun Zha, QI Tian, Dong Liu, Ting Yao, Qiang Ling, and Tao Mei. Multi-scale triplet cnn for person re-identification. In Proceedings of the 24th ACM international conference on Multimedia, pages 192-196. ACM, 2016. +[35] Wei Liu, Andrew Rabinovich, and Alexander C Berg. Parsenet: Looking wider to see better. arXiv preprint arXiv:1506.04579, 2015. +[36] Hyeonseob Nam and Bohyung Han. Learning multi-domain convolutional neural networks for visual tracking. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4293-4302, 2016. +[37] Eunbyung Park and Alexander C Berg. Meta-tracker: Fast and robust online adaptation for visual object trackers. In Proceedings of the European Conference on Computer Vision (ECCV), pages 569-585, 2018. +[38] Pierre Sermanet, Soumith Chintala, and Yann LeCun. Convolutional neural networks applied to house numbers digit classification. arXiv preprint arXiv:1204.3968, 2012. +[39] Qiang Wang, Li Zhang, Luca Bertinetto, Weiming Hu, and Philip HS Torr. Fast online object tracking and segmentation: A unifying approach. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1328-1338, 2019. +[40] Yi Wu, Erik Blasch, Genshe Chen, Li Bai, and Haibin Ling. Multiple source data fusion via sparse representation for robust visual tracking. In 14th International Conference on Information Fusion, pages 1-8. IEEE, 2011. +[41] Yi Wu, Jongwoo Lim, and Ming-Hsuan Yang. Online object tracking: A benchmark. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2411-2418, 2013. +[42] Yi Wu, Jongwoo Lim, and Ming-Hsuan Yang. Object tracking benchmark. IEEE Transactions on Pattern Analysis and Machine Intelligence, 37(9):1834-1848, 2015. + +[43] Hui Zhang, Lei Zhang, Li Zhuo, and Jing Zhang. Object tracking in rgb-t videos using modal-aware attention network and competitive learning. Sensors, 20(2):393, 2020. +[44] Zhenyu Zhang, Zhen Cui, Chunyan Xu, Yan Yan, Nicu Sebe, and Jian Yang. Pattern-affinitive propagation across depth, surface normal and semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4106-4115, 2019. +[45] Yabin Zhu, Chenglong Li, Yijuan Lu, Liang Lin, Bin Luo, and Jin Tang. Fanet: Quality-aware feature aggregation network for rgb-t tracking. arXiv preprint arXiv:1811.09855, 2018. +[46] Yabin Zhu, Chenglong Li, Bin Luo, Jin Tang, and Xiao Wang. Dense feature aggregation and pruning for rgbt tracking. In Proceedings of the 27th ACM International Conference on Multimedia, pages 465-472, 2019. +[47] Zheng Zhu, Wei Wu, Wei Zou, and Junjie Yan. End-to-end flow correlation tracking with spatial-temporal attention. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 548-557, 2018. \ No newline at end of file diff --git a/crossmodalpatternpropagationforrgbttracking/images.zip b/crossmodalpatternpropagationforrgbttracking/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2a768d38fcc40183f5730d1e5461501056122f98 --- /dev/null +++ b/crossmodalpatternpropagationforrgbttracking/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1571a0fb8bdbf09c61ef50a89cdc62fd85ac516076151b0f7fb49032c0c6d67 +size 615092 diff --git a/crossmodalpatternpropagationforrgbttracking/layout.json b/crossmodalpatternpropagationforrgbttracking/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..802eb43eb20fd4c7f59ae4ca7bc11f772186d70e --- /dev/null +++ b/crossmodalpatternpropagationforrgbttracking/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:83a3288d71215cb6e8d69fb6cb3f6d57f4cf512cb438262677de383834da0621 +size 371945 diff --git a/crossspectralfacehallucinationviadisentanglingindependentfactors/c43318ee-c1a5-4529-b4b0-610bf1d0f3ab_content_list.json b/crossspectralfacehallucinationviadisentanglingindependentfactors/c43318ee-c1a5-4529-b4b0-610bf1d0f3ab_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..dd91a8bce8dbefa04d70c4b625568b15f5201650 --- /dev/null +++ b/crossspectralfacehallucinationviadisentanglingindependentfactors/c43318ee-c1a5-4529-b4b0-610bf1d0f3ab_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:acb5735d8ce0194cceaede966462d1c13b38af477b9ca2fffdb8a5be2dc6e5b1 +size 71060 diff --git a/crossspectralfacehallucinationviadisentanglingindependentfactors/c43318ee-c1a5-4529-b4b0-610bf1d0f3ab_model.json b/crossspectralfacehallucinationviadisentanglingindependentfactors/c43318ee-c1a5-4529-b4b0-610bf1d0f3ab_model.json new file mode 100644 index 0000000000000000000000000000000000000000..15a5b1d57268aed85e66c884b69f44fa032e4af4 --- /dev/null +++ b/crossspectralfacehallucinationviadisentanglingindependentfactors/c43318ee-c1a5-4529-b4b0-610bf1d0f3ab_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c1cca4f26d5e5d653c862de3c549a76b0f1edac4da911dd6c52b953313d9a4c +size 85774 diff --git a/crossspectralfacehallucinationviadisentanglingindependentfactors/c43318ee-c1a5-4529-b4b0-610bf1d0f3ab_origin.pdf b/crossspectralfacehallucinationviadisentanglingindependentfactors/c43318ee-c1a5-4529-b4b0-610bf1d0f3ab_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5a13d0eca1436202b64d25a55971f4885a03bfdb --- /dev/null +++ b/crossspectralfacehallucinationviadisentanglingindependentfactors/c43318ee-c1a5-4529-b4b0-610bf1d0f3ab_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d5769cb2d5606f43b60a6ee2219423bb025bf042524ee1cde7499e34ca28ee8 +size 2305750 diff --git a/crossspectralfacehallucinationviadisentanglingindependentfactors/full.md b/crossspectralfacehallucinationviadisentanglingindependentfactors/full.md new file mode 100644 index 0000000000000000000000000000000000000000..fca8f3359157f7b2cc8ebc901e5ac98d12f7f8f1 --- /dev/null +++ b/crossspectralfacehallucinationviadisentanglingindependentfactors/full.md @@ -0,0 +1,316 @@ +# Cross-Spectral Face Hallucination via Disentangling Independent Factors + +Boyan Duan $^{1*}$ Chaoyou Fu $^{1,2*}$ Yi Li $^{1,2}$ Xingguang Song $^{3}$ Ran He $^{1,2\dagger}$ + +$^{1}$ NLPR & CEBSIT & CRIPAC, CASIA $^{2}$ University of Chinese Academy of Sciences + +3 Central Media Technology Institute, Huawei Technology Co., Ltd. + +dbby96@163.com, {chaoyou.fu, rhe}@nlpr.ia.ac.cn, yi.li@cripac.ia.ac.cn, songxingguang@huawei.com + +# Abstract + +The cross-sensor gap is one of the challenges that have aroused much research interests in Heterogeneous Face Recognition (HFR). Although recent methods have attempted to fill the gap with deep generative networks, most of them suffer from the inevitable misalignment between different face modalities. Instead of imaging sensors, the misalignment primarily results from facial geometric variations that are independent of the spectrum. Rather than building a monolithic but complex structure, this paper proposes a Pose Aligned Cross-spectral Hallucination (PACH) approach to disentangle the independent factors and deal with them in individual stages. In the first stage, an Unsupervised Face Alignment (UFA) module is designed to align the facial shapes of the near-infrared (NIR) images with those of the visible (VIS) images in a generative way, where UV maps are effectively utilized as the shape guidance. Thus the task of the second stage becomes spectrum translation with aligned paired data. We develop a Texture Prior Synthesis (TPS) module to achieve complexion control and consequently generate more realistic VIS images than existing methods. Experiments on three challenging NIR-VIS datasets verify the effectiveness of our approach in producing visually appealing images and achieving state-of-the-art performance in HFR. + +# 1. Introduction + +In real world systems, there are multiple imaging sensors in cameras. For example, near infrared (NIR) sensors work well in low lighting conditions and are widely used in night-vision devices and surveillance cameras. Nevertheless, visible (VIS) images are much easier to capture, leading them to the most common type. Different sensors result in face appearance variations, which imposes a great challenge to precisely match face images in different light + +![](images/0ba6efb7b217076e2b26b814a8e84814256909782f212d1b56992146c54a83cd.jpg) + +![](images/112849e73cf12808d88d231dbb699c346811c321313702f67d9e43817d5012fa.jpg) + +![](images/8fd954deb1a5546055f2f593dc711c65cc42d91d213caedbc6877af4a04aaa3b.jpg) +Figure 1. Synthesis results (the 2nd row, $256 \times 256$ resolution) of PACH. There are distinct facial shape deviations between the NIR images (the 1st row) and the VIS images (the 3rd row). PACH disentangles the independent factors in cross-spectral hallucination and produces realistic VIS images from NIR inputs. + +spectra. Face recognition with NIR images is an important task in computer vision [22]. However, in most face recognition scenarios, the only available faces are VIS images. There lack large-scale datasets with NIR faces for effective model learning, compared with the VIS face datasets. Therefore, it is significant to effectively utilize both NIR and VIS images to boost HFR. In past decades, many efforts have been paid to HFR. These methods can be classified into three categories [30]. The first category contrives to learn domain-invariant features of faces in different domains [20]. The second category projects NIR and VIS images into a common subspace [31]. Face synthesis (or hallucination) has raised as another popular trend [26], especially in recent years. It usually translates NIR images to the VIS ones while keeping the identity of faces, and then evaluates recognition models on the synthesized VIS images to reduce the domain gap. + +However, there are still challenges regarding the image synthesis based methods. A major challenge comes from the misalignment. The paired NIR and VIS images (com + +![](images/20e4e6941d06eb0e374bffbcd67a364af83ef798605e36a99835e8b08b1a841b.jpg) +Figure 2. The schematic diagram of PACH. There are two stages in our method, each having an individual duty. The first stage (Unsupervised Face Alignment, UFA) learns to align the facial shape of $I_N$ to that of the paired $I_V$ with the guidance of the UV map. The second stage (Texture Prior Synthesis, TPS) transfers the aligned $I_N''$ to a VIS one based on a texture prior $T$ . + +![](images/ef2e65982735871d70bd35fb9da9f74f3ddeb305f34a0ecc5dc97e9c7cfb29c9.jpg) + +ing from the same identity) in the training set are not exactly aligned. The reason is that the NIR and the VIS images are usually captured in different scenarios, involving imaging distances or environments. We exhibit some sample NIR-VIS pairs in Figure 1, along with our synthesized VIS results. Nevertheless, most existing image synthesis methods require aligned paired data to train a decent model. When confronting unaligned data (which is the more common case in reality), they tend to produce unsatisfying results. In addition, the image resolution of the synthesized images is usually no more than $128 \times 128$ . Although [32] proposes to tackle the misalignment issue by learning attention from warped images to guide generation, their results share a similar complexion, which violates variations in reality and lacks realistic textures. Moreover, their network is quite complex as well as with complicated data preprocessing. + +In this paper, we propose a simple yet effective solution against the misalignment problem in cross-spectral face hallucination, namely Pose Aligned Cross-spectral Hallucination (PACH). The schematic diagram is presented in Figure 2. During the hallucination, procedures containing face alignment and spectrum translation are independent from each other. Instead of dealing with the blended factors together, PACH disentangles them and settles each in an individual stage. In the first stage, we design an Unsupervised Face Alignment (UFA) module to adjust the facial shape of the input NIR image. UFA is trained following an unsupervised principle of reconstructing the input image. Inspired by [12], UFA could naturally separate the identity and the facial shape of an NIR image. In the second stage, UFA has been trained well and stays unchanged. The UV map of the input NIR image is replaced with that of the paired VIS image. By this means, UFA synthesizes a new NIR image that is aligned with the paired VIS one. The aligned paired data produced by UFA simplifies the task of cross-spectral hal + +lucination. To tackle the facial texture problem, we develop a Texture Prior Synthesis (TPS) module that is able to control complexions and produce realistic results. We train our model on the CASIA NIR-VIS 2.0 dataset [19], and evaluate it on three datasets, including CASIA NIR-VIS 2.0, Oulu-CASIA NIR-VIS [1], and BUAA-VisNir [9]. Extensive experimental results show that our method generates high-quality images as well as promotes HFR performance. In summary, our main contributions are as followings: + +1. This paper proposes a novel solution to deal with data misalignment in cross-spectral face hallucination, namely Pose Aligned Cross-spectral Hallucination (PACH). Since the facial shape and the spectrum are two independent factors, we suggest to disentangle the factors and settle them separately in different stages with relatively simpler networks. +2. There are two stages in PACH, each focusing on a certain factor. In the first stage, we introduce an Unsupervised Face Alignment (UFA) module to adjust facial shape according to the guidance of the UV map, and thus produce aligned paired NIR-VIS data. The second stage contains a Texture Prior Synthesis (TPS) module that achieves complexion control and produces realistic VIS images for HFR. +3. Extensive experiments on the CASIA NIR-VIS 2.0, the Oulu-CASIA NIR-VIS, and the BUAA-VisNir datasets show that our method achieves state-of-the-art performance in both visualization and recognition. The cross-dataset experiments demonstrate the generalization ability of our method. + +# 2. Related Work + +Heterogeneous Face Recognition (HFR) has been widely studied in recent years. Existing methods could be classi- + +fied into three categories: domain-invariant feature representation, common subspace learning, and image synthesis. + +Feature representation methods try to learn face features that are robust and invariant in NIR and VIS domains. Traditional methods are based on hand-crafted local features. [20] applies Difference-of-Gaussian (DoG) filtering and Multi-scale Block Local Binary Patterns (MB-LBP) to get the feature representation. [3] uses Local Radon Binary Pattern (LRBP) as the feature that is robust in two different modalities to tackle the task of Sketch-VIS recognition. [4] encodes face images into a common encoding model, and uses a discriminant matching method to match images in different domains. + +Subspace learning methods learn to project the NIR and the VIS images into a common subspace. The projections of the same subject from two domains are similar in the subspace. [31] applies Canonical Correlation Analysis (CCA) learning in the Linear Discriminant Analysis (LDA) subspace. [25] uses Partial Least Squares (PLS) to map heterogeneous faces from different modalities into a common subspace. [11] proposes regularized discriminative spectral regression to match heterogeneous face images in a subspace. [16] uses a Multi-view Discriminant Analysis (MvDA) approach to learn a discriminant common subspace. + +Image synthesis methods aim to reduce the domain gap by a synthesis manner, e.g., translating NIR images to the VIS ones. [27] uses the image synthesis method to tackle the sketch-photo recognition problem. [15] learns a mapping function between the NIR and the VIS domains with a dictionary based approach. In recent years, with the rise of deep learning, there are lots of works applying deep learning in the image synthesis process. [18] uses a convolutional neural network to synthesize VIS images from NIR images in patches, and then applies a low-rank embedding to further improve the results. Generative Adversarial Network (GAN) [5] is also widely used in this field. [26] proposes to use a Cycle-GAN [34] based framework for the face hallucination. [2] proposes a dual generation method that generates massive paired NIR-VIS images from noise to reduce the domain gap of HFR. + +# 3. Method + +The goal of our method is to translate an NIR image to the VIS one, which is expected to facilitate the performance of HFR. However, on the one hand, the paired NIR and VIS images in the heterogeneous face datasets, such as CASIA NIR-VIS 2.0, are unaligned. There are inevitable differences in the facial shapes between paired NIR and VIS images, as shown in Figure 3. The misalignment of facial shapes makes it hard to synthesize satisfactory VIS images from the paired NIR ones. On the other hand, the diverse complexions of the VIS images lead the NIR-VIS translation to be a 'one to many' problem, i.e., one NIR complex- + +![](images/40229094e4ab08f87de1cd34bfc790f9e527ba4f36963cbbb91b677872343e88.jpg) +Figure 3. Examples of face alignment on the CASIA NIR-VIS 2.0 dataset. There are large differences in the facial shapes between the paired NIR (the 1st row) and VIS (the 3rd row) images. The aligned NIR (the 2nd row) images have the same facial shapes as the VIS ones. + +ion to multiple VIS complexions, bringing challenges to photo-realistic face synthesis. In order to tackle the above problems, we explicitly divide the cross spectral face hallucination into two independent stages: an Unsupervised Face Alignment (UFA) stage and a Texture Prior Synthesis (TPS) stage. The first stage is proposed to align the facial shapes of the NIR images with those of the paired VIS ones, as presented in Figure 3. After that, we can obtain the aligned paired NIR and VIS images for pixel-wise supervised training. The second stage adopts a texture prior to facilitate the realistic image synthesis. In the following subsections, the details of the above two stages are described respectively. + +# 3.1. Unsupervised Face Alignment (UFA) + +Inspired by the recently proposed works [12, 17, 21, 33] that employ Adaptive Instance Normalization (AdaIN) [10] to control image styles, we propose an unsupervised face alignment method with AdaIN to disentangle facial shapes and identities. The AdaIN is defined as: + +$$ +A d a I N (z, \gamma , \beta) = \gamma \left(\frac {z - u (z)}{\sigma (z)}\right) + \beta . \tag {1} +$$ + +In the previous method [12], $z$ means the feature of 'content' images. $u(z)$ and $\sigma (z)$ denote the channel-wise mean and standard deviation of $z$ , respectively. $\gamma$ and $\beta$ are the affine parameters learned by a network. The image 'style' can be switched by changing $\gamma$ and $\beta$ . In our method, we replace the 'content' with the facial shape, and the 'style' with the identity. + +As shown in Figure 2, the generator in UFA consists of a shape encoder $Enc_{s}$ , an identity encoder $Enc_{i}$ , several + +AdaIN residual blocks $AdaRes$ , and a decoder $Dec$ . $Enc_i$ is used to extract the identity features, which are irrelevant with the facial shape, of the input NIR image $I_N$ . The affine parameters $\gamma$ and $\beta$ in Eq. (1) are obtained by $Enc_i(I_N)$ . $Enc_s$ is a facial shape extractor. The input of $Enc_s$ is the UV map $M_N$ of $I_N$ . The facial shape of $I_N$ , such as the pose and the expression, can be presented well by $M_N$ , as shown in Figure 2. $AdaRes$ , which denotes residual blocks with AdaIN, is used to disentangle the identity features $Enc_i(I_N)$ and the shape features $Enc_s(M_N)$ . $Dec$ decodes the disentangled features $AdaRes(Enc_i(I_N), Enc_s(M_N))$ to the image space, outputting the NIR image $I_N'$ . The loss functions of this stage are introduced as below. + +# 3.1.1 Reconstruction Loss. + +We adopt an unsupervised manner to train the generator, which is reflected in the fact that we only reconstruct the input image without any other supervision. The output image $I_N' = \text{Dec}(AdaRes(Enc_i(I_N), Enc_s(M_N)))$ is required to keep consistent with the input image $I_N$ , which is implemented by a pixel-wise L1 loss: + +$$ +\mathcal {L} _ {\text {r e c}} = \mathbb {E} _ {I _ {N} ^ {\prime}, I _ {N}} [ | | I _ {N} ^ {\prime} - I _ {N} | | _ {1} ]. \tag {2} +$$ + +# 3.1.2 Identity Preserving Loss. + +Inspired by [8], the reconstructed NIR image $I_N'$ should be consistent with the ground truth $I_N$ not only at the image space, but also at the latent semantic feature space. Specifically, an identity preserving network $D_{ip}$ , which is the LightCNN [29] pre-trained on the MS-Celeb-1M dataset [6], is introduced to extract the identity features of $I_N'$ and $I_N$ , respectively. A L2 loss is imposed to constrain the feature distance between $D_{ip}(I_N')$ and $D_{ip}(I_N)$ : + +$$ +\mathcal {L} _ {\mathrm {i p}} = \mathbb {E} _ {I _ {N} ^ {\prime}, I _ {N}} [ | | D _ {i p} (I _ {N} ^ {\prime}) - D _ {i p} (I _ {N}) | | _ {2} ]. \tag {3} +$$ + +# 3.1.3 Adversarial Loss. + +In order to improve the visual quality of the reconstructed NIR image $I_N'$ , we adopt a discriminator $D$ to perform adversarial learning [5] with the generator, including Enci, Encc, AdaRes, and Dec: + +$$ +\mathcal {L} _ {\mathrm {a d v}} = \mathbb {E} _ {I _ {N}} [ \log D (I _ {N}) ] + \mathbb {E} _ {I _ {N} ^ {\prime}} [ \log \left(1 - D \left(I _ {N} ^ {\prime}\right)\right) ]. \tag {4} +$$ + +# 3.1.4 Overall Loss. + +The overall loss in the first stage is the weighted sum of the above reconstruction loss $\mathcal{L}_{\mathrm{rec}}$ , identity preserving loss $\mathcal{L}_{\mathrm{ip}}$ and adversarial loss $\mathcal{L}_{\mathrm{adv}}$ : + +$$ +\mathcal {L} _ {\mathrm {U F A}} = \mathcal {L} _ {\mathrm {r e c}} + \lambda_ {1} \mathcal {L} _ {\mathrm {i p}} + \lambda_ {2} \mathcal {L} _ {\mathrm {a d v}}. \tag {5} +$$ + +where $\lambda_{1}$ and $\lambda_{2}$ are trade-off parameters. The generator, which contains Enci, Encs, AdaRes and Dec, and the discriminator $D$ are trained alternatively to play a min-max game [5]. + +# 3.2. Texture Prior Synthesis (TPS) + +After the training of UFA, we align the facial shape of the input NIR image $I_N$ with that of the target VIS image $I_V$ , by changing the UV map. That is, replacing the UV map $M_N$ of $I_N$ with the UV map $M_V$ of $I_V$ . By this means, we obtain the aligned paired NIR-VIS training images $I_N'' = Dec(AdaRes(Enc_i(I_N), Enc_s(M_V)))$ and $I_V$ . The corresponding process is presented in Figure 2. The examples of the aligned paired NIR and VIS images are shown in Figure 3. + +By now we have aligned paired training data $I_N^{\prime \prime}$ and $I_V$ , but meet the other intractable challenge. The complexions of NIR images in the CASIA NIR-VIS 2.0 dataset are unified, while those of VIS images are diverse. The diverse complexions lead cross-spectral hallucination to a 'one to many' problem, which brings challenges to the traditional image to image translation methods [13, 34] that are usually applicable to 'one to one' problems. As shown in Figure 4, the synthesized images of previous translation methods tend to have an average complexion that is somewhat yellow. Obviously, the average complexion makes the synthesized images unrealistic, which may further decrease the recognition performance. + +Different from previous image translation methods, we introduce a texture prior to facilitate cross-spectral hallucination. Specifically, a texture prior $T$ , which indicates the complexion information, is cropped from the target VIS image $I_V$ . The texture prior is concatenated with the aligned NIR image $I_N''$ , and fed into the generator $G$ . By this way, $T$ provides a specific guidance for the translation, turning it into an easier 'one to one' task. The corresponding losses in this stage are listed as follows. + +# 3.2.1 Pixel Loss. + +Benefitting from the aligned paired NIR-VIS images $I_N''$ and $I_V$ , we can train the translation network $G$ by the means of pixel-wise supervision. The pixel loss, which defines the discrepancies between the synthesized $I_V' = G(I_N'', T)$ and the target $I_V$ , is formulated as: + +$$ +\mathcal {L} _ {\mathrm {p i x}} = \mathbb {E} _ {I _ {N} ^ {\prime \prime}, T, I _ {V}} [ | G (I _ {N} ^ {\prime \prime}, T) - I _ {V} | ]. \tag {6} +$$ + +# 3.2.2 Total Variation Regularization. + +In order to reduce the artifacts that are produced in the training process, a total variation regularization loss [14] is im + +![](images/84ce4667f4f7952cd6c445f244c4b11fc52f4f5f8ad78b4599aa83bdee110298.jpg) +Input +Ours +PCFH +Pixel2Pixel CycleGAN +ADFL +Figure 4. The visualization comparisons with other state-of-the-art methods on the CASIA NIR-VIS 2.0 dataset. The results of the compared methods are obtained from [32]. + +posed on the synthesized image: + +$$ +\begin{array}{l} \mathcal {L} _ {\mathrm {t v}} = \sum_ {c = 1} ^ {C} \sum_ {w, h = 1} ^ {W, H} | G (I _ {N} ^ {\prime \prime}, T) _ {w + 1, h, c} - G (I _ {N} ^ {\prime \prime}, T) _ {w, h, c} | \\ + \left| G \left(I _ {N} ^ {\prime \prime}, T\right) _ {w, h + 1, c} - G \left(I _ {N} ^ {\prime \prime}, T\right) _ {w, h, c} \right|. \tag {7} \\ \end{array} +$$ + +where $W$ and $H$ denote image width and image height, respectively. + +In addition, we also adopt an identity preserving loss and an adversarial loss in this stage. The two losses have the same form as Eq. (3) and Eq. (4) respectively, except for replacing $I_N / I_N'$ with $I_V / I_V'$ . + +# 3.2.3 Overall Loss. + +The overall loss in the second stage is the weighted sum of the above losses: + +$$ +\mathcal {L} _ {\mathrm {T P S}} = \mathcal {L} _ {\mathrm {p i x}} + \alpha_ {1} \mathcal {L} _ {\mathrm {t v}} + \alpha_ {2} \mathcal {L} _ {\mathrm {i p}} + \alpha_ {3} \mathcal {L} _ {\mathrm {a d v}}. \tag {8} +$$ + +where $\alpha_{1},\alpha_{2}$ , and $\alpha_{3}$ are the trade-off parameters. + +
MethodRank-1VR@FAR=1%VR@FAR=0.1%
LightCNN [29]96.8499.1094.68
Pixel2Pixel [13]22.1339.2214.45
CycleGAN [34]87.2393.9279.41
PCFH [32]98.5099.5897.32
PACH99.0099.6198.51
+ +Table 1. Comparisons with other state-of-the-art methods on the 1-fold of the CASIA NIR-VIS 2.0 dataset. + +
MethodRank-1VR@FAR=1%VR@FAR=0.1%
VGG [24]62.1 ± 1.8871.0 ± 1.2539.7 ± 2.85
TRIVET [23]95.7 ± 0.5298.1 ± 0.3191.0 ± 1.26
LightCNN [29]96.7 ± 0.2398.5 ± 0.6494.8 ± 0.43
IDR [7]97.3 ± 0.4398.9 ± 0.2995.7 ± 0.73
ADFL [26]98.2 ± 0.3499.1 ± 0.1597.2 ± 0.48
PCFH [32]98.8 ± 0.2699.6 ± 0.0897.7 ± 0.26
PACH98.9 ± 0.1999.6 ± 0.1098.3 ± 0.21
+ +Table 2. Comparisons with other state-of-the-art methods on the 10-fold of the CASIA NIR-VIS 2.0 dataset. + +# 4. Experiments + +In this section, we evaluate our proposed approach against state-of-the-art methods on three widely employed NIR-VIS face datasets, including the CASIA NIR-VIS 2.0 [19], the Oulu-CASIA NIR-VIS [1], and the BUAA-VisNir [9] datasets. We begin with introducing these three datasets as well as the training and the testing protocols. Then, experimental details are described. Finally, qualitative and quantitative experimental results are reported to demonstrate the effectiveness of our approach. + +# 4.1. Datasets and Protocols + +The CASIA NIR-VIS 2.0 [19] is a challenging NIR-VIS heterogeneous face dataset with largest number of images from 725 subjects. The number of VIS images for each subject ranges from 1 to 22, and the number of NIR images for each subject ranges from 5 to 50. Face images in this dataset contain diverse variations, such as different expressions, poses, backgrounds, and lighting conditions. The paired NIR and VIS images of each subject are not aligned, because of the differences in facial shapes. We follow the protocol of [30] to split the training and the testing set, containing a total of 10-fold experimental settings. For each setting, 2, 500 VIS images and 6, 100 NIR images from about 360 subjects are used as the training set. The probe set consists of over 6,000 NIR images from 358 subjects. The gallery set contains 358 VIS images from the same subjects. Note that, we also follow the generation protocol of [32]. That is, the qualitative and quantitative results are all obtained from the first fold. The Rank-1 accuracy, verification rate (VR)@ false accept rate (FAR) = 1%, and VR@FAR = 0.1% are reported for comparisons. + +
MethodRank-1VR@FAR=1%VR@FAR=0.1%
KDSR [11]66.956.131.9
TRIVET [23]92.267.933.6
IDR [7]94.373.446.2
ADFL [26]95.583.060.7
LightCNN [29]96.792.465.1
PCFH [32]10097.786.6
PACH10097.988.2
+ +Table 3. Comparisons with other state-of-the-art methods on the Oulu-CASIA NIR-VIS dataset. + +
MethodRank-1VR@FAR=1%VR@FAR=0.1%
KDSR [11]83.086.869.5
TRIVET [23]93.993.080.9
IDR [7]94.393.484.7
ADFL [26]95.295.388.0
LightCNN [29]96.595.486.7
PCFH [32]98.497.992.4
PACH98.698.093.5
+ +Table 4. Comparisons with other state-of-the-art methods on the BUAA-VisNir dataset. + +The Oulu-CASIA NIR-VIS [1] is a popular heterogeneous face dataset that consists of 80 identities with 6 different expressions. Among all the identities, 30 identities are from CASIA and the remainder are from Oulu University. Following the protocol of [30], 20 identities are selected as the training set, and another 20 identities are selected as the testing set. Each identity contains 48 NIR images and 48 VIS images. For the testing set, all the NIR images are used as the probe and all the VIS images are used as the gallery. Following [32], we train our model on the CASIA NIR-VIS 2.0 dataset and test it on the Oulu-CASIA NIR-VIS dataset. The Rank-1 accuracy, $\mathrm{VR@FAR} = 1\%$ , and, $\mathrm{VR@FAR} = 0.1\%$ are reported. + +The BUAA-VisNir [9] is a widely used heterogeneous face recognition dataset. It has images from 150 subjects with 9 NIR images and 9 VIS images per subject. A total of 50 subjects with 900 images are chosen as the training set, and the remaining 100 subjects with 1800 images are the testing set. According to [32], we train our model on the first fold of the CASIA NIR-VIS 2.0 dataset, and test it on the BUAA-VisNir dataset. The Rank-1 accuracy, VR@FAR = 1% and VR@FAR = 0.1% are reported. + +# 4.2. Experimental Details + +All images in the heterogeneous face datasets are aligned to $144 \times 144$ and center cropped to $128 \times 128$ . Moreover, we also align and crop $256 \times 256$ resolution images on the CASIA NIR-VIS 2.0 dataset to explore high-resolution face synthesis. In the first stage, we crop a $15 \times 15$ patch from the facial cheek of the VIS image, and then resize it to $128 \times 128$ as the texture prior. The UV map is calculated based on + +![](images/54c48268759f5b0d6c56fc8f55e4f2ebe225e58dbcd2fe9620125b62dd09fe2d.jpg) + +![](images/ea7571f7552515ef015da905b736867b37de8d7cdf05ed07ff1a6762482791d2.jpg) + +![](images/3ea3e6d0c5a2ac4244562a5b730a85e920f4238273b0056041bbe226949e5b36.jpg) +Figure 5. The visualization results of cross-dataset experiments. The model is trained on the CASIA NIR-VIS 2.0 dataset. (a) The testing results on the Oulu-CASIA NIR-VIS dataset. (b) The testing results on the BUAA-VisNir dataset. (c) The testing results on the CUHK Face Sketch (CUFS) dataset [28]. + +[35]. Adam is used as the optimizer with a fixed learning rate 2e-4. The batch size is set to 64. Both of the trade-off parameters $\lambda_{1}$ and $\lambda_{2}$ in Eq. (5) are set to 1. The trade-off parameters $\alpha_{1}, \alpha_{2}$ , and $\alpha_{3}$ in Eq. (8) are set to 1e-4, 1, and 1, respectively. The network architectures in UFA are based on [12], and those of the generator and the discriminator in TPS are based on [8]. Refer to Figure 2, the input and output of the networks are modified correspondingly. + +# 4.3. Comparisons + +# 4.3.1 Results on the CASIA NIR-VIS 2.0 dataset. + +We compare the qualitative results of our method with those of other GAN-based methods, including Pixel2Pixel [13], CycleGAN [34], ADFL [26], and PCFH [32], on the 1-fold of the CASIA NIR-VIS 2.0 dataset. Among them, Pixel2Pixel and CycleGAN are well-known supervised and unsupervised image-to-image translation methods, respectively. ADFL and PCFH are two state-of-the-art cross-spectral hallucination approaches. The visual comparisons are presented in Figure 4. All results of the compared meth + +![](images/e670e1562f6814e94bd74936a26a62102d853289640e806fbae79cc9b0d22446.jpg) + +![](images/d0a3413c2cf0339a70887303cf7e29c790342a4c112b5e22ffbc7d4ff6700cc4.jpg) + +![](images/94606a349a4ada13b1947b8d898145e1296d8e4c2b350d69bc99adfbbe21d8b9.jpg) + +![](images/37ba0294ea3974523599fc7fd66c32cd92af5245bfbe8c7a779c993d9e96f290.jpg) + +![](images/69cb1bb7e5d48632d9658a016100c7ad2239c25b2e6ba87417d91ee61597c125.jpg) +Figure 6. The results of changing texture priors. The top left is the input NIR image. The rest VIS images are synthesized under different texture priors. For each synthesized VIS image, the lower right corner is the corresponding texture prior. + +![](images/a9caae3ae8cd95748ffd455375bd257b7fdc5178f166196a35182a3fca59afba.jpg) + +![](images/88cc3c345af49664c8cbe7677e7cd944a07ccc62fb469439036925a5c38d4f89.jpg) + +![](images/97f8b92fb8e1ae71f7217ed0f71a18e7198f210ad7f9e07836a57cbbc86faaa2.jpg) + +ods are obtained from [32]. + +For Pixel2Pixel and CycleGAN, there are distinct artifacts in the synthesized results. In addition, the facial shapes of the generated VIS images are not completely consistent with those of the input NIR images. For example, the mouth shape of the second synthesized VIS image of CycleGAN is different from that of the input NIR image. The facial size of the third synthesized VIS image of Pixel2Pixel is smaller than that of the input NIR image. These phenomena may be caused by the unaligned paired training data. + +ADFL is mainly based on CycleGAN, resulting in the similar visual problems as CycleGAN. PCFH proposes a complex attention warping to alleviate the unaligned problem, and thus gets better results than Pixel2Pixel, CycleGAN, and ADFL. However, there is still a huge gap between the synthesized images and the real ones, which is mainly reflected in the complexion. The yellow complexion makes the results unrealistic. It is obvious that our method outperforms all other methods. The synthesized VIS images not only maintain the facial shapes of the input NIR images, but also have more realistic textures. We owe the consistency of facial shapes to the proposed face alignment in the first stage, and the realistic textures to the introduced texture prior in the second stage. + +In Table 1, we report the results of the quantitative comparison with Pixel2Pixl, CycleGAN, PCFH, and the baseline LightCNN on the 1-fold of the CASIA NIR-VIS 2.0 dataset. We can see that our method performs better than the baseline LightCNN that evaluates on the original NIR images. The Rank-1 accuracy, VR@FAR=1%, and VR@FAR=0.1% are improved by 2.16%, 0.51%, and 3.83%, respectively. The significant improvements over baseline prove that our method can really boost the recognition performance, by the way of translating NIR images to VIS ones. On the contrary, compared with the baseline LightCNN, other GAN-based methods, i.e., Pixel2Pixel and CycleGAN, result in worse recognition performance. The + +
MethodRank-1VR@FAR=1%VR@FAR=0.1%
w/o UFA35.7643.5321.36
w/o TPS86.5690.6481.67
PACH99.0099.6198.51
+ +Table 5. Quantitative results of ablation study on the 1-fold of the CASIA NIR-VIS 2.0 dataset. + +degradation may be caused by the poor quality of the synthesized images, as shown in Figure 4. + +Furthermore, we also conduct experiments on more folds of the CASIA NIR-VIS 2.0 dataset, the results are tabulated in Table 2. Besides LightCNN, the compared methods contain VGG [24], TRIVET [23], IDR [7], ADFL [26], and PCFH [32]. Our method gets the best results on all recognition indicators. In particular, VR@FAR=0.1% is improved from the state-of-the-art 97.7% [32] to 98.3%. + +# 4.3.2 Results on the Oulu-CASIA NIR-VIS dataset. + +As stated in Section 4.1, our model is trained on the 1-fold of the CAISA NIR-VIS 2.0 dataset, and tested on the OuluCASIA NIR-VIS dataset. The qualitative cross-dataset experimental results are shown in Figure 5 (a). The input NIR images are randomly selected from Oulu-CASIA NIR-VIS. We can observe our method still performs well in such a challenging cross-dataset case. + +The results of the quantitative comparison with KDSR [11], TRIVET, IDR, ADFL, LighCNN, and PCFH are listed in Table 3. It is obvious that our method outperforms other methods by a large margin. For instance, compared with the baseline LightCNN, VR@FAR=0.1% is improved from 65.1% to 88.2%. Compared with the state-of-the-art method PCFH, VR@FAR=0.1% is improved by 1.6%. Since PCFH has got good performance in Rank-1 accuracy and VR@FAR=1%, it is impressive to gain the improvements over PCFH. + +# 4.3.3 Results on the BUAA-VisNir dataset. + +The cross-dataset experimental results on the BUAA-VisNir dataset are reported in Figure 5 (b). Our method obtains photo-realistic synthesized VIS images, although the model is trained on the CAISA NIR-VIS 2.0 dataset. + +We further quantitatively compare our method with LightCNN, KDSR, TRIVET, IDR, ADFL, and PCFH. The results of all the methods are shown in Table 4. Compared with the baseline LightCNN, our method improves the Rank-1 accuracy, VR@FAR=1%, and VR@FAR=0.1% by 2.1%, 2.6%, and 6.8%, respectively. Moreover, compared with PCFH, our method gains 1.1% on VA@FAR=0.1%, revealing the importance of realistic textures. The improve + +![](images/00dab810f619fa2ecbc3114bf5d4afa31fd7586355ab7bb62d3b55947fd60389.jpg) +Figure 7. The synthesis results of our method and its two variants on the CASIA NIR-VIS 2.0 dataset. The images in the first column are the input NIR images, and the remaining are the results without UFA, the results without TPS, and the results of our method, respectively. + +ments on the Rank-1 and VR@FAR=1% are marginal, because these indicators are already saturated. + +# 4.4. Experimental Analyses + +We begin with studying the roles of our proposed UFA and TPS, reporting both qualitative and quantitative results for better comparisons. Figure 7 presents the visualization comparisons between our method and its two variants. It is obvious that our method gets the best results. Without UFA, the synthesized images are blurry, especially for the facial edges. For example, the cheek of the first synthesized VIS image is not consistent with that of the input NIR image. This may be caused by the unaligned paired data. Without TPS, the synthesized images look unrealistic. The diverse complexions of the VIS images in the CASIA NIR-VIS 2.0 dataset bring huge challenges for image translation. Our texture prior provides a complexion simulation mechanism in the training process, facilitating to synthesize realistic facial textures. Moreover, Figure 6 shows the synthesized results under different textures priors. The complexions of the synthesized results change with the texture priors, which demonstrates the controllability of the complexion. + +Table 5 tabulates the quantitative recognition results of our method and its variants. We can see that the recognition performance will highly decrease if any component is + +not used, suggesting that each component of our method is useful. In particular, the recognition performance drops significantly when UFA is removed. Concretely, the Rank-1 accuracy, VR@FAR=1%, and VR@FAR=0.1% decrease to 35.76%, 43.53%, and 21.36%, when removing UFA. The quantitative results in Table 5 further demonstrate the crucial role of our UFA and TPS for effective cross-spectral face hallucination. + +In addition, we also make a parameter analysis, considering there are several trade-off parameters. As stated in Section 3, each loss of our method is reasonable, which is also confirmed by our experiments. Specifically, when $\lambda_{1}$ , $\lambda_{2}$ , $\alpha_{1}$ , $\alpha_{2}$ , and $\alpha_{3}$ are set to 0 respectively, the rank-1 accuracy on the CASIA NIR-VIS 2.0 dataset correspondingly decreases $14\%$ , $0.6\%$ , $0.5\%$ , $11\%$ , and $3\%$ . Meanwhile, our method is not sensitive to these trade-off parameters in a large range. For the most influential identity preserving loss, the rank-1 accuracy only changes $0.8\%$ when $\lambda_{1}$ is set from 1 to 10. + +Given that our method performs well on the cross-dataset experiments, we further test our method on a sketch dataset CUHK Face Sketch (CUFS) [28]. As shown in Figure 5 (c), although the model is only trained on the CASIA NIR-VIS 2.0 dataset, we observe satisfactory results on such a sketch dataset. The synthesized details, including the hair and the facial textures, are photo-realistic, which proves the generalization ability of our method. We will continue to explore more applications in our future work. + +# 5. Conclusion + +To tackle the misalignment problem in cross-spectral face hallucination, this paper has proposed to disentangle the facial shape and the spectrum information, and settle them in individual stages. The first stage focuses on the facial shape. We design an Unsupervised Face Alignment (UFA) module to align the facial shape of an NIR image with that of the paired VIS one. Then we use the acquired aligned paired data to train a generator that translates the NIR image to VIS image. The second stage is in charge of the cross-spectral translation. To improve the reality of the synthesized results, we develop a Texture Prior Synthesis (TPS) module and produce VIS images with different complexion cases, which has been proved to facilitate the performance of cross-spectral translation. We conduct extensive experiments on three challenging NIR-VIS datasets and achieve state-of-the-art results in visual effects and quantitative comparisons. + +# Acknowledgments + +This work is funded by Beijing Natural Science Foundation (Grants No. JQ18017). + +# References + +[1] Jie Chen, Dong Yi, Jamei Yang, Guoying Zhao, Stan Z Li, and Matti Pietikainen. Learning mappings for face synthesis from near infrared to visual light images. In CVPR, 2009. +[2] Chaoyou Fu, Xiang Wu, Yibo Hu, Huaibo Huang, and Ran He. Dual variational generation for low-shot heterogeneous face recognition. In NeurIPS, 2019. +[3] Hamed Kiani Galoogahi and Terence Sim. Face sketch recognition by local radon binary pattern: Lrbp. In ICIP, 2012. +[4] Dihong Gong, Zhifeng Li, Weilin Huang, Xuelong Li, and Dacheng Tao. Heterogeneous face recognition: A common encoding feature discriminant approach. TIP, 2017. +[5] 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. +[6] Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. Ms-celeb-1m: A dataset and benchmark for large-scale face recognition. In ECCV, 2016. +[7] Ran He, Xiang Wu, Zhenan Sun, and Tieniu Tan. Learning invariant deep representation for nir-vis face recognition. In AAAI, 2017. +[8] Yibo Hu, Xiang Wu, Bing Yu, Ran He, and Zhenan Sun. Pose-guided photorealistic face rotation. In CVPR, 2018. +[9] Di Huang, Jia Sun, and Yunhong Wang. The buaa-visnir face database instructions. Technical report, 2012. +[10] Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In ICCV, 2017. +[11] Xiangsheng Huang, Zhen Lei, Mingyu Fan, Xiao Wang, and Stan Z Li. Regularized discriminative spectral regression method for heterogeneous face matching. TIP, 2012. +[12] Xun Huang, Ming-Yu Liu, Serge Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. In ECCV, 2018. +[13] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. +[14] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016. +[15] Felix Juefei-Xu, Dipan K Pal, and Marios Savvides. Nir-vis heterogeneous face recognition via cross-spectral joint dictionary learning and reconstruction. In CVPR workshops, 2015. +[16] Meina Kan, Shiguang Shan, Haihong Zhang, Shihong Lao, and Xilin Chen. Multi-view discriminant analysis. TPAMI, 2015. +[17] Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019. +[18] José Lezama, Qiang Qiu, and Guillermo Sapiro. Not afraid of the dark: Nir-vis face recognition via cross-spectral hallucination and low-rank embedding. In CVPR, 2017. +[19] Stan Li, Dong Yi, Zhen Lei, and Shengcai Liao. The casia mir-vis 2.0 face database. In CVPR workshops, 2013. + +[20] Shengcai Liao, Dong Yi, Zhen Lei, Rui Qin, and Stan Z. Li. Heterogeneous face recognition from local structures of normalized appearance. In ICB, 2009. +[21] Ming-Yu Liu, Xun Huang, Arun Mallya, Tero Karras, Timo Aila, Jaakko Lehtinen, and Jan Kautz. Few-shot unsupervised image-to-image translation. In ICCV, 2019. +[22] Sifei Liu, Dong Yi, Zhen Lei, and Stan Z Li. Heterogeneous face image matching using multi-scale features. In ICB, 2012. +[23] Xiaoxiang Liu, Lingxiao Song, Xiang Wu, and Tieniu Tan. Transferring deep representation for nir-vis heterogeneous face recognition. In ICB, 2016. +[24] Omkar M Parkhi, Andrea Vedaldi, and Andrew Zisserman. Deep face recognition. In BMVC, 2015. +[25] Abhishek Sharma and David W Jacobs. Bypassing synthesis: PIs for face recognition with pose, low-resolution and sketch. In ICCV, 2011. +[26] Lingxiao Song, Man Zhang, Xiang Wu, and Ran He. Adversarial discriminative heterogeneous face recognition. In AAAI, 2018. +[27] Xiaou Tang and Xiaogang Wang. Face sketch synthesis and recognition. In ICCV, 2003. +[28] Xiaogang Wang and Xiaou Tang. Face photo-sketch synthesis and recognition. TPAMI, 2008. +[29] Xiang Wu, Ran He, Zhenan Sun, and Tieniu Tan. A light cnn for deep face representation with noisy labels. TIFS, 2018. +[30] Xiang Wu, Huaibo Huang, Vishal M Patel, Ran He, and Zhenan Sun. Disentangled variational representation for heterogeneous face recognition. In AAAI, 2019. +[31] Dong Yi, Rong Liu, RuFeng Chu, Zhen Lei, and Stan Z Li. Face matching between near infrared and visible light images. In ICB, 2007. +[32] Junchi Yu, Jie Cao, Yi Li, Xiaofei Jia, and Ran He. Pose-preserving cross-spectral face hallucination. In IJCAI, 2019. +[33] Egor Zakharov, Aliaksandra Shysheya, Egor Burkov, and Victor Lempitsky. Few-shot adversarial learning of realistic neural talking head models. In ICCV, 2019. +[34] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017. +[35] Xiangyu Zhu, Zhen Lei, Xiaoming Liu, Hailin Shi, and Stan Z Li. Face alignment across large poses: A 3d solution. In CVPR, 2016. \ No newline at end of file diff --git a/crossspectralfacehallucinationviadisentanglingindependentfactors/images.zip b/crossspectralfacehallucinationviadisentanglingindependentfactors/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..7cde710597681bfb89c157f770946d54d20c47bb --- /dev/null +++ b/crossspectralfacehallucinationviadisentanglingindependentfactors/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02927ad275d8aef727eeca9c1d6a4fa0b47583427d8c8de5167839381c198ac8 +size 539836 diff --git a/crossspectralfacehallucinationviadisentanglingindependentfactors/layout.json b/crossspectralfacehallucinationviadisentanglingindependentfactors/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..fefefa90473f8b8ee4931044fc6d3bf08b33181d --- /dev/null +++ b/crossspectralfacehallucinationviadisentanglingindependentfactors/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c3b6d8f07a80a11c3970364f7e84bbcd2028f6ceea3c52946e9b358ef3a4c70d +size 383551 diff --git a/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/e27d0be3-9976-4ff4-85f8-05d2d9c79812_content_list.json b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/e27d0be3-9976-4ff4-85f8-05d2d9c79812_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..04b2d158b55527c8be7391a3c5f2194c34871d7e --- /dev/null +++ b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/e27d0be3-9976-4ff4-85f8-05d2d9c79812_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b16769ad1e32a4fbef409bcc575fdd352ad6b1d6af26bb3339157d8f3523fa8 +size 89071 diff --git a/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/e27d0be3-9976-4ff4-85f8-05d2d9c79812_model.json b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/e27d0be3-9976-4ff4-85f8-05d2d9c79812_model.json new file mode 100644 index 0000000000000000000000000000000000000000..e3a17a5feb79917483669ae32d0c3a25fd8c0f30 --- /dev/null +++ b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/e27d0be3-9976-4ff4-85f8-05d2d9c79812_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5d5d23c0a1127c906baf642c7289530025f947235beecfdf106abba09cc38ae +size 110749 diff --git a/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/e27d0be3-9976-4ff4-85f8-05d2d9c79812_origin.pdf b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/e27d0be3-9976-4ff4-85f8-05d2d9c79812_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..55a5bc27d0e9c0bde3440368f99ac06e3d93d167 --- /dev/null +++ b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/e27d0be3-9976-4ff4-85f8-05d2d9c79812_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75d8776934f69a5c244b264edfb7453a56051279965d879a1ccebea012281063 +size 876066 diff --git a/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/full.md b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..79dfa95f5e4477a9660a820fbedf41951ed8f07f --- /dev/null +++ b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/full.md @@ -0,0 +1,431 @@ +# Cross-view Correspondence Reasoning based on Bipartite Graph Convolutional Network for Mammogram Mass Detection + +Yuhang Liu $^{1}$ Fandong Zhang $^{2}$ Qianyi Zhang $^{1}$ Siwen Wang $^{1}$ Yizhou Wang $^{3}$ Yizhou Yu $^{1,*}$ $^{1}$ Deepwise AI Lab $^{2}$ Center for Data Science, Peking University + +3 Center on Frontiers of Computing Studies, Dept. of Computer Science & Technology, Advanced Institute of Information Technology, Peking University + +{liuyuhang, zhangqianyi, wangsiwen, yuyizhou}@deepwise.com + +{fd.zhang, yizhou.wang}@pku.edu.cn + +# Abstract + +Mammogram mass detection is of great clinical significance due to the high proportion of breast cancers. The information from cross views (i.e., mediolateral-oblique and cranio-caudal) is highly related and complementary, and is helpful to make comprehensive decisions. However, unlike radiologists who can recognize masses with reasoning ability in cross-view images, most existing methods lack the ability to reason under the guidance of domain knowledge, thus it limits the performance. In this paper, we introduce the bipartite graph convolutional network to endow existing methods with cross-view reasoning ability of radiologists in mammogram mass detection. The bipartite node sets are constructed by cross-view images respectively to represent relatively consistent regions in breasts, while the bipartite edge learns to model both inherent cross-view geometric constraints and appearance similarities between correspondences. Based on the bipartite graph, the information propagates methodically through correspondences and enables spatial visual features equipped with customized cross-view reasoning ability. Experimental results on DDSM dataset demonstrate the proposed algorithm achieves state-of-the-art performance. Besides, visual analysis shows the model has a clear physical meaning, which is helpful to radiologists in clinical interpretation. + +# 1. Introduction + +Breast cancer continues to have the highest incidence and mortality rates among women worldwide [49]. Screening mammography has been proved to effectively reduce breast cancer mortality [48]. Mass is one of the most important signs of breast cancer. However, mammogram mass + +detection is challenging for both radiologists and computer-aided detection (CAD) system, since masses can be partially obscured by high-intensity compacted glands especially in dense breasts. In clinical practice, cross-view images (i.e., as shown in Figure 1, cranio-caudal (CC) view which is a top-down view of the breast, and mediolateral oblique (MLO) view which is a side view of the breast taken at a certain angle) provide related and complementary information [46], and help to make comprehensive decisions. + +To exploit relations of cross-view mammogram images, an intuitive idea is to adopt [21, 54] to model inter-image non-local relations. For example, CVR-RCNN [32] adds a relation module to the second stage of Faster RCNN [42] to learn inter-proposal relations. However, unlike radiologists who are able to reason with domain knowledge, the constraints of the relation learning is implicit and uncontrolled, while cross-view geometric constraints and semantic relations are not explicitly considered. Thus, the learned relations may be incorrect. Besides, the relation module relies on the quality of stage-one proposals. It may fail under severe gland occlusions, which also lead to poor performance. + +We argue that the key issue is how to endow the current detection methods with the power of reasoning. When identifying masses, radiologists take the reasoning procedure explicitly. First extract suspicious regions in the examined image. And then search the regions in the auxiliary view with compatible locations and appearances. If reasonable correspondences are found, regions in both views are more likely to be mass, and vice versa. Therefore, the cross-view region-based reasoning procedure is helpful for mass detection. + +Motivated by the above observations, in this paper, we introduce a novel Bipartite Graph convolutional Network (BGN) to provide the reasoning ability in mammogram mass detection. BGN can be embedded into any object detection frameworks [42, 18, 59]. It takes backbone im + +![](images/8e04ce4583a8e65a663ac4c0bcb86ecb4ac14c90f1193448577aac0221a5e590.jpg) +(a) CC View + +![](images/341fb34671b91ad83e571719c9e0b7e3f11059ff78657253a270d9e1ba2f4499.jpg) +(b) MLO View + +![](images/6d74803ce10de0cca47a6d4eb865fd3fcea64b1bdb6b0797ffe0210c793eb86c.jpg) +(c) Projection Model +Figure 1. Relations between CC and MLO views. Figure (a)-(b) indicate CC and MLO views of the breast. Line to the right side of figure (b) corresponds to the projected pectoral muscle plain. Figure (c) indicates an ideal projection model. The CC view is a top-down view taken along the pectoral muscle plain, while the MLO view is a side view taken at a certain angle. + +age features as input and outputs cross-view enhanced features. To model cross-view region-based reasoning procedure, bipartite graph nodes are constructed by cross-view images respectively, each of which represents a relatively consistent region in breasts. The graph edges are designed to model both inherent geometric constraints and appearance similarities of cross-view nodes jointly. Therefore, only edges between nodes from different views exist, leading to a bipartite graph structure. After several layers of bipartite graph convolution, the node features are enhanced through correspondences and enables spatial visual features equipped with cross-view reasoning ability. Unlike existing methods that use none or weak cross-view constraints, the proposed model learns stronger customized cross-view reasoning with both geometric and semantic correspondences. Moreover, instead of applying the module after the proposal stage, the proposed graph module enhances backbone features before the proposal. Therefore, it suffers less from the proposal missing problem. + +Experimental results on both a public dataset DDSM [20] and an in-house dataset demonstrate that the proposed algorithm achieves state-of-the-art performance. Besides, visual analysis shows the model has a clear physical meaning, which is helpful for clinical interpretation. + +Our contributions are mainly two-fold: Firstly, we propose a novel mammogram mass detection framework that effectively exploits cross-view information and visual correspondences. Next, we build a bipartite graph convolutional network capable of performing reasoning about cross-view correspondences and modeling both geometric constraints and visual similarities across views. + +# 2. Related Work + +Mammogram Mass Detection Mammogram mass detection has been studied for several years. Traditional meth- + +ods use handcrafted features to represent masses and design complex classifiers for identification [37, 52, 11]. However, these methods are limited due to the lack of representation ability and end-to-end training ability. In recent years, deep learning has made great progress in medical image computing [58, 17, 10, 61]. Modern object detection networks are applied to enhance mass detection performance [43, 24, 30, 55, 31, 5]. However, cross-view mammogram images containing related and complementary information are not considered. Ma et al. [32] attempt to model cross-view property and integrate relation module [21] into Faster RCNN [42] to learn cross-view inter-proposal relations. However, the relation learning is implicit and uncontrolled, and lacks reasoning ability under the guidance of domain knowledge. Thus, it limits the performance. Besides, severe gland occlusion may lead to proposal-missing problem, which also causes poor performance. The BGN provides reasoning ability with domain knowledge, which helps to learn stronger customized feature enhancement. + +Visual Reasoning based on Graph Convolutional Network Visual reasoning aims to combine different information or interactions between objects or things, and has been applied to many computer vision tasks, such as classification [1, 34], object detection [8, 22], segmentation [28] and so on [27, 35, 15, 33, 41]. Recently, researchers attempt to introduce graph convolutional network [62] for visual reasoning [56]. Li et al. [28] propose graph convolutional units to learn graph visual representation from 2D data. However, information propagates from all semantic correspondences which introduce noises for learning representation. Meanwhile, the reasoning procedure is implicit and uncontrolled, and it limits the performance as well as interpretation. Gao et al. [16] enhance target feature by introducing a spatial-temporal graph in visual tracking task. However, the nodes are represented by uniform grids, which are sensitive to object scales, image shapes, geometric distortions, etc. Noticing crucial semantic dependencies among objects, Xu et al. [57] attempt to reason with a class-to-class prior graph. However, the graph remains fixed and is hard to adapt to all cases. Besides, it cannot be applied to the single-class detection tasks (e.g., mass detection). + +Multi-view Visual Recognition Understanding and representing 3D object is a fundamental problem in vision recognition [39, 14] and stereo vision [25, 47, 6, 7, 40]. Multi-view based approaches render the 3D object from multi views, and deploy image-based classifiers on individual view images [50, 23]. Feng et al. [14] propose a group-view convolutional network to model hierarchical correlation from multiple views. Yang et al. [60] learn to reinforce the information by exploiting region-level and view-level relations. Different from multi-view based approaches, + +![](images/dbe11939face1ffa3a915783a56b04ca77a82dfaa78f6f9337a6f6b6aefe7072.jpg) +Figure 2. The pipeline of the proposed BGN. BGN takes cross-view backbone features as inputs, and outputs enhanced features for further prediction. First, bipartite graph nodes are constructed by mapping spatial visual features with pseudo landmarks. Each mapping cell is a representative region for each graph node. Then, the bipartite graph edge learns to model both geometric constraints and semantic similarities. Next, correspondence reasoning enhancement is conducted for feature enhancement by propagating information on the bipartite graph. Finally, the enhanced features are aggregated with original features for further prediction. + +mammography cross-view images have more explicit correspondences, which helps to design stronger customized reasoning mechanisms. Explicit correspondences also exist in stereo vision [47, 6, 7, 40], which matches key points in general scenario as correspondences with calibrated cameras. However, different from stereo vision, we cannot get exact matched correspondences due to standard mammography screening mechanisms [46]. The key challenge is to utilize fuzzy correspondences for feature enhancement. + +# 3. Methodology + +# 3.1. Overview + +The proposed BGN aims to endow cross-view correspondence reasoning ability in the mammogram detection framework. BGN is stacked on the backbone to enhance feature representations, and can be integrated into any modern detection frameworks. As illustrated in Figure 2, there are three major steps. Firstly, to model the region-based reasoning procedure, bipartite graph nodes are mapped from cross-view backbone visual features, where each node denotes the representations of relative consistent region in breasts. Then, bipartite graph edges are designed to model both cross-view geometric constraints and appearance similarities of bipartite graph nodes. Finally, correspondence + +reasoning enhancement based on the pre-defined bipartite graph is designed to enhance feature representations. After information propagation through nodes, node representations are mapped to spatial visual domain reversely, which enables enhanced spatial features aware of cross-view correspondences. Both enhanced features and original backbone features are fused for further proposals. + +Formally, we are given a paired 2D feature maps $F_{e}, F_{a} \in \mathbb{R}^{HW \times C}$ extracted from the examined view (where detection is performed) and its auxiliary view (the other view), where $e, a \in \{CC, MLO\}$ indicate the view types, $H, W$ and $C$ represent the height, width and channel of the feature map. Note either $CC$ or $MLO$ view can be treated as the examined view. As formulated in Equation 1, BGN learns a function $f$ , parameterized by the bipartite graph $\mathcal{G} = (\mathcal{V}, \mathcal{U}, \mathcal{E})$ with node sets as $\mathcal{V}, \mathcal{U}$ and edges as $\mathcal{E}$ . $\mathcal{V}, \mathcal{U}$ indicate nodes from $CC$ and $MLO$ views respectively, each edge in $\mathcal{E}$ connects a node in $\mathcal{V}$ to one in $\mathcal{U}$ . + +$$ +Y = f \left(F _ {e}, F _ {a}; \mathcal {G}\right) \tag {1} +$$ + +# 3.2. Bipartite Graph Node + +Bipartite graph node is designed to represent region-level correspondences in breasts. There are two issues: (1) Where to locate? (2) What to represent? + +![](images/8955799c831c6d2d8168c45015574b9e9def96724b761286c3394eacf8383dfd.jpg) +(a) CC View + +![](images/96e3aa775bebf7932c50da9e6e4ead1c67aed8c2bf1dcc92220b8d36aa9836d5.jpg) +(b) MLO View + +![](images/42e74189e3243c3cff278fa1aa8b958a84c165990aba3c6066d5cdb379bd29a7.jpg) +(c) Mapping Cell +Figure 3. Illustration of pseudo landmarks and bipartite graph node mapping. (a)-(b) draw pseudo landmarks and the matched bounding boxes on CC and MLO views respectively. (c) illustrates how bipartite node mapping works when $k = 1$ . Each mapping cell denotes the representative region of the node in the CC view. + +Pseudo landmarks that preserve relative consistent location in breasts are defined to solve the first issue, while bipartite graph node mapping produces node representations from spatial visual features. We describe the details in the following parts. + +# 3.2.1 Pseudo Landmarks + +Landmarks are points in a shape object in which correspondences between and within the populations of the object are preserved [12]. However, there are no specialized landmarks for breasts. We have to define pseudo landmarks according to prior knowledge. + +The pseudo landmarks should satisfy the following three properties: I. Each pseudo landmark represents a relatively consistent region in breasts; II. Different pseudo landmarks represent different regions; III. The union of all pseudo landmarks covers the breast region completely. + +An intuitive idea is to treat uniform grids of the image as landmarks. However, property I. is not satisfied, leading to sensitiveness to image scale, geometric distortions, etc. + +As illustrated in Figure 1, the design of the pseudo landmark embedding method is based on a basic observation: CC and MLO views of standard mammography screening have natural geometric correspondences. Ideally, a point in CC view approximately corresponds to a line parallel to projected pectoral muscle plane in MLO view. + +To embed pseudo landmarks as shown in Figure 3, equidistant parallel lines are first inserted between the nipple and pectoral muscle line (projected by pectoral muscle plane). The parallel lines and the breast contour intersect, and we insert points uniformly between two intersection points. Finally, all the points are re-ordered based on intersections and defined as pseudo landmarks. Specially, as for + +MLO view which contains pectoral muscle areas additionally, a similar method is applied to define pseudo landmarks in pectoral muscle areas. With these processes, we obtain a set of pseudo landmarks for each view. + +# 3.2.2 Bipartite Graph Node Mapping + +Bipartite graph node mapping aims to project spatial visual features $(F_{CC}, F_{MLO})$ to node domain parameterized by matrices $X^{CC} \in \mathbb{R}^{|\mathcal{V}| \times C}$ , $X^{MLO} \in \mathbb{R}^{|\mathcal{U}| \times C}$ . The features at a node are region-level features of the region corresponding to the node. + +The node mapping reveals the relation between graph nodes and all the pixels. As illustrated in the following equations, we design kNN (k Nearest Neighbor) forward mapping $\phi_{k}$ with its auxiliary matrix $A$ for node visual representations. Each node corresponds to an irregular region satisfying the property that for any pixel in the region, the node is one of its $k$ nearest nodes. $\phi_{k}$ performs region-level feature pooling within the regions corresponding to the graph nodes: + +$$ +\phi_ {k} (F, \mathcal {N}) = \left(Q ^ {f}\right) ^ {T} F, \tag {2} +$$ + +$$ +Q ^ {f} = A \left(\Lambda^ {f}\right) ^ {- 1}, \tag {3} +$$ + +$$ +A _ {i j} = \left\{ \begin{array}{l l} 1 & \text {i f} j \text {t h n o d e i s k N N o f} i \text {t h p i x e l} \\ 0 & \text {O t h e r w i s e} \end{array} , \right. \tag {4} +$$ + +where $\mathcal{N} \in \{\mathcal{V}, \mathcal{U}\}$ represents node set corresponding to spatial visual feature $F \in \mathbb{R}^{HW \times C}$ , $A \in \mathbb{R}^{HW \times |\mathcal{N}|}$ is an auxiliary matrix to assign spatial features to top-k nearest graph nodes, $\Lambda^f \in \mathbb{R}^{|\mathcal{N}| \times |\mathcal{N}|}$ is a diagonal matrix, $\Lambda_{jj}^f = \sum_{i=1}^{HW} A_{ij}$ , and $Q^f \in \mathbb{R}^{HW \times |\mathcal{N}|}$ which is a normalized form of $A$ serves as the forward mapping matrix. + +Compared with fixed-grid assign methods [16], the proposed node representations are more robust to image scales, geometric distortions, etc, since $\phi_{k}$ selects representative region adaptively according to relations among node locations. Besides, the mapping mechanism has a clear physical meaning, which is helpful for visual interpretation. Specifically, Figure 3(c) shows the mapping degenerates to Voronoi grids [2] when $k = 1$ . + +Based on kNN forward mapping, we can obtain visual representations of bipartite graph node sets. + +$$ +X ^ {C C} = \phi_ {k} \left(F _ {C C}, \mathcal {V}\right) \tag {5} +$$ + +$$ +X ^ {M L O} = \phi_ {k} \left(F _ {M L O}, \mathcal {U}\right) \tag {6} +$$ + +# 3.3. Bipartite Graph Edge + +If given a mass locating at one certain node in the examined view, it is obvious that different nodes in the auxiliary view can have different probabilities representing the + +same mass instance as the given mass. Thus, bipartite graph edge aims to reveal such underlying relations between nodes. We characterize the edge in two aspects: geometric constraints and appearance similarities. The two aspects describe the inherent constraints caused by mammogram screening mechanism and visual similarities between nodes, respectively. + +Formally, bipartite graph edge is represented as an adjacency matrix $\mathcal{E} \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{U}|}$ composed of a geometric graph $\mathcal{E}^g \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{U}|}$ and a semantic graph $\mathcal{E}^s \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{U}|}$ . The geometric graph as a global prior graph reveals the geometric constraints across views. The semantic graph as an instance dependent graph represents the semantic similarities between nodes. The two graphs jointly affect cross-view information propagation. Equation 7 illustrates the relations of these matrices, where $\circ$ indicates element-wise dot. + +$$ +\mathcal {E} = \mathcal {E} ^ {g} \circ \mathcal {E} ^ {s} \tag {7} +$$ + +# 3.3.1 Geometric Relation Learning + +How to represent geometric constraints? Though the CC and MLO views have standard camera pose, the exact geometric correspondence is not well-defined due to tissue deformation under pressure and lack of visual cues. We hereby model the geometric correspondence using masses as visual cues. Each edge in the geometric graph represents the correlation of the linked nodes that denote the same mass instance from different views. To approximate the correlation, for each mass, if the node is the closest to the center of the bounding box, it will be selected to represent this mass. Then we link the nodes that represent the same mass instance from different views (e.g. 4 th node in CC view and 3 th node in MLO view in Figure 3). + +We take two steps to obtain the geometric graph. Firstly, we obtain a frequent statistics matrix $\epsilon \in \mathbb{R}^{|\mathcal{V}| \times |\mathcal{U}|}$ based on the annotated masses in the training set by calculating occurrences of cross-view node pairs representing the same mass instances. Then, we perform a column-row normalization method [57] to obtain $\mathcal{E}^g$ . + +# 3.3.2 Semantic Relation Learning + +The geometric graph provides global geometric prior correlations. However, it is not precise enough to find exact correspondence pairs across views. Thus, noises can be involved in the reasoning procedure. The semantic graph is designed to learn the semantic relation between nodes, and can help filter the noisy relations. + +How to define semantic similarities between nodes? An intuitive idea is to measure by inner product or cosine distance [3, 53]. However, relations between nodes that represent backgrounds are unknown, and may enhance background representations. Thus we release the weights, and + +allow the module to learn its own similarity: + +$$ +\mathcal {E} _ {i j} ^ {s} = \sigma \left(\left[ \left(X _ {i} ^ {C C}\right) ^ {T}, \left(X _ {j} ^ {M L O}\right) ^ {T} \right] w _ {s}\right), \tag {8} +$$ + +where $X_{i}^{CC}, X_{j}^{MLO} \in \mathbb{R}^{C}$ represent i th and j th node features of CC and MLO views respectively, $w_{s} \in \mathbb{R}^{2C}$ indicates the fusion parameter, and $\sigma$ means the sigmoid activation function. + +# 3.4. Correspondence Reasoning Enhancement + +Correspondence reasoning enhancement, based on the defined bipartite graph $\mathcal{G}$ , is designed to fully take the advantage of cross-view reasoning procedure for customized feature enhancement. There are three major steps. Firstly, we augment bipartite graph convolution to adapt to the modern graph convolutional manner. Then map node representations to spatial domain reversely, which enables spatial feature aware of the correspondences. Last, we concatenate with the original features to enhance the representations. + +Bipartite Graph Convolution To adapt to the manner of modern graph convolutional network [16, 26], we first give the augmented form of the bipartite graph: + +$$ +\hat {X} = \left[ \left(X ^ {C C}\right) ^ {T}, \left(X ^ {M L O}\right) ^ {T} \right] ^ {T}, \tag {9} +$$ + +$$ +\hat {\mathcal {E}} = \left( \begin{array}{c c} \mathbf {0} & \mathcal {E} \\ \mathcal {E} ^ {T} & \mathbf {0} \end{array} \right), \tag {10} +$$ + +where $\hat{X} \in \mathbb{R}^{|\mathcal{V} \cup \mathcal{U}| \times C}, \hat{\mathcal{E}} \in \mathbb{R}^{|\mathcal{V} \cup \mathcal{U}| \times |\mathcal{V} \cup \mathcal{U}|}$ indicate the augmented form of bipartite nodes and edges respectively. + +We adopt similar fashion [16] to define graph convolution. An iteration of graph convolution layer with convolution parameters $W_{g} \in \mathbb{R}^{C \times D}$ is formulated in Equation 11. Intuitively, we can stack multiple graph convolutional layers in graph convolutional network. + +$$ +Z = \sigma \left(\hat {\mathcal {E}} \hat {X} W _ {g}\right) \tag {11} +$$ + +kNN Reverse Mapping. To enhance spatial features, we build a kNN reverse mapping function $\psi_{k}$ to project graph node features to the spatial domain. The mapping follows similar design principles as the kNN forward mapping and keeps the same number $(k)$ of nearest neighbors. + +Formally, $\psi_{k}$ is formulated as: + +$$ +\psi_ {k} (Z, \mathcal {N} _ {e}) = Q ^ {r} [ Z ] _ {e}, \tag {12} +$$ + +$$ +Q ^ {r} = \left(\Lambda^ {r}\right) ^ {- 1} A, \tag {13} +$$ + +where $\mathcal{N}_e\in \{\mathcal{V},\mathcal{U}\}$ represents the unipartite node set from the examined view, $A\in \mathbb{R}^{HW\times |\mathcal{N}|}$ follows the similar definition of the Equation 4, $[\cdot ]_e$ indicates an indexing operator which selects nodes in the examined view from all bipartite nodes, $\Lambda^r\in \mathbb{R}^{HW\times HW}$ is a diagonal matrix, $\Lambda_{ii}^{r} = \sum_{j = 1}^{|\mathcal{N}|}A_{ij}$ , and $Q^{r}\in \mathbb{R}^{HW\times |\mathcal{N}|}$ is the reverse mapping matrix which is the normalized form of $A$ . + +Table 1. Performance on DDSM dataset(%) + +
MethodR@t
Campanini et at. [4]80@1.1
Eltonsy et at. [13]92@5.4, 88@2.4, 81@0.6
Sampat et at. [45]88@2.7, 85@1.5, 80@1.0
Faster RCNN [32]85@2.1, 75@1.8, 73@1.2
CVR-RCNN [32]92@4.4, 88@1.9, 85@1.2
BG-RCNN95@4.4, 92@1.9, 89@1.2
+ +Table 2. Performance on DDSM dataset(%) + +
MethodR@0.5R@1.0R@2.0R@3.0R@4.0
Faster RCNN, FPN75.381.587.389.891.4
Faster RCNN, FPN, DCN75.782.588.490.191.4
Mask RCNN, FPN76.082.588.790.891.4
Mask RCNN, FPN, DCN76.783.989.491.491.8
BG-RCNN79.586.691.892.594.5
+ +Feature fusion. We finally fuse and obtain the enhanced feature $Y$ , parameterized by $W_{f} \in \mathbb{R}^{D \times (D + C)}$ : + +$$ +\hat {F} = \psi_ {k} (Z, \mathcal {N}) \tag {14} +$$ + +$$ +Y = \left[ F, \hat {F} \right] W _ {f} ^ {T} \tag {15} +$$ + +# 4. Experiments + +# 4.1. Implementation Details + +The mammogram images are first segmented by OTSU [38], and the foreground region is treated as input. We apply hough transform to detect pectoral muscle line and the nipple for pseudo landmark embedding. To avoid over-fitting during training, we conduct several specific augmentation methods (e.g. random flip, random crop, multi-scaling). + +We build the proposed BG-RCNN by integrating BGN into Mask RCNN object detection framework [18]. ResNet50 [19] which is pretrained on ImageNet [44] is taken as a backbone network. Our implementation is based on PyTorch deep learning framework [10]. We adopt SGD with a learning rate 0.02, weight decay $10^{-4}$ , momentum 0.9 and nesterov set True. The whole training procedure takes 30 epochs. As for stacked bipartite graph model, we keep the same number of nearest neighbors $k$ for both $\phi_{k}$ and $\psi_{k}$ for bipartite node mapping and reverse mapping. + +# 4.2. Datasets + +Our experiments are conducted on both a public dataset called DDSM [20] and an in-house dataset. We do not choose other datasets such as INBreast [36], MIAS [51], because the amount of dataset is insufficient. + +DDSM dataset. DDSM dataset contains 2620 mammography cases. For most cases, each contains two views of images for both breasts. As in other approaches [32, 13, 4, 45], + +Table 3. Performance on in-house dataset(%) + +
MethodR@0.5R@1.0R@2.0R@3.0R@4.0
Faster RCNN, FPN82.984.788.089.189.6
Faster RCNN, FPN, DCN83.186.988.789.890.3
Mask RCNN, FPN83.185.989.690.390.7
Mask RCNN, FPN, DCN84.287.890.291.692.1
BG-RCNN87.890.592.893.994.1
+ +we adopt the same method to split training, validation and testing set. There are 512 cases used in the evaluation. + +In-house dataset. We collect an in-house dataset, which contains 3000 cases and 12000 images. Each case contains cross-view images of each breast. The annotations, namely the mask of each breast lesion, are labeled by 3 radiologists with experiences of more than 10 years. When disagreement meets, we take the majority opinion of radiologists. The dataset is randomly divided into training, validation and testing sets by 8:1:1. + +# 4.3. Baselines + +Faster RCNN, FPN. Faster RCNN [42] with Feature Pyramid Network (FPN) [29] is a solid baseline in object detection task. We use ResNet50[19] as the backbone. + +Faster RCNN, FPN, DCN. Deformable Convolution Network (DCN) [9] is used to enhance the transformation modeling capability of convolutional networks. DCN is integrated into baselines to enhance the performance. + +Mask RCNN, FPN. Mask RCNN [18] is a state-of-the-art model on both object detection and instance segmentation. To exploit the mask supervision for localization, we employ Mask RCNN as a baseline. + +Mask RCNN, FPN, DCN. DCN is also integrated into Mask RCNN baselines. + +# 4.4. Comparison with state-of-the-art methods + +We evaluate the performance by recall $(R)$ at $t$ false positive per image (FPI), simplified as $R@t$ , where $t \in \{0.5, 1.0, 2.0, 3.0, 4.0\}$ . + +Table 1 and Table 2 report the experimental performance on DDSM dataset. Results in Table 1 are reported from [4, 13, 45, 32], and baselines in Table 2 are implemented by us. We do not compare with [31], as they do not release the dataset split method. We keep the same FPI and compare the recall with a strong competitor CVR-RCNN[32]. We can conclude that the proposed model outperforms state-of-the-art methods. The same conclusion can be drawn on the in-house dataset from Table 3. To understand how the + +Table 4. Effectiveness of pseudo landmarks on DDSM dataset(%) + +
MethodR@0.5R@1.0R@2.0R@3.0R@4.0
Uniform76.484.690.492.593.2
BG-RCNN79.586.691.892.594.5
+ +Table 5. Effectiveness of node number on DDSM dataset(%) + +
MethodR@0.5R@1.0R@2.0R@3.0R@4.0
V1,U175.783.988.792.193.2
V9,U1379.586.090.492.593.2
V21,U2579.586.691.892.594.5
V42,U4676.085.690.893.594.2
V66,U7178.885.690.192.193.2
+ +proposed model benefits from the correspondence reasoning mechanism, we analyze the cases in Figure 4. We compare the recall when keeping the same FPI. We can see that the proposed method can significantly improve the recall (the 2nd and 3rd row) and localization ability (the 1st row). + +# 4.5. Ablation study + +Ablation of Pseudo Landmarks As shown in Table 4, We first investigate the effectiveness of pseudo landmarks versus uniform grids. We keep the same number of uniform grids and pseudo landmarks. The results have demonstrated that pseudo landmarks are rather more effective than uniform grids. We also investigate how node number affects the performance. “ $\mathcal{V}_i, \mathcal{U}_j$ ” means there are $i$ nodes in CC view and $j$ nodes in MLO view. Specifically, the setting “ $\mathcal{V}_1, \mathcal{U}_1$ ” is equivalent to two-branch Faster RCNN. As shown in Table 5, we choose “ $\mathcal{V}_{21}, \mathcal{U}_{25}$ ” as our final results. + +Ablation of Bipartite Graph Node Mapping. To investigate the effectiveness of bipartite node mapping, we first compare with a simple method, which directly crop a fixed region for graph node representation. We also evaluate how k influences the results. We keep the same k for both $\phi_{k}$ and $\psi_{k}$ . As shown in Table 6, we can see that bipartite graph node mapping is effective and necessary. Meanwhile, when dense nodes embedded, the model works better with larger k, because larger k can abstract more context feature for the node which may lack sufficient context representation. + +Ablation of Bipartite Graph Edge. We analyze the influence of $\mathcal{E}^s$ and $\mathcal{E}^g$ in the bipartite graph edge. It degenerates to naive Mask RCNN when neither $\mathcal{E}^s$ nor $\mathcal{E}^g$ are used, since no information propagates across views. When either $\mathcal{E}^s$ or $\mathcal{E}^g$ is used, we set $\mathcal{E}$ to $\mathcal{E}^s$ or $\mathcal{E}^g$ respectively. As shown in Table 7, either $\mathcal{E}^s$ or $\mathcal{E}^g$ can make an improvement, and combining both parts achieves the best performance. + +# 4.6. Visualization + +Our visualization experiments mainly answer two questions: (1) Where does the bipartite graph focus on auxiliary + +Table 6. Effectiveness of bipartite graph node mapping on DDSM dataset(%) + +
MethodR@0.5R@1.0R@2.0R@3.0R@4.0
V21,U25,crop76.484.290.191.893.2
V21,U25,k=179.886.391.892.594.2
V21,U25,k=279.586.691.892.594.5
V21,U25,k=379.586.387.791.893.5
V66,U71,crop75.384.289.491.892.1
V66,U71,k=177.785.690.191.493.2
V66,U71,k=278.885.690.192.193.2
V66,U71,k=379.186.090.192.193.8
+ +Table 7. Effectiveness of each component in bipartite graph edge on DDSM dataset(%) + +
\( \mathcal{E}^s \)\( \mathcal{E}^g \)R@0.5R@1.0R@2.0R@3.0R@4.0
××76.783.989.491.491.8
×√78.483.991.192.193.8
√×77.786.389.491.893.5
√√79.586.691.892.594.5
+ +view? (2) How does the correspondence reasoning mechanism enhance the feature representations? + +To answer the first question, we design a specialized method for correspondence visualization. The main purpose is to find representative regions of correlated nodes in the auxiliary view when given a query mass in the examined view. We first define a one-hot representative vector $x \in \mathbb{R}^{|\mathcal{V} \cup \mathcal{U}|}$ to represent locations of the mass in the examined area. The index of the node which is nearest to the center of the analyzed mass in the examined image is set to 1. Then visualize the feature by Equation 16, where $o \in \mathbb{R}^{HW}$ represents the response vector, and $[\cdot]_e$ indicates indexing operator which selects nodes in the examined view from bipartite graph nodes. As shown in Figure 4, we can see that the bipartite graph focuses on the mated mass area in the auxiliary view, which helps to learn complementary feature representations. Besides, our model has a clear physical meaning and provides visual cues of mated masses. Thus it can help radiologists in clinical interpretation. + +$$ +o = Q ^ {r} \left[ \hat {\mathcal {E}} x \right] _ {e} \tag {16} +$$ + +To answer the second question, we compare the response map before and after feature enhancement. Specifically, channel-wise max pooling is conducted on $F_{e}$ and $Y$ respectively. As shown in Figure 4, feature response map activates more prominently on mass located area after enhancement. As a result, the corresponding reasoning enhancement method can help to improve the detection performance and make comprehensive and sufficient judgment. + +# 5. Conclusions and Future Work + +In this paper, we introduce the bipartite graph convolutional network to provide customized reasoning ability in + +![](images/394fa96ee474ba5d2d3d4db0eb84ec4da1d837b6e42e28c52071e3bc772e9f16.jpg) + +![](images/a7c2053c37506e6a688df6d59ce26b0794e40cab664f44b77a1b0bfd866ef411.jpg) + +![](images/d79ab7c813c5a448f6e51f51cfa672d17fd5c9488119886f438f8b2c09d715c4.jpg) + +![](images/18689484a563b95c6a2a7e881ca90f06da815eef6e7c6b13ae21cf4ec105b32d.jpg) + +![](images/279c21a64af29e783779eb962e42d6637ec5374111c5a57da53e673a9b2aa8d3.jpg) + +![](images/78a1129fb5488e5c763dbb94dac7cefc366e3af6a450ab4de42d7ad63d8f734f.jpg) + +![](images/d861440174a5ab5ab7d7adb01b1a704076b4899fdce922470b0630d28a396ecb.jpg) + +![](images/16502dfad961d423554a3855e8fc42460e50143b12ed8e978aee0fcf7799c786.jpg) + +![](images/05c1b851da88348b12d78af85ebd051436acb6df1cecb51389551105f120bb4f.jpg) + +![](images/d9db64c6d2ec0928b951c9a640a52cf857c4fbf681637a8dc3aa31b2463f1b0b.jpg) + +![](images/0f181dcd4e8ac279d737409c7103b9bf6bec7baf8a5a89103b5331e7681adb37.jpg) + +![](images/82db745d5bd1c263645a8ba34056d2b1ae79ae36687f0f7bdf7aafd120797a72.jpg) + +![](images/038d2563f6fbeb97170de7e04aa8747e0d9e2c4913ff323d18d3ca07b36f90b4.jpg) + +![](images/37c167b8908c5dc7b31bdad5601911dbc1b650027d64c6146142b6d3a0cde129.jpg) + +![](images/8edac70800f1f74f6f9476444601f1ed266c28742dd16264e06d92c19ade63db.jpg) +(a) + +![](images/48f5771aafb985bce6b96b9db0e9583d140da537614548bc9f4861acf83aa527.jpg) +(b) + +![](images/24cd4df48b8b88922ad4ab0d93036335af5b602d929712cff3f40d728d4a1437.jpg) +(c) + +![](images/091244ee66623100c524aa5705b7bc8d5ef2f767a35a469a945958974193bda9.jpg) +(d) + +![](images/ab1e993bc8d28db39a80a713d6ea2cc19dc695f0b2c722816dd9e7416281ead8.jpg) +(e) + +![](images/f831f3543b318e35eed275709eb97f7d9355d599ec8cd76d5b2b0193d33f4a44.jpg) +(f) +Figure 4. Detection results of BG-RCNN. Each row shows a representative case. Column (a)-(b) refer to the examined image and its auxiliary view image with annotations. Column (c)-(d) indicate detection results by Mask-RCNN and BG-RCNN. Column (e) visualizes the attention area on the auxiliary view. Column (f)-(g) visualize the response maps before and after correspondence visual reasoning. + +![](images/b3d40194d42199653ca1f3d7ec127e300710987100587d40c0ff8d8d48b8e0bc.jpg) +(g) + +mammogram mass detection. To model the cross-view reasoning procedure, bipartite graph nodes induced by pseudo landmarks are constructed from cross-view images respectively, which are able to represent the relatively consistent regions. Then bipartite graph edge learns both cross-view inherent geometric constraints and semantic relations. Finally, in correspondence reasoning enhancement, information propagates on the bipartite graph and it enables spatial visual features aware of cross-view correspondences. Thus feature representations are enhanced. Experiments on both public and in-house datasets demonstrate that the proposed method achieves state-of-the-art performance. Besides, visual analysis shows that the proposed model has a clear physical meaning, which is helpful to radiologists in clin + +ical interpretation. + +Future work will include: (1) exploring learnable forms of pseudo landmarks; (2) integrating bilateral (same view of left and right breasts) domain knowledge to the model; (3) exploiting more powerful graph mechanisms to facilitate information propagation. + +# Acknowledgment + +This work was supported in part by Zhejiang Province Key Research Development Program (No. 2020C03073), MOST-2018AAA0102004, NSFC-61625201, 61527804, DFG TRR169 / NSFC Major International Collaboration Project "Crossmodal Learning". We would like to thank Shu Zhang and Yuchun Chen for valuable discussions. + +# References + +[1] Jon Almazán, Albert Gordo, Alicia Fornés, and Ernest Valveny. Word spotting and recognition with embedded attributes. IEEE transactions on pattern analysis and machine intelligence, 36(12):2552-2566, 2014. 2 +[2] Franz Aurenhammer and Rolf Klein. Voronoi diagrams. Handbook of computational geometry, 5(10):201-290, 2000. 4 +[3] Antoni Buades, Bartomeu Coll, and J-M Morel. A non-local algorithm for image denoising. In 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05), volume 2, pages 60-65. IEEE, 2005. 5 +[4] Renato Campanini, Danilo Dongiovanni, Emiro Iampieri, Nico Lanconelli, Matteo Masotti, Giuseppe Palermo, Alessandro Riccardi, and Matteo Roffilli. A novel featureless approach to mass detection in digital mammograms based on support vector machines. Physics in Medicine & Biology, 49(6):961, 2004. 6 +[5] Zhenjie Cao, Zhicheng Yang, Xiaoyan Zhuo, Ruei-Sung Lin, Shibin Wu, Lingyun Huang, Mei Han, Yanbo Zhang, and Jie Ma. Deep learning based lesion identification in mammograms. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 0-0, 2019. 2 +[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, 3 +[7] Xiaozhi Chen, Kaustav Kundu, Yukun Zhu, Huimin Ma, Sanja Fidler, and Raquel Urtasun. 3d object proposals using stereo imagery for accurate object class detection. IEEE transactions on pattern analysis and machine intelligence, 40(5):1259-1272, 2017. 2, 3 +[8] Xinlei Chen, Li-Jia Li, Li Fei-Fei, and Abhinav Gupta. Iterative visual reasoning beyond convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7239–7248, 2018. 2 +[9] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In Proceedings of the IEEE international conference on computer vision, pages 764-773, 2017. 6 +[10] Neeraj Dhungel, Gustavo Carneiro, and Andrew P Bradley. Automated mass detection in mammograms using cascaded deep learning and random forests. In 2015 international conference on digital image computing: techniques and applications (DICTA), pages 1-8. IEEE, 2015. 2, 6 +[11] João Otávio Bandeira Diniz, Pedro Henrique Bandeira Diniz, Thales Levi Azevedo Valente, Aristófanes Corrêa Silva, Anselmo Cardoso de Paiva, and Marcelo Gattass. Detection of mass regions in mammograms by bilateral analysis adapted to breast density using similarity indexes and convolutional neural networks. Computer methods and programs in biomedicine, 156:191-207, 2018. 2 +[12] I. L. Dryden and K. V. Mardia. Statistical Shape Analysis, with Applications in R. Second Edition. John Wiley and Sons, Chichester, 2016. 4 +[13] Nevine H Eltonsy, Georgia D Tourassi, and Adel S Elmaghraby. A concentric morphology model for the detection + +of masses in mammography. IEEE transactions on medical imaging, 26(6):880-889, 2007. 6 +[14] Yifan Feng, Zizhao Zhang, Xibin Zhao, Rongrong Ji, and Yue Gao. GvCNN: Group-view convolutional neural networks for 3d shape recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 264-272, 2018. 2 +[15] 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. 2 +[16] Junyu Gao, Tianzhu Zhang, and Changsheng Xu. Graph convolutional tracking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4649-4659, 2019. 2, 4, 5 +[17] Zhihui Guo, Ling Zhang, Le Lu, Mohammadhadi Bagheri, Ronald M Summers, Milan Sonka, and Jianhua Yao. Deep logismos: Deep learning graph-based 3d segmentation of pancreatic tumors on ct scans. In 2018 IEEE 15th International Symposium on Biomedical Imaging (ISBI 2018), pages 1230-1233. IEEE, 2018. 2 +[18] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. 1, 6 +[19] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. 6 +[20] Michael Heath, Kevin Bowyer, Daniel Kopans, Richard Moore, and W Philip Kegelmeyer. The digital database for screening mammography. In Proceedings of the 5th international workshop on digital mammography, pages 212-218. Medical Physics Publishing, 2000. 2, 6 +[21] 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, 2 +[22] Chenhan Jiang, Hang Xu, Xiaodan Liang, and Liang Lin. Hybrid knowledge routed modules for large-scale object detection. In Advances in Neural Information Processing Systems, pages 1552-1563, 2018. 2 +[23] Edward Johns, Stefan Leutenegger, and Andrew J Davison. Pairwise decomposition of image sequences for active multiview recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3813-3822, 2016. 2 +[24] Hwejin Jung, Bumsoo Kim, Inyeop Lee, Minhwan Yoo, Junhyun Lee, Sooyoun Ham, Okhee Woo, and Jaewoo Kang. Detection of masses in mammograms using a one-stage object detector based on a deep convolutional neural network. PloS one, 13(9):e0203355, 2018. 2 +[25] Abhishek Kar, Christian Häne, and Jitendra Malik. Learning a multi-view stereo machine. In Advances in neural information processing systems, pages 365-376, 2017. 2 + +[26] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016. 5 +[27] Christoph H Lampert, Hannes Nickisch, and Stefan Harmeling. Learning to detect unseen object classes by between-class attribute transfer. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 951-958. IEEE, 2009. 2 +[28] Yin Li and Abhinav Gupta. Beyond grids: Learning graph representations for visual recognition. In Advances in Neural Information Processing Systems, pages 9225-9235, 2018. 2 +[29] 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. 6 +[30] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In Proceedings of the IEEE international conference on computer vision, pages 2980-2988, 2017. 2 +[31] Yuhang Liu, Zhen Zhou, Shu Zhang, Ling Luo, Qianyi Zhang, Fandong Zhang, Xiuli Li, Yizhou Wang, and Yizhou Yu. From unilateral to bilateral learning: Detecting mammogram masses with contrasted bilateral network. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 477-485. Springer, 2019. 2, 6 +[32] Jiechao Ma, Sen Liang, Xiang Li, Hongwei Li, Bjoern H Menze, Rongguo Zhang, and Wei-Shi Zheng. Cross-view relation networks for mammogram mass detection. arXiv preprint arXiv:1907.00528, 2019. 1, 2, 6 +[33] Junhua Mao, Xu Wei, Yi Yang, Jiang Wang, Zhiheng Huang, and Alan L Yuille. Learning like a child: Fast novel visual concept learning from sentence descriptions of images. In Proceedings of the IEEE international conference on computer vision, pages 2533-2541, 2015. 2 +[34] Kenneth Marino, Ruslan Salakhutdinov, and Abhinav Gupta. The more you know: Using knowledge graphs for image classification. arXiv preprint arXiv:1612.04844, 2016. 2 +[35] Ishan Misra, Abhinav Gupta, and Martial Hebert. From red wine to red tomato: Composition with context. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1792-1801, 2017. 2 +[36] Inês C Moreira, Igor Amaral, Inês Domingues, António Cardoso, Maria Joao Cardoso, and Jaime S Cardoso. Inbreast: toward a full-field digital mammographic database. Academic radiology, 19(2):236-248, 2012. 6 +[37] Naga R Mudigonda, Rangaraj M Rangayyan, and JE Leo Desautels. Detection of breast masses in mammograms by density slicing and texture flow-field analysis. IEEE Transactions on Medical Imaging, 20(12):1215-1227, 2001. 2 +[38] N. Otsu. A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics, 9(1):62-66, Jan 1979. 6 +[39] 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 Pro + +ceedings of the IEEE conference on computer vision and pattern recognition, pages 5648-5656, 2016. 2 +[40] Henri Rebecq, Guillermo Gallego, Elias Mueggler, and Davide Scaramuzza. Emvs: Event-based multi-view stereo—3d reconstruction with an event camera in real-time. International Journal of Computer Vision, 126(12):1394–1414, 2018. 2, 3 +[41] 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. 2 +[42] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91-99, 2015. 1, 2, 6 +[43] Dezső Ribli, Anna Horváth, Zsuzsa Unger, Péter Pollner, and István Csabai. Detecting and classifying lesions in mammograms with deep learning. Scientific reports, 8(1):4165, 2018. 2 +[44] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, and Michael Bernstein. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211-252. 6 +[45] Mehul P Sampat, Alan C Bovik, Gary J Whitman, and Mia K Markey. A model-based framework for the detection of spiculated masses on mammography a. Medical physics, 35(5):2110-2123, 2008. 6 +[46] Mehul P Sampat, Mia K Markey, Alan C Bovik, et al. Computer-aided detection and diagnosis in mammography. Handbook of image and video processing, 2(1):1195–1217, 2005. 1, 3 +[47] Thomas Schops, 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3260-3269, 2017. 2, 3 +[48] Edward A Sickles. Breast cancer screening outcomes in women ages 40-49: clinical experience with service screening using modern mammography. JNCI Monographs, 1997(22):99-104, 1997. 1 +[49] Rebecca Siegel, Jiemin Ma, Zhaohui Zou, and Ahmedin Jemal. Cancer statistics, 2014. CA: a cancer journal for clinicians, 64(1):9-29, 2014. 1 +[50] Hang Su, Subhransu Maji, Evangelos Kalogerakis, and Erik Learned-Miller. Multi-view convolutional neural networks for 3d shape recognition. In Proceedings of the IEEE international conference on computer vision, pages 945-953, 2015. 2 +[51] P SUCKLING J. The mammographic image analysis society digital mammogram database. Digital Mammo, pages 375-386, 1994. 6 +[52] Shen-Chuan Tai, Zih-Siou Chen, and Wei-Ting Tsai. An automatic mass detection system in mammograms based on complex texture features. IEEE journal of biomedical and health informatics, 18(2):618-627, 2014. 2 + +[53] Carlo Tomasi and Roberto Manduchi. Bilateral filtering for gray and color images. In Iccv, volume 98, page 2, 1998. 5 +[54] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. 1 +[55] Nan Wu, Jason Phang, Jungkyu Park, Yiqiu Shen, Zhe Huang, Masha Zorin, Stanisław Jastrzebski, Thibault Févry, Joe Katsnelson, Eric Kim, et al. Deep neural networks improve radiologists' performance in breast cancer screening. 2019. 2 +[56] Hang Xu, Chenhan Jiang, Xiaodan Liang, and Zhenguo Li. Spatial-aware graph relation network for large-scale object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9298-9307, 2019. 2 +[57] Hang Xu, ChenHan Jiang, Xiaodan Liang, Liang Lin, and Zhenguo Li. Reasoning-rcnn: Unifying adaptive global reasoning into large-scale object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6419–6428, 2019. 2, 5 +[58] Zhoubing Xu, Yuankai Huo, JinHyeong Park, Bennett Landman, Andy Milkowski, Sasa Grbic, and Shaohua Zhou. Less is more: Simultaneous view classification and landmark detection for abdominal ultrasound images. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 711-719. Springer, 2018. 2 +[59] Ze Yang, Shaohui Liu, Han Hu, Liwei Wang, and Stephen Lin. Repoints: Point set representation for object detection. arXiv preprint arXiv:1904.11490, 2019. 1 +[60] Ze Yang and Liwei Wang. Learning relationships for multiview 3d object recognition. In Proceedings of the IEEE International Conference on Computer Vision, pages 7505-7514, 2019. 2 +[61] Fandong Zhang, Ling Luo, Xinwei Sun, Zhen Zhou, Xiuli Li, Yizhou Yu, and Yizhou Wang. Cascaded generative and discriminative learning for microcalcification detection in breast mammograms. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12578-12586, 2019. 2 +[62] Jie Zhou, Ganqu Cui, Zhengyan Zhang, Cheng Yang, Zhiyuan Liu, and Maosong Sun. Graph neural networks: A review of methods and applications. arXiv preprint arXiv:1812.08434, 2018. 2 \ No newline at end of file diff --git a/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/images.zip b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9c75f01fc2cd8cd8fca3164983d9f7d48a29a699 --- /dev/null +++ b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e37367281cfdad03f9c14d75b415e960aef2661be30bbdb78376a6298fc0a940 +size 565791 diff --git a/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/layout.json b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a5f29e078b0f64b86d44b97f4ee75fe78ce8dfd4 --- /dev/null +++ b/crossviewcorrespondencereasoningbasedonbipartitegraphconvolutionalnetworkformammogrammassdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6cd004e80f174b6db4bc834a5dcba0f3ab2118023b2e5534a49eac64165e52c8 +size 473837 diff --git a/crossviewtrackingformultihuman3dposeestimationatover100fps/38b509d9-7734-437c-9274-45e7c01d3659_content_list.json b/crossviewtrackingformultihuman3dposeestimationatover100fps/38b509d9-7734-437c-9274-45e7c01d3659_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8d837097653bf6e64268ac65081b4b1798465a84 --- /dev/null +++ b/crossviewtrackingformultihuman3dposeestimationatover100fps/38b509d9-7734-437c-9274-45e7c01d3659_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e11dbeac6ef1316db4129acbe008ba60e7af1dc3441715f0cbd15fc5140b69e +size 76092 diff --git a/crossviewtrackingformultihuman3dposeestimationatover100fps/38b509d9-7734-437c-9274-45e7c01d3659_model.json b/crossviewtrackingformultihuman3dposeestimationatover100fps/38b509d9-7734-437c-9274-45e7c01d3659_model.json new file mode 100644 index 0000000000000000000000000000000000000000..78a2a1357b008ee0573ec34bd4990b83d5c4c210 --- /dev/null +++ b/crossviewtrackingformultihuman3dposeestimationatover100fps/38b509d9-7734-437c-9274-45e7c01d3659_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48e447db23153170240f29ba5448f835696c3112b1778b70da16df86161701eb +size 90487 diff --git a/crossviewtrackingformultihuman3dposeestimationatover100fps/38b509d9-7734-437c-9274-45e7c01d3659_origin.pdf b/crossviewtrackingformultihuman3dposeestimationatover100fps/38b509d9-7734-437c-9274-45e7c01d3659_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a505be19020c74eee6888a676c3c6e6992cf86c4 --- /dev/null +++ b/crossviewtrackingformultihuman3dposeestimationatover100fps/38b509d9-7734-437c-9274-45e7c01d3659_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2232b38ae230268b07ecc038c0ae33d2314641bf136cb0d52e20a7b25d4de20 +size 1451102 diff --git a/crossviewtrackingformultihuman3dposeestimationatover100fps/full.md b/crossviewtrackingformultihuman3dposeestimationatover100fps/full.md new file mode 100644 index 0000000000000000000000000000000000000000..dfa199097d204804576774bb816763519813027e --- /dev/null +++ b/crossviewtrackingformultihuman3dposeestimationatover100fps/full.md @@ -0,0 +1,316 @@ +# Cross-View Tracking for Multi-Human 3D Pose Estimation at over 100 FPS + +Long Chen $^{1}$ Haizhou Ai $^{1}$ Rui Chen $^{1}$ Zijie Zhuang $^{1}$ Shuang Liu $^{2}$ $^{1}$ Department of Computer Science and Technology, Tsinghua University $^{2}$ AiFi Inc. + +# Abstract + +Estimating 3D poses of multiple humans in real-time is a classic but still challenging task in computer vision. Its major difficulty lies in the ambiguity in cross-view association of 2D poses and the huge state space when there are multiple people in multiple views. In this paper, we present a novel solution for multi-human 3D pose estimation from multiple calibrated camera views. It takes 2D poses in different camera coordinates as inputs and aims for the accurate 3D poses in the global coordinate. Unlike previous methods that associate 2D poses among all pairs of views from scratch at every frame, we exploit the temporal consistency in videos to match the 2D inputs with 3D poses directly in 3-space. More specifically, we propose to retain the 3D pose for each person and update them iteratively via the cross-view multi-human tracking. This novel formulation improves both accuracy and efficiency, as we demonstrated on widely-used public datasets. To further verify the scalability of our method, we propose a new large-scale multi-human dataset with 12 to 28 camera views. Without bells and whistles, our solution achieves 154 FPS on 12 cameras and 34 FPS on 28 cameras, indicating its ability to handle large-scale real-world applications. The proposed dataset will be released at https://github.com/longcw/crossview_3dPose_tracking. + +# 1. Introduction + +Multi-human 3D pose estimation from videos has a wide range of applications, including action recognition, sports analysis, and human-computer interaction. With the rapid development of deep neural network, most of the recent efforts in this area have been devoted to monocular 3D pose estimation [25, 26]. However, despite much progress, the single-camera setting is still far from being resolved due to the large variations of human poses and partial occlusion in the monocular views. A natural solution for these problems is to recover the 3D poses from multiple camera views. + +Recent multi-view approaches generally employ the de + +tected 2D body joints from multiple views as inputs with the advance of 2D human pose estimation [9, 11, 35], and address the 3D pose estimation in a two-step formulation [2, 13]. Specifically, the 2D joints of the same person are first matched and associated across views, the 3D location of each joint is subsequently determined by a multi-view reconstruction method. In this formulation, the challenge comes from three parts: 1) the detected 2D joints are noisy and inaccurate since the pose estimation is imperfect; 2) the cross-view association is ambiguous when multiple people interacting with each other in crowded scenes; 3) the computational complexity explodes as the number of people and number of cameras increase. + +To tackle the problem of cross-view association, 3D pictorial structure model (3DPS) is widely used in some previous methods [2, 8], where the 3D poses are recovered from 2D joints in a discretized 3-space. In this formulation, the likelihood of a joint belonging to a spatial bin is given by the geometric consistency [16], along with a pre-defined body structure model. A severe problem of 3DPS is the expensive computational cost due to the huge state space with multiple people in multiple views. As an improvement, Dong et al. [13] propose solving the cross-view association problem at the body level in advance before applying 3DPS. They associate 2D poses of the same person from different views as clusters and estimate 3D poses from the clusters via 3DPS. Nevertheless, matching 2D poses between all pairs of views still makes the computational complexity explode as the number of cameras increases. + +In contrast to previous methods that process inputs from multiple cameras simultaneously, we propose a new solution with an iterative processing strategy. Specifically, we propose exploiting the temporal consistency in videos to match 2D poses of each view with 3D poses directly in 3-space, where the 3D poses are retained and updated iteratively by the cross-view multi-human tracking. There are two advantages in our formulation. Firstly, for the accuracy, matching in 3-space is expected to be robust to partial occlusion and inaccurate 2D localization, as the 3D poses consist of multi-view information. Secondly, for the efficiency, processing camera views iteratively makes the + +computational complexity varies only linearly as the number of cameras changes, enabling the applications on largescale camera systems. To verify the effectiveness, we compare our method with state-of-the-art approaches on several widely-used public datasets, and moreover, we test it on a self-collected dataset with more than 12 cameras, as shown in Figure 1. With the proposed solution, we are able to estimate 3D poses accurately in 12 cameras at over 100 FPS. + +Below, we review related work in multi-human 3D pose estimation and multi-view tracking, and then we present the details of our new approach, which contains an efficient geometric affinity measurement for tracking in 3-space, along with a novel 3D reconstruction algorithm that designed for iterative processing in videos. In the experimental section, we perform the evaluation on three public datasets: Campus [2], Shelf [2], and CMU Panoptic [18], demonstrating both state-of-the-art accuracy and efficiency of our method. We also propose a new dataset that collected from large-scale camera systems, to verify the scalability of our method for real-world applications as the number of cameras increases. + +# 2. Related work + +Multi-human 3D pose estimation. The problem of 3D human pose estimation has been studied from monocular [26, 1, 21, 25, 12] and multi-view perspectives [8, 4, 13, 32]. + +Most of the existing monocular solutions are designed for the single-person cases [28, 21, 12], where the estimated poses are relatively centered around the pelvis joint, and the absolute locations in the environment are unknown. Such a relative coordinate setting limits the application of these methods in surveillance scenarios. + +To estimate multiple 3D poses from a monocular view, Mehta et al. [22] use the location-maps [23] to infer 3D joint positions at the respective 2D joint pixel locations. Moon et al. [25] propose a root localization network to estimate the camera-centered coordinates of the human roots. Despite lots of recent progress in this area, the task of monocular 3D pose estimation is inherently ambiguous as multiple 3D poses can map to the same 2D joints. The mapping result, unfortunately, often has a large deviation in practice, especially when occlusion or motion blur occurs in images. + +On the other hand, multi-camera systems are becoming progressively available in the context of various applications such as sport analysis and video surveillance. Given images from multiple camera views, most previous methods [27, 29, 8, 2] are generally based on the 3D Pictorial Structure model (3DPS) [8], which discretizes the 3-space by an $N \times N \times N$ grid and assigns each joint to one of the $N^3$ bins (hypothesis). The cross-view association and reconstruction are solved by minimizing the geometric error [16] between the estimated 3D poses and 2D inputs among all the hypotheses. Considering all joints of multiple people in all cameras simultaneously, these methods are generally com- + +![](images/6440e0cf2be8ad157da538edd87b54e294c342605bd72f53c1978b5d9180cb95.jpg) +Figure 1: Multi-human multi-view 3D pose estimation. The triangles in the 3D view represent camera locations. + +putational expensive due to the huge state space. Recent work from Dong et al. [13] propose to solve the cross-view association problem at the body level first. 3DPS is subsequently applied to each cluster of the 2D poses of the same person from different views. The state space is therefore reduced as each person is processed individually. Nevertheless, the computational cost of cross-view association of this method is still too high to achieve the real-time speed. + +Multi-view tracking for 3D pose estimation. Multi-view tracking for 3D pose estimation is not a new topic in computer vision. However, it is still nontrivial to combine these two tasks for fast and robust multi-human 3D pose estimation, as facing the challenges mentioned above. + +Markerless motion capture, aiming at 3D motion capturing for a single person, has been studied for a decade [33, 14, 34]. Tracking in these early works is developed for joint localization and motion estimation. As the recent progress in deep neural network, temporal information is also investigated with the recurrent neural network [30, 20] or convolutional neural network [28] for single-view 3D pose estimation. However, these approaches are generally designed for well-aligned single person cases, where the critical cross-view association problem is neglected. + +As for the multi-human case, Belagiannis et al. [4] propose employing cross-view tracking results to assist 3D pose estimation under the framework of 3DPS. It introduces the temporal consistency from an off-the-shelf cross-view tracker [5] to reduce the state space of 3DPS. This approach separates tracking and pose estimation into two tasks and + +runs at 1 fps, which is far from being applied to the time-critical applications. There is also a very recent tracking approach [7] that uses the estimated 3D poses as inputs of the tracker to improve the tracking quality, while the pose estimation is rarely benefited from the tracking results. Tang et al. [32] propose to jointly perform multi-view 2D tracking and pose estimation for 3D scene reconstruction. The 2D detections are associated using a ground plane assumption, which is efficient but limits the accuracy. In contrast, we couple cross-view tracking and multi-human 3D pose estimation in a unified framework, making these two tasks benefit from each other for both accuracy and efficiency. + +# 3. Method + +In this section, we first give an overview of our framework with iterative processing, then we detail the two components of our framework, that is, cross-view tracking in 3-space with geometric affinity measurement and incremental 3D pose reconstruction in videos. + +# 3.1. Iterative processing for 3D pose estimation + +Given an unknown number of people interacting with each other in the scene covered by multiple calibrated cameras, our approach takes the detected 2D body joints as inputs. We aim at estimating the 3D locations of a fixed set of body joints for each person in the scene. Particularly, our approach differs from previous methods in the way they process frames from different cameras. In contrast to taking all camera views at a time in a batch mode, here we assume each camera streams frames independently, where the frames are collected in chronological order and fed into the framework one-by-one iteratively. + +With iterative processing, the overall computational cost increases only linearly as the number of cameras increases, and the strict synchronization between cameras is no longer required, making the solution have the potential to be applied to large-scale camera systems. Such a modification is straightforward, but not that easy to achieve, as the cross-view association is generally ambiguous, especially when only one view is observed at one time. Another challenge, in this case, is to reconstruct 3D poses from different cameras when these cameras are not strictly synchronized. + +To solve the problems, we construct our framework from two components: 1) cross-view tracking for body joint association, and 2) incremental 3D pose reconstruction for unsynchronized frames. Given a frame from a particular camera, the task of tracking is to associate the detected 2D human bodies with tracked targets. Here, we represent the targets in 3-space using historically estimated 3D poses. The cross-view association is therefore performed between 2D joints and 3D poses in 3-space, as detailed in Section 3.2. Subsequently, based on the association results, each 2D human body is assigned to a target or labeled as unmatched. + +The 3D pose of each target is incrementally updated when combining the newly observed and previously retained 2D joints. Since these joints are from different times, conventional reconstruction method such as triangulation [16] is prone to inaccurate 3D locations. To deal with the unsynchronized frames, we present our incremental triangulation algorithm in Section 3.3. + +# 3.2. Cross-view tracking with geometric affinity + +In multi-view geometry, reconstructing the location of a point in 3-space requires knowing the 2D locations of the point in at least two views. Thus in our case, in order to estimate the 3D poses, we have to associate the detected 2D joints across views first. Similar to [13], we associate the joints at the body level, but not just across views, also across times. This forms the cross-view tracking problem, as discussed in this section. + +Problem statement. We retain historical states of persons in the scene as tracked targets, the problem becomes associating these targets with the newly detected human bodies, while the detections come from a different camera in every iteration. Here, we begin with some notations and definitions. We use $\mathbf{x} \in \mathbb{R}^2$ to represent 2D point in camera coordinate, and $\mathbf{X} \in \mathbb{R}^3$ for 3D point in global coordinate. For a frame from camera $c$ at time $t$ , a detected human body $D$ is denoted as 2D points $\mathbf{x}_{t,c}^{k}$ of a fixed set of human joints with indices $k \in \{1, \dots, K\}$ . Meanwhile, a target $T$ is represented in 3-space using points $\mathbf{X}_{t'}^{k} \in \mathbb{R}^{3}$ of the same set of human joints, where $t'$ stands for the last updated time of the joint. The historical 2D joints are also retained in the corresponding targets. + +Then, supposing there are $M$ detections $\{D_{i,t,c}|i = 1,\dots,M\}$ in the new frame, we need to associate these detections to the last $N$ tracked targets $\{T_{i,t'}|i = 1,\dots,N\}$ , and afterwards update the 3D locations of targets based on the matching results. Technically, this is a weighted bipartite graph matching problem, where the graph is determined by the affinity matrix $\mathbf{A} \in \mathbb{R}^{N \times M}$ between targets and detections. Once the graph is determined, the problem can be solved efficiently with the Hungarian algorithm [19]. Therefore, our major challenge is to measure the affinity of each pair of targets and detections accurately and efficiently. + +Affinity measurement. Given a pair of target and detection $\langle T_{t'}, D_{t,c} \rangle$ , the affinity is measured from both 2D and 3D geometric correspondences: + +$$ +A \left(T _ {t ^ {\prime}}, D _ {t, c}\right) = \sum_ {k = 1} ^ {K} A _ {2 D} \left(\mathbf {x} _ {t ^ {\prime \prime}, c} ^ {k}, \mathbf {x} _ {t, c} ^ {k}\right) + A _ {3 D} \left(\mathbf {X} _ {t ^ {\prime}} ^ {k}, \mathbf {x} _ {t, c} ^ {k}\right), \tag {1} +$$ + +where $\mathbf{x}_{t^{\prime \prime},c}^{k}$ is the last matched joint $k$ of the target from camera $c$ . For each type of human joints the correspondence is computed independently, thus we omit the index $k$ in the following discussion for notation simplicity. + +As shown in Figure 2a, the 2D correspondence is computed based on the distance of detected joint $\mathbf{x}_{t,c}$ and previously retained joint $\mathbf{x}_{t^{\prime \prime},c}$ in the camera coordinate: + +$$ +A _ {2 D} \left(\mathbf {x} _ {t ^ {\prime \prime}, c}, \mathbf {x} _ {t, c}\right) = w _ {2 D} \left(1 - \frac {\left\| \mathbf {x} _ {t , c} - \mathbf {x} _ {t ^ {\prime \prime} , c} \right\|}{\alpha_ {2 D} \left(t - t ^ {\prime \prime}\right)}\right) \cdot e ^ {- \lambda_ {a} \left(t - t ^ {\prime \prime}\right)}. \tag {2} +$$ + +There are three hyper-parameters $w_{2D}$ , $\alpha_{2D}$ , and $\lambda_{a}$ , standing for the weight of 2D correspondence, threshold of 2D velocity, and the penalty rate of time interval, respectively. Note that $t > t''$ since frames are processed in chronological order. $A_{2D} > 0$ indicates these two joints may come from the same person, and vice versa. The magnitude represents the confidence of the indication, which decreases exponentially as the time interval increases. + +2D correspondence is the most basic affinity measurement that exploited by single-view tracking methods. In order to track people across views, a 3D correspondence is introduced, as illustrated in Figure 2b. We suppose that cameras are well calibrated and the projection matrix of camera $c$ is provided as $\mathrm{P}_c\in \mathbb{R}^{3\times 4}$ . We first back-project the detected 2D point $\mathbf{x}_{t,c}$ into 3-space as a ray: + +$$ +\tilde {\mathbf {X}} _ {t} (\mu ; \mathbf {x} _ {t, c}) = \mathrm {P} _ {c} ^ {+} \tilde {\mathbf {x}} _ {t, c} + \mu \tilde {\mathbf {X}} _ {c}, \tag {3} +$$ + +where $\mathrm{P}_c^+ \in \mathbb{R}^{4 \times 3}$ is the pseudo-inverse of $\mathrm{P}_c$ and $\mathbf{X}_c$ is the 3D location of the camera center. The symbol with superscript tilde denotes the corresponding homogeneous coordinate. The 3D correspondence is then defined as: + +$$ +A _ {3 D} \left(\mathbf {X} _ {t ^ {\prime}}, \mathbf {x} _ {t, c}\right) = w _ {3 D} \left(1 - \frac {d _ {l} \left(\hat {\mathbf {X}} _ {t} , \mathbf {X} _ {t} (\mu)\right)}{\alpha_ {3 D}}\right) \cdot e ^ {- \lambda_ {a} (t - t ^ {\prime})}, \tag {4} +$$ + +where $d_{l}(\cdot)$ denotes the point-to-line distance in 3-space and $\alpha_{3D}$ is the threshold of distance. Note that in this formulation, the detected point is compared with a predicted point $\hat{\mathbf{X}}_t$ at the same time $t$ . A linear motion model is introduced to predict the 3D location at time $t$ : + +$$ +\hat {\mathbf {X}} _ {t} = \mathbf {X} _ {t ^ {\prime}} + \mathbf {V} _ {t ^ {\prime}} \cdot (t - t ^ {\prime}), \tag {5} +$$ + +where $t \geq t'$ and $\mathbf{V}_{t'}$ is 3D velocity estimated via a linear least-square method. + +Here, for the purpose of verifying the iterative processing strategy, we only employ the geometric consistency in the affinity measurement for simplicity. This baseline formulation already achieves state-of-the-art performance for both human body association and 3D pose estimation, as we demonstrated in experiments. The key contribution comes from Equation 4, where we match the detected 2D joints with targets directly in 3-space. + +Compared with matching in pairs of views in the camera coordinates [13], our formulation has three advantages: 1) matching in 3-space is robust to partial occlusion and inaccurate 2D localization, as the 3D pose actually combines the + +![](images/252d9a3ff74cbfadbb7f51d427f7508fa89e0f0421222fe0a8f7adc9198c8a92.jpg) +(a) 2D correspondence +Figure 2: Geometric affinity measurement. (a) 2D correspondence is computed within the same camera. (b) 3D correspondence is measured between the predicted location and the projected line in 3-space. + +![](images/7f07f873245667235f4fa07e9f1eed228717cbcd9b3531d2cad0573bbb304d3c.jpg) +(b) 3D correspondence + +information from multiple views; 2) motion estimation in 3-space is more feasible and reliable than that in 2D camera coordinates; 3) the computational cost is significantly reduced since only one comparison is required in 3-space for each pair of target and detection. To verify this, a quantitative comparison is further conducted in ablation study. + +Target update and initialization. With previous affinity measurement, this section describes how we update and initialize targets in a particular iteration. Firstly, we compute the affinity matrix between targets and detections using Equation 1 and solve the association problem in bipartite graph matching. Each detection is either assigned to a target or labeled as unmatched based on the association results. In the former case, if a detection is assigned to a target, the 3D pose of the target will be updated gradually with the new detection, as the 2D information is observed over time. Thus, 3D pose reconstruction in our framework is an incremental process, as detailed in Section 3.3. + +As for the target initialization, we collect unmatched detections from different cameras and associate them across views using epipolar constraint [16]. Here for each camera, only the most recent frame is retained, thus we assume all detections are from very similar times and can be matched directly. Particularly, we solve the association problem in weighted graph partitioning [31, 10], to comply the cycle-consistency constraint as there are multiple cameras [13]. Body pose of a new target is initialized in 3-space from the detections when at least two views are matched. The overall procedure of cross-view tracking is shown in Algorithm 1. + +# 3.3. Incremental 3D pose reconstruction + +Generally, given 2D poses of the same person at a time in different views, the 3D pose can be reconstructed using triangulation. However, with the iterative processing, 2D poses in our framework may come from different times, raising the incremental triangulation problem. + +Supposing the new frame is from camera $c$ at time $t$ , for a target $T_{t'}$ with the matched detection $D_{t,c}$ we collect 2D points from different cameras for each type of human joints: + +$$ +\mathbf {J} _ {t} ^ {k} = \left\{\mathbf {x} _ {t, c} ^ {k} \right\} \cup \left\{\mathbf {x} _ {t _ {i}, c _ {i}} ^ {k} \mid c _ {i} \neq c \right\}, \tag {6} +$$ + +where $\mathbf{x}_{t,c}^k$ is the new point in camera $c$ , and $\mathbf{x}_{t_i,c_i}^k$ denotes the last observed point in camera $c_i$ . For each joint, the 3D location is estimated independently, thus we omit the index $k$ in the following discussion for clarity. Here we aim at estimating the 3D location $\mathbf{X}_t$ from the point collection $\mathbf{J}_t$ , where the points are from different times. + +We first briefly introduce the linear algebraic triangulation algorithm and then explain our improvement that designed for this problem. For each camera, the relationship between 2D point $\mathbf{x}_{t,c}$ and 3D point $\mathbf{X}_t$ can be written as: + +$$ +\tilde {\mathbf {x}} _ {t, c} \times \left(\mathrm {P} _ {c} \tilde {\mathbf {X}} _ {t}\right) = \mathbf {0}, \tag {7} +$$ + +where $\times$ is the cross product, $\tilde{\mathbf{x}}_{t,c} \in \mathbb{R}^3$ and $\tilde{\mathbf{X}}_t \in \mathbb{R}^4$ are the homogeneous coordinates, and $\mathrm{P}_c \in \mathbb{R}^{3\times 4}$ denotes the projection matrix. Writing Equation 7 out on multiple cameras gives the equation of the form: + +$$ +\mathbf {C} \bar {\mathbf {X}} _ {t} = \mathbf {0}, \tag {8} +$$ + +with + +$$ +\mathbf {C} = \left[ \begin{array}{c} x _ {1} \mathbf {p} _ {1} ^ {3 \mathrm {T}} - \mathbf {p} _ {1} ^ {1 \mathrm {T}} \\ y _ {1} \mathbf {p} _ {1} ^ {3 \mathrm {T}} - \mathbf {p} _ {1} ^ {2 \mathrm {T}} \\ x _ {2} \mathbf {p} _ {2} ^ {3 \mathrm {T}} - \mathbf {p} _ {2} ^ {1 \mathrm {T}} \\ y _ {2} \mathbf {p} _ {2} ^ {3 \mathrm {T}} - \mathbf {p} _ {2} ^ {2 \mathrm {T}} \\ \dots \end{array} \right], \tag {9} +$$ + +where $(x_{c},y_{c})$ denotes the 2D point $\mathbf{x}_{t,c}$ , and $\mathbf{p}_c^{i\mathrm{T}}$ is the $i$ -th row of $\mathrm{P}_c$ . If there are at least two views, Equation 8 is overdetermined and can be solved via singular value decomposition (SVD). The final non-homogeneous coordinate $\mathbf{X}_t$ can be obtained by dividing the homogeneous coordinate $\tilde{\mathbf{X}}_t$ by its fourth value: $\mathbf{X}_t = \tilde{\mathbf{X}}_t / (\tilde{\mathbf{X}}_t)_4$ . + +The conventional triangulation algorithm assumes that 2D points of different views are from the same time and independently of each other. However, in our case the points are collected from different times (Equation 6). The time difference between points varies from 0 to $300\mathrm{ms}$ in practice, according to the frame rate and temporary occlusion. + +Aiming at estimating the 3D point $\mathbf{X}_t$ for the newest time $t$ , we argue that points from different times should have different importance when solving Equation 8. To this end, we add weights $\mathbf{w}_{\mathbf{c}}$ to the coefficients of $\mathbf{C}$ corresponding to different cameras: + +$$ +\left(\mathbf {w} _ {\mathbf {c}} \circ \mathbf {C}\right) \tilde {\mathbf {X}} _ {t} = \mathbf {0}, \tag {10} +$$ + +where $\mathbf{w}_{\mathbf{c}} = (w_{1},w_{2},w_{3},w_{4},\ldots)$ and $\circ$ denotes Hadamard product. This is a similar formulation to that in [17], where + +Algorithm 1: Tracking procedure for each iteration +Input: New 2D human poses $\mathbb{D}_{t,c} = \{D_{j,t,c}|j = 1,\dots,M\}$ Previous targets $\mathbb{T}_{t'} = \{T_{i,t'}|i = 1,\dots,N\}$ at time $t'$ Previous unmatched detections $\mathbb{D}_u = \{D_{t_i,c_i}\}$ Output: New targets with 3D poses $\mathbb{T}_t = \{T_{i,t}\}$ at time $t$ Initialization: $\mathbb{T}_t\gets \emptyset ;\mathbf{A}\leftarrow \mathbf{A}_{N\times M}\in \mathbb{R}^{N\times M}$ / cross-view association \*/ +foreach $T_{i,t^{\prime}}\in \mathbb{T}_{t^{\prime}}$ do +foreach $D_{j,t,c}\in \mathbb{D}_{t,c}$ do +A(i,j)←A(Ti,t',Dj,t,c) +end +end +Indices,IndicesD ← HungarianAlgorithm(A) +/* target update */ +foreach i,j ∈ Indices,Indices do +Ti,t←Incremental3DReconstruction(Ti,t',Dj,t,c) + $\mathbb{T}_t\gets \mathbb{T}_t\cup \{T_i,t\}$ +end +/* target initialization */ +foreach j ∈ {1,...,M} and j∉ Indices do + $\mathbb{D}_u\gets \mathbb{D}_u\cup \{D_{j,t,c}\}$ +end +Au← EpipolarConstraint(Du) +foreach $\mathbb{D}_{cluster}\in \mathrm{GraphPartition}(\mathbf{A}_u)$ do if Length(Dcluster) ≥ 2 then Tnew,t← 3DReconstruction(Dcluster) Ti← Ti∪{Tnew,t} D_u← D_u - D_cluster +end + +$\mathbf{w}_{\mathbf{c}}$ is estimated by a convolution neural network for the. +confidences of 2D points. Differently, our method is des +signed for incremental processing on time series: + +$$ +w _ {i} = e ^ {- \lambda_ {t} (t - t _ {i})} / \| \mathbf {c} ^ {i \mathrm {T}} \| _ {2}, \tag {11} +$$ + +where $\lambda_{t}$ is the penalty rate, $t_i\leq t$ is the timestamp of the point, and $\mathbf{c}^{i\mathrm{T}}$ denotes the $i$ -th row of $\mathbf{C}$ . In this case, the importance of the point increases as its timestamp closes to the last time, making the estimated 3D point $\mathbf{X}_t$ closer to the actual joint location at time $t$ . The second term of $L^2$ -norm is written to eliminate the bias from different 2D locations in different views, as introduced in Equation 9. + +# 4. Experiments + +We perform the evaluation on three widely-used public datasets: Campus [2], Shelf [2], and CMU Panoptic [18], and compare our method with previous works in terms of both accuracy and efficiency. We also propose a new dataset with 12 to 28 camera views, to verify the scalability of our method as the numbers of cameras and people increase. + +# 4.1. Datasets + +We first briefly introduce the public datasets and evaluation metric for multi-human 3D pose estimation. Then we present the detail of our proposed dataset and compare it with existing public datasets. + +Campus and Shelf. The Campus is a small-scale dataset that captured by three calibrated cameras. It consists of three people interacting with each other on an open outdoor square. The Shelf dataset is captured by five cameras with a more complex setting, where four people are interacting and disassembling a shelf in a small indoor area. The joint annotations of these two datasets are provided by Belagiannis et al. [2] for evaluation. We follow the same evaluation protocol as in previous works [2, 3, 15, 13] and compute the PCP (percentage of correctly estimated parts) scores to measure the accuracy of 3D pose estimation. + +CMU Panoptic. The CMU Panoptic dataset [18] is captured in a closed studio with 480 VGA cameras and 31 HD cameras. The hundreds of cameras are distributed over the surface of a geodesic sphere with about 5 meters of width and 4 meters of height. The studio is designed to simulate and capture social activities of multiple people and therefore the space inside the sphere is built without obstacle. For the lack of the ground truth of 3D poses of multiple people, only qualitative results are presented on this dataset. In contrast to previous works [13, 17] that exploit only a few cameras (about two to five) for 3D pose estimation, we present analysis with different numbers of cameras in our ablation study. + +Our dataset. Our dataset, namely Store dataset, is captured inside two kinds of simulated stores with 12 and 28 cameras, respectively. Different from CMU Panoptic that uses hundreds of cameras for a small closed area, we evenly arrange the cameras on the ceiling of the store to simulate the real-world environment. Each camera works independently without strict synchronization, as we discussed in Section 3.1. Moreover, there are lots of shelves inside the second store, serving as obstacles, making the scene more complex than previous datasets. A detailed comparison is presented in Table 1. We use the Store dataset along with the CMU Panoptic dataset to verify the scalability of our method on the large-scale camera systems. + +# 4.2. Comparison with state-of-the-art + +We first present the quantitative comparison with other state-of-the-art methods in Table 2. Belagiannis et al. introduced 3DPS for multi-view multi-human 3D pose estimation in [2]. Afterwards, they extended 3DPS for videos by exploiting the temporal consistency in [4]. These early works have a huge state space with a very expensive computational cost. Dong et al. [13] propose to cluster joints at the body level to reduce the state space. An appearance model [36] is also investigated in their work to mitigate the ambiguity of the body-level association. Their approach takes about $25\mathrm{ms}$ on a dedicated GPU to extract appearance features and $20\mathrm{ms}$ for the body association, and $60\mathrm{ms}$ for the 3D reconstruction in 3DPS. Without bells and whistles, our geometric-only method outperforms pervious 3DPS-based models and achieves competitive accuracy with the very re + +
DatasetCamerasPeopleAreaObstacle
Campus3343None
Shelf5419Shelf
CMU Panoptic480+31717None
Store layout1 (ours)12412None
Store layout2 (ours)281623Shelves
+ +Table 1: Comparison of datasets. The area is computed in square meters using convex hull of camera locations. + +
CampusPCP(%)FPS
Actor1Actor2Actor3Average
CVPR14 [2]82.072.473.775.8-
ECCWV14 [4]83.073.078.078.01
TPAMI16 [3]93.575.785.484.5-
MTA18 [15]94.292.984.690.6-
CVPR19 [13]97.693.398.096.39.5
Ours97.194.198.696.6617
ShelfActor1Actor2Actor3AverageFPS
CVPR14 [2]66.165.083.271.4-
ECCWV14 [4]75.067.086.076.01
TPAMI16 [3]75.369.787.677.5-
MTA18 [15]93.375.994.888.0-
CVPR19 [13]98.894.197.896.99.5
Ours99.693.297.596.8325
+ +Table 2: Quantitative comparison on the Campus and Shelf datasets. FPS of other methods is the average speed taken from the papers, as per-dataset speed is not provided. + +cent work [13], while our method is much faster with only a single laptop CPU. Note that, for the fair comparison, we use the same 2D pose detections for the experiments as that in [13], which are provided by an off-the-shelf 2D pose estimation method [11]. + +# 4.3. Ablation study + +To further verify the effectiveness of our solution, ablation study is conducted to answer the following questions: 1) Whether matching in 3-space has achieved better results comparing to its 2D counterparts? 2) How much is the contribution of the incremental triangulation, is it really necessary? 3) What is the speed of our method on large-scale camera systems and how much is the contribution of the iterative processing? 4) How is the quality of the tracking? + +Matching in 2D or 3D? As described in Section 3.2, we argue that matching in 3-space leads to more accurate association results, since it robust to partial occlusion and inaccurate 2D localization. To verify that, instead of comparing the final PCP score, we measure the association accuracy directly and compare our method with four baselines, as shown in Figure 3. The association accuracy is computed for each camera based on the degree of agreement between clustered 2D poses and annotations. This formulation + +![](images/265e0015eca6e8b2fc6bacdf59fc56bb21f5acc68983b3249cee450590320480.jpg) +Figure 3: Association accuracy on the Campus dataset. + +removes the impact of different reconstruction algorithms. The first baseline is matching joints in pairs of views in the 2D camera coordinates via epipolar constraint. The following three baselines are taken from the official implementation of [13], which employs geometric information and human appearance features for matching 2D poses between camera views. As seen in the figure, all these approaches achieve good performance in Camera1 and Camera2 of the Campus dataset, while the gap is revealed in the more difficult Camera3, which is placed closer to the people and suffers more from occlusion. Our method that matching in 3-space outperforms the baselines with $32\%$ , $5.2\%$ , $9.2\%$ , $4.6\%$ association accuracy in Camera3, respectively. + +Different 3D reconstruction methods. Cross-view association is the first step of 3D pose estimation, while 3D reconstruction is also critical. Here, we retain the association results of our method and estimate the 3D poses using different reconstruction algorithms. As presented in Table 3 four algorithms are considered: 3DPS, conventional triangulation, incremental triangulation without normalization, and our proposed. We select torso, upper arm, lower arm for comparison because these body parts have different motion amplitudes that can evaluate for different cases. All the four reconstruction algorithms achieve good performance on the torso as it has a small range of motion and is easy to detect. As for the lower arm, which can generally move quickly, our incremental triangulation improves about $3\%$ to $5\%$ PCP score compared with conventional triangulation. + +To further verify if the incremental triangulation has the ability to handle unsynchronized frames, we analyze the performance drop when the input frame rate decreases. The original Shelf dataset was captured with 25 FPS. We construct datasets with different frame rates by sampling one frame from every $n$ frames in each camera. The comparison between incremental and conventional triangulation is shown in Figure 4. Average time differences within every 2D joint collection $\mathbf{J}_t^k$ are also recorded in the figure. As + +![](images/b955f0b94d7b066f79a40800762911ca7d4847d0c175a1bb05a822ede118cd35.jpg) +Figure 4: PCP score in terms of input frame rate on the Shelf dataset. The original frame rate is 25 FPS, therefore the actual frame rate of each trail is $25 / n$ . + +
CampusTorsoUpper armLower armWhole
3DPS100.099.182.596.0
Triangulation100.095.479.194.4
Ours, w/o norm100.095.681.795.4
Ours, proposed100.098.684.696.6
ShelfTorsoUpper armLower armWhole
3DPS100.098.188.496.6
Triangulation100.097.084.594.8
Ours, w/o norm100.098.787.796.9
Ours, proposed100.098.787.796.8
+ +Table 3: PCP scores of different 3D reconstruction algorithms on the Campus and Shelf datasets. + +the input frame rate decreases and the time differences increase, the performance of conventional triangulation drops significantly, while that of ours keeps stable, indicating the effectiveness of our method in handling the unsynchronized frames. Therefore, we confirm that incremental triangulation is essential for the iterative processing. + +Speed on large-scale camera system. As already seen in Table 2, our method is about 50 times faster than others on the small-scale datasets Campus and Shelf. We further test the proposed method on the large-scale Store dataset as demonstrated in Figure 5. It finally achieves 154 FPS for 12 cameras with 4 people and 34 FPS for 28 cameras with 16 people. Note that when counting the running speed, we follow the common practice that one frame represents that all cameras are updated once. + +Indeed, different implementation and hardware environment affect the running speed a lot. Our algorithm is implemented in $\mathrm{C + + }$ without multi-processing and evaluated on the laptop with an Intel i7 2.20 GHz CPU. In order to verify the efficiency more fairly and understand the contribution of iterative processing, we construct a baseline method that matches joints in pairs of views in the camera coordinates with the same testing environment. The comparison is con + +![](images/b4fda635480f619711acce1f6540f0c1eb2c7b91d7f18411477f25f273b76ef2.jpg) +Figure 5: Qualitative result on the Store dataset (layout 2). There are 28 cameras and 16 people in the scene and different people are represented in different colors. The camera locations are illustrated in the 3D view as triangles in blue. + +![](images/8fff55d1dbf59b26b3a949c67a6ec0c6911fe5f4e08780015f5c7181ee49df53.jpg) + +![](images/7b8a7bef725d058bbf029cbb624790094c1b44c5441dd93833aef24197337d77.jpg) +Figure 6: Average running time of one frame with different numbers of cameras on the CMU Panoptic dataset. + +duced on the CMU Panoptic dataset with its 31 HD cameras, as the cameras are all placed in a closed small area that changing the number of cameras does not affect the number of people observed. As shown in Figure 6, the running time of the baseline method explodes as the number of cameras increases, while that of ours varies almost linearly. The result verifies the effectiveness of the iterative processing strategy and demonstrates the ability of our method to work with large-scale camera systems in real-world applications. + +Tracking quality. We measure the tracking quality using the Shelf dataset. Particularly, we project the estimated 3D poses onto each camera and follow the same evaluation protocol as MOTChallenge [24]. We compare our result with a simple single-view tracking baseline [6] as shown in Table 4. In some easy cases, e.g. Camera2, the baseline single-view tracker achieves similar performance as cross-view tracking. But for the difficult cases such as Camera4, which contain severe occlusion, our cross-view tracking outperforms its single-view counterpart significantly. The result verifies that, in our framework, multi-human tracking can be also boosted by multi-view 3D pose estimation. + +
MethodCameraMOTAIDF1FPFNIDS
Single-viewCamera186.781.732342
Camera297.663.9444
Camera397.398.6770
Camera468.841.877793
Camera579.069.051515
Cross-viewCamera198.899.4330
Camera299.299.6112
Camera398.499.2440
Camera497.698.8660
Camera597.698.8660
+ +Table 4: Tracking performance on the Shelf dataset. + +# 5. Conclusion + +We have presented a novel solution for multi-human 3D pose estimation from multiple camera views. By exploiting the temporal consistency in videos, we propose to match the 2D inputs with 3D poses in 3-space directly, where the 3D poses are retained and iteratively updated by a cross-view tracking. In experiments, we have achieved state-of-the-art accuracy and efficiency on three public datasets. The comprehensive ablation study demonstrates the effectiveness of each component in our framework. Given its simple formulation and efficiency, our solution can be extended easily by other techniques such as appearance features, and applied directly to other high-level tasks. In addition, we propose a new large-scale Store dataset to simulate the real-world scenarios, which verifies the scalability of our solution and may also benefit future researches in this area. + +# 6. Acknowledgement + +This work was supported by the Natural Science Foundation of China (Project Number 61521002). + +# References + +[1] Mykhaylo Andriluka, Stefan Roth, and Bernt Schiele. Monocular 3d pose estimation and tracking by detection. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 623-630. IEEE, 2010. 2 +[2] Vasileios Belagiannis, Sikandar Amin, Mykhaylo Andriluka, Bernt Schiele, Nassir Navab, and Slobodan Ilic. 3d pictorial structures for multiple human pose estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1669-1676, 2014. 1, 2, 5, 6 +[3] Vasileios Belagiannis, Sikandar Amin, Mykhaylo Andriluka, Bernt Schiele, Nassir Navab, and Slobodan Ilic. 3d pictorial structures revisited: Multiple human pose estimation. IEEE transactions on pattern analysis and machine intelligence, 38(10):1929-1942, 2016. 6 +[4] Vasileios Belagiannis, Xinchao Wang, Bernt Schiele, Pascal Fua, Slobodan Ilic, and Nassir Navab. Multiple human pose estimation with temporally consistent 3d pictorial structures. In European Conference on Computer Vision Workshop, pages 742-754. Springer, 2014. 2, 6 +[5] Jerome Berclaz, Francois Fleuret, Engin Turetken, and Pascal Fua. Multiple object tracking using k-shortest paths optimization. IEEE transactions on pattern analysis and machine intelligence, 33(9):1806-1819, 2011. 2 +[6] Alex Bewley, Zongyuan Ge, Lionel Ott, Fabio Ramos, and Ben Upcroft. Simple online and realtime tracking. In 2016 IEEE International Conference on Image Processing (ICIP), pages 3464-3468, 2016. 8 +[7] Lewis Bridgeman, Marco Volino, Jean-Yves Guillemaut, and Adrian Hilton. Multi-person 3d pose estimation and tracking in sports. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2019. 3 +[8] Magnus Burenius, Josephine Sullivan, and Stefan Carlsson. 3d pictorial structures for multiple view articulated pose estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3618-3625, 2013. 1, 2 +[9] Zhe Cao, Tomas Simon, Shih-En Wei, and Yaser Sheikh. Realtime multi-person 2d pose estimation using part affinity fields. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7291–7299, 2017. 1 +[10] Long Chen, Haizhou Ai, Rui Chen, and Zijie Zhuang. Aggregate tracklet appearance features for multi-object tracking. IEEE Signal Processing Letters, 26(11):1613-1617, 2019. 4 +[11] Yilun Chen, Zhicheng Wang, Yuxiang Peng, Zhiqiang Zhang, Gang Yu, and Jian Sun. Cascaded pyramid network for multi-person pose estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7103-7112, 2018. 1, 6 +[12] Yu Cheng, Bo Yang, Bo Wang, Wending Yan, and Robby T Tan. Occlusion-aware networks for 3d human pose estimation in video. In ICCV, 2019. 2 +[13] Junting Dong, Wen Jiang, Qixing Huang, Hujun Bao, and Xiaowei Zhou. Fast and robust multi-person 3d pose estimate + +tion from multiple views. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7792-7801, 2019. 1, 2, 3, 4, 6, 7 +[14] Ahmed Elhayek, *Edilson de Aguiar*, Arjun Jain, Jonathan Tompson, Leonid Pishchulin, Micha Andriluka, Chris Bregler, Bernt Schiele, and Christian Theobalt. Efficient convnet-based marker-less motion capture in general scenes with a low number of cameras. In *Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition*, pages 3810-3818, 2015. 2 +[15] Sara Ershadi-Nasab, Erfan Noury, Shohreh Kasaei, and Esmaeil Sanaei. Multiple human 3d pose estimation from multiview images. Multimedia Tools and Applications, 77(12):15573-15601, 2018. 6 +[16] Richard Hartley and Andrew Zisserman. Multiple view geometry in computer vision. Cambridge university press, 2003. 1, 2, 3, 4 +[17] Karim Iskakov, Egor Burkov, Victor Lempitsky, and Yury Malkov. Learnable triangulation of human pose. In ICCV, 2019. 5, 6 +[18] Hanbyul Joo, Hao Liu, Lei Tan, Lin Gui, Bart Nabbe, Iain Matthews, Takeo Kanade, Shohei Nobuhara, and Yaser Sheikh. Panoptic studio: A massively multiview system for social motion capture. In Proceedings of the IEEE International Conference on Computer Vision, pages 3334-3342, 2015. 2, 5, 6 +[19] Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly, 2(1-2):83-97, 1955. 3 +[20] Kyoungoh Lee, Inwooong Lee, and Sanghoon Lee. Propagating lstm: 3d pose estimation based on joint interdependency. In Proceedings of the European Conference on Computer Vision (ECCV), pages 119-135, 2018. 2 +[21] Julieta Martinez, Rayat Hossain, Javier Romero, and James J Little. A simple yet effective baseline for 3d human pose estimation. In Proceedings of the IEEE International Conference on Computer Vision, pages 2640-2649, 2017. 2 +[22] Dushyant Mehta, Oleksandr Sotnychenko, Franziska Mueller, Weipeng Xu, Srinath Sridhar, Gerard Pons-Moll, and Christian Theobalt. Single-shot multi-person 3d pose estimation from monocular rgb. In 2018 International Conference on 3D Vision (3DV), pages 120-130. IEEE, 2018. 2 +[23] Dushyant Mehta, Srinath Sridhar, Oleksandr Sotnychenko, Helge Rhodin, Mohammad Shafiei, Hans-Peter Seidel, Weipeng Xu, Dan Casas, and Christian Theobalt. Vnect: Real-time 3d human pose estimation with a single rgb camera. ACM Transactions on Graphics (TOG), 36(4):1-14, 2017. 2 +[24] Anton Milan, Laura Leal-Taixe, Ian Reid, Stefan Roth, and Konrad Schindler. Mot16: A benchmark for multi-object tracking. arXiv preprint arXiv:1603.00831, 2016. 8 +[25] Gyeongsik Moon, Ju Yong Chang, and Kyoung Mu Lee. Camera distance-aware top-down approach for 3d multiperson pose estimation from a single rgb image. In ICCV, 2019. 1, 2 + +[26] Francesc Moreno-Noguer. 3d human pose estimation from a single image via distance matrix regression. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2823-2832, 2017. 1, 2 +[27] Georgios Pavlakos, Xiaowei Zhou, Konstantinos G Derpanis, and Kostas Daniilidis. Harvesting multiple views for marker-less 3d human pose annotations. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 6988-6997, 2017. 2 +[28] Dario Pavllo, Christoph Feichtenhofer, David Grangier, and Michael Auli. 3d human pose estimation in video with temporal convolutions and semi-supervised training. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7753-7762, 2019. 2 +[29] Haibo Qiu, Chunyu Wang, Jingdong Wang, Naiyan Wang, and Wenjun Zeng. Cross view fusion for 3d human pose estimation. In ICCV, 2019. 2 +[30] Mir Rayat Imtiaz Hossain and James J Little. Exploiting temporal information for 3d human pose estimation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 68-84, 2018. 2 +[31] Ergys Ristani and Carlo Tomasi. Tracking multiple people online and in real time. In Asian conference on computer vision, pages 444-459. Springer, 2014. 4 +[32] Zheng Tang, Renshu Gu, and Jenq-Neng Hwang. Joint multi-view people tracking and pose estimation for 3d scene reconstruction. In 2018 IEEE International Conference on Multimedia and Expo (ICME). IEEE, 2018. 2, 3 +[33] Graham W Taylor, Leonid Sigal, David J Fleet, and Geoffrey E Hinton. Dynamical binary latent variable models for 3d human pose tracking. In 2010 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 631-638. IEEE, 2010. 2 +[34] Denis Tome, Matteo Toso, Lourdes Agapito, and Chris Russell. Rethinking pose in 3d: Multi-stage refinement and recovery for markerless motion capture. In 2018 International Conference on 3D Vision (3DV), pages 474-483. IEEE, 2018. 2 +[35] Bin Xiao, Haiping Wu, and Yichen Wei. Simple baselines for human pose estimation and tracking. In Proceedings of the European Conference on Computer Vision (ECCV), pages 466-481, 2018. 1 +[36] Zhun Zhong, Liang Zheng, Zhedong Zheng, Shaozi Li, and Yi Yang. Camera style adaptation for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5157–5166, 2018. 6 \ No newline at end of file diff --git a/crossviewtrackingformultihuman3dposeestimationatover100fps/images.zip b/crossviewtrackingformultihuman3dposeestimationatover100fps/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..01127d74af4308b48fd6124f3ec51293b8f5f94f --- /dev/null +++ b/crossviewtrackingformultihuman3dposeestimationatover100fps/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac30ae0f7f50aca059677362aa7fe0415288dad84298ecdef9f43a662801e7ec +size 526495 diff --git a/crossviewtrackingformultihuman3dposeestimationatover100fps/layout.json b/crossviewtrackingformultihuman3dposeestimationatover100fps/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..aa95546b1e5da3a29030cb7471fca153dd5bd1fe --- /dev/null +++ b/crossviewtrackingformultihuman3dposeestimationatover100fps/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:725bd94b951f26557d423b485a3fbac2f480fe0a043ed2aeb21a535f659dc2cf +size 371612 diff --git a/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/4145b24a-e248-4655-a8f2-5690b504b99e_content_list.json b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/4145b24a-e248-4655-a8f2-5690b504b99e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a8cda393e6dad6ce2cd4e8de0b162383d6b011ca --- /dev/null +++ b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/4145b24a-e248-4655-a8f2-5690b504b99e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de423dfc09cfe15a57ccf330514e793523627e6f6a9385ed54bfce8b3206bb37 +size 75474 diff --git a/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/4145b24a-e248-4655-a8f2-5690b504b99e_model.json b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/4145b24a-e248-4655-a8f2-5690b504b99e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..05543628d99fcb229afb3d7d595e0190cefef943 --- /dev/null +++ b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/4145b24a-e248-4655-a8f2-5690b504b99e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c25284e219ad3b29209b113d3d6014b53b7ad6800fc483988d46476b0f83b75b +size 92039 diff --git a/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/4145b24a-e248-4655-a8f2-5690b504b99e_origin.pdf b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/4145b24a-e248-4655-a8f2-5690b504b99e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..942b379795a2ddbb42e4dfdda06653dd88eba33b --- /dev/null +++ b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/4145b24a-e248-4655-a8f2-5690b504b99e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5cdd0e2933559e391f20fe74759415029c4bea0e689440d644a831a8cf8b17b2 +size 2534456 diff --git a/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/full.md b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..6d30b7309ac3ea3d629f02d59fdcb8b9719042f2 --- /dev/null +++ b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/full.md @@ -0,0 +1,301 @@ +# CurricularFace: Adaptive Curriculum Learning Loss for Deep Face Recognition + +Yuge Huang† Yuhan Wang§ Ying Tai†* Xiaoming Liu‡ + +Pengcheng Shen† Shaoxin Li†* Jilin Li† Feiyue Huang† + +†Youtu Lab, Tencent §Zhejiang University ‡Michigan State University + +$\dagger$ {yugehuang, yingtai, quantshen, darwinli, jerolinli, garyhuang}@tencent.com + +$^\S$ wang_yuhan@zju.edu.cn, liuxm@cse.msu.edu + +https://github.com/HuangYG123/CurricularFace + +# Abstract + +As an emerging topic in face recognition, designing margin-based loss functions can increase the feature margin between different classes for enhanced discriminability. More recently, the idea of mining-based strategies is adopted to emphasize the misclassified samples, achieving promising results. However, during the entire training process, the prior methods either do not explicitly emphasize the sample based on its importance that renders the hard samples not fully exploited; or explicitly emphasize the effects of semi-hard/hard samples even at the early training stage that may lead to convergence issue. In this work, we propose a novel Adaptive Curriculum Learning loss (CurricularFace) that embeds the idea of curriculum learning into the loss function to achieve a novel training strategy for deep face recognition, which mainly addresses easy samples in the early training stage and hard ones in the later stage. Specifically, our CurricularFace adaptively adjusts the relative importance of easy and hard samples during different training stages. In each stage, different samples are assigned with different importance according to their corresponding difficulty. Extensive experimental results on popular benchmarks demonstrate the superiority of our CurricularFace over the state-of-the-art competitors. + +# 1. Introduction + +The success of Convolutional Neural Networks (CNNs) on face recognition can be mainly credited to: enormous training data, network architectures, and loss functions. Recently, designing effective loss functions that enhance discriminative power is pivotal for training deep face CNNs. + +Current state-of-the-art (SOTA) face recognition methods mainly adopt softmax-based classification loss. Since the learned features with the original softmax is not suf + +![](images/40ef6dba88f8c21503a8db29aa7fc2e08ac5af74aaaa99391f18c037f4fbeafa.jpg) +Figure 1. Different training strategies for modulating negative cosine similarities of hard samples (i.e., the mis-classified samples) in ArcFace [8], MV-Arc-Softmax [31] and our Curricular-Face. Left: The modulation coefficients $I(t, \cos \theta_j)$ for negative cosine similarities of hard samples in different methods, where $t$ is an adaptively estimated parameter and $\theta_j$ denotes the angle between the hard sample and the non-ground truth $j$ -class center. Right: The corresponding hard samples' negative cosine similarities $N(t, \cos \theta_j) = I(t, \cos \theta_j) \cos \theta_j + c$ after modulation, where $c$ indicates a constant. On one hand, during early training stage (e.g., $t$ is close to 0), hard sample's negative cosine similarities are usually reduced, and thus leads to smaller hard sample loss than the original one. Therefore, easier samples are relatively emphasized; during later training stage (e.g., $t$ is close to 1), the hard sample's negative cosine similarities are enhanced, and thus leads to larger hard sample loss. On the other hand, in the same training stage, we modulate the hard samples' negative cosine similarities with $\cos \theta_j$ . Specifically, the smaller the angle $\theta_j$ is, the larger the modulation coefficient should be. + +![](images/79656bde5e72b1f5e039f6add4db29e19eeb8b874fa248c9686f599d59cf5fb6.jpg) + +ficiently discriminative for the practical face recognition problem [14], which means that the testing identities are usually disjoint from the training set, several margin-based variants have been proposed to enhance features' discriminative power. For example, explicit margin, i.e., CosFace [30], Spherface [14], ArcFace [8], and implicit margin, i.e., Adacos [38], supplement the original softmax function to enforce greater intra-class compactness and inter-class discrepancy, which result in more discriminate features. However, these margin-based loss functions do not explicitly emphasize each sample according to its im + +# portance. + +As demonstrated in [5, 10], hard sample mining is also a critical step to further improve the final accuracy. As a commonly-used hard sample mining method, OHEM [26] focuses on the large-loss samples in one mini-batch, in which the percentage of hard samples is empirically decided and easy samples are completely discarded. Focal loss [16] is a soft mining variant that rectifies the loss function to a elaborately designed form, in which two hyperparameters should be tuned with a lot of efforts to decide the weights of each sample and hard samples are emphasized by reducing the weights of easy samples. Recently, Triplet loss [23] and MV-Arc-Softmax [31] are motivated by integrating both margin and mining into one framework. Triplet loss adopts a semi-hard mining strategy to obtain semi-hard triplets and enlarges the margin between triplet samples. MV-Arc-Softmax [31] clearly defines hard samples as misclassified samples and emphasizes them by increasing the weights of their negative cosine similarities with a preset constant. In a nutshell, mining-based loss functions explicitly emphasize the effects of semi-hard or hard samples [23]. + +However, there are drawbacks in training strategies of both margin- and mining-based loss functions. The general softmax-based loss function can be formulated as follows: + +$$ +\mathcal {L} = - \log \frac {e ^ {s T (\cos \theta_ {y _ {i}})}}{e ^ {s T (\cos \theta_ {y _ {i}}) + \sum_ {j = 1 , j \neq y _ {i}} ^ {n} e ^ {s N (t , \cos \theta_ {j})}}} \tag {1} +$$ + +where $T(\cos \theta_{y_i})$ and $N(t, \cos \theta_j) = I(t, \cos \theta_j) \cos \theta_j + c$ are the functions to define the positive and negative cosine similarities, respectively. $I(t, \cos \theta_j)$ denotes the modulation coefficients of negative cosine similarities and $c$ is a constant. For margin-based methods, mining strategy is ignored and thus the difficulty of each sample is not exploited, which may lead to convergence issues when using a large margin on small backbones, e.g., MobileFaceNet [6]. As shown in Fig. 1, the modulation coefficients $I(\cdot)$ for the negative cosine similarities are fixed as a constant of 1 in ArcFace for all samples during the entire training process. For mining-based methods, over-emphasizing hard samples in early training stage may hinder the model to converge. MV-Arc-Softmax emphasizes hard samples by modulating the negative cosine similarity as $N(t, \cos \theta_j) = t \cos \theta_j + t - 1$ , i.e., $I(t, \cos \theta_j) = t$ , where $t$ is a manually defined constant. As MV-Arc-Softmax claimed, $t$ plays a key role in the model convergence property and a slight larger value (e.g., $>1.4$ ) may cause the model difficult to converge. Thus $t$ needs to be carefully tuned. + +In this work, we propose a novel adaptive curriculum learning loss, termed CurricularFace, to achieve a novel training strategy for deep face recognition. Motivated by the nature of human learning that easy cases are learned first and then come the hard ones [2], our CurricularFace incorporates the idea of Curriculum Learning (CL) into face + +recognition in an adaptive manner, which differs from the traditional CL in two aspects. First, the curriculum construction is adaptive. In traditional CL, the samples are ordered by the corresponding difficulty, which are often defined by a prior and then fixed to establish the curriculum. In CurricularFace, the samples are randomly selected in each mini-batch, while the curriculum is established adaptively via mining the hard samples online, which shows the diversity in samples with different importance. Second, the importance of hard samples are adaptive. On one hand, the relative importance between easy and hard samples is dynamic and could be adjusted in different training stages. On the other hand, the importance of each hard sample in current mini-batch depends on its own difficulty. + +Specifically, the mis-classified samples in mini-batch are chosen as hard samples and weighted by adjusting the modulation coefficients $I(t,\cos \theta_{j})$ of cosine similarities between the sample and the non-ground truth class center vectors, i.e., negative cosine similarity $\cos \theta_{j}$ . To achieve the goal of adaptive curricular learning in the entire training, we design a novel coefficient function $I(\cdot)$ that is determined by two factors: 1) the adaptively estimated parameter $t$ that utilizes moving average of positive cosine similarities between samples and the corresponding ground-truth class center to unleash the burden of manually tuning; and 2) the angle $\theta_{j}$ that defines the difficulty of hard samples to achieve adaptive assignment. To sum up, the contributions of this work are: + +- We propose an adaptive curriculum learning loss for face recognition, which automatically emphasizes easy samples first and hard samples later. To the best of our knowledge, it is the first work to introduce the idea of adaptive curriculum learning for face recognition. +- We design a novel modulation coefficient function $I(\cdot)$ to achieve adaptive curriculum learning during training, which connects positive and negative cosine similarity simultaneously without the need of manually tuning any additional hyper-parameter. +- We conduct extensive experiments on popular facial benchmarks, which demonstrate the superiority of our CurricularFace over the SOTA competitors. + +# 2. Related Work + +Margin-based loss function. Loss design is pivotal for large-scale face recognition. Current SOTA deep face recognition methods mostly adopt softmax-based classification loss [28]. Since the learned features with the original softmax loss are not guaranteed to be discriminative enough for practical face recognition problems [14], margin-based losses [18, 14, 8] are proposed. Though the margin-based loss functions are verified to obtain good performance, they + +do not take the difficulty of each sample into consideration, while our CurricularFace emphasizes easy samples first and hard samples later, which is more reasonable and effective. + +Mining-based loss function. Though some mining-based loss function such as Focal loss [16], Online Hard Sample Mining (OHEM) [26] are prevalent in the field of object detection, they are rarely used in face recognition. OHEM focuses on the large-loss samples in one mini-batch, in which the percentage of the hard samples is empirically determined and easy samples are completely discarded. Focal loss emphasizes hard samples by reducing the weights of easy samples, in which two hyper-parameters should be manually tuned. The recent work, MV-Arc-Softmax [31] fuses the motivations of both margin and mining into one framework for deep face recognition. They define hard samples as misclassified samples and enlarge the weights of hard samples with a preset constant. Our method differs from MV-Arc-Softmax in three aspects: 1) We do not always emphasize hard samples, especially in the early training stages. 2) We assign different weights for hard samples according to their corresponding difficulty. 3) We adaptively estimate the additional hyper-parameter $t$ without manual tuning. + +Curriculum Learning. Learning from easier samples first and harder samples later is a common strategy in Curriculum Learning (CL) [2, 42]. The key problem in CL is to define the difficulty of each sample. For example, [1] takes the negative distance to the boundary as the indicator for easiness in classification. However, the ad-hoc curriculum design in CL turns out to be difficult to implement in different problems. To alleviate this issue, [12] designs a new formulation, called Self-Paced Learning (SPL), where examples with lower losses are considered to be easier and emphasized during training. The key differences between our CurricularFace with SPL are: 1) Our method focuses on easier samples in the early training stage and emphasizes hard samples in the later stage. 2) Our method proposes a novel function $N(\cdot)$ for negative cosine similarities, which achieves not only adaptive assignment on modulation coefficients $I(\cdot)$ for different samples in the same training stage, but also adaptive curriculum learning strategy in different stages. + +# 3. The Proposed CurricularFace + +# 3.1. Preliminary Knowledge on Loss Function + +The original softmax loss is formulated as follows: + +$$ +\mathcal {L} = - \log \frac {e ^ {W _ {y _ {i}} x _ {i} + b _ {y _ {i}}}}{\sum_ {j = 1} ^ {n} e ^ {W _ {j} x _ {i} + b _ {j}}}, \tag {2} +$$ + +where $x_{i} \in R^{d}$ denotes the deep feature of $i$ -th sample which belongs to the $y_{i}$ class, $W_{j} \in R^{d}$ denotes the $j$ -th column of the weight $W \in R^{d \times n}$ and $b_{j}$ is the bias term. The class number and the embedding feature size are $n$ and $d$ , respectively. In practice, the bias is usually set to $b_{j} = 0$ and the individual weight is set to $||W_{j}|| = 1$ by $l_{2}$ normalization. The deep feature is also normalized and re-scaled to $s$ . Thus, the original softmax can be modified as follows: + +$$ +\mathcal {L} = - \log \frac {e ^ {s \left(\cos \theta_ {y _ {i}}\right)}}{e ^ {s \left(\cos \theta_ {y _ {i}}\right)} + \sum_ {j = 1 , j \neq y _ {i}} ^ {n} e ^ {s \left(\cos \theta_ {j}\right)}}. \tag {3} +$$ + +Since the learned features with original softmax loss may not be discriminative enough for practical face recognition problem, several variants are proposed and can be formulated in a general form: + +$$ +\mathcal {L} = - G \left(p \left(x _ {i}\right)\right) \log \frac {e ^ {s T \left(\cos \theta_ {y _ {i}}\right)}}{e ^ {s T \left(\cos \theta_ {y _ {i}}\right)} + \sum_ {j = 1 , j \neq y _ {i}} ^ {n} e ^ {s N \left(t , \cos \theta_ {j}\right)}}, \tag {4} +$$ + +where $p(x_{i}) = \frac{e^{sT(\cos\theta_{y_{i}})}}{e^{sT(\cos\theta_{y_{i}})} + \sum_{j=1,j\neq y_{i}}^{n} e^{sN(t,\cos\theta_{j})}}$ is the predicted ground truth probability and $G(p(x_{i}))$ is an indicator function. $T(\cos \theta_{y_i})$ and $N(t,\cos \theta_j) = I(t,\cos \theta_j)\cos \theta_j + c$ are the functions to modulate the positive and negative cosine similarities, respectively, where $c$ is a constant, and $I(t,\cos \theta_j)$ denotes the modulation coefficients of negative cosine similarities. In margin-based loss function, e.g., ArcFace, $G(p(x_{i})) = 1$ , $T(\cos \theta_{y_i}) = \cos (\theta_{y_i} + m)$ , and $N(t,\cos \theta_j) = \cos \theta_j$ . It only modifies the positive cosine similarity of each sample to enhance the feature discrimination. As shown in Fig. 1, the modulation coefficients $I(\cdot)$ of each sample's negative cosine similarities are fixed as 1. The recent work, MV-Arc-Softmax emphasizes hard samples by increasing $I(t,\cos \theta_j)$ for hard samples. That is, $G(p(x_{i})) = 1$ and $N(t,\cos \theta_j)$ is formulated as follows: + +$$ +N \left(t, \cos_ {\theta_ {j}}\right) = \left\{ \begin{array}{l l} \cos \theta_ {j}, & T \left(\cos \theta_ {y _ {i}}\right) - \cos \theta_ {j} \geq 0 \\ t \cos \theta_ {j} + t - 1, & T \left(\cos \theta_ {y _ {i}}\right) - \cos \theta_ {j} < 0. \end{array} \right. \tag {5} +$$ + +If a sample is defined to be easy, its negative cosine similarity is kept the same as the original one, $\cos \theta_{j}$ ; if as a hard sample, its negative cosine similarity becomes $t\cos \theta_{j} + t - 1$ . That is, as shown in Fig. 1, $I(\cdot)$ is a constant and determined by a preset hyper-parameter $t$ . Meanwhile, since $t$ is always larger than $1$ , $t\cos \theta_{j} + t - 1 > \cos \theta_{j}$ always holds true, which means the model always focuses on hard samples, even in the early training stage. However, the parameter $t$ is sensitive that a large pre-defined value (e.g., $>1.4$ ) may lead to convergence issue. + +# 3.2. Adaptive Curricular Learning Loss + +Next, we present the details of our proposed adaptive curriculum learning loss, which is the first attempt to intro- + +# Algorithm 1: CurricularFace + +Input: The deep feature of $i$ -th sample $x_{i}$ with its label $y_{i}$ , last fully-connected layer parameters $W$ , cosine similarity $\cos \theta_{j}$ of two vectors, embedding network parameters $\Theta$ , learning rate $\lambda$ , and margin $m$ + +iteration number $k\gets 0$ parameter $t\gets 0,m\gets 0.5$ + +# while not converged do + +if $\cos (\theta_{y_i} + m)\geq \cos \theta_j$ then $N(t,\cos \theta_j) = \cos \theta_j;$ else $N(t,\cos \theta_j) = (t^{(k)} + \cos \theta_j)\cos \theta_j;$ end $T(\cos \theta_{y_i}) = \cos (\theta_{y_i} + m);$ Compute the loss $\mathcal{L}$ by Eq.10; Compute the gradients of $x_{i}$ and $W_{j}$ by Eq. Update the parameters $W$ and $\Theta$ by: $W^{(k + 1)} = W^{(k)} - \lambda^{(k)}\frac{\partial L}{\partial W},$ $\Theta^{(k + 1)} = \Theta^{(k)} - \lambda^{(k)}\frac{\partial L}{\partial x_i}\frac{\partial x_i}{\partial\Theta^{(k)}};$ $k\gets k + 1$ Update the parameter $t$ by Eq.9; + +end + +Output: $W, \Theta$ . + +duce adaptive curriculum learning into deep face recognition. The formulation of our loss function is also contained in the general form, where $G(p(x_i)) = 1$ , positive and negative cosine similarity functions are defined as follows: + +$$ +T \left(\cos \theta_ {y _ {i}}\right) = \cos \left(\theta_ {y _ {i}} + m\right), \tag {6} +$$ + +$$ +N (t, \cos_ {\theta_ {j}}) = \left\{ \begin{array}{l l} \cos \theta_ {j}, & T (\cos \theta_ {y _ {i}}) - \cos \theta_ {j} \geq 0 \\ \cos \theta_ {j} (t + \cos \theta_ {j}), & T (\cos \theta_ {y _ {i}}) - \cos \theta_ {j} < 0. \end{array} \right. \tag {7} +$$ + +It should be noted that the positive cosine similarity can adopt any margin-based loss functions and here we adopt ArcFace as an example. As shown in Fig. 1, the modulation coefficient $I(t,\theta_{j})$ of hard sample negative cosine similarity depends on both the value of $t$ and $\theta_{j}$ . In the early training stage, learning from easy samples is beneficial to model convergence. Thus, $t$ should be close to zero and $I(\cdot) = t + \cos \theta_{j}$ is smaller than 1. Therefore, the weights of hard samples are reduced and easy samples are emphasized relatively. As training goes on, the model gradually focuses on the hard samples, i.e., the value of $t$ shall increase and $I(\cdot)$ is larger than 1. Thus, the hard samples are emphasized with larger weights. Moreover, within the same training stage, $I(\cdot)$ is monotonically decreasing with $\theta_{j}$ so that harder sample can be assigned with larger coefficient according to its difficulty. The value of the parameter $t$ is automatically estimated in our CurricularFace, otherwise it may require lots of efforts for manual tuning. + +Optimization. Next, we show our CurricularFace can be easily optimized by the conventional stochastic gradient de + +![](images/d68d87c13a1154b3237505c58b65cfcac2453f4486940757b8bf3c04d765f70b.jpg) +Figure 2. The adaptive parameter $t$ (red line) and gradient modulation coefficients $M$ of ours (green area) and MV-Arc-Softmax (blue line) in training. Since the number of mined hard samples reduces as training progresses, the green area, i.e., the range of $M$ values, is relatively smooth in early stage and exhibits burrs in later stage. + +scent. Assuming $x_{i}$ denotes the deep feature of $i$ -th sample which belongs to the $y_{i}$ class, the input of the proposed function is the logit $f_{j}$ , where $j$ denotes the $j$ -th class. + +In the forwarding process, when $j = y_{i}$ , it is the same as the ArcFace, i.e., $f_{j} = sT(\cos \theta_{y_{i}})$ , $T(\cos \theta_{y_{i}}) = \cos (\theta_{y_{i}} + m)$ . When $j \neq y_{i}$ , it has two cases, if $x_{i}$ is an easy sample, it is the same as the original softmax, i.e., $f_{j} = s\cos \theta_{j}$ . Otherwise, it will be modulated as $f_{j} = sN(t,\cos \theta_{j})$ , where $N(t,\cos \theta_{j}) = (t + \cos \theta_{j})\cos \theta_{j}$ . In the backward propagation process, the gradients w.r.t. $x_{i}$ and $W_{j}$ can also be divided into three cases and computed as follows: + +$$ +\frac {\partial L}{\partial x _ {i}} = \left\{ \begin{array}{l l} \frac {\partial L}{\partial f _ {y _ {i}}} (s \frac {\sin (\theta_ {y _ {i}} + m)}{\sin \theta_ {y _ {i}}}) W _ {y _ {i}}, & j = y _ {i} \\ \frac {\partial L}{\partial f _ {j}} s W _ {j}, & j \neq y _ {i}, \text {e a s y} \\ \frac {\partial L}{\partial f _ {j}} s (2 \cos \theta_ {j} + t) W _ {j} & j \neq y _ {i}, \text {h a r d} \end{array} \right. \tag {8} +$$ + +$$ +\frac {\partial L}{\partial W _ {j}} = \left\{ \begin{array}{l l} \frac {\partial L}{\partial f _ {y _ {i}}} (s \frac {\sin (\theta_ {y _ {i}} + m)}{\sin \theta_ {y _ {i}}}) x _ {i}, & j = y _ {i} \\ \frac {\partial L}{\partial f _ {j}} s x _ {i}, & j \neq y _ {i}, \text {e a s y} \\ \frac {\partial L}{\partial f _ {j}} s (2 \cos \theta_ {j} + t) x _ {i} & j \neq y _ {i}, \text {h a r d} \end{array} \right. +$$ + +Based on the above formulations, we can find the gradient modulation coefficients of hard samples are determined by $M(\cdot) = 2\cos \theta_{j} + t$ , which consists of two parts, the negative cosine similarity $\cos \theta_{j}$ and the value of $t$ . As shown in Fig. 2, on the one hand, the coefficients increase with the adaptive estimation of $t$ (described in the next subsection) to emphasize hard samples. On the other hand, these coefficients are assigned with different importance according to their corresponding difficulty $(\cos \theta_{j})$ . Therefore, the values of $M$ in Fig. 2 are plotted as a range at each training iteration. However, the coefficients are fixed to be 1 and a constant $t$ in ArcFace and MV-Arc-Softmax, respectively. + +![](images/187fa51be31b64bddc6294d50f45b01cc920645e4c5ee193855cc6f4c42c38d8.jpg) +Figure 3. Illustrations on (ratio between our loss and ArcFace, maximum $\cos\theta_j$ ) in different training stages. Top: Early training stage. Bottom: Later training stage. + +Adaptive Estimation of $t$ . It is critical to determine appropriate values of $t$ in different training stages. Ideally the value of $t$ can indicate the model training stages. We empirically find the average of positive cosine similarities is a good indicator. However, mini-batch statistic-based methods usually face an issue: when many extreme data are sampled in one mini-batch, the statistics can be vastly noisy and the estimation will be unstable. Exponential Moving Average (EMA) is a common solution to address this issue [13]. Specifically, let $r^{(k)}$ be the average of the positive cosine similarities of the $k$ -th batch and be formulated as $r^{(k)} = \sum_{i} \cos \theta_{y_i}$ , we have: + +$$ +t ^ {(k)} = \alpha r ^ {(k)} + (1 - \alpha) t ^ {(k - 1)}, \tag {9} +$$ + +where $t^0 = 0$ , $\alpha$ is the momentum parameter and set to 0.99. With the EMA, we avoid the hyper-parameter tuning and make the modulation coefficients of hard sample negative cosine similarities $I(\cdot)$ adaptive to the current training stage. To sum up, the loss function of our CurricularFace is formulated as follows: + +$$ +\mathcal {L} = - \log \frac {e ^ {s \cos \left(\theta_ {y _ {i}} + m\right)}}{e ^ {s \cos \left(\theta_ {y _ {i}} + m\right)} + \sum_ {j = 1 , j \neq y _ {i}} ^ {n} e ^ {s N \left(t ^ {(k)}, \cos \theta_ {j}\right)}}, \tag {10} +$$ + +where $N(t^{(k)},\cos \theta_j)$ is defined in Eq. 7. The entire training process is summarized in Algorithm 1. + +Fig. 3 illustrates how the loss changes from ArcFace to our CurricularFace during training. Here are some observations: 1) As we excepted, hard samples (B and C) are suppressed in early training stage but emphasized later. 2) The ratio is monotonically increasing with $\cos \theta_{j}$ , since the larger $\cos \theta_{j}$ is, the harder the sample is. 3) The positive cosine similarity of a perceptual-well image is often large. However, during the early training stage, the negative cosine similarities of the perceptual-well image (A) may also be large so that it could be classified as the hard one. + +Table 1. The decision boundaries of popular loss functions. + +
LossDecision Boundary
Softmaxcos θyi = cos θj
SphereFacecos(mθyi) = cos θj
CosFacecos θyi - m = cos θj
ArcFacecos(θyi + m) = cos θj
MV-Arc-Softmaxcos(θyi + m) = cos θj (easy) +cos(θyi + m) = t cos θj + t - 1 (hard)
CurricularFace (Ours)cos(θyi + m) = cos θj (easy) +cos(θyi + m) = (t + cos θj) cos θj (hard)
+ +![](images/3b8b1eaf9a4167cb823844e89a9d89c4c568316b6dcfa3cf2aeef1ed0c0d2c74.jpg) +Figure 4. Blue line, red line, green line and purple line denote the decision boundary of Softmax, ArcFace, MV-Arc-Softmax, and ours, respectively. $m$ denotes the angular margin added by ArcFace. $d$ denotes the additional margin of MV-Arc-Softmax and ours. In MV-Arc-Softmax, $d = (t - 1)\cos \theta_{j} + t - 1$ . In ours, $d = (t + \cos \theta_{j} - 1)\cos \theta_{j}$ . + +# 3.3. Discussions with SOTA Loss Functions + +Comparison with ArcFace and MV-Arc-Softmax. We first discuss the difference between our CurricularFace and the two competitors, ArcFace and MV-Arc-Softmax, from the perspective of the decision boundary in Tab. 1. ArcFace introduces a margin function $T(\cos \theta_{y_i}) = \cos (\theta_{y_i} + m)$ from the perspective of the positive cosine similarity. As shown in Fig. 4, its decision condition changes from $\cos \theta_{y_i} = \cos \theta_j$ (i.e., blue line) to $\cos (\theta_{y_i} + m) = \cos \theta_j$ (red line) for each sample. MV-Arc-Softmax introduces additional margin from the perspective of negative cosine similarity for hard samples, and the decision boundary becomes $\cos (\theta_{y_i} + m) = t\cos \theta_j + t - 1$ (green line). Conversely, we adaptively adjust the weights of hard samples in different training stages. The decision condition becomes $\cos (\theta_{y_i} + m) = (t + \cos \theta_j)\cos \theta_j$ (purple line). During training, the decision boundary for hard samples changes from one purple line (early stage) to another (later stage), which emphasizes easy samples first and hard samples later. + +Comparison with Focal Loss. Focal loss is formulated as: $G(p(x)) = \alpha (1 - p(x_i))^{\beta}$ , where $\alpha$ and $\beta$ are modulating factors to be tuned manually. The definition of hard samples in Focal loss is ambiguous, since it focuses on relatively hard samples by reducing the weight of easier samples during entire training process. In contrast, the definition of hard samples in our CurricularFace is more clear, i.e., misclassified samples. Meanwhile, the weights of hard samples are adaptively determined in different training stages. + +Table 2. Verification performance $\left( \% \right)$ of different values of $t$ . + +
Methods (%)LFWCFP-FP
t = 099.3295.90
t = 0.399.3796.47
t = 0.799.4296.66
t = 199.4593.94
Adaptive t99.4796.96
+ +Table 3. Verification performance (\%) of different strategies for setting $t$ . + +
Methods (%)LFWCFP-FP
Mode(cos θyi)99.4296.49
Mean(pxi)99.4295.39
Mean(cos θyi)99.4796.96
+ +# 4. Experiments + +# 4.1. Implementation Details + +Datasets. We separately employ CASIA-WebFace [36] and refined MS1MV2 [8] as our training data for fair comparisons with other methods. CASIA-WebFace contains about 0.5M of 10 individuals, and MS1MV2 contains about 5.8M images of 85K individuals. We extensively test our method on several popular benchmarks, including LFW [9], CFP-FP [24], CPLFW [41], AgeDB [20], CALFW [40], IJB-B [33], IJB-C [19], and MegaFace [11]. + +Training Setting. We follow [8] to crop the $112 \times 112$ faces with five landmarks [37, 27]. For the embedding network, we adopt ResNet50 and ResNet100 as in [8]. Our framework is implemented in Pytorch [21]. We train models on 4 NVIDIA Tesla P40 GPU with batch size 512. The models are trained with SGD algorithm, with momentum 0.9 and weight decay $5e - 4$ . On CASIA-WebFace, the learning rate starts from 0.1 and is divided by 10 at 28, 38, 46 epochs. The training process is finished at 50 epochs. On MS1MV2, we divide the learning rate at 10, 18, 22 epochs and finish at 24 epochs. We follow the common setting as [8] to set scale $s = 64$ and margin $m = 0.5$ . + +# 4.2. Ablation study + +Effects on Fixed vs. Adaptive Parameter $t$ . We first investigate the effect of adaptive estimation of $t$ . We choose four fixed values between 0 and 1 for comparison. Specifically, 0 means the modulation coefficient $I(\cdot)$ of each hard sample's negative cosine similarity is always reduced based on its difficulty. In contrast, 1 means the hard samples are always emphasized. 0.3 and 0.7 are between the two cases. Tab. 2 shows that it is more effective to learn from easier samples first and hard samples later based on our adaptively estimated parameter $t$ . + +![](images/0c0c09486228bba20ff62310fefeae6df95c8a2e3f17a97e13378e73607c6abe.jpg) +Figure 5. Illustrations on loss curves of our CurricularFace and ArcFace with the small backbone MobileFaceNet. + +Effects on Different Statistics for Estimating $t$ . We now investigate the effects of several other statistics, i.e., mode of positive cosine similarities in a mini-batch, or mean of the predicted ground truth probability for estimating $t$ in our loss. As Tab. 3 shows: 1) The mean of positive cosine similarities is better than mode. 2) The positive cosine similarity is more accurate than the predicted ground truth probability to indicate the training stages. + +Robustness on Training Convergence. As claimed in [15], ArcFace exhibits the divergence issue when using small backbones like MobileFaceNet. As a result, softmax loss must be incorporated for pre-training. To illustrate the robustness of our loss function on convergence issue with small backbones, we use the MobileFaceNet as the network architecture and train it on CASIA-WebFace. As shown in Fig. 5, when the margin $m$ is set to 0.5, the model trained with our loss achieves $99.25\%$ accuracy on LFW, while the model trained with ArcFace does not converge and the loss is NAN at about 2, 400-th step. When the margin $m$ is set to 0.45, both losses can converge, but our loss achieves better performance (99.20% vs. 99.10%). Comparing the yellow and red curves, since the losses of hard samples are reduced in early training stages, our loss converges much faster in the beginning, leading to lower loss than ArcFace. Later on, the value of our loss is slightly larger than ArcFace, because we emphasize the hard samples in later stages. The results illustrate that learning from easy samples first and hard samples later is beneficial to model convergence. + +# 4.3. Comparisons with SOTA Methods + +Results on LFW, CFP-FP, CPLFW, AgeDB and CALFW. Next, we train our CurricularFace on dataset MS1MV2 with ResNet100, and compare with the SOTA competitors on various benchmarks, including LFW for unconstrained face verification, CFP-FP and CPLFW for large pose variations, AgeDB and CALFW for age variations. As reported in Tab. 4, our CurricularFace achieves comparable result (i.e., $99.80\%$ ) with the competitors on LFW where + +Table 4. Verification comparison with SOTA methods on LFW, two pose benchmarks: CFP-FP and CPLFW, and two age benchmarks: AgeDB and CALFW. * denotes our re-implemented results with the backbone ResNet100 [8]. + +
Methods (%)LFWCFP-FPCPLFWAgeDBCALFW
Center Loss (ECCV'16)98.75-77.48-85.48
SphereFace (CVPR'17)99.27-81.40-90.30
DRGAN (CVPR'17)-93.41---
Peng et al. (ICCV'17)-93.76---
VGGFace2 (FG'18)99.43-84.00-90.57
Dream (CVPR'18)-93.98---
Deng et al. (CVPR'18)99.6094.05---
ArcFace (CVPR'19)99.7798.2792.0898.1595.45
MV-Arc-Softmax (AAAI'20)99.78----
MV-Arc-Softmax*99.8098.2892.8397.9596.10
CurricularFace (Ours)99.8098.3793.1398.3296.20
+ +Table 5. 1:1 verification TAR (@FAR=1e-4) on the IJB-B and IJB-C datasets. * denotes our re-implemented results with the backbone ResNet100 [8]. + +
Methods (%)IJB-BIJB-C
ResNet50+SENet50 (FG'18)80.084.1
Multicolumn (BMVC'18)83.186.2
DCN (ECCV'18)84.988.5
ArcFace-VGG2-R50 (CVPR'19)89.892.1
ArcFace-MS1MV2-R100 (CVPR'19)94.295.6
Adocos (CVPR'19)-92.4
P2SGrad (CVPR'19)-92.3
PFE (ICCV'19)-93.3
MV-Arc-Softmax* (AAAI'20)93.695.2
Ours-MS1MV2-R10094.896.1
+ +![](images/2ddfa4222cfa0bd0afb7367a355ce44baa54a8e2885f627ad6c181c3354ddc0e.jpg) +(a) ROC for IJB-B + +![](images/4f460cb1e3c3e19e37d56379ca66f9b5ef498ef242f7178131d2f82686c0c5cd.jpg) +(b) ROC for IJB-C +Figure 6. ROC of 1:1 verification protocol on IJB-B and IJB-C. + +the performance is near saturated. While for both CFP-FP and CPLFW, our method shows superiority over the baselines including general methods, e.g., [32], [4], and crosspose methods, e.g., [29], [22], [3] and [7]. As a recent face recognition method, MV-Arc-Softmax achieves better performance than ArcFace, but still worse than Our CurricularFace. Finally, for AgeDB and CALFW, as Tab. 4 shows, our CurricularFace again achieves the best performance than all of the other SOTA methods. + +Results on IJB-B and IJB-C. The IJB-B dataset contains 1,845 subjects with 21.8K still images and 55K frames from 7,011 videos. In the 1:1 verification, there are 10,270 positive matches and 8M negative matches. The IJB-C dataset is a further extension of IJB-B, which contains about 3,500 identities with a total of 31,334 images and 117,542 unconstrained video frames. In the 1:1 verification, there are 19,557 positive matches and 15,638,932 + +Table 6. Verification comparison with SOTA methods on MegaFace Challenge 1 using FaceScrub as the probe set. Id refers to the rank-1 face identification accuracy with 1M distractors, and Ver refers to the face verification TAR at $1e^{-6}$ FAR. The column R refers to data refinement on both probe set and 1M distractors. * denotes our re-implemented results with the backbone ResNet100 [8]. + +
Methods (%)ProtocolRIdVer
Triplet (CVPR'15)Small64.7978.32
Center Loss (ECCV'16)Small65.4980.14
SphereFace (CVPR'17)Small72.7385.56
CosFace (CVRP'18)Small77.1189.88
AM-Softmax (SPL'18)Small72.4784.44
ArcFace-R50 (CVPR'19)Small77.5092.34
ArcFace-R50Small✓91.7593.69
Ours-R50Small77.6592.91
Ours-R50Small✓92.4894.55
CosFace-R100Large80.5696.56
CosFace-R100Large✓97.9197.91
ArcFace-R100Large81.0396.98
ArcFace-R100Large✓98.3598.48
PFE (ICCV'19)Large78.9592.51
Adacos (CVPR'19)Large✓97.41-
P2SGrad (CVPR'19)Large✓97.25-
MV-Arc-Softmax (AAAI'20)Large✓97.1497.57
MV-Arc-Softmax*Large80.5996.22
MV-Arc-Softmax*Large✓97.7697.80
Ours-R100Large81.2697.26
Ours-R100Large✓98.7198.64
AdaptiveFace-R50 (CVPR19)Large✓95.0295.61
Ours-R50Large✓98.2598.44
+ +negative matches. On IJB-B and IJB-C datasets, we employ MS1MV2 and the ResNet100 for a fair comparison with recent methods. We follow the testing protocol in ArcFace and take the average of the image features as the corresponding template representation without bells and whistles. Note that our method is not proposed for set-based face recognition task, and DOES not adopt any specific strategies for set-based face recognition. The experiments on these two datasets are just to prove that our loss can obtain more discriminate features than the baselines like ArcFace, which are also generic methods for face recognition. Tab. 5 exhibits the performance of different methods, e.g., Multicolumn [35], DCN [34], Adacos [38], P2SGrad [39], PFE [25] and MV-Arc-Softmax [31] on IJB-B and IJB-C 1:1 verification, our method again achieves the best performance. Fig. 6 shows the ROC curves of CurricularFace and ArcFace on IJB-B/C with the backbone ResNet100, our method achieves better performance. + +Results on MegaFace. Finally, we evaluate the performance on the MegaFace Challenge. The gallery set of MegaFace includes 1M images of 690K subjects, and the probe set includes 100K photos of 530 unique individuals from FaceScrub. We report the two testing results under two protocols (large or small training set). Here, we use CASIA-WebFace and MS1MV2 under the small protocol and large protocol, respectively. In Tab. 6, our method + +![](images/399982032c8baf5c614a409307fd62efb54513fc52c43912d963de476492ab36.jpg) +Figure 7. Easy and hard examples from two subjects classified by our CurricularFace on early and later training stage, respectively. Green box indicates easy samples. Red box indicates hard samples. Blue box means samples are classified as hard in early stage but relabeled as easy in later stage, which indicates samples' transformation from hard to easy during the training procedure. + +![](images/315dc79e438c92233ef286e9b88e72e6ef8dc599792663e9343b9a46ad1f707d.jpg) +Figure 8. The rank-1 face identification accuracy on MegaFace Challenge 1 with both the 1M distractors and the probe set refined by ArcFace. + +achieves the best single-model identification and verification performance under both protocols, surpassing the recent strong competitors, e.g., CosFace, ArcFace, Adacos, P2SGrad and PFE. We also report the results following the ArcFace testing protocol, which refines both the probe set and the gallery set. As shown in Fig. 8, our method still clearly outperforms the competitors and achieves the best performance on identification. Compared with ArcFace, our loss shows better performance under both identification and verification scenarios as shown in Fig. 9. AdaptiveFace [17] is another recent margin-based loss function for face recognition. We train our model with the same training data MS1MV2 and the same backbone ResNet50 [8] as AdaptiveFace for a fair comparison. The results in Tab. 6 demonstrate the superiority of our method. + +Time Complexity. The proposed method only brings small burden on training complexity, but has the same cost as the backbone model during inference. Specifically, compared with the conventional margin-based loss functions, our loss only additionally adjusts the negative cosine similarity of hard samples. Under the same environment and batchsize, ArcFace [8] costs 0.370s for each iteration on NVIDIA P40 GPUs, while ours costs 0.378s. + +![](images/e5981cd8f1f408f9360f85f45e5fc734f9f1deb22cb674475d2f5013aad76661.jpg) +Figure 9. Illustrations on Top 1 of different distractors and ROC on Megaface. Results are evaluated on refined MegaFace dataset. The results of ArcFace are from the official ResNet100 pre-trained with MS1M. + +![](images/3221e1fd5663194a6d6dab0d40487e7d73b06a3e9381fcfcac63660e496ad242.jpg) + +Discussion on Easy and Hard Samples During Training. Finally, Fig. 7 shows the easy and hard samples classified by our method in different training stages. As we can see, the front and clear faces are usually considered as easy samples in early training stage, and our model mainly learns the identity information from these samples. With the model continues training, slightly harder samples (i.e., Blue box) are gradually focused and corrected as the easy ones. + +# 5. Conclusions + +In this paper, we propose a novel Adaptive Curriculum Learning Loss that embeds the idea of adaptive curriculum learning into deep face recognition. Our key idea is to address easy samples in the early training stage and hard ones in the later stage. Our method is easy to implement and robust to converge. Extensive experiments on popular facial benchmarks demonstrate the effectiveness of our method compared to the SOTA competitors. Following the main idea of this work, future research can be expanded in various aspects, including designing a better function $N(\cdot)$ for negative cosine similarity that shares similar adaptive characteristic during training, and investigating the effects of noise samples that might be optimized as hard samples. + +# References + +[1] Sumit Basu and Janara Christensen. Teaching classification boundaries to humans. In AAAI, 2013. 3 +[2] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In ICML, 2009. 2, 3 +[3] Kaidi Cao, Yu Rong, Cheng Li, Xiaou Tang, and Chen Change Loy. Pose-robust face recognition via deep residual equivariant mapping. In CVPR, 2018. 7 +[4] Qiong Cao, Li Shen, Weidi Xie, Omkar M. Parkhi, and Andrew Zisserman. Vggface2: A dataset for recognising faces across pose and age. In FG, 2018. 7 +[5] Beidi Chen, Weiyang Liu, Animesh Garg, Zhiding Yu, Anshumali Shrivastava, and Anima Anandkumar. Angular visual hardness. In ICML Workshop on Deep Phenomena, 2019. 2 +[6] Sheng Chen, Yang Liu, Xiang Gao, and Zhen Han. Mobile-facenets: Efficient cnns for accurate real-time face verification on mobile devices. In CCBR, 2018. 2 +[7] Jiankang Deng, Shiyang Cheng, Niannan Xue, Yuxiang Zhou, and Stefanos Zafeiriou. Uv-gan: Adversarial facial uv map completion for pose-invariant face recognition. In CVPR, 2018. 7 +[8] Jiankang Deng, Jia Guo, and Stefanos Zafeiriou. ArcFace: Additive angular margin loss for deep face recognition. In CVPR, 2019. 1, 2, 6, 7, 8 +[9] Gary B. Huang, Manu Ramesh, Tamara Berg, and Erik Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. Technical Report 07-49, University of Massachusetts, Amherst, October 2007. 6 +[10] Yuge Huang, Pengcheng Shen, Ying Tai, Shaoxin Li, Xiaoming Liu, Jilin Li, Feiyue Huang, and Rongrong Ji. Distribution distillation loss: Generic approach for improving face recognition from hard samples. arXiv preprint arXiv:2002.03662, 2020. 2 +[11] Ira Kemelmacher-Shlizerman, Steven M Seitz, Daniel Miller, and Evan Brossard. The megaface benchmark: 1 million faces for recognition at scale. In CVPR, 2016. 6 +[12] M Pawan Kumar, Benjamin Packer, and Daphne Koller. Self-paced learning for latent variable models. In NIPS, 2010. 3 +[13] Buyu Li, Yu Liu, and Xiaogang Wang. Gradient harmonized single-stage detector. In AAAI, 2019. 5 +[14] Weiyang Li, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Spherface: Deep hypersphere embedding for face recognition. In CVPR, 2017. 1, 2 +[15] Xianyang Li. Airface: Lightweight and efficient model for face recognition. arXiv:1907.12256, 2019. 6 +[16] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In ICCV, pages 2980-2988, 2017. 2, 3 +[17] Hao Liu, Xiangyu Zhu, Zhen Lei, and Stan Z Li. Adaptive face: Adaptive margin and sampling for face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11947-11956, 2019. 8 +[18] Weiyang Liu, Yandong Wen, Zhiding Yu, and Meng Yang. Large-margin softmax loss for convolutional neural networks. In ICML, 2016. 2 + +[19] Brianna Maze, Jocelyn Adams, James A Duncan, Nathan Kalka, Tim Miller, Charles Otto, Anil K Jain, W Tyler Niggel, Janet Anderson, Jordan Cheney, et al. Iarpa janus benchmark-c: Face dataset and protocol. In ICB, 2018. 6 +[20] Stylianos Moschoglou, Athanasios Papaioannou, Christos Sagonas, Jiankang Deng, Irene Kotsia, and Stefanos Zafeiriou. Agedb: the first manually collected, in-the-wild age database. In CVPR Workshops, 2017. 6 +[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. 6 +[22] Xi Peng, Xiang Yu, Kihyuk Sohn, Dimitris Metaxas, and Manmohan Chandraker. Reconstruction-based disentanglement for poseinvariant face recognition. In ICCV, 2017. 7 +[23] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, 2015. 2 +[24] S. Sengupta, J.-C. Chen, C. Castillo, V. M. Patel, R. Chellappa, and D.W. Jacobs. Frontal to profile face verification in the wild. In WACV, 2016. 6 +[25] Yichun Shi, Anil K Jain, and Nathan D Kalka. Probabilistic face embeddings. In ICCV, 2019. 7 +[26] Abhinav Shrivastava, Abhinav Gupta, and Ross Girshick. Training region-based object detectors with online hard example mining. In CVPR, 2016. 2, 3 +[27] Ying Tai, Yicong Liang, Xiaoming Liu, Lei Duan, Jilin Li, Chengjie Wang, Feiyue Huang, and Yu Chen. Towards highly accurate and stable face alignment for high-resolution videos. In AAAI, 2019. 6 +[28] Yaniv Taigman, Ming Yang, Marc'Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1701-1708, 2014. 2 +[29] Luan Tran, Xi Yin, and Xiaoming Liu. Disentangled representation learning GAN for pose-invariant face recognition. In CVPR, 2017. 7 +[30] Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In CVPR, 2018. 1 +[31] Xiaobo Wang, Shifeng Zhang, Shuo Wang, Tianyu Fu, Hailin Shi, and Tao Mei. Mis-classified vector guided softmax loss for face recognition. In AAAI, 2020. 1, 2, 3, 7 +[32] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In ECCV, 2016. 7 +[33] Cameron Whitelam, Emma Taborsky, Austin Blanton, Brianna Maze, Jocelyn Adams, Tim Miller, Nathan Kalka, Anil K Jain, James A Duncan, Kristen Allen, et al. Iarpa janus benchmark-b face dataset. In CVPR Workshops, 2017. 6 +[34] Weidi Xie, Li Shen, and Andrew Zisserman. Comparator networks. In ECCV, 2018. 7 +[35] Weidi Xie and Andrew Zisserman. Multicolumn networks for face recognition. In BMVC, 2018. 7 + +[36] Dong Yi, Zhen Lei, Shengcai Liao, and Stan Z. Li. Learning face representation from scratch. arXiv:1411.7923, 2014. 6 +[37] Kaipeng Zhang, Zhanpeng Zhang, Zhifeng Li, and Yu Qiao. Joint face detection and alignment using multitask cascaded convolutional networks. IEEE Signal Processing Letters, 23(10):1499-1503, 2016. 6 +[38] Xiao Zhang, Rui Zhao, Yu Qiao, Xiaogang Wang, and Hongsheng Li. Adacos: Adaptively scaling cosine logits for effectively learning deep face representations. In CVPR, 2019. 1, 7 +[39] Xiao Zhang, Rui Zhao, Junjie Yan, Mengya Gao, Yu Qiao, Xiaogang Wang, and Hongsheng Li. P2sgrad: Refined gradients for optimizing deep face models. In CVPR, 2019. 7 +[40] Tianyue Zheng, Weihong Deng, and Jiani Hu. Cross-age lfw: A database for studying cross-age face recognition in unconstrained environments. arXiv:1708.08197, 2017. 6 +[41] Tianyue Zheng, Weihong Deng, and Jiani Hu. Cross-posed lfw: A database for studying cross-posed face recognition in unconstrained environments. Technical Report 18-01, Beijing University of Posts and Telecommunications, February 2018. 6 +[42] Tianyi Zhou and Jeff Bilmes. Minimax curriculum learning: Machine teaching with desirable difficulties and scheduled diversity. In ICLR, 2018. 3 \ No newline at end of file diff --git a/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/images.zip b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0fe6d61f9ba89018398a238654e34270a0ee9e89 --- /dev/null +++ b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e018afa0e25f2e0b6e6ca7d50dc77c9bcabcdcfc17758ef2034d767af3465f20 +size 565901 diff --git a/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/layout.json b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0ba53e73a8e8d8b15fc1c41b7ad8d2e7ad51d83f --- /dev/null +++ b/curricularfaceadaptivecurriculumlearninglossfordeepfacerecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:13bdf31c52ad3f981f9f6faefa34a77b19fa8e49fd80bc38652bbf0131fb67bc +size 439132 diff --git a/cvxnetlearnableconvexdecomposition/50a27e96-d8ec-42b8-a1dc-dabb2d9831a0_content_list.json b/cvxnetlearnableconvexdecomposition/50a27e96-d8ec-42b8-a1dc-dabb2d9831a0_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..5d6153972473d98f7574d2dad74bb21bfba36092 --- /dev/null +++ b/cvxnetlearnableconvexdecomposition/50a27e96-d8ec-42b8-a1dc-dabb2d9831a0_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:510cf8467a7f47d4bd2ab99af03f3c9e35eb9d35925ceadab4c25a31ab2736f6 +size 89078 diff --git a/cvxnetlearnableconvexdecomposition/50a27e96-d8ec-42b8-a1dc-dabb2d9831a0_model.json b/cvxnetlearnableconvexdecomposition/50a27e96-d8ec-42b8-a1dc-dabb2d9831a0_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c6f847a3f585c4364c1a4df5ce58a332a33c70ec --- /dev/null +++ b/cvxnetlearnableconvexdecomposition/50a27e96-d8ec-42b8-a1dc-dabb2d9831a0_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:208ee2b135298eea734a6cd737fd2fec054204ab37261287ca27dc2ebf8f12af +size 113170 diff --git a/cvxnetlearnableconvexdecomposition/50a27e96-d8ec-42b8-a1dc-dabb2d9831a0_origin.pdf b/cvxnetlearnableconvexdecomposition/50a27e96-d8ec-42b8-a1dc-dabb2d9831a0_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..54a49c24b870d33766a354441c89f461575c02ef --- /dev/null +++ b/cvxnetlearnableconvexdecomposition/50a27e96-d8ec-42b8-a1dc-dabb2d9831a0_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fa4e7f42238f31bc70a9d49aa06c968f5693edc34764b74715b0970231c0b30 +size 1116058 diff --git a/cvxnetlearnableconvexdecomposition/full.md b/cvxnetlearnableconvexdecomposition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..145ebc286eb2e2697525208b86f6db631530782b --- /dev/null +++ b/cvxnetlearnableconvexdecomposition/full.md @@ -0,0 +1,358 @@ +# CvxNet: Learnable Convex Decomposition + +Boyang Deng +Google Research + +Kyle Genova Google Research + +Geoffrey Hinton +Google Research + +Soroosh Yazdani +Google Hardware + +Sofien Bouaziz +Google Hardware + +# Abstract + +Any solid object can be decomposed into a collection of convex polytopes (in short, convexes). When a small number of convexes are used, such a decomposition can be thought of as a piece-wise approximation of the geometry. This decomposition is fundamental in computer graphics, where it provides one of the most common ways to approximate geometry, for example, in real-time physics simulation. A convex object also has the property of being simultaneously an explicit and implicit representation: one can interpret it explicitly as a mesh derived by computing the vertices of a convex hull, or implicitly as the collection of half-space constraints or support functions. Their implicit representation makes them particularly well suited for neural network training, as they abstract away from the topology of the geometry they need to represent. However, at testing time, convexes can also generate explicit representations - polygonal meshes - which can then be used in any downstream application. We introduce a network architecture to represent a low dimensional family of convexes. This family is automatically derived via an auto-encoding process. We investigate the applications of this architecture including automatic convex decomposition, image to 3D reconstruction, and part-based shape retrieval. + +# 1. Introduction + +While images admit a standard representation in the form of a scalar function uniformly discretized on a grid, the curse of dimensionality has prevented the effective usage of analogous representations for learning 3D geometry. Voxel representations have shown some promise at low resolution [10, 20, 35, 57, 62, 69, 74], while hierarchical representations have attempted to reduce the memory footprint required for training [58, 64, 73], but at the significant cost of complex implementations. Rather than representing the volume occupied by a 3D object, one can resort to mod- + +Andrea Tagliasacchi Google Research + +![](images/d36dfd3a761bc7be6b0cb24073596e44ebaaa965a5f3d5c9d6b8af7b121a2fc1.jpg) +Figure 1. Our method reconstructs a 3D object from an input image as a collection of convex hulls, and we visualize the explode of these convexes. Notably, CvxNet outputs polygonal mesh representations of convex polytopes without requiring the execution of computationally expensive iso-surfacing (e.g. Marching Cubes). This means the representation outputted by CvxNet can then be readily used for physics simulation [17], as well as many other downstream applications that consume polygonal meshes. + +eling its surface via a collection of points [1, 19], polygons [31, 56, 71], or surface patches [26]. Alternatively, one might follow Cezanne's advice and "treat nature by means of the cylinder, the sphere, the cone, everything brought into proper perspective", and think to approximate 3D geometry as geons [4] - collections of simple to interpret geometric primitives [68, 77], and their composition [60, 21]. Hence, one might rightfully start wondering "why so many representations of 3D data exist, and why would one be more advantageous than the other?" One observation is that multiple equivalent representations of 3D geometry exist because real-world applications need to perform different operations and queries on this data ([9, Ch.1]). For example, in computer graphics, points and polygons allow for very efficient rendering on GPUs, while volumes allow artists to sculpt geometry without having to worry about tes + +sellation [51] or assembling geometry by smooth composition [2], while primitives enable highly efficient collision detection [66] and resolution [67]. In computer vision and robotics, analogous trade-offs exist: surface models are essential for the construction of low-dimensional parametric templates essential for tracking [6, 8], volumetric representations are key to capturing 3D data whose topology is unknown [48, 47], while part-based models provide a natural decomposition of an object into its semantic components. Part-based models create a representation useful to reason about extent, mass, contact, ... quantities that are key to describing the scene, and planning motions [29, 28]. + +Contributions. In this paper, we propose a novel representation for geometry based on primitive decomposition. The representation is parsimonious, as we approximate geometry via a small number of convex elements, while we seek to allow low-dimensional representation to be automatically inferred from data – without any human supervision. More specifically, inspired by recent works [68, 21, 44] we train our pipeline in an unsupervised manner: predicting the primitive configuration as well as their parameters by checking whether the reconstructed geometry matches the geometry of the target. We note how we inherit a number of interesting properties from several of the aforementioned representations. As it is part-based it is naturally locally supported, and by training on a shape collection, parts have a semantic association (i.e. the same element is used to represent the backs of chairs). Although part-based, each of them is not restricted to belong to the class of boxes [68], ellipsoids [21], or sphere-meshes [67], but to the more general class of convexes. As a convex is defined by a collection of half-space constraints, it can be simultaneously decoded into an explicit (polygonal mesh), as well as implicit (indicator function) representation. Because our encoder decomposes geometry into convexes, it is immediately usable in any application requiring real-time physics simulation, as collision resolution between convexes is efficiently decided by GJK [23] (Figure 1). Finally, parts can interact via structuring [21] to generate smooth blending between parts. + +# 2. Related works + +One of the simplest high-dimensional representations is voxels, and they are the most commonly used representation for discriminative [43, 54, 61] models, due to their similarity to image based convolutions. Voxels have also been used successfully for generative models [75, 16, 24, 57, 62, 74]. However, the memory requirements of voxels makes them unsuitable for resolutions larger than $64^{3}$ . One can reduce the memory consumption significantly by using octrees that take advantage of the sparsity of voxels [58, 72, 73, 64]. This can extend the resolution to $512^{3}$ , for instance, but comes at the cost of more complicated implementation. + +Surfaces. In computer graphics, polygonal meshes are the standard representation of 3D objects. Meshes have also been considered for discriminative classification by applying graph convolutions to the mesh [42, 11, 27, 46]. Recently, meshes have also been considered as the output of a network [26, 32, 71]. A key weakness of these models is the fact that they may produce self-intersecting meshes. Another natural high-dimensional representation that has garnered some traction in vision is the point cloud representation. Point clouds are the natural representation of objects if one is using sensors such as depth cameras or LiDAR, and they require far less memory than voxels. Qi et al. [53, 55] used point clouds as a representation for discriminative deep learning tasks. Hoppe et al. [30] used point clouds for surface mesh reconstruction (see also [3] for a survey of other techniques). Fan et. al. [19] and Lin et. al. [37] used point clouds for 3D reconstruction using deep learning. However, these approaches require additional non-trivial post-processing steps to generate the final 3D mesh. + +Primitives. Far more common is to approximate the input shape by set of volumetric primitives. With this perspective in mind, representing shapes as voxels will be a special case, where the primitives are unit cubes in a lattice. Another fundamental way to describe 3D shapes is via Constructive Solid Geometry [33]. Sherma et. al. [60] presents a model that will output a program (i.e. set of Boolean operations on shape primitives) that generate the input image or shape. In general, this is a fairly difficult task. Some of the classical primitives used in graphics and computer vision are blocks world [59], generalized cylinders [5], geons [4], and even Lego pieces [70]. In [68], a deep CNN is used to interpret a shape as a union of simple rectangular prisms. They also note that their model provides a consistent parsing across shapes (i.e. the head is captured by the same primitive), allowing some interpretability of the output. In [50], they extended cuboids to superquadrics, showing that the extra flexibility will result in better reconstructions. + +Implicit surfaces. If one generalizes the shape primitives to analytic surfaces (i.e. level sets of analytic functions), then new analytic tools become available for generating shapes. In [44, 15], for instance, they train a model to discriminate inside coordinates from outside coordinates (referred to as an occupancy function in the paper, and as an indicator function in the graphics community). Park et. al. [49] used the signed distance function to the surface of the shape to achieve the same goal. One disadvantage of the implicit description of the shape is that most of the interpretability is missing from the final answer. In [21], they take a more geometric approach and restrict to level sets of axis-aligned Gaussians. Partly due to the restrictions of these functions, their representation struggles on shapes with angled parts, but they do recover the interpretability that [68] offers. + +![](images/1eaa991efa94e194877224c9fbb7f8ade6f606a7e58e67866037425a20eee447.jpg) +hyperplanes + +![](images/ef5acea026798286c0bde28b4ed8c27a0589ad3c4ef182a307531e60021f4d5d.jpg) + +![](images/fab52078e9ee953eeead89e35cd77a2f9cd103fe06b4ed98131945d4c8bd9254.jpg) + +![](images/585225391905417ec4b18caa61ae19eb16b1b74acbf4366ed34bde8508baed9f.jpg) + +![](images/e148bb524dfd460d1b88d1f7fcb6f0c65bef260c5b4d67bfe83f442a839da001.jpg) +signed distances + +![](images/d264d74e96a9d4db8a61a121249e263afa51d13be048abb98c6eb8caf6b47ffd.jpg) +Figure 2. From {hyperplanes} to occupancy - A collection of hyperplane parameters for an image specifies the indicator function of a convex. The soft-max allows gradients to propagate through all hyperplanes and allows for the generation of smooth convex, while the sigmoid parameter controls the slope of the transition in the generated indicator - note that our soft-max function is a LogSumExp. + +![](images/f3a6b6012e39c69be0f1d3babe7cc34ea458715ea393f005b6f0681eaeff9d9a.jpg) + +![](images/dcf6bd388bb493482dfa3e82b92922aca701ea2312ced57d61efab9ff084f567.jpg) + +![](images/9e5aae94b3ec5fde2a78e90d8b77c96420028be142da86f8a9bfa0252106564d.jpg) +after softmax + +![](images/971ce6b590551f66574338ae90b3f2f8470c7e3889865e5fee368164cd91114b.jpg) +after sigmoid + +Convex decomposition. In graphics, a common method to represent shapes is to describe them as a collection of convex objects. Several methods for convex decomposition of meshes have been proposed [25, 52]. In machine learning, however, we only find early attempts to approach convex hull computation via neural networks [34]. Splitting the meshes into exactly convexes generally produces too many pieces [13]. As such, it is more prudent to seek small number of convexes that approximate the input shape [22, 36, 38, 41, 40]. Recently [66] also extended convex decomposition to the spatio-temporal domain, by considering moving geometry. Our method is most related to [68] and [21], in that we train an occupancy function. However, we choose our space of functions so that their level sets are approximately convex, and use these as building blocks. + +# 3. Method - CvxNet + +Our object is represented via an indicator $\mathcal{O}:\mathbb{R}^3\to [0,1]$ , and with $\partial \mathcal{O} = \{\mathbf{x}\in \mathbb{R}^3\mid \mathcal{O}(x) = 0.5\}$ we indicate the surface of the object. The indicator function is defined such that $\{\mathbf{x}\in \mathbb{R}^3\mid \mathcal{O}(x) = 0\}$ defines the outside of the object and $\{\mathbf{x}\in \mathbb{R}^3\mid \mathcal{O}(x) = 1\}$ the inside. Given an input (e.g. an image, point cloud, or voxel grid) an encoder estimates the parameters $\{\beta_k\}$ of our template representation $\hat{\mathcal{O}} (\cdot)$ with $K$ primitives (indexed by $k$ ). We then evaluate the template at random sample points $\mathbf{x}$ , and our training loss ensures $\hat{\mathcal{O}} (\mathbf{x})\approx \mathcal{O}(\mathbf{x})$ . In the discussion below, without loss of generality, we use 2D illustrative examples where $\mathcal{O}:\mathbb{R}^2\to [0,1]$ . Our representation is a differentiable convex decomposition, which is used to train an image encoder in an end-to-end fashion. We begin by describing a differentiable representation of a single convex object (Section 3.1). Then we introduce an auto-encoder architecture to create a low-dimensional family of approximate convexes (Section 3.2). These allow us to represent objects as spatial compositions of convexes (Section 3.4). We then describe the losses used to train our networks (Section 3.5) and mention a few implementation details (Section 3.6). + +# 3.1. Differentiable convex indicator - Figure 2 + +We define a decoder that given a collection of (unordered) half-space constraints constructs the indicator function of a single convex object; such a function can be evaluated at any point $\mathbf{x} \in \mathbb{R}^3$ . We define $\mathcal{H}_h(\mathbf{x}) = \mathbf{n}_h \cdot \mathbf{x} + d_h$ as the signed distance of the point $\mathbf{x}$ from the $h$ -th plane with normal $\mathbf{n}_h$ and offset $d_h$ . Given a sufficiently large number $H$ of half-planes the signed distance function of any convex object can be approximated by taking the max of the signed distance functions of the planes. To facilitate gradient learning, instead of maximum, we use the smooth maximum function LogSumExp and define the approximate signed distance function, $\Phi(x)$ : + +$$ +\Phi (\mathbf {x}) = \operatorname {L o g S u m E x p} \left\{\delta \mathcal {H} _ {h} (\mathbf {x}) \right\}, \tag {1} +$$ + +Note this is an approximate SDF, as the property $\| \nabla \Phi (\mathbf{x})\| = 1$ is not necessarily satisfied $\forall \mathbf{x}$ . We then convert the signed distance function to an indicator function $\mathcal{C}:\mathbb{R}^3\to [0,1]$ : + +$$ +\mathcal {C} (\mathbf {x} | \boldsymbol {\beta}) = \operatorname {S i g m o i d} (- \sigma \Phi (\mathbf {x})), \tag {2} +$$ + +We denote the collection of hyperplane parameters as $\mathbf{h} = \{(\mathbf{n}_h,d_h)\}$ , and the overall set of parameters for a convex as $\beta = [\mathbf{h},\sigma]$ . We treat $\sigma$ as a hyperparameter, and consider the rest as the learnable parameters of our representation. As illustrated in Figure 2, the parameter $\delta$ controls the smoothness of the generated convex, while $\sigma$ controls the sharpness of the transition of the indicator function. Similar to the smooth maximum function, the soft classification boundary created by Sigmoid facilitates training. + +In summary, given a collection of hyperplane parameters, this differentiable module generates a function that can be evaluated at any position $\mathbf{x}$ . + +# 3.2. Convex encoder/decoder - Figure 3 + +A sufficiently large set of hyperplanes can represent any convex object, but one may ask whether it would be pos- + +![](images/9c3a01d2839a07eaf22b973ca459f8085fb80a7da9532f6343bce2a59f1fa99e.jpg) +Figure 3. Convex auto-encoder - The encoder $\mathcal{E}$ creates a low dimensional latent vector representation $\lambda$ , decoded into a collection of hyperplanes by the decoder $\mathcal{D}$ . The training loss involves reconstructing the value of the input image at random pixels $\mathbf{x}$ . + +sible to discover some form of correlation between their parameters. Towards this goal, we employ an auto-encoder architecture illustrated in Figure 3. Given an input, the encoder $\mathcal{E}$ derives a bottleneck representation $\lambda$ from the input. Then, a decoder $\mathcal{D}$ derives the collection of hyperplane parameters. While in theory permuting the $H$ hyperplanes generates the same convex, the decoder $\mathcal{D}$ correlates a particular hyperplane with a corresponding orientation. This is visible in Figure 4, where we color-code different 2D hyperplanes and indicate their orientation distribution in a simple 2D auto-encoding task for a collection of axis-aligned ellipsoids. As ellipsoids and oriented cuboids are convexes, we argue that the architecture in Figure 3 allows us to generalize the core geometric primitives proposed in VP [68] and SIF [21]; we verify this claim in Figure 5. + +![](images/b6c322754bc76e204353ba72a216c77e6e038ed9072530559fab6a38b8d4d726.jpg) +Figure 4. Correlation - While the description of a convex, $\{(\mathbf{n}_h,\mathbf{d}_h)\}$ is permutation invariant we employ an encoder/decoder that implicitly establishes an ordering. Our visualization reveals how a particular hyperplane typically represents a particular subset of orientations. + +![](images/149722ba1585b40686ed9892bf3fefa62cfeeb9bda053e5f0270e737300fbfc0.jpg) +Figure 5. Interpolation - We compute latent code of shapes in the corners using CvxNet. We then linearly interpolate latent codes to synthesize shapes in-between. Our primitives generalize the shape space of VP [68] (boxes) and SIF [21] (ellipsoids) so we can interpolate between them smoothly. + +# 3.3. Explicit interpretation - Figure 6 + +What is significantly different from other methods that employ indicator functions as trainable representations of 3D geometry, is that convexes generated by our network admit an explicit interpretation: they can be easily converted + +into polygonal meshes. This is in striking contrast to [49, 15, 21, 44], where a computationally intensive isosurfacing operation needs to be executed to extract their surface (e.g. Marching Cubes [39]). More specifically, isosurfacing techniques typically suffer the curse of dimensionality, with a performance that scales as $1 / \varepsilon^{d}$ , where $\varepsilon$ the desired spatial resolution and $d$ is usually 3. Conversely, as we illustrate in Figure 6, we only require the execution of two duality transforms, and the computations of two convex hulls of $H$ points. The complexity of these operations is clearly independent of any resolution parameter $\varepsilon$ . + +![](images/7af78a713aaec87908c2336dc70a370a63529198b182ba9fca138c3b0be4de9c.jpg) +Figure 6. From {hyperplanes} to polygonal meshes - The polygonal mesh corresponding to a set of hyperplanes (a) can be computed by transforming planes into points via a duality transform (b), the computation of a convex hull (c), a second duality transform (d), and a final convex hull execution (e). The output of this operation is a polygonal mesh. Note this operation is efficient, output sensitive, and, most importantly does not suffer the curse of dimensionality. Note that, for illustration purposes, the duality coordinates in this figure are fictitious. + +# 3.4. Multi convex decomposition - Figure 7 + +Having a learnable pipeline for a single convex object, we can now expand the expressivity of our model by representing generic non-convex objects as compositions of convexes [66]. To achieve this task an encoder $\mathcal{E}$ outputs a low + +![](images/ffd1ad086844c692966cfd4f19d146a59f0843a22e8430692f9364cd9c114c2f.jpg) +Figure 7. Multi-convex auto-encoder - Our network approximates input geometry as a composition of convex elements. Note that this network does not prescribe how the final image is generated, but merely output the shape $\{\beta_k\}$ and pose $\{\mathbf{T}_k\}$ parameters of the abstraction. Note that this is an illustration where the parameters $\{\beta_k\}, \{\pmb{T}_k\}$ have been directly optimized via SGD with a preset $\delta$ . + +dimensional bottleneck representation of all $K$ convexes $\lambda$ that $\mathcal{D}$ decodes into a collection of $K$ parameter tuples. Each tuple (indexed by $k$ ) is comprised of a shape code $\beta_{k}$ , and corresponding transformation $\mathbf{T}_k(\mathbf{x}) = \mathbf{x} + \mathbf{c}_k$ that transforms the point from world coordinates to local coordinates. $\mathbf{c}_k$ is the predicted translation vector (Figure 7). + +# 3.5. Training losses + +First and foremost, we want the (ground truth) indicator function of our object $\mathcal{O}$ to be well approximated: + +$$ +\mathcal {L} _ {\mathrm {a p p r o x}} (\omega) = \mathbb {E} _ {\mathbf {x} \sim \mathbb {R} ^ {3}} \| \hat {\mathcal {O}} (\mathbf {x}) - \mathcal {O} (\mathbf {x}) \| ^ {2}, \tag {3} +$$ + +where $\hat{\mathcal{O}} (\mathbf{x}) = \max_k\{\mathcal{C}_k(\mathbf{x})\}$ , and $\mathcal{C}_k(\mathbf{x}) = \mathcal{C}(\mathbf{T}_k(\mathbf{x})|\boldsymbol {\beta}_k)$ . The application of the max operator produces a perfect union of convexes. While constructive solid geometry typically applies the min operator to compute the union of signed distance functions, note that we apply the max operator to indicator functions instead with the same effect; see Section 6 in the supplementary material for more details. We couple the approximation loss with several auxiliary losses that enforce the desired properties of our decomposition. + +Decomposition loss (auxiliary). We seek a parsimonious decomposition of an object akin to Tulsiani et al. [68]. Hence, overlap between elements should be discouraged: + +$$ +\mathcal {L} _ {\text {d e c o m p}} (\omega) = \mathbb {E} _ {\mathbf {x} \sim \mathbb {R} ^ {3}} \| \operatorname {r e l u} \left(\sum_ {k} \left\{\mathcal {C} _ {k} (\mathbf {x}) \right\} - \tau\right) \| ^ {2}, \tag {4} +$$ + +where we use a permissive $\tau = 2$ , and note how the ReLU activates the loss only when an overlap occurs. + +Unique parameterization loss (auxiliary). While each convex is parameterized with respect to the origin, there is a nullspace of solutions - we can move the origin to another location within the convex, and update offsets $\{d_h\}$ and transformation $\mathbf{T}$ accordingly - see Figure 8(left). To remove such a null-space, we simply regularize the magni + +tudes of the offsets for each of the $K$ elements: + +$$ +\mathcal {L} _ {\text {u n i q u e}} (\omega) = \frac {1}{H} \sum_ {h} \| d _ {h} \| ^ {2} \tag {5} +$$ + +In the supplementary material, we prove that minimizing $\mathcal{L}_{\mathrm{unique}}$ leads to a unique solution and centers the convex body to the origin. This loss further ensures that "inactive" hyperplane constraints can be readily re-activated during learning. Because they fit tightly around the surface they are therefore sensitive to shape changes. + +Guidance loss (auxiliary). As we will describe in Section 3.6, we use offline sampling to speed-up training. However, this can cause severe issues. In particular, when a convex "falls within the cracks" of sampling (i.e. $\nexists x \mid \mathcal{C}(x) > 0.5$ ), it can be effectively removed from the learning process. This can easily happen when the convex enters a degenerate state (i.e. $d_h = 0 \forall h$ ). Unfortunately these degenerate configurations are encouraged by the loss (5). We can prevent collapses by ensuring that each of them represents + +![](images/969b7abae56ce64ab0615b60f7188371cee579ad4c9a369ac84f3d68128274e6.jpg) + +![](images/333c82e6db0d0ebb4318856cae6502b20b0fbc2567a2e61c8bc6056b861d788b.jpg) + +![](images/543a94ce520bf19264097d2d86b8be1c5a7c14ee25df95ba5ae84a50d6a79ab7.jpg) + +![](images/78f4b7a1c71dbf4d2ba3d6d1d80fc751078e6d3338308b5094e34a5ea1bfb6ec.jpg) +null-space +Figure 8. Auxiliary losses - Our $\mathcal{L}_{\mathrm{unique}}$ loss (left) prevents the existence of a null-space in the specification of convexes, and (middle) ensures inactive hyperplanes can be easily activated during training. (right) Our $\mathcal{L}_{\mathrm{guide}}$ move convexes towards the representation of samples drawn from within the object $\mathbf{x} \in \mathcal{O}$ . + +![](images/52e78b791913063e3bbfa620e89e8e17fdfe633fb4f1856aa8ce15214daa4860.jpg) +activity + +![](images/d9bef8e4a2f73fdf14e61635db405eef68851b22e667fafc60c3a4028600aeb8.jpg) +guidance loss + +a certain amount of information (i.e. samples): + +$$ +\mathcal {L} _ {\text {g u i d e}} (\omega) = \frac {1}{K} \sum_ {k} \frac {1}{N} \sum_ {\mathbf {x} \in \mathcal {N} _ {k} ^ {N}} \| \mathcal {C} _ {k} (\mathbf {x}) - \mathcal {O} (\mathbf {x}) \| ^ {2}, \tag {6} +$$ + +where $\mathcal{N}_k^N$ is the subset of $N$ samples from the set $\mathbf{x} \sim \{\mathcal{O}\}$ with the smallest distance value $\Phi_k(\mathbf{x})$ from $\mathcal{C}_k$ . In other words, each convex is responsible for representing at least the $N$ closest interior samples. + +Localization loss (auxiliary). When a convex is far from interior points, the loss in (6) suffers from vanishing gradients due to the sigmoid function. We overcome this problem by adding a loss with respect to $\mathbf{c}_k$ , the translation vector of the $k$ -th convex: + +$$ +\mathcal {L} _ {\mathrm {l o c}} (\omega) = \frac {1}{K} \sum_ {\mathbf {x} \in \mathcal {N} _ {k} ^ {1}} \| \mathbf {c} _ {k} - x \| ^ {2} \tag {7} +$$ + +Observations. Note that we supervise the indicator function $\mathcal{C}$ rather than $\Phi$ , as the latter does not represent the signed distance function of a convex (e.g. $\| \nabla \Phi(x) \| \neq 1$ ). Also note how the loss in (4) is reminiscent of SIF [21, Eq.1], where the overall surface is modeled as a sum of meta-ball implicit functions [7] - which the authors call "structuring". The core difference lies in the fact that SIF [21] models the surface of the object $\partial \mathcal{O}$ as an isolevel of the function post structuring - therefore, in most cases, the iso-surface of the individual primitives do not approximate the target surface, resulting in a slight loss of interpretability in the generated representation. + +# 3.6. Implementation details + +To increase training speed, we sample a set of points on the ground-truth shape offline, precompute the ground truth quantities, and then randomly sub-sample from this set during our training loop. For volumetric samples, we use the samples from OccNet [44], while for surface samples we employ the "near-surface" sampling described in SIF [21]. Following SIF [21], we also tune down $\mathcal{L}_{\mathrm{approx}}$ of "near-surface" samples by 0.1. We draw $100k$ random samples from the bounding box of $\mathcal{O}$ and $100k$ samples from each of $\partial \mathcal{O}$ to construct the points samples and labels. We use a sub-sample set (at training time) with 1024 points for both sample sources. Although Mescheder et al. [44] claims that using uniform volumetric samples are more effective than surface samples, we find that balancing these two strategies yields the best performance - this can be attributed to the complementary effect of the losses in (3) and (4). + +Architecture details. In all our experiments, we use the same architecture while varying the number of convexes and hyperplanes. For the $\{\mathrm{Depth}\}$ -to-3D task, we use 50 convexes each with 50 hyperplanes. For the RGB-to-3D + +task, we use 50 convexes each with 25 hyperplanes. Similar to OccNet [44], we use ResNet18 as the encoder $\mathcal{E}$ for both the {Depth}-to-3D and the RGB-to-3D experiments. A fully connected layer then generates the latent code $\lambda \in \mathbb{R}^{256}$ that is provided as input to the decoder $\mathcal{D}$ . For the decoder $\mathcal{D}$ we use a sequential model with four hidden layers with (1024, 1024, 2048, $|\mathbf{H}|$ ) units respectively. The output dimension is $|\mathbf{H}| = K(4 + 3H)$ where for each of the $K$ elements we specify a translation (3 DOFs) and a smoothness (1 DOFs). Each hyperplane is specified by the (unit) normal and the offset from the origin (3H DOFs). In all our experiments, we use a batch of size 32 and train with Adam with a learning rate of $10^{-4}$ , $\beta_{1} = .9$ , and $\beta_{2} = .999$ . As determined by grid-search on the validation set, we set the weight for our losses $\{\mathcal{L}_{\mathrm{approx}}:1.0,\mathcal{L}_{\mathrm{decomp}}:0.1,\mathcal{L}_{\mathrm{unique}}:0.001,\mathcal{L}_{\mathrm{guide}}:0.01,\mathcal{L}_{\mathrm{loc}}:1.0\}$ and $\sigma = 75$ . + +# 4. Experiments + +We use the ShapeNet [12] dataset in our experiments. We use the same voxelization, renderings, and data split as in Choy et. al. [16]. Moreover, we use the same multiview depth renderings as [21] for our {Depth}-to-3D experiments, where we render each example from cameras placed on the vertices of a dodecahedron. Note that this problem is a harder problem than 3D auto-encoding with point cloud input as proposed by OccNet [44] and resembles more closely the single view reconstruction problem. At training time we need ground truth inside/outside labels, so we employ the watertight meshes from [44] - this also ensures a fair comparison to this method. For the quantitative evaluation of semantic decomposition, we use labels from PartNet [45] and exploit the overlap with ShapeNet. + +Methods. We quantitatively compare our method to a number of self-supervised algorithms with different characteristics. First, we consider VP [68] that learns a parsimonious approximation of the input via (the union of) oriented boxes. We also compare to the Structured Implicit Function SIF [21] method that represents solid geometry as an iso-level of a sum of weighted Gaussians; like VP [68], and in contrast to OccNet [44], this methods provides an interpretable encoding of geometry. Finally, from the class of techniques that directly learn non-interpretable representations of implicit functions, we select OccNet [44], P2M [71], and AtlasNet [26]; in contrast to the previous methods, these solutions do not provide any form of shape decomposition. As OccNet [44] only report results on RGB-to-3D tasks, we extend the original codebase to also solve {Depth}-to-3D tasks. We follow the same data pre-processing used by SIF [21]. + +Metrics. With $\hat{\mathcal{O}}$ and $\partial \hat{\mathcal{O}}$ we respectively indicate the indicator and the surface of the union of our primitives. We then + +![](images/b4b2325179e428e776576556cc4b7eada936af1d85953d5e565569267c423005.jpg) +Figure 9. Analysis of accuracy vs. # primitives - (left) The ground truth object to be reconstructed and the single shape-abstraction generated by VP [68]. (middle) Quantitative evaluation (ShapeNet/Multi) of abstraction performance with an increase number of primitives - the closer the curve is to the top-left, the better. (right) A qualitative visualization of the primitives and corresponding reconstructions. + +![](images/f87bbca758ce5d55c8cb68a78b099d56a7f2c5393f93dd4935884fc996c802f6.jpg) + +use three quantitative metrics to evaluate the performance of 3D reconstruction: ① The Volumetric IoU; note that with $100K$ uniform samples to estimate this metric, our estimation is more accurate than the $32^{3}$ voxel grid estimation used by [16]. ② The Chamfer-L1 distance, a smooth relaxation of the symmetric Hausdorff distance measuring the average between reconstruction accuracy $\mathbb{E}_{\mathbf{o} \sim \partial \mathcal{O}}[\min_{\hat{\mathbf{o}} \in \partial \mathcal{O}}\|\mathbf{o} - \hat{\mathbf{o}}\|]$ and completeness $\mathbb{E}_{\hat{\mathbf{o}} \sim \partial \hat{\mathcal{O}}}[\min_{\mathbf{o} \in \partial \mathcal{O}}\|\hat{\mathbf{o}} - \mathbf{o}\|]$ [18]. ③ Following the arguments presented in [65], we also employ $F$ -score to quantitatively assess performance. It can be understood as "the percentage of correctly reconstructed surface". + +![](images/1f42e3477a33f8b4f1f83d06e70c3cb82193bb784585f053a139354e2b8d2356.jpg) +Figure 10. Part based retrieval - Two inputs (left) are first encoded into our CvxNet representation (middle-left), from which a user can select a subset of parts (middle-right). We then use the concatenated latent code as an (incomplete) geometric lookup function, and retrieve the closest decomposition in the training database (right). + +![](images/b15b9990c1f908f1a25ea3f8584427b744501a9fdf0bf816c394001a210d1b9e.jpg) +Figure 11. Abstraction - (left) The distribution of partnet labels within each convex ID (4 out of 50). (right) The classification accuracy for each semantic part when using the convex ID to label each point. BAE [14] is a baseline for unsupervised part segmentation. Finally, BAE* is the supervised version of BAE. + +# 4.1. Abstraction - Figure 9, 10, 11 + +As our convex decomposition is learnt on a shape collection, the convexes produced by our decoder are in natural correspondence - e.g. we expect the same $k$ -th convex to represent the leg of a chair in the chairs dataset. We analyze this quantitatively on the PartNet dataset [45]. We do so by verifying whether the $k$ -th component is consistently mapped to the same PartNet part label; see Figure 11 (left) for the distribution of PartNet labels within each component. We can then assign the most commonly associated label to a given convex to segment the PartNet point cloud, achieving a relatively high accuracy; see Figure 11 (right). This reveals how our representation captures the semantic structure in the dataset. We also evaluate our shape abstraction capabilities by varying the number of components and evaluating the trade-off between representation parsimony and reconstruction accuracy; we visualize this via Pareto-optimal curves in the plot of Figure 9. We compare with SIF [21], and note that thanks to the generalized shape space of our model, our curve dominates theirs regardless of the number of primitives chosen. We further investigate the use of natural correspondence in a part-based retrieval task. We first encode an input into our representation, allow a user to select a few parts of interest, and then use this (incomplete) shape-code to fetch the elements in the training set with the closest (partial) shape-code; see Figure 10. + +# 4.2. Reconstruction - Table 1 and Figure 12 + +We quantitatively evaluate the reconstruction performance against a number of state-of-the-art methods given inputs as multiple depth map images ( $\{\mathrm{Depth}\}$ -to-3D) and a single color image (RGB-to-3D); see Table 1. A few qualitative examples are displayed in Figure 12. We find that CvxNet is: $①$ consistently better than other part decomposition methods (SIF, VP, and SQ) which share the common goal of learning shape elements; $②$ in general comparable to the state-of-the-art reconstruction methods; $③$ better than the leading technique (OccNet [44]) when evaluated in terms of F-score, and tested on multi-view depth input. + +![](images/e2b904ef3dcf3f2ba88c532f606591df9853446d747c8f215fde30e5793ed602.jpg) +Input + +![](images/0091fd4151f217ca879db79f7300af12c7638f754b76898bfece2893a50b44b5.jpg) +Oracle + +![](images/ea63791da4c722f0761e5ea04aac5044602a060d4d185a338af2bc69b8ec65bc.jpg) +CvxNet + +![](images/6a306ced7c1e067a0491822f4e0619b9ceff540090a16a8804902d52d54b2cea.jpg) +AtlasNet +Figure 12. ShapeNet/Multi - Qualitative comparisons to SIF [21], AtlasNet [26], OccNet [44], VP [68] and SQ [50]; on RGB Input, while VP uses voxelized, and SQ uses a point-cloud input. (*Note that the OccNet [44] results are post-processed with smoothing). + +![](images/78629a62f3998377a18ab77e085c6a363f27fee08b89a30a0e0b2163d75418a4.jpg) +OccNet* + +![](images/562f581eb1e578dd614aefb14fc25d9ce8dcdbcd29b32037a258a6ec4a218617.jpg) +SIF + +![](images/d6f2216b951304e12f07667ac34d4ac6d046fe9628229d5d8efa4b1ed1065602.jpg) +VP + +![](images/66980418f6bdac0ebe2561e82df13defd44b4aff8d6ad372f9024778cb895dd4.jpg) +SQ + +
CategoryIoUChamfer-L1F-Score
OccNetSIFOursOccNetSIFOursOccNetSIFOurs
airplane0.7280.6620.7390.0310.0440.02579.5271.4084.68
bench0.6550.5330.6310.0410.0820.04371.9858.3577.68
cabinet0.8480.7830.8300.1380.1100.04871.3159.2676.09
car0.8300.7720.8260.0710.1080.03169.6456.5877.75
chair0.6960.5720.6810.1240.1540.11563.1442.3765.39
display0.7630.6930.7620.0870.0970.06563.7656.2671.41
lamp0.5380.4170.4940.6780.3420.35251.6035.0151.37
speaker0.8060.7420.7840.4400.1990.11258.0947.3960.24
rifle0.6660.6040.6840.0330.0420.02378.5270.0183.63
sofa0.8360.7600.8280.0520.0800.03669.6655.2275.44
table0.6990.5720.6600.1520.1570.12168.8055.6671.73
phone0.8850.8310.8690.0220.0390.01885.6081.8289.28
vessel0.7190.6430.7080.0700.0780.05266.4854.1570.77
mean0.7440.6600.7310.1490.1180.08069.0859.0273.49
+ +{Depth}-to-3D + +
CategoryP2MAtlasNetIoUOursP2MChamfer- \( {L}_{1} \)OursF-Score
OccNetSIFOursAtlasNetOccNetSIFAtlasNetOccNetSIFOurs
airplane0.420-0.5710.5300.5980.1870.1040.1470.1670.09367.2462.8752.8168.16
bench0.323-0.4850.3330.4610.2010.1380.1550.2610.13354.5056.9137.3154.64
cabinet0.664-0.7330.6480.7090.1960.1750.1670.2330.16046.4361.7931.6846.09
car0.552-0.7370.6570.6750.1800.1410.1590.1610.10351.5156.9137.6647.33
chair0.396-0.5010.3890.4910.2650.2090.2280.3800.33738.8942.4126.9038.49
display0.490-0.4710.4910.5760.2390.1980.2780.4010.22342.7938.9627.2240.69
lamp0.323-0.3710.2600.3110.3080.3050.4791.0960.79533.0438.3520.5931.41
speaker0.599-0.6470.5770.6200.2850.2450.3000.5540.46235.7542.4822.4229.45
rifle0.402-0.4740.4630.5150.1640.1150.1410.1930.10664.2256.5253.2063.74
sofa0.613-0.6800.6060.6770.2120.1770.1940.2720.16443.4648.6230.9442.11
table0.395-0.5060.3720.4730.2180.1900.1890.4540.35844.9358.4930.7848.10
phone0.661-0.7200.6580.7190.1490.1280.1400.1590.08358.8566.0945.6159.64
vessel0.397-0.5300.5020.5520.2120.1510.2180.2080.17349.8742.3736.0445.88
mean0.480-0.5710.4990.5670.2160.1750.2150.3490.24548.5751.7534.8647.36
+ +RGB-to-3D + +Table 1. Reconstruction performance on ShapeNet/Multi - We evaluate our method against P2M [71], AtlasNet [26], OccNet [44] and SIF [21]. We provide in input either (left) a collection of depth maps or (right) a single color image. For AtlasNet [26], note that IoU cannot be measured as the meshes are not watertight. We omit VP [68], as it only produces a very rough shape decomposition. + +Note that SIF [21] first trains for the template parameters on (\{Depth\}-to-3D) with a reconstruction loss, and then trains the RGB-to-3D image encoder with a parameter regression loss; conversely, our method trains both encoder and decoder of the RGB-to-3D task from scratch. + +# 4.3. Ablation studies + +We summarize here the results of several ablation studies found in the supplementary material. Our analysis reveals that the method is relatively insensitive to the dimensionality of the bottleneck $|\lambda|$ . We also investigate the effect of varying the number of convexes $K$ and number of hyperplanes $H$ in terms of reconstruction accuracy and inference/training time. Moreover, we quantitatively demonstrate that using signed distance as supervision for $\mathcal{L}_{\mathrm{approx}}$ produces significantly worse results and at the cost of slightly worse performance we can collapse $\mathcal{L}_{\mathrm{guide}}$ and $\mathcal{L}_{\mathrm{loc}}$ into one. Finally, we perform an ablation study with respect to our losses, and verify that each is beneficial towards effective learning. + +# 5. Conclusions + +We propose a differentiable representation of convex primitives that is amenable to learning. The inferred representations are directly usable in graphics/physics pipelines; see Figure 1. Our self-supervised technique provides more detailed reconstructions than very recently proposed part-based techniques (SIF [21] in Figure 9), and even consistently outperforms the leading reconstruction technique on multi-view input (OccNet [44] in Table 1). In the future we would like to generalize the model to be able to predict a variable number of parts [68], understand symmetries and modeling hierarchies [76], and include the modeling of rotations [68]. Leveraging the invariance of hyperplane ordering, it would be interesting to investigate the effect of permutation-invariant encoders [63], or remove encoders altogether in favor of auto-decoder architectures [49]. + +Acknowledgements. We would like to acknowledge Luca Prasso and Timothy Jeruzalski for their help with preparing the rigid-body simulations, Avneesh Sud and Ke Li for reviewing our draft, and Anton Mikhailov, Tom Funkhouser, and Erwin Coumans for fruitful discussions. + +# References + +[1] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Learning representations and generative models for 3d point clouds. In International Conference on Machine Learning, pages 40-49, 2018. 1 +[2] Baptiste Angles, Marco Tarini, Loic Barthe, Brian Wyvill, and Andrea Tagliasacchi. Sketch-based implicit blending. ACM Transaction on Graphics (Proc. SIGGRAPH Asia), 2017. 2 +[3] Matthew Berger, Andrea Tagliasacchi, Lee M Seversky, Pierre Alliez, Gael Guennebaud, Joshua A Levine, Andrei Sharf, and Claudio T Silva. A survey of surface reconstruction from point clouds. In Computer Graphics Forum, volume 36, pages 301-329. Wiley Online Library, 2017. 2 +[4] Irving Biederman. Recognition-by-components: a theory of human image understanding. Psychological review, 1987. 1, 2 +[5] Thomas Binford. Visual perception by computer. In IEEE Conference of Systems and Control, 1971. 2 +[6] Volker Blanz and Thomas Vetter. A morphable model for the synthesis of 3D faces. In ACM Trans. on Graphics (Proceedings of SIGGRAPH), 1999. 2 +[7] James F Blinn. A generalization of algebraic surface drawing. ACM Trans. on Graphics (TOG), 1(3):235-256, 1982. 6 +[8] Federica Bogo, Angjoo Kanazawa, Christoph Lassner, Peter Gehler, Javier Romero, and Michael J Black. Keep it smpl: Automatic estimation of 3d human pose and shape from a single image. In Proceedings of the European Conference on Computer Vision, 2016. 2 +[9] Mario Botsch, Leif Kobbelt, Mark Pauly, Pierre Alliez, and Bruno Lévy. *Polygon mesh processing*. AK Peters/CRC Press, 2010. 1 +[10] Andrew Brock, Theodore Lim, James M Ritchie, and Nick Weston. Generative and discriminative voxel modeling with convolutional neural networks. arXiv preprint arXiv:1608.04236, 2016. 1 +[11] Michael M Bronstein, Joan Bruna, Yann LeCun, Arthur Szlam, and Pierre Vandergheynst. Geometric deep learning: going beyond euclidean data. IEEE Signal Processing Magazine, 34(4):18-42, 2017. 2 +[12] 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. 6 +[13] Bernard M Chazelle. Convex decompositions of polyhedra. In Proceedings of the thirteenth annual ACM symposium on Theory of computing, pages 70-79. ACM, 1981. 3 +[14] Zhiqin Chen, Kangxue Yin, Matthew Fisher, Siddhartha Chaudhuri, and Hao Zhang. Bae-net: Branched autoencoder for shape co-segmentation. Proceedings of International Conference on Computer Vision (ICCV), 2019. 7 +[15] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. Proceedings of Computer Vision and Pattern Recognition (CVPR), 2019. 2, 4 + +[16] Christopher B Choy, Danfei Xu, JunYoung Gwak, Kevin Chen, and Silvio Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. In Proceedings of the European Conference on Computer Vision. Springer, 2016. 2, 6, 7 +[17] Erwin Coumans and Yunfei Bai. PyBullet, a python module for physics simulation for games, robotics and machine learning. pybullet.org, 2016-2019. 1 +[18] Siyan Dong, Matthias Niessner, Andrea Tagliasacchi, and Kevin Kai Xu. Multi-robot collaborative dense scene reconstruction. ACM Trans. on Graphics (Proceedings of SIGGRAPH), 2019. 7 +[19] Haoqiang Fan, Hao Su, and Leonidas J Guibas. A point set generation network for 3d object reconstruction from a single image. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 605-613, 2017. 1, 2 +[20] Matheus Gadelha, Subhransu Maji, and Rui Wang. 3d shape induction from 2d views of multiple objects. In International Conference on 3D Vision (3DV), 2017. 1 +[21] Kyle Genova, Forrester Cole, Daniel Vlasic, Aaron Sarna, William T Freeman, and Thomas Funkhouser. Learning shape templates with structured implicit functions. arXiv preprint arXiv:1904.06447, 2019. 1, 2, 3, 4, 6, 7, 8 +[22] Mukulika Ghosh, Nancy M Amato, Yanyan Lu, and Jyh-Ming Lien. Fast approximate convex decomposition using relative concavity. Computer-Aided Design, 45(2):494-504, 2013. 3 +[23] Elmer G Gilbert, Daniel W Johnson, and S Sathiya Keerthi. A fast procedure for computing the distance between complex objects in three-dimensional space. IEEE Journal on Robotics and Automation, 1988. 2 +[24] Rohit Girdhar, David F Fouhey, Mikel Rodriguez, and Abhinav Gupta. Learning a predictable and generative vector representation for objects. In Proceedings of the European Conference on Computer Vision, pages 484-499. Springer, 2016. 2 +[25] Ronald L. Graham. An efficient algorithm for determining the convex hull of a finite planar set. Info. Pro. Lett., 1:132-133, 1972. 3 +[26] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. A papier-mache approach to learning 3d surface generation. In Proceedings of Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2, 6, 8 +[27] Kan Guo, Dongqing Zou, and Xiaowu Chen. 3d mesh labeling via deep convolutional neural networks. ACM Transactions on Graphics (TOG), 35(1):3, 2015. 2 +[28] Eric Heiden, David Millard, and Gaurav Sukhatme. Real2sim transfer using differentiable physics. Workshop on Closing the Reality Gap in Sim2real Transfer for Robotic Manipulation, 2019. 2 +[29] Eric Heiden, David Millard, Hejia Zhang, and Gaurav S Sukhatme. Interactive differentiable simulation. arXiv preprint arXiv:1905.10706, 2019. 2 +[30] Hugues Hoppe, Tony DeRose, Tom Duchamp, John McDonald, and Werner Stuetzle. Surface reconstruction from unorganized points. In ACM SIGGRAPH Computer Graphics, volume 26, pages 71-78. ACM, 1992. 2 + +[31] Angjoo Kanazawa, Shubham Tulsiani, Alexei A Efros, and Jitendra Malik. Learning category-specific mesh reconstruction from image collections. In Proceedings of the European Conference on Computer Vision, 2018. 1 +[32] Chen Kong, Chen-Hsuan Lin, and Simon Lucey. Using locally corresponding cad models for dense 3d reconstructions from a single image. In Proceedings of Computer Vision and Pattern Recognition (CVPR), pages 4857-4865, 2017. 2 +[33] David H Laidlaw, W Benjamin Trumbore, and John F Hughes. Constructive solid geometry for polyhedral objects. In ACM Trans. on Graphics (Proceedings of SIGGRAPH), 1986. 2 +[34] Yee Leung, Jiang-She Zhang, and Zong-Ben Xu. Neural networks for convex hull computation. IEEE Transactions on Neural Networks, 8(3):601-611, 1997. 3 +[35] Yiyi Liao, Simon Donne, and Andreas Geiger. Deep marching cubes: Learning explicit surface representations. In Proceedings of Computer Vision and Pattern Recognition (CVPR), 2018. 1 +[36] Jyh-Ming Lien and Nancy M Amato. Approximate convex decomposition of polyhedra. In Computer Aided Geometric Design (Proc. of the Symposium on Solid and physical modeling), pages 121-131. ACM, 2007. 3 +[37] Chen-Hsuan Lin, Chen Kong, and Simon Lucey. Learning efficient point cloud generation for dense 3d object reconstruction. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 2 +[38] Guilin Liu, Zhonghua Xi, and Jyh-Ming Lien. Nearly convex segmentation of polyhedra through convex ridge separation. Computer-Aided Design, 78:137-146, 2016. 3 +[39] William E Lorensen and Harvey E Cline. Marching cubes: A high resolution 3d surface construction algorithm. ACM siggraph computer graphics, 1987. 4 +[40] Khaled Mamou and Faouzi Ghorbel. A simple and efficient approach for 3d mesh approximate convex decomposition. In 2009 16th IEEE international conference on image processing (ICIP), pages 3501-3504. IEEE, 2009. 3 +[41] Khaled Mamou, E Lengyel, and Ed AK Peters. Volumetric hierarchical approximate convex decomposition. Game Engine Gems 3, pages 141-158, 2016. 3 +[42] Jonathan Masci, Davide Boscaini, Michael Bronstein, and Pierre Vandergheynst. Geodesic convolutional neural networks on riemannian manifolds. In Proceedings of the IEEE international conference on computer vision workshops, pages 37-45, 2015. 2 +[43] Daniel Maturana and Sebastian Scherer. Voxnet: A 3d convolutional neural network for real-time object recognition. In 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 922-928. IEEE, 2015. 2 +[44] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. arXiv preprint arXiv:1812.03828, 2018. 2, 4, 6, 7, 8, 14 +[45] Kaichun Mo, Shilin Zhu, Angel X Chang, Li Yi, Subarna Tripathi, Leonidas J Guibas, and Hao Su. Partnet: A large-scale benchmark for fine-grained and hierarchical part-level + +3d object understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 909-918, 2019. 6, 7 +[46] Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodola, Jan Svoboda, and Michael M Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In Proceedings of Computer Vision and Pattern Recognition (CVPR), pages 5115-5124, 2017. 2 +[47] Richard A Newcombe, Dieter Fox, and Steven M Seitz. Dynamicfusion: Reconstruction and tracking of non-rigid scenes in real-time. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2015. 2 +[48] Richard A Newcombe, Shahram Izadi, Otmar Hilliges, David Molyneaux, David Kim, Andrew J Davison, Pushmeet Kohi, Jamie Shotton, Steve Hodges, and Andrew Fitzgibbon. Kinectfusion: Real-time dense surface mapping and tracking. In Proc. ISMAR. IEEE, 2011. 2 +[49] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. arXiv preprint arXiv:1901.05103, 2019. 2, 4, 8 +[50] Despoina Paschalidou, Ali Osman Ulusoy, and Andreas Geiger. Superquadrics revisited: Learning 3d shape parsing beyond cuboids. In Proceedings IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2019. 2, 8 +[51] Jason Patnode. Character Modeling with Maya and ZBrush: Professional polygonal modeling techniques. Focal Press, 2012. 2 +[52] Franco P. Preparata and Se June Hong. Convex hulls of finite sets of points in two and three dimensions. Communications of the ACM, 20(2):87-93, 1977. 3 +[53] 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, 2017. 2 +[54] Charles R Qi, Hao Su, Matthias Nießner, Angela Dai, Mengyuan Yan, and Leonidas J Guibas. Volumetric and multi-view cnns for object classification on 3d data. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5648-5656, 2016. 2 +[55] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in Neural Information Processing Systems, pages 5099-5108, 2017. 2 +[56] Anurag Ranjan, Timo Bolkart, Soubhik Sanyal, and Michael J Black. Generating 3d faces using convolutional mesh autoencoders. In Proceedings of the European Conference on Computer Vision (ECCV), 2018. 1 +[57] Danilo Jimenez Rezende, SM Ali Eslami, Shakir Mohamed, Peter Battaglia, Max Jaderberg, and Nicolas Heess. Unsupervised learning of 3d structure from images. In Advances in Neural Information Processing Systems, 2016. 1, 2 +[58] 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. 1, 2 + +[59] Lawrence G Roberts. Machine perception of three-dimensional solids. PhD thesis, Massachusetts Institute of Technology, 1963. 2 +[60] Gopal Sharma, Rishabh Goyal, Difan Liu, Evangelos Kalogerakis, and Subhransu Maji. Csgnet: Neural shape parser for constructive solid geometry. In Proceedings of Computer Vision and Pattern Recognition (CVPR), 2018. 1, 2 +[61] Shuran Song and Jianxiong Xiao. Deep sliding shapes for amodal 3d object detection in rgb-d images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 808-816, 2016. 2 +[62] David Stutz and Andreas Geiger. Learning 3d shape completion from laser scan data with weak supervision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1955-1964, 2018. 1, 2 +[63] Weiwei Sun, Wei Jiang, Eduard Trulls, Andrea Tagliasacchi, and Kwang Moo Yi. Attentive context normalization for robust permutation-equivariant learning. arXiv preprint arXiv:1907.02545, 2019. 8 +[64] Maxim Tatarchenko, Alexey Dosovitskiy, and Thomas Brox. Octree generating networks: Efficient convolutional architectures for high-resolution 3d outputs. In Proceedings of the IEEE International Conference on Computer Vision, pages 2088-2096, 2017. 1, 2 +[65] Maxim Tatarchenko, Stephan R Richter, René Ranftl, Zhuwen Li, Vladlen Koltun, and Thomas Brox. What do single-view 3d reconstruction networks learn? In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3405-3414, 2019. 7 +[66] Daniel Thul, Sohyeon Jeong, Marc Pollefeys, et al. Approximate convex decomposition and transfer for animated meshes. In SIGGRAPH Asia 2018 Technical Papers, page 226. ACM, 2018. 2, 3, 4 +[67] Anastasia Tkach, Mark Pauly, and Andrea Tagliasacchi. Sphere-meshes for real-time hand modeling and tracking. ACM Transaction on Graphics (Proc. SIGGRAPH Asia), 2016. 2 +[68] Shubham Tulsiani, Hao Su, Leonidas J Guibas, Alexei A Efros, and Jitendra Malik. Learning shape abstractions by assembling volumetric primitives. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 1, 2, 3, 4, 5, 6, 7, 8 +[69] Ali Osman Ulusoy, Andreas Geiger, and Michael J Black. Towards probabilistic volumetric reconstruction using ray potentials. In International Conference on 3D Vision (3DV), 2015. 1 +[70] Anton van den Hengel, Chris Russell, Anthony Dick, John Bastian, Daniel Pooley, Lachlan Fleming, and Lourdes Agapito. Part-based modelling of compound scenes from images. In Proceedings of Computer Vision and Pattern Recognition (CVPR), pages 878-886, 2015. 2 +[71] Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, and Yu-Gang Jiang. Pixel2mesh: Generating 3d mesh models from single rgb images. In Proceedings of the European Conference on Computer Vision, 2018. 1, 2, 6, 8 + +[72] 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. 2 +[73] Peng-Shuai Wang, Chun-Yu Sun, Yang Liu, and Xin Tong. Adaptive o-cnn: a patch-based deep representation of 3d shapes. In SIGGRAPH Asia 2018 Technical Papers, page 217. ACM, 2018. 1, 2 +[74] 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. 1, 2 +[75] 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 Computer Vision and Pattern Recognition (CVPR), pages 1912-1920, 2015. 2 +[76] Fenggen Yu, Kun Liu, Yan Zhang, Chenyang Zhu, and Kai Xu. Partnet: A recursive part decomposition network for fine-grained and hierarchical shape segmentation. Proceedings of Computer Vision and Pattern Recognition (CVPR), 2019. 8 +[77] Chuhang Zou, Ersin Yumer, Jimei Yang, Duygu Ceylan, and Derek Hoiem. 3d-prnn: Generating shape primitives with recurrent neural networks. In Proceedings of the IEEE International Conference on Computer Vision, 2017. 1 \ No newline at end of file diff --git a/cvxnetlearnableconvexdecomposition/images.zip b/cvxnetlearnableconvexdecomposition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..5efbcc20635ca9d77ce63c5378fdeb9ae29599db --- /dev/null +++ b/cvxnetlearnableconvexdecomposition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:293601c86dab1fe3548ade17a5baaea6ace52aab42b1643f9244451e4c6ee351 +size 534438 diff --git a/cvxnetlearnableconvexdecomposition/layout.json b/cvxnetlearnableconvexdecomposition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..90bb5d536f3c3b2dde1e36d7e15990172759c1c5 --- /dev/null +++ b/cvxnetlearnableconvexdecomposition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05b1def162efe8e2f5166fc1cec001b1f1451d6e541bfa6c5201e2eaedded91a +size 486354 diff --git a/cycleisprealimagerestorationviaimproveddatasynthesis/2b509c23-6c10-4e00-868e-3912aa22cece_content_list.json b/cycleisprealimagerestorationviaimproveddatasynthesis/2b509c23-6c10-4e00-868e-3912aa22cece_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6c75e90c4f6a3a01e1c84012c2b377dcff2f4756 --- /dev/null +++ b/cycleisprealimagerestorationviaimproveddatasynthesis/2b509c23-6c10-4e00-868e-3912aa22cece_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67efa37d2a39d6bd4255cb9e181f32a6b4f391e6e30e31c74011e8098a01e5d5 +size 84887 diff --git a/cycleisprealimagerestorationviaimproveddatasynthesis/2b509c23-6c10-4e00-868e-3912aa22cece_model.json b/cycleisprealimagerestorationviaimproveddatasynthesis/2b509c23-6c10-4e00-868e-3912aa22cece_model.json new file mode 100644 index 0000000000000000000000000000000000000000..880e04cf2cc56ef260415e74247a1d0156fe5c3f --- /dev/null +++ b/cycleisprealimagerestorationviaimproveddatasynthesis/2b509c23-6c10-4e00-868e-3912aa22cece_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cedfe486880f6003b260cb10cd8824bf3b24c3574005b7749e384e641e31c5c6 +size 116535 diff --git a/cycleisprealimagerestorationviaimproveddatasynthesis/2b509c23-6c10-4e00-868e-3912aa22cece_origin.pdf b/cycleisprealimagerestorationviaimproveddatasynthesis/2b509c23-6c10-4e00-868e-3912aa22cece_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4727df3241de1f49d611c6b048efb467cf79b2f3 --- /dev/null +++ b/cycleisprealimagerestorationviaimproveddatasynthesis/2b509c23-6c10-4e00-868e-3912aa22cece_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd5b9efc29917426b5cd45df14af5b9e6e82fc4b0f1dc915decb16b91da3797c +size 3324778 diff --git a/cycleisprealimagerestorationviaimproveddatasynthesis/full.md b/cycleisprealimagerestorationviaimproveddatasynthesis/full.md new file mode 100644 index 0000000000000000000000000000000000000000..dc9a9189bd39acd4d586472042a50362d44b719f --- /dev/null +++ b/cycleisprealimagerestorationviaimproveddatasynthesis/full.md @@ -0,0 +1,435 @@ +# CycleISP: Real Image Restoration via Improved Data Synthesis + +Syed Waqas Zamir $^{1}$ Aditya Arora $^{1}$ Salman Khan $^{1}$ Munawar Hayat $^{1}$ + +Fahad Shahbaz Khan $^{1}$ Ming-Hsuan Yang $^{2,3}$ Ling Shao $^{1}$ + +1Inception Institute of Artificial Intelligence, UAE + +$^{2}$ University of California, Merced $^{3}$ Google Research + +# Abstract + +The availability of large-scale datasets has helped unleash the true potential of deep convolutional neural networks (CNNs). However, for the single-image denoising problem, capturing a real dataset is an unacceptably expensive and cumbersome procedure. Consequently, image denoising algorithms are mostly developed and evaluated on synthetic data that is usually generated with a widespread assumption of additive white Gaussian noise (AWGN). While the CNNs achieve impressive results on these synthetic datasets, they do not perform well when applied on real camera images, as reported in recent benchmark datasets. This is mainly because the AWGN is not adequate for modeling the real camera noise which is signal-dependent and heavily transformed by the camera imaging pipeline. In this paper, we present a framework that models camera imaging pipeline in forward and reverse directions. It allows us to produce any number of realistic image pairs for denoising both in RAW and sRGB spaces. By training a new image denoising network on realistic synthetic data, we achieve the state-of-the-art performance on real camera benchmark datasets. The parameters in our model are $\sim 5$ times lesser than the previous best method for RAW denoising. Furthermore, we demonstrate that the proposed framework generalizes beyond image denoising problem e.g., for color matching in stereoscopic cinema. The source code and pre-trained models are available at https://github.com/swz30/CycleISP. + +# 1. Introduction + +High-level computer vision tasks, such as image classification, object detection and segmentation have witnessed significant progress due to deep CNNs [33]. The major driving force behind the success of CNNs is the availability of large-scale datasets [17, 38], containing hundreds of thousands of annotated images. However, for low-level vision problems (image denoising, super-resolution, deblurring, etc.), collecting even small datasets is extremely challenging and non-trivial. For instance, the typical procedure to acquire noisy paired data is to take multiple noisy images + +![](images/f0b7d6133b55058cb75310446d98ec0aa247731c2fce628a6708bc2d9d6c5f0c.jpg) +(a) Noisy Input + +![](images/2b0448d98ebbc510bb5352be25b1e2b6b4a2ece8af483f766954b846d1c2c263.jpg) +(b) N3NET [45] + +![](images/2950b3dd08d5feb27daa7ec0deba39040a8d302b185d4385bf1188ebf06b015c.jpg) +PSNR(RAW) / PSNR(sRGB) +(c) UPI [7] +37.37 dB / 35.49 dB +Figure 1: Denoising a real camera image from DND dataset [44]. Our model is effective in removing real noise, especially the low-frequency chroma and defective pixel noise. + +![](images/7c23e8adad1cd2c2154ff518f4206eb58242270783a69e3ccfac1df27f4282d8.jpg) +38.24 dB / 32.42 dB +(d) Ours +40.44 dB / 36.16 dB + +of the same scene and generate clean ground-truth image by pixel-wise averaging. In practice, spatial pixels misalignment, color and brightness mismatch is inevitable due to changes in lighting conditions and camera/object motion. Moreover, this expensive and cumbersome exercise of acquiring image pairs needs to be repeated with different camera sensors, as they exhibit different noise characteristics. + +Consequently, single image denoising is mostly per + +formed in synthetic settings: take a large set of clean sRGB images and add synthetic noise to generate their noisy versions. On synthetic datasets, existing deep learning based denoising models yield impressive results, but they exhibit poor generalization to real camera data as compared to conventional methods [8, 15]. This trend is also demonstrated in recent benchmarks [1, 44]. Such behavior stems from the fact that deep CNNs are trained on synthetic data that is usually generated with the Additive White Gaussian Noise (AWGN) assumption. Real camera noise is fundamentally different from AWGN, thereby causing a major challenge for deep CNNs [6, 22, 24]. + +In this paper, we propose a synthetic data generation approach that can produce realistic noisy images both in RAW and sRGB spaces. The main idea is to inject noise in the RAW images obtained with our learned device-agnostic transformation rather than in the sRGB images directly. The key insight behind our framework is that the real noise present in sRGB images is convoluted by the series of steps performed in a regular image signal processing (ISP) pipeline [6, 46]. Therefore, modeling real camera noise in sRGB is an inherently difficult task as compared to RAW sensor data [35]. As an example, noise at the RAW sensor space is signal-dependent; after demosaicking, it becomes spatio-chromatically correlated; and after passing through the rest of the pipeline, its probability distribution not necessarily remains Gaussian [53]. This implies that the camera ISP heavily transforms the sensor noise, and therefore more sophisticated models that take into account the influence of imaging pipeline are needed to synthesize realistic noise than uniform AWGN model [1, 26, 44]. + +In order to exploit the abundance and diversity of sRGB photos available on the Internet, the main challenge with the proposed synthesis approach is how to transform them back to RAW measurements. Brooks et al. [7] present a technique that inverts the camera ISP, step-by-step, and thereby allows conversion from sRGB to RAW data. However, this approach requires prior information about the target camera device (e.g., color correction matrices and white balance gains), which makes it specific to a given device and therefore lacks in generalizability. Furthermore, several operations in a camera pipeline are proprietary and such black boxes are very difficult to reverse engineer. To address these challenges, in this paper we propose a CycleISP framework that converts sRGB images to RAW data, and then back to sRGB images, without requiring any knowledge of camera parameters. This property allows us to synthesize any number of clean and realistic noisy image pairs in both RAW and sRGB spaces. Our main contributions are: + +- Learning a device-agnostic transformation, called CycleISP, that allows us to move back and forth between sRGB and RAW image spaces. +Real image noise synthesizer for generating + +clean/noisy paired data in RAW and sRGB spaces. + +- A deep CNN with dual attention mechanism that is effective in a variety of tasks: learning CycleISP, synthesizing realistic noise, and image denoising. +- Algorithms to remove noise from RAW and sRGB images, setting new state-of-the-art on real noise benchmarks of DND [44] and SIDD [1] (see Fig. 1). Moreover, our denoising network has much fewer parameters (2.6M) than the previous best model (11.8M) [7]. +- CycleISP framework generalizes beyond denoising, we demonstrate this via an additional application i.e., color matching in stereoscopic cinema [41, 59, 49]. + +# 2. Related Work + +The presence of noise in images is inevitable, irrespective of the acquisition method; now more than ever, when majority of images come from smartphone cameras having small sensor size but large resolution. Single-image denoising is a vastly researched problem in the computer vision and image processing community, with early works dating back to 1960's [6]. Classic methods on denoising are mainly based on the following two principles. (1) Modifying transform coefficients using the DCT [63], wavelets [19, 55], etc. (2) Averaging neighborhood values: in all directions using Gaussian kernel, in all directions only if pixels have similar values [56, 58] and along contours [42, 51]. + +While these aforementioned methods provide satisfactory results in terms of image fidelity metrics and visual quality, the Non-local Means (NLM) algorithm of Buades et al. [8] makes significant advances in denoising. The NLM method exploits the redundancy, or self-similarity [20] present in natural images. For many years the patch-based methods yielded comparable results, thus prompting studies [11, 12, 37] to investigate whether we reached the theoretical limits of denoising performance. Subsequently, Burger et al. [9] train a simple Multi-Layer Perceptron (MLP) on a large synthetic noise dataset. This method performs well against previous sophisticated algorithms. Several recent methods use deep CNNs [4, 7, 25, 28, 45, 66, 67, 2] and demonstrate promising denoising performance. + +Image denoising can be applied to RAW or sRGB data. However, capturing diverse large-scale real noise data is a prohibitively expensive and tedious procedure, consequently leaving us to study denoising in synthetic settings. The most commonly used noise model for developing and evaluating image denoising is AWGN. As such, algorithms that are designed for AWGN cannot effectively remove noise from real images, as reported in recent benchmarks [1, 44]. A more accurate model for real RAW sensor noise contains both the signal-dependent noise component (the shot noise), and the signal-independent additive Gaussian component (the read noise) [22, 23, 24]. The camera ISP transforms RAW sensor noise into a complicated form + +![](images/393e5c785dd04d86d0a602f69e5248f247832a98f3c5bd638c48cc2f2f8f909c.jpg) +Figure 2: Our CycleISP models the camera imaging pipeline in both directions. It comprises two main branches: RGB2RAW and RAW2RGB. The RGB2RAW branch converts sRGB images to RAW measurements, whereas the RAW2RGB branch transforms RAW data to sRGB images. The auxiliary color correction branch provides explicit color attention to RAW2RGB network. The noise injection module is switched OFF while training the CycleISP (Section 3), and switched ON when synthesizing noise data (Section 4). + +(spatio-chromatically correlated and not necessarily Gaussian). Therefore, estimating a noise model for denoising in sRGB space requires careful consideration of the influence of ISP. In this paper, we present a framework that is capable of synthesizing realistic noise data for training CNNs to effectively remove noise from RAW as well as sRGB images. + +# 3. CycleISP + +To synthesize realistic noise datasets, we use a two-stage scheme in this work. First, we develop a framework that models the camera ISP both in forward and reverse directions, hence the name CycleISP. Second, using CycleISP, we synthesize realistic noise datasets for the tasks of RAW denoising and sRGB image denoising. In this section, we only describe our CycleISP framework that models the camera ISP as a deep CNN system. Fig. 2 shows the modules of the CycleISP model: (a) RGB2RAW network branch, and (b) RAW2RGB network branch. In addition, we introduce an auxiliary color correction network branch that provides explicit color attention to the RAW2RGB network in order to correctly recover the original sRGB image. + +The noise injection module in Fig. 2 is only required when synthesizing noisy data (Section 4), and thus we keep it in the 'OFF' state while learning CycleISP. The training process of CycleISP is divided in two steps: the RGB2RAW and RAW2RGB networks are first independently trained, and then joint fine-tuning is performed. Next, we present details of different branches of CycleISP. Note that we use RGB instead of sRGB to avoid notation clutter. + +# 3.1. RGB2RAW Network Branch + +Digital cameras apply a series of operations on RAW sensor data in order to generate the monitor-ready sRGB images [46]. Our RGB2RAW network branch aims to invert the effect of camera ISP. In contrast to the unprocessing + +technique of [7], the RGB2RAW branch does not require any camera parameters. + +Given an input RGB image $\mathbf{I}_{rgb} \in \mathbb{R}^{H \times W \times 3}$ , the RGB2RAW network first extracts low-level features $T_0 \in \mathbb{R}^{H \times W \times C}$ using a convolutional layer $M_0$ as: $T_0 = M_0(\mathbf{I}_{rgb})$ . Next, we pass the low-level feature maps $T_0$ through $N$ recursive residual groups (RRGs) to extract deep features $T_d \in \mathbb{R}^{H \times W \times C}$ as: + +$$ +T _ {d} = R R G _ {N} \left(\dots \left(R R G _ {1} \left(T _ {0}\right)\right)\right), \tag {1} +$$ + +where each RRG contains multiple dual attention blocks, as we shall see in Section 3.3. + +We then apply the final convolution operation $M_{1}$ to the features $T_{d}$ and obtain the demosaicked image $\hat{I}_{dem} \in \mathbb{R}^{H \times W \times 3}$ . We deliberately set the number of output channels of $M_{1}$ layer to three rather than one in order to preserve as much structural information of the original image as possible. Moreover, we empirically found that it helps the network to learn the mapping from sRGB to RAW faster and more accurately. At this point, the network is able to invert the effects of tone mapping, gamma correction, color correction, white balance, and other transformations, and provide us with the image $\hat{I}_{dem}$ whose values are linearly related to the scene radiance. Finally, in order to generate the mosaicked RAW output $\hat{\mathbf{I}}_{raw} \in \mathbb{R}^{H \times W \times 1}$ , the Bayer sampling function $f_{Bayer}$ is applied to $\hat{I}_{dem}$ that omits two color channels per pixel according to the Bayer pattern: + +$$ +\hat {\mathbf {I}} _ {r a w} = f _ {b a y e r} \left(M _ {1} \left(T _ {d}\right)\right). \tag {2} +$$ + +The RGB2RAW network is optimized using the $L_{1}$ loss in linear and log domains as: + +$$ +\begin{array}{l} \mathcal {L} _ {s \rightarrow r} (\hat {\mathbf {I}} _ {r a w}, \mathbf {I} _ {r a w}) = \left\| \hat {\mathbf {I}} _ {r a w} - \mathbf {I} _ {r a w} \right\| _ {1} \tag {3} \\ + \left\| \log (\max (\hat {\mathbf {I}} _ {r a w}, \epsilon)) - \log (\max (\mathbf {I} _ {r a w}, \epsilon)) \right\| _ {1}, \\ \end{array} +$$ + +where $\epsilon$ is a small constant for numerical stability, and $\mathbf{I}_{raw}$ is the ground-truth RAW image. Similar to [21], the log loss term is added to enforce approximately equal treatment for all the image values; otherwise the network dedicates more attention to recovering the highlight regions. + +# 3.2. RAW2RGB Network Branch + +While the ultimate goal of RAW2RGB network is to generate synthetic realistic noise data for the sRGB image denoising problem, in this section we first describe how we can map clean RAW images to clean sRGB images (leaving the noise injection module 'OFF' in Fig. 2). + +Let $\mathbf{I}_{raw}$ and $\hat{\mathbf{I}}_{rgb}$ be the input and output of the RAW2RGB network. First, in order to restore translation invariance and reduce computational cost, we pack the $2\times 2$ blocks of $\mathbf{I}_{raw}$ into four channels (RGGB) and thus reduce the image resolution by half [7, 13, 25]. Since the input RAW data may come from different cameras having different Bayer patterns, we ensure the channel order of the packed image to be RGGB by applying the Bayer pattern unification technique [39]. Next, a convolutional layer $M_2$ followed by $K - 1$ RRG modules encode the packed RAW image $I_{pack} \in \mathbb{R}^{\frac{H}{2} \times \frac{W}{2} \times 4}$ into a deep feature tensor $T_{d'} \in \mathbb{R}^{\frac{H}{2} \times \frac{W}{2} \times C}$ as: + +$$ +T _ {d ^ {\prime}} = R R G _ {K - 1} \left(\dots \left(R R G _ {1} \left(M _ {2} (\operatorname {P a c k} (\mathbf {I} _ {r a w}))\right)\right)\right). \tag {4} +$$ + +Note that $\mathbf{I}_{raw}$ is the original camera RAW image (not the output of RGB2RAW network) because our objective here is to first learn RAW to sRGB mapping, independently. + +Color attention unit. To train the CycleISP, we use the MIT-Adobe FiveK dataset [10] that contains images from several different cameras having diverse and complex ISP systems. It is extremely difficult for a CNN to accurately learn a RAW to sRGB mapping function for all different types of cameras (as one RAW image can potentially map to many sRGB images). One solution is to train one network for each camera ISP [13, 52, 64]. However, such solutions are not scalable and the performance may not generalize to other cameras. To address this issue, we propose to include a color attention unit in the RAW2RGB network that provides explicit color attention via a color correction branch. + +The color correction branch is a CNN that takes as input an sRGB image $\mathbf{I}_{rgb}$ and generates a color-encoded deep feature tensor $T_{color} \in \mathbb{R}^{\frac{H}{2} \times \frac{W}{2} \times C}$ . In the color correction branch, we first apply Gaussian blur to $\mathbf{I}_{rgb}$ , followed by a convolutional layer $M_3$ , two RRGs and a gating mechanism with sigmoid activation $\sigma$ : + +$$ +T _ {c o l o r} = \sigma \left(M _ {4} \left(R R G _ {2} \left(R R G _ {1} \left(M _ {3} \left(K * \mathbf {I} _ {r g b}\right)\right)\right)\right), \right. \tag {5} +$$ + +where $*$ denotes convolution, and $K$ is the Gaussian kernel with standard deviation empirically set to 12. This strong blurring operation ensures that only the color information + +![](images/656cc812dc7a7421689f84d581657ff71e56ab58c44078bf45c15135df38547f.jpg) +Figure 3: Recursive residual group (RRG) contains multiple dual attention blocks (DAB). Each DAB contains spatial attention and channel attention modules. + +flows through this branch, whereas the structural content and fine texture comes from the main RAW2RGB network. Using weaker blurring will undermine the effectiveness of the feature tensor $T_{d'}$ of Eq. (4). The overall color attention unit process becomes: + +$$ +T _ {a t t e n} = T _ {d ^ {\prime}} + \left(T _ {d ^ {\prime}} \otimes T _ {c o l o r}\right), \tag {6} +$$ + +where, $\otimes$ is Hadamard product. To obtain the final sRGB image $\hat{\mathbf{I}}_{rgb}$ , the output features $T_{atten}$ from the color attention unit are passed through a RRG module, a convolutional layer $M_4$ and an upscaling layer $M_{up}$ [54], respectively: + +$$ +\tilde {\mathbf {I}} _ {r g b} = M _ {u p} \left(M _ {5} \left(R R G _ {K} \left(T _ {a t t e n}\right)\right)\right). \tag {7} +$$ + +For optimizing RAW2RGB network, we use the $L_{1}$ loss: + +$$ +\mathcal {L} _ {r \rightarrow s} \left(\hat {\mathbf {I}} _ {r g b}, \mathbf {I} _ {r g b}\right) = \left\| \hat {\mathbf {I}} _ {r g b} - \mathbf {I} _ {r g b} \right\| _ {1}. \tag {8} +$$ + +# 3.3. RRG: Recursive Residual Group + +Motivated by the advances of recent low-level vision methods [48, 65, 66, 68] based on the residual learning framework [29], we propose the RRG module, as shown in Fig. 3. The RRG contains $P$ dual attention blocks (DAB). The goal of each DAB is to suppress the less useful features and only allow the propagation of more informative ones. The DAB performs this feature recalibration by using two attention mechanisms: (1) channel attention (CA) [30], and (2) spatial attention (SA) [60]. The overall process is: + +$$ +T _ {D A B} = T _ {i n} + M _ {c} ([ \mathbf {C A} (U), \mathbf {S A} (U) ]), \tag {9} +$$ + +where $U\in \mathbb{R}^{H\times W\times C}$ denotes features maps that are obtained by applying two convolutions on input tensor $T_{in}\in$ $\mathbb{R}^{H\times W\times C}$ at the beginning of the DAB, and $M_{c}$ is the last convolutional layer with filter size $1\times 1$ + +Channel attention. This branch is designed to exploit the inter-channel dependencies of convolutional features. It first performs a squeeze operation in order to encode the + +![](images/98e608174f66344d898925377bcc54efc05cd8f2e8b6321b691cb3ef77db0bf6.jpg) +Figure 4: Fine-tuning CycleISP to synthesize realistic sRGB noise data. + +spatially global context, which is then followed by an excitation operation to fully capture channel-wise relationships [30]. The squeeze operation is realized by applying global average pooling (GAP) on feature maps $U$ , thus yielding a descriptor $z \in \mathbb{R}^{1 \times 1 \times C}$ . The excitation operator recalibrates the descriptor $z$ using two convolutional layers followed by the sigmoid activation and results in activations $s \in \mathbb{R}^{1 \times 1 \times C}$ . Finally, the output of CA branch is obtained by rescaling $U$ with the activations $s$ . + +Spatial attention. This branch exploits the inter-spatial relationships of features and computes a spatial attention map that is then used to rescale the incoming features $U$ . To generate the spatial attention map, we first independently apply global average pooling and max pooling operations on features $U$ along the channel dimensions and concatenate the output maps to form a spatial feature descriptor $d \in \mathbb{R}^{H \times W \times 2}$ . This is followed by a convolution and sigmoid activation to obtain the spatial attention map. + +# 3.4. Joint Fine-tuning of CycleISP + +Since the RGB2RAW and RAW2RGB networks are initially trained independently, they may not provide the optimal-quality images due to the disconnection between them. Therefore, we perform joint fine-tuning in which the output of RGB2RAW becomes the input of RAW2RGB. The loss function for the joint optimization is: + +$$ +\mathcal {L} _ {j o i n t} = \beta \mathcal {L} _ {s \rightarrow r} (\hat {\mathbf {I}} _ {r a w}, \mathbf {I} _ {r a w}) + (1 - \beta) \mathcal {L} _ {r \rightarrow s} (\hat {\mathbf {I}} _ {r g b}, \mathbf {I} _ {r g b}), +$$ + +where $\beta$ is a positive constant. Note that the RAW2RGB network receives gradients from the RAW2RGB sub-loss (only the second term). Whereas, the RGB2RAW network receives gradients from both sub-losses, thereby effectively contributing to the reconstruction of the final sRGB image. + +# 4. Synthetic Realistic Noise Data Generation + +Capturing perfectly-aligned real noise data pairs is extremely difficult. Consequently, image denoising is mostly studied in artificial settings where Gaussian noise is added to the clean images. While the state-of-the-art image denoising methods [9, 66] have shown promising performance on these synthetic datasets, they do not perform well when applied on real camera images [1, 44]. This is because the synthetic noise data differs fundamentally from real camera data. In this section, we describe the process of synthesizing realistic noise image pairs for denoising both in RAW + +![](images/b61536abc89c133e7898b0bbc415581711fead61192a1555d09970f3011edea6.jpg) +Figure 5: Proposed denoising network. It has the same network structure for denoising both RAW images and sRGB images, except in the handling of input and output. + +and sRGB space using the proposed CycleISP method. + +Data for RAW denoising. The RGB2RAW network branch of the CycleISP method takes as input a clean sRGB image and converts it to a clean RAW image (top branch, Fig. 2). The noise injection module, which we kept off while training CycleISP, is now turned to the 'ON' state. The noise injection module adds shot and read noise of different levels to the output of RGB2RAW network. We use the same procedure for sampling shot/read noise factors as in [7]. As such, we can generate clean and its corresponding noisy image pairs $\{\mathrm{RAW}_{\text {clean }}, \mathrm{RAW}_{\text {noisy }}\}$ from any sRGB image. + +Data for sRGB denoising. Given a synthetic $\mathrm{RAW}_{\text {noisy }}$ image as input, the RAW2RGB network maps it to a noisy sRGB image (bottom branch, Fig. 2); hence we are able to generate an image pair $\{\mathrm{sRGB}_{\text {clean}}, \mathrm{sRGB}_{\text {noisy}}\}$ for the sRGB denoising problem. While these synthetic image pairs are already adequate for training the denoising networks, we can further improve their quality with the following procedure. We fine-tune the CycleISP model (Section 3.4) using the SIDD dataset [1] that is captured with real cameras. For each static scene, SIDD contains clean and noisy image pairs in both RAW and sRGB spaces. The fine-tuning process is shown in Fig. 4. Notice that the noise injection module which adds random noise is replaced by (only for fine-tuning) per-pixel noise residue that is obtained by subtracting the real $\mathrm{RAW}_{\text {clean }}$ image from the real $\mathrm{RAW}_{\text {noisy }}$ image. Once the fine-tuning procedure is complete, we can synthesize realistic noisy images by feeding clean sRGB images to the CycleISP model. + +# 5. Denoising Architecture + +As illustrated in Fig. 5, we propose an image denoising network by employing multiple RRGs. Our aim is to apply the proposed network in two different settings: (1) denoising RAW images, and (2) denoising sRGB data. We use the same network structure under both settings, with the only difference being in the handling of input and output. For denoising in the sRGB space, the input and output of the network are the 3-channel sRGB images. For denoising the RAW images, our network takes as input a 4-channel noisy packed image concatenated with a 4-channel noise level map, and provides us with a 4-channel packed denoised output. The noise level map provides an estimate of the standard deviation of noise present in the input image, based on its shot and read noise parameters [7]. + +# 6. Experiments + +# 6.1. Real Image Datasets + +DND [44]. This dataset consists of 50 pairs of noisy and (nearly) noise-free images captured with four consumer cameras. Since the images are of very high-resolution, the providers extract 20 crops of size $512 \times 512$ from each image, thus yielding a total of 1000 patches. The complete dataset is used for testing because the ground-truth noise-free images are not publicly available. The data is provided for two evaluation tracks: RAW space and sRGB space. Quantitative evaluation in terms of PSNR and SSIM can only be performed through an online server [16]. + +SIDD [1]. Due to the small sensor size and high-resolution, smartphone images are much more noisy than those of DSLRs. This dataset is collected using five smartphone cameras. There are 320 image pairs available for training and 1280 image pairs for validation. This dataset also provides images both in RAW format and in sRGB space. + +# 6.2. Implementation Details + +All the models presented in this paper are trained with Adam optimizer $(\beta_{1} = 0.9$ , and $\beta_{2} = 0.999)$ and image crops of $128 \times 128$ . Using the Bayer unification and augmentation technique [39], we randomly perform horizontal and vertical flips. We set a filter size of $3 \times 3$ for all convolutional layers of the DAB except the last for which we use $1 \times 1$ . + +Initial training of CycleISP. To train the CycleISP model, we use the MIT-Adobe FiveK dataset [10], which contains 5000 RAW images. We process these RAW images using the LibRaw library and generate sRGB images. From this dataset, 4850 images are used for training and 150 for validation. We use 3 RRGs and 5 DABs for both RGB2RAW and RAW2RGB networks, and 2 RRGs and 3 DABs for the color correction network. The RGB2RAW and RAW2RGB branches of CycleISP are independently trained for 1200 epochs with a batch size of 4. The initial learning rate is $10^{-4}$ , which is decreased to $10^{-5}$ after 800 epochs. + +Fine-tuning CycleISP. This process is performed twice: first with the procedure presented in Section 3.4, and then with the method of Section 4. In the former case, the output of the CycleISP model is noise-free, and in the latter case, the output is noisy. For each fine-tuning stage, we use 600 epochs, batch size of 1 and learning rate of $10^{-5}$ . + +Training denoising networks. We train four networks to perform denoising on: (1) DND RAW data, (2) DND sRGB images, (3) SIDD RAW data, and (4) SIDD sRGB images. For all four networks, we use 4 RRGs and 8 DABs, 65 epochs, batch size of 16, and initial learning rate of $10^{-4}$ which is decreased by a factor of 10 after every 25 epochs. We take 1 million images from the MIR flickr extended + +Table 1: RAW denoising results on the DND benchmark dataset [44]. * denotes that these methods use variance stabilizing transform (VST) [40] to provide their best results. + +
MethodRAWsRGB
PSNR ↑SSIM ↑PSNR ↑SSIM ↑
TNRD* [14]45.700.9636.090.888
MLP* [9]45.710.96336.720.912
FoE [50]45.780.96735.990.904
EPLL* [69]46.860.97337.460.925
KSVD* [3]46.870.97237.630.929
WNNM* [27]47.050.97237.690.926
NCSR* [18]47.070.96937.790.923
BM3D* [15]47.150.97437.860.930
DnCNN [66]47.370.97638.080.936
N3Net [45]47.560.97738.320.938
UPI (Raw) [7]48.890.98240.170.962
Ours49.130.98340.500.966
+ +Table 2: RAW denoising results on the SIDD dataset [1]. + +
MethodRAWsRGB
PSNR ↑SSIM ↑PSNR ↑SSIM ↑
EPLL [69]40.730.93525.190.842
GLIDE [57]41.870.94925.980.816
TNRD [14]42.770.94526.990.744
FoE [50]43.130.96927.180.812
MLP [9]43.170.96527.520.788
KSVD [3]43.260.96927.410.832
DnCNN [66]43.300.96528.240.829
NLM [8]44.060.97129.390.846
WNNM [27]44.850.97529.540.888
BM3D [15]45.520.98030.950.863
Ours52.410.99339.470.918
+ +dataset [31] and split them into a ratio of 90:5:5 for training, validation and testing. All the images are preprocessed with the Gaussian kernel $(\sigma = 1)$ to reduce the effect of noise, and other artifacts. Next, we synthesize clean/noisy paired training data (both for RAW and sRGB denoising) using the procedure described in Section 4. + +# 6.3. Results for RAW Denoising + +In this section, we evaluate the denoising results of the proposed CycleISP model with existing state-of-the-art methods on the RAW data from DND [44] and SIDD [1] benchmarks. Table 1 shows the quantitative results (PSNR/SSIM) of all competing methods on the DND dataset obtained from the website of the evaluation server [16]. Note that there are two super columns in the table listing the values of image quality metrics. The numbers in the sRGB super column are provided by the server after passing the denoised RAW images through the camera imaging pipeline [32] using image metadata. Our model consistently performs better against the learning-based as well as conventional denoising algorithms. Furthermore, the proposed model has $\sim 5\times$ lesser parameters than previous best method [7]. The trend is similar for the SIDD dataset, as shown in Table 2. Our algorithm achieves 6.89 dB improvement in PSNR over the BM3D algorithm[15]. + +A visual comparison of our result against the state-of + +Table 3: Denoising sRGB images of the DND benchmark dataset [44]. + +
MethodEPLL [69]TNRD [14]NCSR [18]MLP [9]BM3D [15]FoE [50]WNNM [27]KSVD [3]MCWNNM [62]FFDNet+ [67]TWSC [61]CBDNet [28]RIDNet [4]Ours
PSNR ↑33.5133.6534.0534.2334.5134.6234.6736.4937.3837.6137.9438.0639.2339.56
SSIM ↑0.8240.8310.8350.8330.8510.8850.8650.8980.9290.9420.9400.9420.9530.956
+ +Table 4: Denoising sRGB images of the SIDD benchmark dataset [1]. + +
MethodDnCNN [66]MLP [9]GLIDE [57]TNRD [14]FoE [50]BM3D [15]WNNM [27]NLM [8]KSVD [3]EPLL [69]CBDNet [28]RIDNet [4]Ours
PSNR ↑23.6624.7124.7124.7325.5825.6525.7826.7626.8827.1130.7838.7139.52
SSIM ↑0.5830.6410.7740.6430.7920.6850.8090.6990.8420.8700.7540.9140.957
+ +![](images/da95b86dcae6daf7e37a8a9ed74803e2dd9ae0e5e4bf34d2e64aeb63b0ab8f63.jpg) +26.90 dB +Noisy Image + +![](images/abe850e1425eb87ac2876ea8315f4474e242b4f1b3e00d52c3cd3930d2628a8f.jpg) +26.90 dB + +![](images/0ecf074aa8ef2d46388607a0167b6c3b4a619d8a5604fb334c0fc65371e00220.jpg) +Noisy +33.05 dB +FDDNet [67] + +![](images/60eeac7b7ad950be99f0fba11b02cfb53f1324ab205af82fb8cbeb04d424ec34.jpg) +30.91 dB + +![](images/7467c2bf8edaef9774cb982decfee4fd9c81ef0b442980c8e2af6ab1d003cf48.jpg) +BM3D [15] +33.29 dB +DnCNN [66] + +![](images/95a667ffa55f31ac30cb0c754b5e1cb4442fdc12f2a3b168384f85f2f1589607.jpg) +32.47 dB + +![](images/99891dae39d4d5c186541bf291915f8280e921e929731cd2275af6c2fca573c2.jpg) +NC [36] +33.62 dB +CBDNet [28] + +![](images/f2d7eb8092eb230e2c2c937f4d50aad8c51f87fceaaec4554f4893c1611cdac6.jpg) +32.50 dB + +![](images/9d95391ff54fdea1be6359c3a9ae61dc0d1ae1625f2268ed40e494eee9f69165.jpg) +TWSC [61] +34.09 dB +RIDNet [4] + +![](images/28b8231499ec6a9b7ffdbededb9fa9483903fdbee590a7fad30956f857583183.jpg) +32.74 dB + +![](images/882bb32544929efaa87377b1ae3cece94b694b1522049b75c787b17441c9f5ff.jpg) +MCWNNM [62] +34.32 dB +Ours + +![](images/8a35b4d1e01863519ecd2fe4d15bec4a46f8e95bf51d9d2e8b04366a0a490b25.jpg) +Figure 6: Denoising sRGB image from DND [44]. Our method preserves better structural content than other algorithms. +18.25 dB +Noisy +20.76 dB +DnCNN [66] + +![](images/ed3cc7346ada1fc3235504bbb2d1d4125b1768daa05d0e716842a6c739fbc669.jpg) +Reference +25.75 dB +28.84 dB +35.57 dB +BM3D [15] +CBDNet [28] +RIDNet [4] +Figure 7: Denoising results of different methods on a challenging sRGB image from the SIDD dataset [1]. + +the-art algorithms is presented in Fig. 1. Our model is very effective in removing real noise, especially the low-frequency chroma noise and defective pixel noise. + +# 6.4. Results for sRGB Denoising + +While it is recommended to apply denoising on RAW data (where noise is uncorrelated and less complex) [26], denoising is commonly studied in the sRGB domain. We + +compare the denoising results of different methods on sRGB images from the DND and SIDD datasets. Table 3 and 4 show the scores of image quality metrics. Overall, the proposed model performs favorably against the state-of-the-art. Compared to the recent best algorithm RIDNet [4], our approach demonstrates the performance gain of $0.33\mathrm{dB}$ and $0.81\mathrm{dB}$ on DND and SIDD datasets, respectively. + +Fig. 6 and 7 illustrate the sRGB denoising results on DND and SIDD, respectively. To remove noise, most of the evaluated algorithms either produce over-smooth images (and sacrifice image details) or generate images with splotchy texture and chroma artifacts. In contrast, our method generates clean and artifact-free results, while faithfully preserving image details. + +# 6.5. Generalization Test + +To compare the generalization capability of the denoising model trained on the synthetic data generated by our method and that of [7], we perform the following experiments. We take the (publicly available) denoising model of [7] trained for DND, and directly evaluate it on the RAW images from the SIDD dataset. We repeat the same procedure for our denoising model as well. For a fair comparison, we use the same network architecture (U-Net) and noise model as of [7]. The only difference is data conver + +Table 5: Generalization Test. U-Net model is trained only for DND [44] with our technique and with the UPI [7] method, and directly evaluated on the SIDD dataset [1]. + +
MethodDND [44]SIDD [1]
PSNRSSIMPSNRSSIM
UPI [7]48.890.982449.170.9741
Ours49.000.982750.140.9758
+ +Table 6: Ablation study: RAW2RGB branch. + +
Short skip connections✓✓✓✓✓
Color correction branch✓✓✓✓✓
Channel Attention (CA)✓✓✓✓
Spatial attention (SA)✓✓✓✓
PSNR (in dB)23.2242.9633.5844.6745.0845.41
+ +Table 7: Layout of SA and CA in DAB. + +
LayoutCA + SASA + CACA & SA in parallel
PSNR (in dB)45.1745.1645.41
+ +sion from sRGB to RAW. The results in Table 5 show that the denoising network trained with our method not only performs well on the DND dataset but also shows promising generalization to the SIDD set (a gain of $\sim 1$ dB over [7]). + +# 6.6. Ablations + +We study the impact of individual contributions by progressively integrating them to our model. To this end, we use the RAW2RGB network that maps clean RAW image to clean sRGB image. Table 6 shows that the skip connections cause the largest performance drop, followed by the color correction branch. Furthermore, it is evident that the presence of both CA and SA is important, as well as their configuration (see Table 7), for the overall performance. + +# 6.7. Color Matching For Stereoscopic Cinema + +In professional 3D cinema, stereo pairs for each frame are acquired using a stereo camera setup, with two cameras mounted on a rig either side-by-side or (more commonly) in a beam splitter formation [5]. During movie production, meticulous efforts are required to ensure that the twin cameras perform in exactly the same manner. However, oftentimes visible color discrepancies between the two views are inevitable because of the imperfect camera adjustments and impossibility of manufacturing identical lens systems. In movie post-production, color mismatch is corrected by a skilled technician, which is an expensive and highly involved procedure [41]. + +With the proposed CycleISP model, we can perform the color matching task, as shown in Fig. 8. Given a stereo pair, we first choose one view as the target and apply morphing to fully register it with the source view. Next, we pass the source RGB image through RGB2RAW model and obtain the source RAW image. Finally, we map back the source RAW image to the sRGB space using the RAW2RGB net + +![](images/114a927e38c7dcdb65260101630f741d8407299cd82ca0250dc80316eeeefe8f.jpg) +Figure 8: Scheme for color matching 3D pairs. + +![](images/214a7c6106c4957225b8a66758243c1b2a8b372262f884b132627f765a320e2b.jpg) + +![](images/01cec239df4eed98f4e988006ea7809860e45023195ef9ef8218110379be1333.jpg) +(b) Source view. 32.17 dB + +![](images/97f1d6a78a9eb41ee556d5b8c311ccad929d68f0097c6d7de56b5bb8d0f4b2dd.jpg) +(a) Target view. (PSNR) + +![](images/61e3a82b6f7868ccc2a05a60272f3f9b8ba7c761dfc21edc33daad6401f74458.jpg) + +![](images/7c35ea70f6ebc40842e7fb58c3d06da832702340bb1733bcaa39bbcfdc52819e.jpg) +(c) Reinhard et al. [47]. 18.38 +dB (d) Kotera [34]. 32.80 dB +(e) Pitie et al. [43]. 33.38 dB +Figure 9: Example of color correction for 3D cinema. Compare the colors of the ground and side of the car in zoomed-in crops. Images are property of Mammoth HD Inc. + +![](images/dcdf0f384abf877c452435269b3273940c9def6afa78faadc074c966f59bfd82.jpg) +(f) Ours. 36.60 dB + +work, but with the color correction branch providing the color information from the 'target' RGB image (rather than the source RGB). Fig. 9 compares our method with three other color matching techniques [34, 43, 47]. The proposed method generates results that are perceptually more faithful to the target views than other competing approaches. + +# 7. Conclusion + +In this work, we propose a data-driven CycleISP framework that is capable of converting sRGB images to RAW data and back to sRGB images. The CycleISP model allows us to synthesize realistic clean/noisy paired training data both in RAW and sRGB spaces. By training a novel network for the tasks of denoising the RAW and sRGB images, we achieve state-of-the-art performance on real noise benchmark datasets (DND [44] and SIDD [1]). Furthermore, we demonstrate that the CycleISP model can be applied to the color matching problem in stereoscopic cinema. Our future work includes exploring and extending the CycleISP model for other low-level vision problems such as super-resolution and deblurring. + +Acknowledgments. Ming-Hsuan Yang is supported by the NSF CAREER Grant 1149783. + +# References + +[1] Abdelrahman Abdelhamed, Stephen Lin, and Michael S Brown. A high-quality denoising dataset for smartphone cameras. In CVPR, 2018. 2, 5, 6, 7, 8 +[2] Abdelrahman Abdelhamed, Radu Timofte, and Michael S Brown. Ntire 2019 challenge on real image denoising: Methods and results. In CVPRW, 2019. 2 +[3] Michal Aharon, Michael Elad, and Alfred Bruckstein. K-SVD: an algorithm for designing overcomplete dictionaries for sparse representation. Trans. Sig. Proc., 2006. 6, 7 +[4] Saeed Anwar and Nick Barnes. Real image denoising with feature attention. ICCV, 2019. 2, 7 +[5] Marcelo Bertalmó. Image Processing for Cinema. CRC Press, 2014. 8 +[6] Marcelo Bertalmó. Denoising of Photographic Images and Video. Springer, 2018. 2 +[7] Tim Brooks, Ben Mildenhall, Tianfan Xue, Jiawen Chen, Dillon Sharlet, and Jonathan T Barron. Unprocessing images for learned raw denoising. In CVPR, 2019. 1, 2, 3, 4, 5, 6, 7, 8 +[8] Antoni Buades, Bartomeu Coll, and J-M Morel. A non-local algorithm for image denoising. In CVPR, 2005. 2, 6, 7 +[9] Harold C Burger, Christian J Schuler, and Stefan Harmeling. Image denoising: Can plain neural networks compete with BM3D? In CVPR, 2012. 2, 5, 6, 7 +[10] Vladimir Bychkovsky, Sylvain Paris, Eric Chan, and Frédo Durand. Learning photographic global tonal adjustment with a database of input/output image pairs. In CVPR, 2011. 4, 6 +[11] Priyam Chatterjee and Peyman Milanfar. Is denoising dead? TIP, 2009. 2 +[12] Priyam Chatterjee and Peyman Milanfar. Fundamental limits of image denoising: are we there yet? In ICASSP, 2010. 2 +[13] Chen Chen, Qifeng Chen, Jia Xu, and Vladlen Koltun. Learning to see in the dark. In CVPR, 2018. 4 +[14] Yunjin Chen, Wei Yu, and Thomas Pock. On learning optimized reaction diffusion processes for effective image restoration. In CVPR, 2015. 6, 7 +[15] Kostadin Dabov, Alessandro Foi, Vladimir Katkovnik, and Karen Egiazarian. Image denoising by sparse 3-D transform-domain collaborative filtering. TIP, 2007. 2, 6, 7 +[16] https://noise.visinf.tu-darmstadt.de/benchmark/, 2017. [Online; accessed 15-Nov-2019]. 6 +[17] J. Deng, W. Dong, R. Socher, L. Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In CVPR, 2009. 1 +[18] Weisheng Dong, Lei Zhang, Guangming Shi, and Xin Li. Nonlocally centralized sparse representation for image restoration. TIP, 2012. 6, 7 +[19] David L Donoho. De-noising by soft-thresholding. Trans. on information theory, 1995. 2 +[20] Alexei A Efros and Thomas K Leung. Texture synthesis by non-parametric sampling. In ICCV, 1999. 2 +[21] Gabriel Eilertsen, Joel Kronander, Gyorgy Denes, Rafal K Mantiuk, and Jonas Unger. HDR image reconstruction from a single exposure using deep cnns. TOG, 2017. 4 + +[22] Alessandro Foi. Clipped noisy images: Heteroskedastic modeling and practical denoising. Signal Processing, 2009. 2 +[23] Alessandro Foi, Sakari Alenius, Vladimir Katkovnik, and Karen Egiazarian. Noise measurement for raw-data of digital imaging sensors by automatic segmentation of nonuniform targets. Sensors, 2007. 2 +[24] Alessandro Foi, Mejdi Trimeche, Vladimir Katkovnik, and Karen Egiazarian. Practicaloissonian-gaussian noise modeling and fitting for single-image raw-data. TIP, 2008. 2 +[25] Michael Gharbi, Gaurav Chaurasia, Sylvain Paris, and Frédo Durand. Deep joint demosaicking and denoising. TOG, 2016. 2, 4 +[26] Gabriela Ghimpeşeanu, Thomas Batard, Tamara Seybold, and Marcelo Bertalmío. Local denoising applied to raw images may outperform non-local patch-based methods applied to the camera output. In *Electronic Imaging*, 2016. 2, 7 +[27] Shuhang Gu, Lei Zhang, Wangmeng Zuo, and Xiangchu Feng. Weighted nuclear norm minimization with application to image denoising. In CVPR, 2014. 6, 7 +[28] Shi Guo, Zifei Yan, Kai Zhang, Wangmeng Zuo, and Lei Zhang. Toward convolutional blind denoising of real photographs. In CVPR, 2019. 2, 7 +[29] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 4 +[30] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In CVPR, 2018. 4, 5 +[31] Mark J Huiskes, Bart Thomee, and Michael S Lew. New trends and ideas in visual concept detection: the MIR flickr retrieval evaluation initiative. In ACM MIR, 2010. 6 +[32] Hakki Can Karaimer and Michael S Brown. A software platform for manipulating the camera imaging pipeline. In ECCV, 2016. 6 +[33] Salman Khan, Hossein Rahmani, Syed Afaq Ali Shah, and Mohammed Bennamoun. A guide to convolutional neural networks for computer vision. Synthesis Lectures on Computer Vision, 8(1):1-207, 2018. 1 +[34] Hiroaki Kotera. A scene-referred color transfer for pleasant imaging on display. In ICIP, 2005. 8 +[35] Marc Lebrun, Miguel Colom, Antoni Buades, and Jean-Michel Morel. Secrets of image denoising cuisine. Acta Numerica, 2012. 2 +[36] Marc Lebrun, Miguel Colom, and Jean-Michel Morel. The noise clinic: a blind image denoising algorithm. Image Processing On Line, 2015. 7 +[37] Anat Levin and Boaz Nadler. Natural image denoising: Optimality and inherent bounds. In CVPR, 2011. 2 +[38] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft COCO: Common objects in context. In ECCV, 2014. 1 +[39] Jiaming Liu, Chi-Hao Wu, Yuzhi Wang, Qin Xu, Yuqian Zhou, et al. Learning raw image denoising with bayer pattern unification and bayer preserving augmentation. In CVPR Workshops, 2019. 4, 6 + +[40] Markku Makitalo and Alessandro Foi. Optimal inversion of the generalized anscombe transformation for poisson-gaussian noise. TIP, 2012. 6 +[41] Bernard Mendiburu. 3D Movie Making: Stereoscopic Digital Cinema from Script to Screen. Focal Press, 2009. 2, 8 +[42] Pietro Perona and Jitendra Malik. Scale-space and edge detection using anisotropic diffusion. TPAMI, 1990. 2 +[43] François Pitie, Anil C Kokaram, and Rozenn Dahyot. Automated colour grading using colour distribution transfer. Trans. on CVIU, 2007. 8 +[44] Tobias Plotz and Stefan Roth. Benchmarking denoising algorithms with real photographs. In CVPR, 2017. 1, 2, 5, 6, 7, 8 +[45] Tobias Plötz and Stefan Roth. Neural nearest neighbors networks. In NeurIPS, 2018. 1, 2, 6 +[46] R. Ramanath, W. E. Snyder, Y. Yoo, and M. S. Drew. Color image processing pipeline. IEEE Signal Processing Magazine, 2005. 2, 3 +[47] Erik Reinhard, Michael Adhikhmin, Bruce Gooch, and Peter Shirley. Color transfer between images. Trans. on Computer graphics and applications, 2001. 8 +[48] Dongwei Ren, Wangmeng Zuo, Qinghua Hu, Pengfei Zhu, and Deyu Meng. Progressive image deraining networks: a better and simpler baseline. In CVPR, 2019. 4 +[49] Raquel Gil Rodríguez, Javier Vazquez-Corral, and Marcelo Bertalmio. Color matching images with unknown non-linear encodings. TIP, 2020. 2 +[50] Stefan Roth and Michael J Black. Fields of experts. IJCV, 2009. 6, 7 +[51] Leonid I Rudin, Stanley Osher, and Emad Fatemi. Nonlinear total variation based noise removal algorithms. Physica D: nonlinear phenomena, 1992. 2 +[52] Eli Schwartz, Raja Giryes, and Alex M Bronstein. DeepISP: Towards learning an end-to-end image processing pipeline. TIP, 2018. 4 +[53] Tamara Seybold, Ozlem Cakmak, Christian Keimel, and Walter Stechele. Noise characteristics of a single sensor camera in digital color image processing. In CIC, 2014. 2 +[54] Wenzhe Shi, Jose Caballero, Ferenc Huszár, Johannes Totz, Andrew P Aitken, Rob Bishop, Daniel Rueckert, and Zehan Wang. Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In CVPR, 2016. 4 +[55] Eero P Simoncelli and Edward H Adelson. Noise removal via bayesian wavelet coring. In ICIP, 1996. 2 +[56] Stephen M Smith and J Michael Brady. SUSAN—a new approach to low level image processing. *IJCV*, 1997. 2 +[57] Hossein Talebi and Peyman Milanfar. Global image denoising. TIP, 2013. 6, 7 +[58] Carlo Tomasi and Roberto Manduchi. Bilateral filtering for gray and color images. In ICCV, 1998. 2 +[59] Javier Vazquez-Corral and Marcelo Bertalmio. Color stabilization along time and across shots of the same scene, for one or several cameras of unknown specifications. TIP, 2014. 2 + +[60] Sanghyun Woo, Jongchan Park, Joon-Young Lee, and In So Kweon. CBAM: Convolutional block attention module. In ECCV, 2018. 4 +[61] Jun Xu, Lei Zhang, and David Zhang. A trilateral weighted sparse coding scheme for real-world image denoising. In ECCV, 2018. 7 +[62] Jun Xu, Lei Zhang, David Zhang, and Xiangchu Feng. Multi-channel weighted nuclear norm minimization for real color image denoising. In ICCV, 2017. 7 +[63] Leonid P Yaroslavsky. Local adaptive image restoration and enhancement with the use of DFT and DCT in a running window. In Wavelet Applications in Signal and Image Processing IV, 1996. 2 +[64] Syed Waqas Zamir, Aditya Arora, Salman Khan, Fahad Shahbaz Khan, and Ling Shao. Learning digital camera pipeline for extreme low-light imaging. arXiv preprint arXiv:1904.05939, 2019. 4 +[65] He Zhang, Vishwanath Sindagi, and Vishal M Patel. Multiscale single image dehazing using perceptual pyramid deep network. In CVPR Workshops, 2018. 4 +[66] Kai Zhang, Wangmeng Zuo, Yunjin Chen, Deyu Meng, and Lei Zhang. Beyond a gaussian denoiser: Residual learning of deep cnn for image denoising. TIP, 2017. 2, 4, 5, 6, 7 +[67] Kai Zhang, Wangmeng Zuo, and Lei Zhang. FFDNet: Toward a fast and flexible solution for CNN-based image denoising. TIP, 2018. 2, 7 +[68] Yulun Zhang, Kunpeng Li, Kai Li, Lichen Wang, Bineng Zhong, and Yun Fu. Image super-resolution using very deep residual channel attention networks. In ECCV, 2018. 4 +[69] Daniel Zoran and Yair Weiss. From learning models of natural image patches to whole image restoration. In ICCV, 2011. 6, 7 \ No newline at end of file diff --git a/cycleisprealimagerestorationviaimproveddatasynthesis/images.zip b/cycleisprealimagerestorationviaimproveddatasynthesis/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..df7b4a2942282843e7d70fd90ebcb98528963211 --- /dev/null +++ b/cycleisprealimagerestorationviaimproveddatasynthesis/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fcc6a8fd6ad0c9198a251d0a62a7c8b3cb56f3f1a60d84d3b2f5a78d22e6f29 +size 655165 diff --git a/cycleisprealimagerestorationviaimproveddatasynthesis/layout.json b/cycleisprealimagerestorationviaimproveddatasynthesis/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..a249bae0b6092f01bb34ffd59e27b9a79c382b28 --- /dev/null +++ b/cycleisprealimagerestorationviaimproveddatasynthesis/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6528737a5f655ae5492eb7920502981bcc1b87daaaef05630e9d2e2307acf3c +size 510879 diff --git a/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/3104e7ae-6eca-48e7-97c9-513953dec116_content_list.json b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/3104e7ae-6eca-48e7-97c9-513953dec116_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..926da0a123bfe22e9e2f257697106c7331a2d601 --- /dev/null +++ b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/3104e7ae-6eca-48e7-97c9-513953dec116_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57452d6bf2e49a19ba16a84e54b0850ea1ab05e9bf9c6ad570f92aa236abd217 +size 74088 diff --git a/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/3104e7ae-6eca-48e7-97c9-513953dec116_model.json b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/3104e7ae-6eca-48e7-97c9-513953dec116_model.json new file mode 100644 index 0000000000000000000000000000000000000000..cbb6dd28b1ef1036aaae8708ba66dc6a8932be74 --- /dev/null +++ b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/3104e7ae-6eca-48e7-97c9-513953dec116_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e5f80e8db168ac69d4175d75727f174ee11e079008baeec0fc3e15413db8df8 +size 89741 diff --git a/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/3104e7ae-6eca-48e7-97c9-513953dec116_origin.pdf b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/3104e7ae-6eca-48e7-97c9-513953dec116_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2628d55416f31bae08ee59fbd345d4bcc190057e --- /dev/null +++ b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/3104e7ae-6eca-48e7-97c9-513953dec116_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a690580aa1b6675153b4e8874ef171d6df555070b4b6b208113e43bf0b0ec6f +size 2775489 diff --git a/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/full.md b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..8d3ea3ebb34f44c1a554b88dfa5d75106997ae30 --- /dev/null +++ b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/full.md @@ -0,0 +1,272 @@ +# Cylindrical Convolutional Networks for Joint Object Detection and Viewpoint Estimation + +Sunghun Joung1, Seungryong Kim2,3, Hanjae Kim1, Minsu Kim1, Ig-Jae Kim4, Junghyun Cho4, and Kwanghoon Sohn1,* + +1Yonsei University 2Ecole Polytechnique Fédérale de Lausanne (EPFL) + +$^{3}$ Korea University $^{4}$ Korea Institute of Science and Technology (KIST) + +{sunghunjoung, incohjk, minsukim320, khsohn}@yonsei.ac.kr + +seungryong_kim@korea.ac.kr, {drjay,jhcho}@kist.re.kr + +# Abstract + +Existing techniques to encode spatial invariance within deep convolutional neural networks only model 2D transformation fields. This does not account for the fact that objects in a 2D space are a projection of 3D ones, and thus they have limited ability to severe object viewpoint changes. To overcome this limitation, we introduce a learnable module, cylindrical convolutional networks (CCNs), that exploit cylindrical representation of a convolutional kernel defined in the 3D space. CCNs extract a view-specific feature through a view-specific convolutional kernel to predict object category scores at each viewpoint. With the view-specific feature, we simultaneously determine objective category and viewpoints using the proposed sinusoidal softargmax module. Our experiments demonstrate the effectiveness of the cylindrical convolutional networks on joint object detection and viewpoint estimation. + +# 1. Introduction + +Recent significant success on visual recognition, such as image classification [33], semantic segmentation [24], object detection [12], and instance segmentation [13], has been achieved by the advent of deep convolutional neural networks (CNNs). Their capability of handling geometric transformations mostly comes from the extensive data augmentation and the large model capacity [19, 15, 31], having limited ability to deal with severe geometric variations, e.g., object scale, viewpoints and part deformations. To realize this, several modules have been proposed to explicitly handle geometric deformations. Formally, they transform the + +![](images/cae0aac735b1f1e0ef58422b68aa235f5d53acc32c4410ab3e73424b2a680068.jpg) +Figure 1. Illustration of cylindrical convolutional networks (CCNs): Given a single image of objects, we apply a view-specific convolutional kernel to extract the shape characteristic of object from different viewpoints. + +input data by modeling spatial transformation [16, 3, 20], e.g., affine transformation, or by learning the offset of sampling locations in the convolutional operators [42, 4]. However, all of these works only use a visible feature to handle geometric deformation in the 2D space, while viewpoint variations occur in the 3D space. + +To solve the problems of viewpoint variations, joint object detection and viewpoint estimation using CNNs [36, 35, 26, 6] has recently attracted the interest. This involves first estimating the location and category of objects in an image, and then predicting the relative rigid transformation between the camera coordinate in the 3D space and each image coordinate in the 2D space. However, category classification and viewpoint estimation problems are inherently contradictory, since the former requires a view-invariant feature representation while the latter requires a view-specific feature representation. Therefore, incorporating viewpoint estimation networks to a conventional object detector in a multi-task fashion does not help each other, as demonstrated in several works [26, 7]. + +Recent studies on 3D object recognition have shown that object viewpoint information can improve the recognition performance. Typically, they first represent a 3D object + +with a set of 2D rendered images, extract the features of each image from different viewpoints, and then aggregate them for object category classification [34, 1, 37]. By using multiple features with a set of predefined viewpoints, they effectively model shape deformations with respect to the viewpoints. However, in real-world scenarios, they are not applicable because we cannot access the invisible side of an object without 3D model. + +In this paper, we propose cylindrical convolutional networks (CCNs) for extracting view-specific features and using them to estimate object categories and viewpoints simultaneously, unlike conventional methods that share representation of feature for both object category [30, 23, 21] and viewpoint estimation [35, 26, 6]. As illustrated in Fig. 1, the key idea is to extract the view-specific feature conditioned on the object viewpoint (i.e., azimuth) that encodes structural information at each viewpoint as in 3D object recognition methods [34, 1, 37]. In addition, we present a new and differentiable argmax operator called sinusoidal soft-argmax that can manage sinusoidal properties of the viewpoint to predict continuous values from the discretized viewpoint bins. We demonstrate the effectiveness of the proposed cylindrical convolutional networks on joint object detection and viewpoint estimation task, achieving large improvements on Pascal $3\mathrm{D}+$ [41] and KITTI [10] datasets. + +# 2. Related Work + +2D Geometric Invariance. Most conventional methods for visual recognition using CNNs [33, 12, 24] provided limited performance due to geometric variations. To deal with geometric variations within CNNs, spatial transformer networks (STNs) [16] offered a way to provide geometric invariance by warping features through a global transformation. Lin and Lucey [20] proposed inverse compositional STNs that replace the feature warping with transformation parameter propagation, but it has a limited capability of handling local transformations. Therefore, several methods have been introduced by applying convolutional STNs for each location [3], estimating locally-varying geometric fields [42], and estimating spatial transformation in a recursive manner [18]. Furthermore, to handle adaptive determination of scales or receptive field for visual recognition with fine localization, Dai et al. [4] introduced two new modules, namely, deformable convolution and deformable ROI pooling that can model geometric transformation for each object. As all of these techniques model geometric deformation in the projected 2D image only with visible appearance feature, there is a lack of robustness to viewpoint variation, and they still only rely on extensive data augmentation. + +Joint Category and Viewpoint Estimation. Since viewpoint of 3D object is a continuous quantity, a natural way to estimate it is to setup a viewpoint regression problem. Wang + +et al. [38] tried to directly regress viewpoint to manage the periodic characteristic with a mean square loss. However, the regression approach cannot represent the ambiguities well that exist between different viewpoints of objects with symmetries or near symmetries [26]. Thus, other works [36, 35] divide the angles into non-overlapping bins and solve the prediction of viewpoint as a classification problem, while relying on object localization using conventional methods (i.e. Fast R-CNN [11]). Divon and Tal [6] further proposed a unified framework that combines the task of object localization, categorization, and viewpoint estimation. However, all of these methods focus on accurate viewpoint prediction, which does not play a role in improving object detection performance [26]. + +Another main issue is a scarcity of real images with accurate viewpoint annotation, due to the high cost of manual annotation. Pascal 3D+ [41], the largest 3D image dataset still is limited in scale compare to object classification datasets (e.g. ImageNet [5]). Therefore, several methods [35, 38, 6] tried to solve this problem by rendering 3D CAD models [2] into background images, but they are unrealistic and do not match real image statistics, which can lead to domain discrepancy. + +3D Object Recognition. There have been several attempts to recognize 3D shapes from a collection of their rendered views on 2D images. Su et al. [34] first proposed multi-view CNNs, which project a 3D object into multiple views and extract view-specific features through CNNs to use informative views by max-pooling. GIFT [1] also extracted view-specific features, but instead of pooling them, it obtained the similarity between two 3D objects by viewwise matching. Several methods to improve performance have been proposed, by recurrently clustering the views into multiple sets [37] or aggregating local features through bilinear pooling [43]. Kanezaki et al. [17] further proposed RotationNet, which takes multi view images as an input and jointly estimates object's category and viewpoint. It treats the viewpoint labels as latent variables, enabling usage of only a partial set of multi-view images for both training and testing. + +# 3. Proposed Method + +# 3.1. Problem Statement and Motivation + +Given a single image of objects, our objective is to jointly estimate object category and viewpoint to model viewpoint variation of each object in the 2D space. Let us denote $N_{c}$ as the number of object classes, where the class $C$ is determined from each benchmark and $N_{v}$ is determined by the number of discretized viewpoint bins. In particular, since the variation of elevation and tilt is small on real-scenes [41], we focus on estimation of the azimuth. + +![](images/f8cc3b99e9f01025666b4894ffcf8e3737da536c021aa5e0aaf5f8be0fdbf7fb.jpg) +(a) + +![](images/750dbab4eb3da72c029bf8a38cc1bcaed8b85e11e275cc339936e7bf58d04f4d.jpg) +(b) + +![](images/01d842a0b13e0f120ce7fff5172ca64e51f23d2f926cd807a6d328b170f0faea.jpg) +(c) +Figure 2. Intuition of cylindrical convolutional networks: (a) joint category and viewpoint estimation methods [26, 6] using single-view image as an input, (b) 3D object recognition methods [34, 1] using multi-view image as an input, and (c) cylindrical convolutional networks, which take the advantages of 3D object recognition methods by extracting view-specific features from single-view image as an input. + +Object categorization requires a view-agnostic representation of an input so as to recognize the object category regardless of viewpoint variations. In contrast, viewpoint estimation requires a representation that preserves shape characteristic of the object in order to distinguish their viewpoint. Conventional CNNs based methods [26, 6] extract a view-agnostic feature, followed by task-specific subnetworks, i.e., object categorization and viewpoint estimation, as shown in Fig. 2 (a). They, however, do not leverage the complementary characteristics of the two tasks, thus showing a limited performance. Unlike these methods, some methods on 3D object recognition have shown that view-specific features for each viewpoint can encode structural information [34, 1], and thus they use these features to facilitate the object categorization task as shown in Fig. 2 (b). Since they require multi-view images of pre-defined viewpoints, their applicability is limited to 3D object recognition (i.e. ModelNet 40 [39]). + +To extract the view-specific features from a single image, we present cylindrical convolutional networks that exploit a cylindrical convolutional kernel, where each subset is a view-specific kernel to capture structural information at each viewpoint. By utilizing view-specific feature followed by object classifiers, we estimate an object category likelihood at each viewpoint and select a viewpoint kernel that predicts to maximize object categorization probability. + +# 3.2. Cylindrical Convolutional Networks + +Let us denote an intermediate CNN feature map of Region of Interest (ROI) [13] as $\mathbf{x} \in \mathbb{R}^{k \times k \times \mathrm{ch}_i}$ , with spatial resolution $k \times k$ and $\mathrm{ch}_i$ channels. Conventional viewpoint estimation methods [26, 6] apply a $k \times k$ view-agnostic convolutional kernel in order to preserve position sensitive information for extracting feature $F \in \mathbb{R}^{\mathrm{ch}_o}$ , where $\mathrm{ch}_o$ is the number of output channels. Since the structural information of projected images varies with different viewpoints, we aim to apply a view-specific convolutional kernel at a + +predefined set of $N_v$ viewpoints. The most straightforward way for realizing this is to define $N_v$ variants of $k \times k$ kernel. This strategy, however, cannot consider structural similarity between nearby viewpoints, and would be inefficient. + +We instead model a cylindrical convolutional kernel with weight parameters $W_{\mathrm{cyl}} \in \mathbb{R}^{k \times N_v \times \mathrm{ch}_i \times \mathrm{ch}_o}$ as illustrated in Fig. 3. Each $k \times k$ kernel extracted along horizontal axis on $W_{\mathrm{cyl}}$ in a sliding window fashion can be seen as a view-specific kernel $W_{\mathrm{v}}$ . We then obtain $N_v$ variants of a view-specific feature $F_v \in \mathbb{R}^{\mathrm{ch}_o}$ as + +$$ +F _ {v} = \sum_ {\mathrm {p} \in \mathcal {R}} W _ {\mathrm {v}} (\mathrm {p}) \cdot \mathrm {x} (\mathrm {p}) = \sum_ {\mathrm {p} \in \mathcal {R}} W _ {\text {c y l .}} (\mathrm {p} + \mathrm {o} _ {v}) \cdot \mathrm {x} (\mathrm {p}), \tag {1} +$$ + +where $\mathrm{o}_v$ is an offset on cylindrical kernel $W_{\mathrm{cyl}}$ for each viewpoint $v$ . The position $\mathfrak{p}$ varies within in the $k\times k$ window $\mathcal{R}$ . Different from view-specific features on Fig. 2 (b) extracted from multi-view images, our view-specific feature benefit from structural similarity between nearby viewpoints. Therefore, each view-specific kernel can be trained to discriminate shape variation from different viewpoints. + +# 3.3. Joint Category and Viewpoint Estimation + +In this section, we propose a framework to jointly estimate object category and viewpoint using the view-specific features $F_{v}$ . We design convolutional layers $f(\cdot)$ with parameters $W_{\mathrm{cls}}$ to produce $N_{v} \times (N_{c} + 1)$ score map such that $S_{v,c} = f(F_v;W_{\mathrm{cls}})$ . Since each element of $S_{v,c}$ represents the probability of object belong to each category $c$ and viewpoint $v$ , the category and viewpoint can be predicted by just finding the maximum score from $S_{v,c}$ . However, it is not differentiable along viewpoint distribution, and only predicts discretized viewpoints. Instead, we propose sinusoidal soft-argmax function, enabling the network to predict continuous viewpoints with periodic properties. To obtain the probability distribution, we normalize $S_{v,c}$ across the viewpoint axis with a softmax operation $\sigma (\cdot)$ such that + +![](images/fba57132e2919f1b3c49f46027610322fc9ee0acf117314e9a432fdcf8e47375.jpg) +Figure 3. Key idea of cylindrical convolutional networks. Input feature maps from fully convolutional networks are fed into the cylindrical convolutional kernel to obtain $N_{v}$ variants of view-specific feature. Then, each view-specific feature is used to identify its category likelihood that object category classification and viewpoint estimation can be jointly estimated. + +$P_{v,c} = \sigma (S_{v,c})$ . In the following, we describe how we estimate object categories and viewpoints. + +Category Classification. We compute the final category classification score using a weighted sum of category likelihood for each viewpoint, $S_{v,c}$ , with viewpoint probability distribution, $P_{v,c}$ , as follows: + +$$ +S _ {c} = \sum_ {v = 1} ^ {N _ {v}} S _ {v, c} \cdot P _ {v, c}, \tag {2} +$$ + +where $S_{c}$ represents an final classification score along category $c$ . Since the category classification is essentially viewpoint invariant, the gradient from $S_{c}$ will emphasize correct viewpoint's probability, while suppressing others as attention mechanism [16]. It enables the back-propagation of supervisory signal along $N_{v}$ viewpoints. + +Viewpoint Estimation. Perhaps the most straightforward way to estimate a viewpoint within CCNs is to choose the best performing view-specific feature from predefined viewpoints to identify object category. In order to predict the continuous viewpoint with periodic properties, we further introduce a sinusoidal soft-argmax, enabling regression from $P_{v,c}$ as shown in Fig. 4. + +Specifically, we make use of two representative indices, $\sin (i_v)$ and $\cos (i_v)$ , extracted by applying sinusoidal function to each viewpoint bin $i_v$ (i.e. $0^\circ$ , $15^\circ$ ,... for $N_v = 24$ ). We then take sum of each representative index with its probability, followed by atan2 function to predict object viewpoint for each class $c$ as follows: + +$$ +\theta_ {c} = \operatorname {a t a n 2} \left(\sum_ {v = 1} ^ {N _ {v}} P _ {v, c} \sin \left(i _ {v}\right), \sum_ {v = 1} ^ {N _ {v}} P _ {v, c} \cos \left(i _ {v}\right)\right), \tag {3} +$$ + +which takes advantage of classification-based approaches [36, 35] to estimate posterior probabilities, enabling better + +training of deep networks, while considering the periodic characteristic of viewpoints as regression-based approaches [38]. The final viewpoint estimation selects $\theta_{c}$ with corresponding class $c$ through category classification (2). + +Bounding Box Regression. To estimate fine-detailed location, we apply additional convolutional layers for bounding box regression with $W_{\mathrm{reg}}$ to produce $N_v \times N_c \times 4$ bounding box offsets, denoted as $t_{v,c} = f(F_v;W_{\mathrm{reg}})$ . Each set of 4 values encodes bounding box transformation parameters [12] from initial location for one of the $N_v \times N_c$ sets. This leads to use different sets of boxes for each category and viewpoint bin, which can be shown as an extended version of class-specific bounding box regression [11, 30]. + +Loss Functions. Our total loss function defined on each feature is the summation of classification loss $L_{\mathrm{cls}}$ , bounding box regression loss $L_{\mathrm{reg}}$ , and viewpoint estimation loss $L_{\mathrm{view}}$ as follows: + +$$ +L = L _ {\mathrm {c l s}} (c, \hat {c}) + [ \hat {c} \geq 1 ] \left\{L _ {\mathrm {r e g}} \left(t _ {v, c}, \hat {t}\right) + [ \hat {\theta} \neq \emptyset ] L _ {\mathrm {v i e w}} \left(\theta_ {c}, \hat {\theta}\right) \right\}, \tag {4} +$$ + +using ground-truth object category $\hat{c}$ , bounding box regression target $\hat{t}$ and viewpoint $\hat{\theta}$ . Iverson bracket indicator function $[\cdot]$ evaluates to 1 when it is true and 0 otherwise. For background, $\hat{c} = 0$ , there is no ground-truth bounding box and viewpoint, hence $L_{\mathrm{reg}}$ and $L_{\mathrm{view}}$ are ignored. We train the viewpoint loss $L_{\mathrm{view}}$ in a semi-supervised manner, using the sets with ground-truth viewpoint $(\hat{\theta} \neq \emptyset)$ for supervised learning. For the datasets without viewpoint annotation $(\hat{\theta} = \emptyset)$ , $L_{\mathrm{view}}$ is ignored and viewpoint estimation task is trained in an unsupervised manner. We use cross-entropy for $L_{\mathrm{cls}}$ , and smooth L1 for both $L_{\mathrm{reg}}$ and $L_{\mathrm{view}}$ , following conventional works [11, 30]. + +# 3.4. Implementation and Training Details + +For cylindrical kernel $W_{\mathrm{cyl}}$ , we apply additional constraint to preserve a reflectinoal symmetry of 3D ob + +![](images/25ddbe3c785d30cc694f916b30c26fce1f8e150c0ec2553c78d97ddd389befa9.jpg) +Figure 4. Illustration of sinusoidal soft-argmax: for probability distribution of discretized viewpoint bins, sinusoidal soft-argmax enables to regress periodic viewpoint signal, while conventional soft-argmax cannot be applied. + +jects. We first divide the parameters into four groups as front, rear, left-side, and right-side, and make the parameters of left-side and the right-side to be reflective using horizontal flip operation $h(\cdot)$ such that $W_{\mathrm{cyl}} = [W_{\mathrm{side}}, W_{\mathrm{front}}, h(W_{\mathrm{side}}), W_{\mathrm{rear}}]$ , where parameters of each groups are concatenated horizontally. We set the spatial resolution of $W_{\mathrm{front}}$ and $W_{\mathrm{back}}$ as $k \times 1$ , and $W_{\mathrm{side}}$ as $k \times (N_v - 2) / 2$ . Therefore, $W_{\mathrm{cyl}}$ can preserve horizontal reflectional symmetry and saves the network memory. + +In order to make $W_{\mathrm{cyl}}$ defined on a 3D space to be implemented in a 2D space, periodicity along the azimuth has to be preserved. Therefore, we horizontally pad $k \times \lfloor k / 2 \rfloor$ of parameters from the left end to the right side using flip operation, and vice versa, where $\lfloor \cdot \rfloor$ denotes floor function that outputs the greatest integer less than or equal to input. It allows $W_{\mathrm{cyl}}$ to be used as periodic parameters. + +We adopt two stage object detection framework, Faster R-CNN [30] that first processes the whole image by standard fully convolutional networks [15, 21], followed by Region Proposal Network (RPN) [30] to produce a set of bounding boxes. We then use ROI Align [13] layer to extract fixed size feature $\mathbf{x}$ for each Region of Interest (ROI). + +In both training and inference, images are resized so that the shorter side is 800 pixels, using anchors of 5 scales and 3 aspect ratios with FPN, and 3 scales and 3 aspect ratios without FPN are utilized. 2k and 1k region proposals are generated using non-maximum suppression threshold of 0.7 at both training and inference respectively. We trained on 2 GPUs with 4 images per GPU (effective mini batch size of 8). The backbones of all models are pretrained on ImageNet classification [5], and additional parameters are randomly initialized using He initialization [14]. The learning rate is initialized to 0.02 with FPN, 0.002 without FPN, and decays by a factor of 10 at the 9th and 11th epochs. All models are trained for 12 epochs using SGD with a weight decay of 0.0001 and momentum of 0.9, respectively. + +
MethodCategoryViewpoint
NvCCNstop-1top-3Accπ/6Mederr
240.910.970.5623.5
18✓0.950.990.6317.3
24✓0.950.990.6615.5
30✓0.940.980.6317.7
+ +Table 1. Joint object category and viewpoint estimation performance with ground truth box on Pascal 3D+ dataset [41]. + +# 4. Experiments + +# 4.1. Experimental Settings + +Our experiments are mainly based on maskrcnn-benchmark [25] using PyTorch [27]. We use the standard configuration of Faster R-CNN [30] based on ResNet-101 [15] as a backbone. We implement two kinds of network, with and without using FPN [21]. For the network without using FPN, we remove the last pooling layer to preserve spatial information of each ROI feature. We set $k = 7$ following conventional works, and set $N_v = 24$ unless stated otherwise. The choice of other hyper-parameters keeps the same with the default settings in [25]. + +We evaluate our joint object detection and viewpoint estimation framework on the Pascal 3D+ [41] and KITTI dataset [10]. The Pascal 3D+ dataset [41] consists of images from Pascal VOC 2012 [8] and images of subset from ImageNet [5] for 12 different categories that are annotated with its viewpoint. Note that the bottle category is omitted, since it is often symmetric across different azimuth [41]. On the other hand, the KITTI dataset [10] consists of 7,481 training images and 7,518 test images that are annotated with its observation angle and 2D location. For KITTI dataset, we focused our experiment on the Car object category. + +Pascal 3D+ dataset. In this experiment, we trained our network using the training set of Pascal 3D+ [41] (training set of Pascal VOC 2012 [8] and ImageNet [5]) for supervised learning only, denoted as CCNs, and semi-supervised learning with additional subset of trainval35k with overlapping classes of COCO dataset [22], denoted as CCNs*. The evaluation is done on the val set of Pascal 3D+ [41] using Average Precision (AP) metric [8] and Average Viewpoint Precision (AVP) [41], where we focus on AVP24 metric. Furthermore, we also evaluate our CCNs using minival split of COCO dataset [22] using COCO-style Average Precision (AP) @ $[0.5:0.95]$ and Average Recall (AR) metric [22] on objects of small, medium, and large sizes. + +KITTI dataset. In this experiment, we followed train/val setting of Xiang et al. [40], which guarantees that images from the training and validation set are from different videos. For evaluation using KITTI dataset [10], we use Average Precision (AP) metric with $70\%$ overlap threshold (AP@IOU0.7), and Average Orientation Similarity (AOS) + +![](images/396252677cdac7998d39da4096946287cf572db8900837dbc146627172765323.jpg) +Figure 5. Visualization of learned deep feature through Grad-CAM [32]: (from top to bottom) inputs, attention maps trained without CCNs, and with CCNs. Note that red color indicates attentive regions and blue color indicates suppressed regions. + +[10]. Results are evaluated based on three levels of difficulty: Easy, Moderate, and Hard, which are defined according to the minimum bounding box height, occlusion, and truncation grade. + +# 4.2. Ablation Study + +Analysis of the CCNs components. We analyzed our CCNs with the ablation evaluations with respect to various settings of $N_{v}$ and the effectiveness of the proposed view-specific convolutional kernel. In order to evaluate performance independent of factors such as mis-localization, we tackle the problem of joint category classification and viewpoint estimation with ground-truth bounding box using ResNet-101 [15]. For a fair comparison, a $k \times k$ view-agnostic convolutional kernels are implemented for joint object category classification and viewpoint estimation, which outputs $N_{c} \times N_{v}$ score map following conventional work [6]. In order to compare the viewpoint estimation accurately, we applied sinusoidal soft-argmax to regress the continuous viewpoint. We evaluated the top-1 and top-3 error rates for object category classification performance, and use median error (MedErr) and $\mathrm{Acc}_{\pi / 6}$ for viewpoint estimation performance [36]. + +As shown in Table 1, CCNs have shown better performance in both object category classification and viewpoint estimation compared to the conventional method using view-agnostic kernel. The result shows that view-specific kernel effectively leverage the complementary characteristics of the two tasks. Since the result with $N_{v} = 24$ has shown the best performance in both category classification and viewpoint estimation, we set $N_{v} = 24$ for remaining experiments. Note that the number of parameters in cylindrical kernel is $k \times \{(N_v - 2) / 2 + 2\} \times ch_i = 7 \times 13 \times ch_i$ , while the baseline uses $k \times k \times ch_i = 7 \times 7 \times ch_i$ . The num + +ber of additional parameters is marginal $(\sim 0.01\%)$ compared to the total number of network parameters, while performance is significantly improved. + +Network visualization. For the qualitative analysis, we applied the Grad-CAM [32] to visualize attention maps based on gradients from output category predictions. We compared the visualization results of CCNs with view-specific kernel and baseline with view-agnostic kernel. In Fig. 5, the attention map of the CCNs covers the overall regions in target object, while conventional category classifier tends to focus on the discriminative part of an object. From the observations, we conjecture that the view-specific convolutional kernel leads the network to capture the shape characteristic of object viewpoint. + +# 4.3. Results + +Pascal 3D+ dataset. In the following, we evaluated our CCNs and CCNs* in comparison to the state-of-the-art methods. Object detection methods are compared such as DPM [9], RCNN [12], Faster R-CNN [30] with ResNet-101 [15] and FPN [21]. Joint object detection and viewpoint estimation methods are also compared, including handcrafted modules such as VDPM [41], DPM-VOC+VP [28], methods using off-the-shelf 2D object detectors for viewpoint estimation such as Su et al. [35], Tulsani and Malik [36], Massa et al. [26], and unified methods such as Poirson et al. [29], Divon and Tal [6]. + +As shown in Table 2 and Table 3, our CCNs* with FPN [21] outperformed conventional methods in terms of both object detection (mAP) and joint object detection and viewpoint estimation (mAVP) on Pascal 3D+ dataset [41]. It is noticeable that conventional methods for joint object detection and viewpoint estimation actually lowered the classification performance at [26], while ours improved the per + +
MethodaerobikeboatbuscarchairdtablembikesofatraintvmAP
DPM [9]42.249.66.054.138.315.09.033.118.936.433.229.6
VDPM [41]42.244.46.053.736.312.611.135.517.032.633.629.5
DPM-VOC+VP [28]36.045.95.353.942.18.05.434.811.028.227.327.1
RCNN [12]72.468.734.073.062.333.035.270.749.670.157.256.9
Massa et al. [26]77.170.451.077.463.024.744.676.951.976.264.661.6
Poirson et al. [29]76.667.742.776.159.715.551.773.650.677.760.759.3
Faster R-CNN w/ [15]79.878.664.479.675.948.251.980.549.877.979.269.6
Faster R-CNN w/ [21]82.778.371.878.776.050.853.383.350.782.677.271.4
CCNs w/ [15]82.579.264.480.376.749.450.981.448.279.578.970.2
CCNs* w/ [15]82.981.463.786.679.743.651.781.652.581.082.171.5
CCNs w/ [21]82.680.669.384.978.850.950.783.450.382.280.072.2
CCNs* w/ [21]83.782.871.488.181.246.351.185.952.783.884.073.7
+ +Table 2. Comparison of object detection on Pascal 3D+ dataset [41]. Average Precision (AP) @IOU 0.5 is evaluated. + +
MethodaerobikeboatbuscarchairdtablembikesofatraintvmAVP24
VDPM [41]8.014.30.339.213.74.43.610.18.220.011.212.1
DPM-VOC+VP [28]9.716.72.242.124.64.22.110.54.120.712.913.6
Su et al. [35]21.522.04.138.625.57.411.024.415.028.019.819.8
Tulsani & Malik [36]37.033.410.054.140.017.519.934.328.943.922.731.1
Massa et al. [26]43.239.416.861.044.213.529.437.533.546.632.536.1
Poirson et al. [29]33.429.49.254.735.75.523.030.327.644.134.328.8
Divon & Tal [6]46.641.123.972.653.522.542.642.044.254.644.844.4
CCNs w/ [15]39.045.922.674.554.719.638.944.241.555.346.843.9
CCNs* w/ [15]39.447.023.276.655.520.339.544.541.856.145.544.5
CCNs w/ [21]45.147.423.177.855.219.939.645.343.458.047.845.7
CCNs* w/ [21]46.148.824.278.055.920.941.045.343.759.549.046.6
+ +Table 3. Comparison of joint object detection and viewpoint estimation on Pascal 3D+ dataset [41]. Average Precision with 24 discretized viewpoint bins (AVP24) is evaluated, where true positive stands with correct bounding box localization and viewpoint estimation. + +![](images/f45b19e744dd3f5d13e21030dfafa4f0aa7a6285734488ce6d6ac148e1e78f32.jpg) +Figure 6. Qualitative examples of joint object detection and viewpoint estimation on Pascal3D+ dataset [41]. The bar below each image indicates the viewpoint prediction, in green, and the ground-truth in black. + +formance compared to the original Faster R-CNN [30, 21]. Furthermore, our semi-supervised learning scheme using real datasets [22] shows performance improvement, indicating that (2) enables the supervisory signal for viewpoint + +estimation. Note that other viewpoint estimation methods used synthetic images with ground-truth viewpoint annotation [35, 26, 6] or keypoint annotation [36]. In Fig. 6, we show the examples of our joint object detection and view + +![](images/7a2c1f6cc13ac84a5b6e287d568cad8c77f65bb80a3e13c11e92213d446e0c4f.jpg) + +![](images/1f0043430053241b321b311d2a7b6c87a45b3e0eb7a5cff7ff20d410afaad03c.jpg) + +![](images/33674548e95e35e3bcb75a5b64b5abfdbea7a0f4783e3bf7daad747454fdeccc.jpg) + +![](images/b93a2ea5219aca391e259bb193eccdc23522685090b36fb3e9e4d72812b763ba.jpg) +Figure 7. Qualitative examples of joint object detection and viewpoint estimation on KITTI dataset [10]. The bar below each image indicates the viewpoint prediction of corresponding object in green. + +![](images/045addaba2706b700e4bc3df30e1d9d0014a8e6432eb67ea2cad71584b89f331.jpg) + +![](images/abf6dd3bbae3a6368b9ab688c62030a1017c6cbd4cec98cc670e7d2da0b92fea.jpg) + +
MetricNetworkCCNsAllSML
APResNet [15]✓34.315.528.947.3
36.617.530.249.6
FPN [21]✓40.722.136.252.1
41.824.238.852.9
ARResNet [15]✓47.221.642.963.6
49.622.744.166.0
FPN [21]✓54.132.651.366.5
56.333.953.168.3
+ +Table 4. Comparison of object detection on subset of COCO dataset [22]. The COCO-style Average Precision (AP) @IOU∈ [0.5, 0.95] and Average Recall (AR) are evaluated on objects of small (S), medium (M), and large (L) sizes. + +
MetricMethodsEasyModerateHard
APFaster-RCNN [30]82.9777.8366.25
w/o CCNs81.7476.2364.19
CCNs86.1780.1967.14
AOSFaster-RCNN [30]---
w/o CCNs79.4672.9259.63
CCNs85.0179.1363.56
+ +Table 5. Comparison of joint object detection and viewpoint estimation on val set of KITTI dataset [10] for cars. Average Precision (AP) @IOU 0.7 is evaluated for object detection, and Average Orientation Similarity (AOS) for viewpoint estimation. + +point estimation on Pascal 3D+ dataset [10]. + +Table 4 validates the effect of CCNs on the standard object detection dataset. Compared to the baseline without using CCNs, object detection performance (AP) has increased by applying view-specific convolutional kernel. Furthermore, the localization performance (AR) has also increased, indicating that our view-specific convolutional kernel can effectively encode structural information of input objects. + +KITTI dataset. We further evaluated our CCNs in KITTI object detection benchmark [10]. Since the other methods aim to find 3D bounding boxes from monocular image, we + +conducted the experiment to validate the effectiveness of CCNs. As shown in Table 5, our CCNs have shown better results compare to original Faster-RCNN [30] by adapting view-specific convolutional kernel. On the other hand, joint training of object detection and viewpoint estimation without using CCNs actually lowered the object detection performance. This results share the same properties as previous studies [26, 7], indicating that proper modeling of geometric relationship is to be determined. In Fig. 7, we show the examples of our joint object detection and viewpoint estimation on KITTI dataset [10]. + +# 4.4. Discussion + +Estimating the viewpoint of deformable categories is an open problem. We thus experimented our cylindrical convolutional networks for visual recognition on rigid categories only [41]. However, our key idea using view-specific convolutional kernel can be generalized with suitable modeling of deformable transformation (e.g., deformable convolution [4]) at the kernel space. We believe that the modeling pose or keypoint of non-rigid categories (e.g., human pose estimation) with our CCNs can be alternative to the current limitation, and leave it as future work. + +# 5. Conclusion + +We have introduced cylindrical convolutional networks (CCNs) for joint object detection and viewpoint estimation. The key idea is to exploit view-specific convolutional kernels, sampled from a cylindrical convolutional kernel in a sliding window fashion, to predict an object category likelihood at each viewpoint. With this likelihood, we simultaneously estimate object category and viewpoint using the proposed sinusoidal soft-argmax module, resulting state-of-the-art performance on the task of joint object detection and viewpoint estimation. In the future, we aim to extend view-specific convolutional kernel into non-rigid categories. + +# References + +[1] Song Bai, Xiang Bai, Zhichao Zhou, Zhaoxiang Zhang, and Longin Jan Latecki. Gift: A real-time and scalable 3d shape search engine. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5023-5032, 2016. 2, 3 +[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. 2015. 2 +[3] Christopher B Choy, JunYoung Gwak, Silvio Savarese, and Manmohan Chandraker. Universal correspondence network. In Advances in Neural Information Processing Systems, pages 2414-2422, 2016. 1, 2 +[4] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 764-773, 2017. 1, 2, 8 +[5] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 248-255, 2009. 2, 5 +[6] Gilad Divon and Ayellet Tal. Viewpoint estimation—insights & model. In Proceedings of the European Conference on Computer Vision, pages 252–268, 2018. 1, 2, 3, 6, 7 +[7] Mohamed Elhoseiny, Tarek El-Gaaly, Amr Bakry, and Ahmed Elgammal. A comparative analysis and study of multiview cnn models for joint object categorization and pose estimation. In International Conference on Machine learning, pages 888-897, 2016. 1, 8 +[8] Mark Everingham, SM Ali Eslami, Luc Van Gool, Christopher KI Williams, John Winn, and Andrew Zisserman. The Pascal visual object classes challenge: A retrospective. International Journal of Computer Vision, 111(1):98-136, 2015. 5 +[9] Pedro F Felzenszwalb, Ross B Girshick, David McAllester, and Deva Ramanan. Object detection with discriminatively trained part-based models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(9):1627-1645, 2009. 6, 7 +[10] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3354-3361, 2012. 2, 5, 6, 8 +[11] Ross Girshick. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, pages 1440-1448, 2015. 2, 4 +[12] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 580-587, 2014. 1, 2, 4, 6, 7 +[13] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE International + +Conference on Computer Vision, pages 2961-2969, 2017. 1, 3, 5 +[14] 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. 5 +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770-778, 2016. 1, 5, 6, 7, 8 +[16] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in Neural Information Processing Systems, pages 2017-2025, 2015. 1, 2, 4 +[17] 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. 2 +[18] Seungryong Kim, Stephen Lin, Sang Ryul Jeon, Dongbo Min, and Kwanghoon Sohn. Recurrent transformer networks for semantic correspondence. In Advances in Neural Information Processing Systems, pages 6126-6136, 2018. 2 +[19] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems, pages 1097-1105, 2012. 1 +[20] Chen-Hsuan Lin and Simon Lucey. Inverse compositional spatial transformer networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2568-2576, 2017. 1, 2 +[21] Tsung-Yi Lin, Piotr Dollar, 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. 2, 5, 6, 7, 8 +[22] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In Proceedings of the European Conference on Computer Vision, pages 740-755, 2014. 5, 7, 8 +[23] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In Proceedings of the European Conference on Computer Vision, pages 21-37, 2016. 2 +[24] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3431-3440, 2015. 1, 2 +[25] Francisco Massa and Ross Girshick. maskrcnn-benchmark: Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch. https://github.com/facebookresearch/maskrcnn-benchmark, 2018.5 +[26] Francisco Massa, Renaud Marlet, and Mathieu Aubry. Crafting a multi-task cnn for viewpoint estimation. In Proceedings + +of the British Machine Vision Conference, pages 91.1-91.12, 2016. 1, 2, 3, 6, 7, 8 +[27] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. 5 +[28] Bojan Pepik, Michael Stark, Peter Gehler, and Bernt Schiele. Teaching 3d geometry to deformable part models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3362-3369, 2012. 6, 7 +[29] Patrick Poirson, Phil Ammirato, Cheng-Yang Fu, Wei Liu, Jana Kosecka, and Alexander C Berg. Fast single shot detection and pose estimation. In 2016 Fourth International Conference on 3D Vision (3DV), pages 676-684, 2016. 6, 7 +[30] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in Neural Information Processing Systems, pages 91-99, 2015. 2, 4, 5, 6, 7, 8 +[31] Sara Sabour, Nicholas Frosst, and Geoffrey E Hinton. Dynamic routing between capsules. In Advances in neural information processing systems, pages 3856-3866, 2017. 1 +[32] Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In Proceedings of the IEEE International Conference on Computer Vision, pages 618-626, 2017. 6 +[33] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In arXiv preprint arXiv:1409.1556, 2014. 1, 2 +[34] Hang Su, Subhransu Maji, Evangelos Kalogerakis, and Erik Learned-Miller. Multi-view convolutional neural networks for 3d shape recognition. In Proceedings of the IEEE International Conference on Computer Vision, pages 945-953, 2015. 2, 3 +[35] 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 Proceedings of the IEEE International Conference on Computer Vision, pages 2686-2694, 2015. 1, 2, 4, 6, 7 +[36] Shubham Tulsiani and Jitendra Malik. Viewpoints and keypoints. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1510-1519, 2015. 1, 2, 4, 6, 7 +[37] 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, pages 61.4-61.12, 2017. 2 +[38] Yumeng Wang, Shuyang Li, Mengyao Jia, and Wei Liang. Viewpoint estimation for objects with convolutional neural network trained on synthetic images. In Pacific Rim Conference on Multimedia, pages 169-179, 2016. 2, 4 +[39] 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. 3 + +[40] Yu Xiang, Wongun Choi, Yuanqing Lin, and Silvio Savarese. Subcategory-aware convolutional neural networks for object proposals and detection. In IEEE Winter Conference on Applications of Computer Vision, pages 924-933, 2017. 5 +[41] Yu Xiang, Roozbeh Mottaghi, and Silvio Savarese. Beyond Pascal: A benchmark for 3d object detection in the wild. In IEEE Winter Conference on Applications of Computer Vision, pages 75-82, 2014. 2, 5, 6, 7, 8 +[42] Kwang Moo Yi, Eduard Trulls, Vincent Lepetit, and Pascal Fua. Lift: Learned invariant feature transform. In Proceedings of the European Conference on Computer Vision, pages 467-483, 2016. 1, 2 +[43] Tan Yu, Jingjing Meng, and Junsong Yuan. Multi-view harmonized bilinear network for 3d object recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 186-194, 2018. 2 \ No newline at end of file diff --git a/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/images.zip b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..54ef7787ad1001495cff6cce58033886e3a7642e --- /dev/null +++ b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e27f02d410a800ba2dbc0939afb682c493f2529f92ebda3d0ee15ca6b532c435 +size 887759 diff --git a/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/layout.json b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..d65847d7bf8dc9e274261434dc758ff8f8e21caf --- /dev/null +++ b/cylindricalconvolutionalnetworksforjointobjectdetectionandviewpointestimation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01126224de8c76519a664507c1a2df7bf6f406c122a6f4d1c54e94446a34462c +size 365937 diff --git a/d2dettowardshighqualityobjectdetectionandinstancesegmentation/93cc943e-ea01-49ec-9fe8-ede0e2f25570_content_list.json b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/93cc943e-ea01-49ec-9fe8-ede0e2f25570_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..dea68af01440e915998b7ec87b899ed2c8c82e28 --- /dev/null +++ b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/93cc943e-ea01-49ec-9fe8-ede0e2f25570_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61cca545ee11bd575efc3e0f4b8464376c963ae29963f5a015fdd11d17ffecb0 +size 81351 diff --git a/d2dettowardshighqualityobjectdetectionandinstancesegmentation/93cc943e-ea01-49ec-9fe8-ede0e2f25570_model.json b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/93cc943e-ea01-49ec-9fe8-ede0e2f25570_model.json new file mode 100644 index 0000000000000000000000000000000000000000..393de6240fb81425c96b74d9a99037ee4686cd5f --- /dev/null +++ b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/93cc943e-ea01-49ec-9fe8-ede0e2f25570_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79b31073c664bb61b84e71c1719e8b0c10b68c8164168dd94a1e5c9e00c71da9 +size 99551 diff --git a/d2dettowardshighqualityobjectdetectionandinstancesegmentation/93cc943e-ea01-49ec-9fe8-ede0e2f25570_origin.pdf b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/93cc943e-ea01-49ec-9fe8-ede0e2f25570_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fb9efb555ca0ac8e0457424cf1aa98b4c2e7102b --- /dev/null +++ b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/93cc943e-ea01-49ec-9fe8-ede0e2f25570_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f2f60725183890c4d06da8401bfbcda7bdc4955c97a896cfaa2efc23a8ab5c22 +size 1514292 diff --git a/d2dettowardshighqualityobjectdetectionandinstancesegmentation/full.md b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5d742d2265a5e7cdd93a1ec5be693fd68a18530d --- /dev/null +++ b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/full.md @@ -0,0 +1,306 @@ +# D2Det: Towards High Quality Object Detection and Instance Segmentation + +Jiale Cao $^{1*}$ , Hisham Cholakkal $^{2*}$ , Rao Muhammad Anwer $^{2}$ , Fahad Shahbaz Khan $^{2}$ , Yanwei Pang $^{1,\dagger}$ , Ling Shao $^{2}$ + +$^{1}$ Tianjin University $^{2}$ Inception Institute of Artificial Intelligence (IIAI), UAE‡ + +$^{1}$ connor, pyw}@tju.edu.cn, $^{2}$ hisham.cholakkal, rao.anwer, fahad.khan, ling.shao}@inceptioniai.org + +# Abstract + +We propose a novel two-stage detection method, D2Det, that collectively addresses both precise localization and accurate classification. For precise localization, we introduce a dense local regression that predicts multiple dense box offsets for an object proposal. Different from traditional regression and keypoint-based localization employed in two-stage detectors, our dense local regression is not limited to a quantized set of keypoints within a fixed region and has the ability to regress position-sensitive real number dense offsets, leading to more precise localization. The dense local regression is further improved by a binary overlap prediction strategy that reduces the influence of background region on the final box regression. For accurate classification, we introduce a discriminative RoI pooling scheme that samples from various sub-regions of a proposal and performs adaptive weighting to obtain discriminative features. + +On MS COCO test-dev, our D2Det outperforms existing two-stage methods, with a single-model performance of 45.4 AP, using ResNet101 backbone. When using multiscale training and inference, D2Det obtains AP of 50.1. In addition to detection, we adapt D2Det for instance segmentation, achieving a mask AP of 40.2 with a two-fold speedup, compared to the state-of-the-art. We also demonstrate the effectiveness of our D2Det on airborne sensors by performing experiments for object detection in UAV images (UAVDT dataset) and instance segmentation in satellite images (iSAID dataset). Source code is available at https://github.com/JialeCao001/D2Det. + +# 1. Introduction + +Recent years have witnessed formidable progress in object detection thanks to the advances in deep neural networks. Modern object detectors can be broadly divided + +into single-stage [35, 42, 40, 29, 27, 4] and two-stage methods [18, 43, 17, 41, 8, 21]. Two-stage detection approaches work by first generating a set of candidate proposals followed by classification and regression of these proposals. On the other hand, single-stage methods perform a direct regression and classification of default anchors into boxes by regular sampling grids on the image. Generally, two-stage methods dominate in terms of accuracy on standard benchmarks, compared to their single-stage counterparts. + +High quality object detection requires both precise localization (bounding box) and accurate classification of the target object. Most existing two-stage detectors [43, 31, 15] share a similar design for the bounding box localization module. A typical design choice is a regression module, employed in most two-stage detectors, including the popular Faster R-CNN [43]. The regression module utilizes several fully connected layers to predict a single box offset of the candidate proposal. Recently, Grid R-CNN [36] extends Faster R-CNN by separating the classification and regression into two branches, as opposed to a shared network. Instead of the regression utilized in Faster R-CNN, Grid R-CNN introduces a localization scheme, based on a fully convolutional network, that searches for a set of keypoints in a fixed-sized region to identify an object boundary. + +In this work, we introduce dense local regression for precise target localization. Different from the traditional regression employed in Faster R-CNN [43] that predicts a single global offset by a fully-connected network, our dense local regression predicts multiple local box offsets, termed as dense box offsets, by a fully convolutional network. Compared to the keypoint-based localization in Grid R-CNN [36], our dense local regression can more accurately localize an object due to its ability to regress any real number offset and is therefore not limited to a quantized set of keypoints within a fixed-sized region. In addition, while Grid R-CNN aims to improve localization capabilities, our method collectively addresses both precise localization and accurate classification of target object. For classification, we introduce a discriminative RoI pooling that extracts features from various sub-regions of a proposal and performs + +adaptive weighting to obtain discriminative features. + +Contributions: We propose a two-stage object detection approach, D2Det, that targets both precise localization and accurate classification. For precise target localization, we introduce a dense local regression, where each sub-region of a candidate proposal predicts its own relative box offsets towards the four sides of ground-truth bounding box. As a result, multiple dense box offsets are obtained by a fully convolutional network, which preserves the position-sensitive characteristic for box offset prediction. To further improve our dense local regression, we introduce a binary overlap prediction that identifies each sub-region of a candidate proposal as an object region or background region, thereby reducing the influence of background region. The binary overlap prediction is trained by assuming all regions inside the ground-truth bounding box as object. For accurate classification of the target object, we introduce a discriminative RoI pooling that first samples features from various sub-regions and then performs an adaptive weighted pooling that aims to generate discriminative features. + +Experiments are performed on the MS COCO [33] and UAVDT [11] datasets. Our D2Det achieves state-of-the-art performance on both datasets. On MS COCO test-dev, our method surpasses existing two-stage detectors, in terms of single model accuracy, with a COCO style AP of 45.4 using a ResNet101 backbone (Fig. 1(a)). Further, an absolute gain of $3.0\%$ is obtained at AP@0.75, compared to the state-of-the-art [28], demonstrating accurate localization capabilities of our D2Det. Moreover, D2Det achieves a COCO style AP of 50.1 when using a stronger backbone with multi-scale training and inference. Additionally, we report results for instance segmentation, obtained by modifying the dense local regression branch of our two-stage detection method and utilizing instance mask annotations. Experiments are performed on two instance segmentation datasets: MS COCO and the recently introduced iSAID [51]. Our method obtains consistent improvement over existing methods on both datasets. On MS COCO test-dev, our approach achieves a Mask AP of 40.2 and provides a two-fold speedup over the state-of-the-art HTC [6] (Fig. 1(b)). + +# 2. Related Work + +In recent years, two-stage detection approaches [18, 43, 17, 44, 28, 36, 5, 46] have shown continuous performance improvements in terms of detection accuracy on standard benchmarks [33, 13]. Among existing two-stage detectors, Faster R-CNN [43] is one of the most popular frameworks for object detection. In the first stage, Faster R-CNN utilizes a region proposal network (RPN) to generate class-agnostic region proposals. The second stage, also known as Fast R-CNN [17], extracts a fixed-sized region-of-interest (RoI) feature representation followed by the computation of classification scores and regressed bounding-box coordi + +![](images/e96d899e7ab720eb9c1ca7b6ab4c53949ab5ebcaf1740ea001ecf47135f3e0af.jpg) +(a) Object detection + +![](images/94740e408085ab11a2a637b3f26765d61395d82717853e348064eefbf1760659.jpg) +(b) Instance segmentation +Figure 1: Accuracy (AP) vs. speed (ms) comparison on MS COCO test-dev. (a) Comparison with existing two-stage detectors for object detection. (b) Comparison with state-of-the-art approaches for instance segmentation. All the methods in (a) use only box-level supervision. Further, all methods in (a) and (b) utilize same settings: input size $(\sim 1333 \times 800$ , except FPN which uses $\sim 1000 \times 600$ ), ResNet101 with FPN (except TridentNet which introduces an alternative to FPN) and without multi-scale training or inference. The speed of all methods is reported on a Titan Xp. In addition to overall COCO AP, we report AP@0.75 for comparison at a higher overlap threshold. + +nates for each proposal. Several recent works have extended this framework by, for example, integrating pyramid representations [31, 28, 44, 5], extending to multi-stage detection [16, 2, 6, 24] and integrating a mask branch [19, 23, 34]. + +Most two-stage detectors represent each object in an image based on a pre-defined anchor box. Alternatively, several single-stage approaches [26, 22, 52, 50, 12] propose an anchor box free strategy that eliminates the need for anchor boxes. This typically involves using paired keypoints and keypoint estimation to detect object bounding-box. These approaches are bottom-up in that keypoints are directly generated from the entire image without defining object instances. Different from these bottom-up approaches, Grid R-CNN [36] is a top-down two-stage method which first defines instances and then generates bounding box keypoints using grid guided keypoint-based localization. This strategy searches for a set of keypoints in a fixed-sized region, obtained through an extended region mapping of RoI, to identify an object boundary. However, even an extended region mapping may fail to encompass the entire object depending on the position of the candidate proposal with respect to the ground-truth. Further, keypoint search occurs in a fixed-resolution feature space $(56 \times 56)$ , which is likely to be problematic for large objects. In such a case (e.g., object size $>100 \times 100$ image pixels) the relatively smaller keypoint search space may lead to less accurate localization. Moreover, Grid R-CNN only focuses on improving the localization capabilities, while keeping the classification branch similar to original Faster R-CNN. On MS COCO, our dense local regression alone (without the proposed improvements in the classification branch) achieves a gain of + +![](images/5021ce527fd39794741efd8bae0102414b02ee34f2bad976853dd70148934a11.jpg) +(a) Overall architecture + +![](images/54bbd1b94a43ece7e272f48639f6bdc4bee194ea259024f1253cf3c67fe6b8df.jpg) + +![](images/a6e2ab04e0b981be9fd8db9bdf0aad656f7a0a0dd9da1e6afd9a08602e082ac2.jpg) +(c) Discriminative RoI Pooling +Figure 2: (a) Overall architecture of our two-stage method. The RoI feature of each candidate proposal $P$ , generated from RPN, is passed through two different branches: dense local regression (b) and classification (c). Instead of treating RoI feature as a single global vector, our dense local regression treats them as $k \times k$ local features extracted from $k \times k$ sub-regions within RoI. These local features are used to predict multiple dense box offsets, implying each local feature $p_i \in P$ predicts its own dense box offsets $(\hat{l}_i, \hat{t}_i, \hat{r}_i, \hat{b}_i)$ . To reduce the influence of background features, a binary overlap prediction $\hat{\mathbf{m}}$ (in green) is utilized that classifies each local feature as either belonging to ground-truth bounding box $G$ (in orange) or background. To train $\hat{\mathbf{m}}$ , the overlapping region $\mathbf{m}$ (in red) between $G$ and $P$ is assigned one $(\mathbf{m} = 1)$ . For classification (c), our discriminative RoI pooling first predicts the offsets of each RoI sub-region using a light-weight offset predictor, and then performs an adaptive weighting $(W(F))$ that assigns higher weights to the discriminative sampling points of an RoI. + +![](images/c03eec67bc2d4f80566dbf8c97c8089981ab2f306d6fa12cbf76185121d88845.jpg) +(b) Dense local regression + +# $3.7\%$ on large objects, compared to Grid R-CNN. + +The original Faster R-CNN employed RoIPool [17, 43] for feature pooling of candidate proposals. Recently RoIAlign [19] has replaced RoIPool in several works, including latest variants of Faster R-CNN and Grid R-CNN [36]. RoIAlign divides candidate proposals into equally sized spatial sub-regions and considers features from sub-regions inside the proposal. Four sampling points are obtained within each sub-region which are averaged by assigning equal weight to all points [19]. This can deteriorate the classification performance as discriminative regions may not appear in equally spaced sub-regions. Different from RoIAlign, deformable RoI pooling [10] obtains features that are used for both classification and regression, from various sub-regions of a candidate proposal, disregarding their distance. However, the sampling points are still averaged with equal weight, as in RoIAlign. Here, we introduce an approach that performs adaptive weighting to enhance discriminative features for classification. + +# 3. Our Method + +We base our method on the standard Faster R-CNN framework [43]. In our method, the proposed dense local regression (Sec. 3.1) replaces the traditional box offset re + +gression of Faster R-CNN, while the classification is improved with a discriminative RoI pooling (Sec. 3.2). The overall architecture of our two-stage detection framework is shown in Fig. 2(a). We utilize a region proposal network (RPN) in the first stage and employ separate classification and regression branches in the second stage. The dense local regression branch (Fig. 2(b)) aims at precise localization of an object whereas the classification branch, based on discriminative RoI pooling (Fig. 2(c)), intends to improve classification of candidate proposals. + +# 3.1. Dense Local Regression + +In a two-stage detection framework, the objective of the bounding-box regression branch is to find a tight bounding-box surrounding an object. Let $P(x_{P},y_{P},w_{P},h_{P})$ be a candidate object proposal, and $G(x_{G},y_{G},w_{G},h_{G})$ be the target ground-truth box. The traditional regression in Faster R-CNN predicts a single box offset $(\Delta_x,\Delta_y,\Delta_w,\Delta_h)$ , as: + +$$ +\Delta_ {x} = \left(x _ {G} - x _ {P}\right) / w _ {P}, \quad \Delta_ {y} = \left(y _ {G} - y _ {P}\right) / h _ {P}, \tag {1} +$$ + +$$ +\Delta_ {w} = \log (w _ {G} / w _ {P}), \qquad \Delta_ {h} = \log (h _ {G} / h _ {P}), +$$ + +where $(x,y)$ indicates box centers and $(w,h)$ represents the width and height of a given box (i.e., either groundtruth bounding box $G$ or candidate proposal $P$ ). For each + +candidate proposal $P$ , feature pooling strategies, such as RoIPool [17] or RoIAlign [19], are employed to obtain the corresponding fixed-sized $(k \times k)$ RoI feature from equally spaced $k \times k$ sub-regions within the proposal. The standard Faster R-CNN treats these RoI features as a single vector, termed here as global feature representation, and predicts a single global box offset by passing them through several fully connected layers (Fig. 3(a)). + +Different from the aforementioned strategy, our dense local regression approach considers the $k \times k$ dimensional RoI feature as $k^2$ spatially adjacent local features. One such local feature is shown as $p_i$ in Fig. 2(b). These local RoI features are then used to predict multiple local box offsets, termed as dense box offsets, by passing through a fully convolutional network. The dense box offsets predict the distance of each local feature $p_i$ at location $(x_i, y_i)$ to the top-left and bottom-right corners of the ground-truth bounding box $G$ . Let $(x_l, y_t)$ and $(x_r, y_b)$ represent the top-left and bottom-right corners of the ground-truth bounding box, and $\hat{l}_i, \hat{t}_i, \hat{r}_i$ and $\hat{b}_i$ represent the dense box offsets predicted by the local feature $p_i$ in left, top, right, and bottom directions, respectively (Fig. 2(b)). The corresponding ground-truth offsets $(l_i, t_i, r_i, b_i)$ at (index) location $i$ , are computed, + +$$ +l _ {i} = \left(x _ {i} - x _ {l}\right) / w _ {P}, \quad t _ {i} = \left(y _ {i} - y _ {t}\right) / h _ {P}, \tag {2} +$$ + +$$ +r _ {i} = (x _ {r} - x _ {i}) / w _ {P}, \quad b _ {i} = (y _ {b} - y _ {i}) / h _ {P}. +$$ + +Here, the normalization factors $w_{P}$ and $h_{P}$ denote the width and height of the candidate proposal. + +The number of sub-regions or local features of the candidate proposal belonging to the ground-truth bounding box depends on the overlap between the proposal and its corresponding ground-truth. Even in the case of higher overlap (majority of $k^2$ local features belonging to the ground-truth bounding box), several unwanted features (e.g., background) are included among these $k^2$ local features. As a consequence, the dense box offsets predicted by these background features are less precise and are therefore desired to be ignored. With this aim, a binary overlap prediction (shown in green in Fig. 2(a) and Fig. 2(b)) is utilized in our dense local regression to classify each local feature as either belonging to ground-truth bounding box region or background. This binary overlap prediction is performed by introducing an additional output $\hat{\mathbf{m}}$ , along with the dense box offsets. The local features in an overlapping region between the ground-truth bounding box $G$ and the candidate proposal $P$ , are assigned with a ground-truth label 1, i.e., + +$$ +m _ {i} = \left\{ \begin{array}{l l} 1, & \text {i f} p _ {i} \in G; \quad \forall p _ {i} \in P, \\ 0, & \text {o t h e r w i s e .} \end{array} \right. \tag {3} +$$ + +Here, due to the unavailability of the ground-truth pixel-level instance mask in generic object detection, we assume all regions inside the ground-truth bounding box $G$ as object. Note that $\hat{\mathbf{m}} = \{\hat{m}_i:i\in [1,k^2 ]\}$ and $\mathbf{m} = \{m_i:i\in$ + +![](images/0b9d3063506eb8048986ce340c3d58c1fe5535c7f1790341f13648795857bf45.jpg) +(a) Faster R-CNN + +![](images/8f251f23f73a80281ab27bbad0d29689cee8d121fe2b9634dfd303dd5831b0c1.jpg) +(b) Grid R-CNN + +![](images/2dd4bf896781c82144cf28476ccac316a5f0966f9b926ed3ac4156eb4d11a995.jpg) +(c) Our approach +Figure 3: Comparison of our dense local regression (c) with traditional regression in Faster R-CNN (a) and keypoint-based localization in Grid R-CNN (b). Traditional regression in Faster R-CNN predicts a single global offset for a given proposal using a fully connected network. Grid R-CNN predicts bounding box keypoints using a probability heatmap. Instead, our approach yields multiple position-sensitive local offsets, termed as dense box offsets, using a fully convolutional network. Our approach can regress any real number offset and is therefore not limited to a quantized set of keypoints within a fixed region. + +$[1,k^2 ]\}$ . During training, the binary overlap prediction $\hat{m}_i$ at (index) location $i$ is passed through sigmoid normalization $(\sigma)$ , for computing the binary cross-entropy loss with the ground-truth label $m_{i}$ . During inference, our dense local regression module predicts five outputs, $(\hat{l}_i,\hat{t}_i,\hat{r}_i,\hat{b}_i,\hat{m}_i)$ , at each local feature $p_i\in P$ . The predicted dense box offsets at positions where $\sigma (\hat{m}_i) > 0.5$ , are only used to compute the top-left and bottom-right corner points of the predicted box. Finally, the boxes predicted by multiple local features (Fig. 3(c)) are averaged to obtain a single (final) regressed bounding box (represented using top-left and bottom-right corner points). + +As discussed earlier, the traditional regression in Faster R-CNN predicts a single global offset for a given candidate proposal using a fully connected network (Fig. 3(a)). Different from the traditional regression, our dense local regression yields multiple position-sensitive box offsets using a fully convolutional network (Fig. 3(c)). Further, our binary overlap predictor reduces the influence of background regions on the final box regression. Similar to our approach, Grid R-CNN employs a fully convolutional network. However, in contrast to the keypoint-based localization strategy used in Grid R-CNN (Fig. 3(b)), our dense local regression can more accurately localize an object due to its ability to regress any real number offset and it is not limited to a quantized set of keypoints within a fixed region-of-interest. Further, our approach does not require deconvolution operations to increase spatial resolution for box localization, + +thereby avoiding the additional computational overhead. + +# 3.2. Discriminative RoI Pooling + +Here, we describe the discriminative RoI pooling (Fig. 2(c)) in our classification branch. Different from the regression, the classification needs highly discriminative features. The discriminative RoI pooling is inspired by deformable RoI pooling [10] and improves it for classification in two ways. First, we use a light-weight offset prediction that requires about one-fourth of the parameters, as compared to the standard offset prediction in deformable RoI pooling. The standard offset prediction employs a RoIAAlign operation to obtain features from $k \times k$ sub-regions and passes these features through three fully connected layers. Instead, the light-weight offset prediction only requires a $\frac{k}{2} \times \frac{k}{2}$ sized RoIAAlign followed by the fully connected layers (light-weight due to smaller input vector). + +After offset prediction, the standard deformable RoI pooling employs a RoIAliign, where all four sampling points obtained within each sub-region are averaged by assigning them equal weights. In contrast, the proposed weighted pooling aims to adaptively assign higher weights to discriminative sampling points and is motivated by [14]. Here, RoIAliign features in original sampling points, i.e. $F \in R^{2k \times 2k}$ , are used to predict its corresponding weights $W(F) \in R^{2k \times 2k}$ , which indicates the discriminative ability of the sampling points inside all $k \times k$ spatial sub-regions. Fig. 2(c) shows some sampling points $(s_1^1, s_1^2, s_1^3, s_1^4)$ and their corresponding adaptive weights $(w_1^1, w_1^2, w_1^3, w_1^4)$ . Weighted RoI feature $\tilde{F}$ of a candidate proposal is obtained by, + +$$ +\tilde {F} = W (F) \odot F, \tag {4} +$$ + +where $\odot$ is the Hadamard product. Note that instead of using a fixed weight, the weight $W(F)$ is computed from $F$ using the convolution operations. Consequently, we employ an average pooling operation with stride two on $\tilde{F}$ , and obtain the discriminative RoI feature with size of $k \times k$ . The discriminative RoI pooled feature of a candidate proposal is treated as a single global vector, as in the standard Faster R-CNN, followed by two fully-connected layers to obtain the classification score of the candidate proposal. + +Note that the predicted offsets samples sub-regions within the candidate proposal as well its surroundings in discriminative RoI pooling. As a result, the extracted features are likely to contain discriminative information relevant to both the object and its context, which is expected to further improve the classification performance. + +# 3.3. Instance Segmentation + +The proposed method can be easily extended to instance segmentation by modifying our dense local regression branch. Instead of assuming all regions inside the ground-truth bounding box $G$ belong to the object (Sec. 3.1), the + +ground-truth mask, available in instance segmentation, is used to label local features $p_i \in P$ in Eq. 3. As a result, the mask-based ground-truth binary overlap $\mathbf{m}$ is used to train the binary overlap prediction $\hat{\mathbf{m}}$ and the offset prediction in our dense regression branch (Fig. 2(b)). During inference, the binary overlap prediction $\hat{\mathbf{m}}$ provides the instance mask prediction. Further, we utilize two deconvolutional layers that increase the output spatial resolution by four times (i.e., from $7 \times 7$ to $28 \times 28$ ) and two fully-connected layers for efficient mask scoring. Our method provides an efficient instance segmentation framework with competitive performance (see Sec. 5). + +# 4. Experiments + +# 4.1. Datasets and Implementation Details + +Datasets: We conduct extensive experiments on two object detection benchmarks: MS COCO [33] and UAVDT [11]. MS COCO dataset contains 80 categories and consists of three subsets: trainval, minival, and test-dev. We perform training on the trainval set and report the results on the test-dev set for state-of-the-art comparison. We follow the standard protocol where the overall performance, in terms of average precision (AP), is measured by averaging over multiple intersection-over-union (IoU) thresholds, ranging from 0.5 to 0.95 with an interval of 0.05. The detection track in UAVDT dataset [11] contains three categories: car, truck and bus. Following the conventions in [11, 48], the three categories are combined into a single vehicle class, due to the highly imbalanced class distribution. We follow the same evaluation criteria in UAVDT [11] and report the results using PASCAL VOC style AP with the IoU threshold set to 0.7. + +Implementation Details: The input image is resized during training and testing such that the shorter edge is 800 pixels. We adopt ResNet models (ResNet50 and ResNet101) [20] with FPN [31] as the backbone. In our work, RPN [43] is used to generate candidate object proposals similar to [31, 36]. All RoIs with a ground-truth overlap greater than 0.5 are considered as positive samples. From each image, we sample 512 RoIs by keeping a 1:3 positive to negative ratio and these sampled RoIs are used to train the classification branch. The dense local regression branch is trained only using positive RoIs. Like [37], we use eight convolutions of size $3 \times 3$ in dense local regression and a pooling size of $7 \times 7$ (where $k = 7$ ) for both classification and regression. Our method is trained on 8 GPUs (2 images per GPU) and adopts the SGD for training optimization, where the weight decay is 0.0001 and the momentum is 0.9. We adopt a $2 \times$ training scheme for all MS COCO experiments. In our experiments, no data augmentation except the traditional horizontal flipping is utilized. During inference, we first classify proposals from RPN, following + +
MethodsBackboneInput SizeAPAP@0.5AP@0.75\( AP_s \)\( AP_m \)\( AP_l \)
Single-Stage Methods:
RetinaNet w FPN [32]ResNet101~ 1333 × 80039.159.142.321.842.750.2
ConRetinaNet w FPN [25]ResNet101~ 1333 × 80040.159.643.523.444.253.3
EFGRNet [38]ResNet101512 × 51239.058.842.317.843.654.5
CornerNet [26]Hourglass104511 × 51140.556.543.119.442.753.9
FSAF w FPN [53]ResNet101~ 1333 × 80040.961.544.024.044.251.3
RPDet w FPN [50]ResNet101~ 1333 × 80041.062.944.323.644.151.7
FCOS w FPN [45]ResNet101~ 1333 × 80041.560.745.024.444.851.6
HSD [3]ResNet101768 × 76842.361.246.922.847.355.9
Two-Stage Methods:
FPN [31]ResNet101~ 1000 × 60036.259.139.018.239.048.2
Libra R-CNN w FPN [39]ResNet101~ 1333 × 80041.162.144.723.443.752.5
Grid R-CNN w FPN [36]ResNet101~ 1333 × 80041.560.944.523.344.953.1
Grid R-CNN Plus w FPN [37]ResNet101~ 1333 × 80042.060.545.623.445.253.2
LIP w FPN [14]ResNet101~ 1333 × 80042.064.345.824.745.252.3
Auto-FPN [49]ResNet101~ 1333 × 80042.5-----
TridentNet [28]ResNet101~ 1333 × 80042.763.646.523.946.656.6
Cascade R-CNN w FPN [2]ResNet101~ 1333 × 80042.862.146.323.745.555.2
D2Det (ours) w FPNResNet101~ 1333 × 80045.464.049.525.848.758.1
DCN v2 [54]ResNet101-deform v2~ 1333 × 80044.065.948.123.247.759.6
D2Det (ours)ResNet101-deform v2~ 1333 × 80047.465.951.727.250.461.3
D2Det* (ours)ResNet101-deform v250.169.454.932.752.762.1
+ +Table 1: State-of-the-art object detection comparison (in terms of AP) on MS COCO test-dev. When using a ResNet101 backbone with FPN, our D2Det achieves the best single-model performance, with an overall AP of 45.4, surpassing all existing two-stage methods employing the same backbone with FPN (TridentNet and Auto-FPN do not use FPN since they introduce alternative approaches). Further, our D2Det outperforms DCN v2 [54] by a gain of $3.4\%$ , when using the same ResNet101-deform v2 backbone. In case of multi-scale training and inference, our D2Det* achieves an overall AP of 50.1. + +which we employ NMS, and select few proposals (100-125) for dense local regression, similar to [37]. On MS COco test-dev, soft-NMS [1] is employed on these few proposals after dense local regression, which slightly improves detection accuracy without a significant reduction in speed. + +# 4.2. MS COCO Dataset + +State-of-the-art Comparison: We first present a comparison (Tab. 1) of our detection method, D2Det, with existing detectors in literature on MS COCO test-dev. Note that several methods exist in the literature that exploit instance mask annotations in addition to bounding box information for object detection. For fair comparison, all detection methods in Tab. 1 only use bounding box annotations. We first discuss the results when using the popular ResNet101 backbone with FPN. Among existing two-stage detectors, Libra R-CNN [39] and Grid R-CNN [36] achieve overall AP scores of 41.1 and 41.5, respectively. Grid R-CNN Plus [37] introduces several updates to improve the performance and efficiency of Grid R-CNN and achieves 42.0 AP. TridentNet [28], which replaces FPN with a parallel multi-branch architecture having different receptive fields, achieves 42.7 AP. Cascade R-CNN [2] and LIP [14] obtain the AP scores of 42.8 and 42.0, respectively. Our D2Det significantly outperforms existing approaches by achieving an AP score of 45.4. Further, a notable absolute gain of + +$3.0\%$ is obtained at strict metric (AP@0.75), compared to the state-of-the-art TridentNet [28], demonstrating the accurate localization capabilities of our detection method. + +Other than ResNet101 with FPN, DCN v2 [54] utilizes a ResNet101-deform v2 backbone and reports 44.0 AP. Our D2Det achieves 47.4 AP and obtains an absolute gain of $3.4\%$ over DCN v2, when using the same backbone. Further, our D2Det* obtains 50.1 AP in case of multi-scale training and inference. + +Qualitative Analysis: To further analyze our D2Det, we utilize the error analysis protocol provided by [33]. Fig. 5 shows error plots on MS COCO minival for our D2Det (bottom row) and Grid R-CNN Plus [37] (top row), when using ResNet50 with FPN. As discussed earlier (Sec. 2), Grid R-CNN and its improved variant Grid R-CNN Plus utilize keypoint-based localization which is especially problematic for large objects. We therefore present error plots for both overall (left) and large objects (right). The plots in each sub-image represent a series of precision recall curves with various evaluation settings, as defined in [33]. + +In case of overall results (on left), Grid R-CNN Plus obtains 0.434 AP at strict AP@0.75, with AP likely increasing to 0.669 in case of perfect localization. Our D2Det detector (bottom row) achieves 0.463 AP at AP@0.75, with AP likely increasing to 0.697 in case of perfect localization. The improvement obtained by our D2Det is more promi + +![](images/6bcd3ac77cd183f523708add0871c378020dfe9f9c609145dc6735bccf53e06c.jpg) + +![](images/ed159d9b96ed3d3a05df3f9430e0a0ad66a966783d2077055db8455a6c4376f9.jpg) + +![](images/ea62d6a09e3d48836cfe2eec3ce8ef437992c454b41737f78998dd17b70cf117.jpg) + +![](images/87b51fb06a0e12b407b04b429659f0b3460851abc042d8876b50dd95ba003537.jpg) + +![](images/a12bb459bb24767c11208394ee7ab4269c34944e30249a2b69f8ebc0101c6307.jpg) + +![](images/4c97697f79e58f0edb1815e395b15596efb064a1c9c7fafc6b72558bfddc4d4e.jpg) +Figure 4: Qualitative results of D2Det on the COCO test-dev and UAVDT. In UAVDT, the black regions are ignored. + +![](images/a73cad8fa8a2621b760aedb9a196984064e1106a8b7cc7bfbb8dfb1b8099178a.jpg) +(a) MS COCO + +![](images/3fda55baaa1f4ef84c33d4cb8863060b9693f710da1b274a79e3004b1b4300fd.jpg) + +![](images/dc8cef6b1245ef2a48bee5ccb7ab057d8e0278c720f13dec78a20088a0b6ead4.jpg) +(b) UAVDT + +![](images/2167c827c378f632fed8824c75d8e15f76bb70452d439054311823d671750626.jpg) + +![](images/ef2650aaeccdfbf616d971b4348694b4281c8ad9786e8a17a946908c04677a2e.jpg) + +![](images/52754b3466665116babaa312e81da4f7ab77e8bfa81d716e13985e90534a102e.jpg) + +![](images/c82ccd5e2486144cb116e4411f43892f3c8e0531d067a42d7a54dcdff28d8e0b.jpg) +Figure 5: Error analysis plots showing a comparison of our D2Det (bottom row) with Grid R-CNN Plus (top row) across all 80 categories, on the overall (left) and the largesized objects (right). As defined in [33], a series of precision recall curves with different evaluation settings is shown in the plots of each sub-image. We also show the area under each curve (brackets in the legends). Our D2Det achieves consistent improvements over Grid R-CNN Plus [37]. + +![](images/d56420dc5dffca27e1c24ea680925df741925b7c2c486f7c32b78dcebfb29704.jpg) + +nent, when performing analysis on large-sized objects (on right). In this case, our D2Det provides a gain of $4.6\%$ by achieving 0.624 AP at strict metric of $\mathrm{AP}@0.75$ , compared to 57.8 by Grid R-CNN Plus. With perfect localization, D2Det is likely to increase the AP to 0.820, compared to 0.789 by Grid R-CNN Plus. Fig. 4(a) shows detection examples with our D2Det on MS COCO test-dev. + +Ablation Study: We perform an ablation study on the MS COCO minival set. Tab. 2 shows the impact of our dense local regression (Sec. 3.1) and discriminative RoI pooling (Sec. 3.2). All results are reported using the ResNet50 backbone with FPN. Note that, as opposed to a shared network, our baseline Faster R-CNN with FPN has separate fully connected branches for regression and classification. This + +
BaselineDLR (Sec. 3.1)DRP (Sec. 3.2)APAP@0.5AP@0.75
✓38.059.241.5
✓✓41.559.644.8
✓✓39.361.442.2
✓✓✓42.761.546.3
+ +Table 2: Impact of integrating our dense local regression (DLR) and discriminative RoI pooling (DRP) into the baseline, on MS COCO minival. Our final method based on DLR and DRP achieves consistent improvement in performance, with an overall gain of $4.7\%$ over the baseline. + +improves the AP from 37.7 to 38.0. The integration of our dense local regression (DLR), in place of traditional regression, in the baseline leads to an AP score of 41.5, in which an AP gain of 0.7 is provided by the binary overlap predictor. Notably, our DLR provides a significant absolute gain of $3.3\%$ at strict metric $(\mathrm{AP}@0.75)$ , over the baseline. This large gain in detection performance at $\mathrm{AP}@0.75$ shows the impact of our DLR towards achieving precise localization. Further, the integration of our discriminative RoI pooling (DRP) in the baseline leads to an overall AP score of 39.3, where our weighting scheme alone gives an AP gain of 0.4. Our final method, D2Det, provides a consistent improvement over the baseline with a significant absolute gain of $4.7\%$ in terms of overall AP. + +We also compare (Tab. 3) our dense local regression (DLR) with the keypoint-based localization utilized in the recently introduced Grid R-CNN [36] and its variant Grid R-CNN Plus [37]. For fair comparison, our DLR alone utilizes the same classification branch, as in Grid R-CNN. Further, all results are reported using the same input size, training iterations and ResNet50 backbone with FPN. Our DLR alone provides superior results compared to Grid R-CNN and its variant. Particularly, a prominent improvement in performance is obtained for large-sized objects, where our DLR alone provides an absolute gain of $2.1\%$ over Grid R-CNN Plus. The best results in Tab. 3 are obtained by our final D2Det, highlighting the importance of both precise localization (DLR) and accurate classification (DRP) to obtain high quality object detection performance. + +
MethodAPAP@0.5AP@0.75\(AP_s\)\(AP_m\)\(AP_l\)
Grid R-CNN [36]39.658.342.422.643.851.5
Grid R-CNN Plus [37]40.258.443.422.744.153.1
Our DLR alone41.559.644.823.344.955.2
Ours Final: D2Det42.761.546.324.546.256.9
+ +Table 3: Comparisons of our dense local regression (DLR) with the grid guided keypoint-based localization utilized in Grid R-CNN and Grid R-CNN Plus. Our DLR alone provides superior results, especially for large objects, compared to Grid R-CNN and its variant. + +
RetinaNet [32]LRF-Net [47]FPN [31]NDFT [48]D2Det
AP33.9537.8149.0552.0356.92
+ +# 4.3. UAVDT Dataset + +Here, we present the results (Tab. 4) of our detector, D2Det, on UAVDT [11]. In addition to category-level annotation, all frames in UAVDT are annotated with UAV-specific nuisances: flying altitude, camera views, and weather conditions. The dataset is particularly challenging due to variations in view angle, illumination, altitude, and object scale. As in [48], we use ResNet101 with FPN. Following the authors of UAVDT [11], the results are reported using PASCAL VOC AP with IoU= 0.7. Among existing methods, the recently introduced NDFT detector [48] which explicitly learns domain-robust features by exploiting free metadata obtains 52.03 AP. Our D2Det outperforms NDFT by achieving Ap score of 56.92. Fig. 4(b) shows qualitative results on the UAVDT test set. + +# 5. Instance Segmentation + +In addition to object detection, we present the effectiveness of our D2Det, with the modifications described in Sec. 3.3, for instance segmentation task. Tab. 5 shows the state-of-the-art comparison on MS COCO test-dev. Among existing instance segmentation methods, the Hybrid Task Cascade (HTC) [6] which interweaves box and mask branches and employs a semantic segmentation branch to capture spatial context, obtains a mask AP of 39.7. Our method provides a two-fold speedup over HTC, while achieving a mask AP of 40.2. + +We also report results (Tab. 6) on recently introduced iSAID dataset [51] for instance segmentation in satellite imagery. It contains 655,451 instances for 15 classes (roundabout, baseball diamond, large vehicle, plane, storage tank, ship, ground track field, tennis court, swimming pool, basketball court, harbor, small vehicle, bridge, helicopter, and soccer ball field). The dataset is challenging due to presence of large number of objects per image, limited appearance details, variety of small objects, large scale variations and + +Table 4: Object detection performance comparison on UAVDT test set. Other than LRF-Net, all methods employ ResNet101 with FPN. Our D2Det achieves superior results compared to the recently introduced NDFT detector. + +
MethodsBackboneTimeMask APAP@0.5AP@0.75
MNC [9]ResNet101-24.644.324.8
FCIS [30]ResNet101-29.249.5-
MaskLab [7]ResNet101-35.457.437.4
Mask R-CNN [19]ResNet10111635.758.037.8
PANet [34]ResNet50-36.658.039.3
MS R-CNN [23]ResNet10111638.358.841.5
Cascade Mask R-CNN [6]ResNet10115638.460.241.4
HTC [6]ResNet10133939.761.843.1
D2Det (Ours)ResNet10116840.261.543.7
+ +Table 5: State-of-the-art instance segmentation comparison (with a single model performance) in Mask AP on MS COCO test-dev. Other than MNC, FCIS and MaskLab, all methods employ FPN. The speed of all the methods is reported on Titan Xp. Our D2Det provides a two-fold speedup over HTC, while achieving a 40.2 mask AP. + +
MethodsBackboneMask APAP@0.5AP@0.75
Mask R-CNN [19]ResNet10125.751.322.7
PANet [34]ResNet10134.256.635.8
D2Det (Ours)ResNet10137.561.039.8
+ +Table 6: State-of-the-art instance segmentation comparison in Mask AP on iSAID test set. + +![](images/53a9881e00eeb4dd966bb160ba05882333f5a1714dd1f49fdb2718109ebc1f4e.jpg) +Figure 6: Instance segmentation results of our D2Det on COCO test-dev (top row) and iSAID test (bottom row). + +high class imbalance. Our D2Det achieves superior results compared to existing works reported on this dataset [51]. Fig. 6 shows qualitative results on MS COCO test-dev (first row) and iSAID test set (second row). + +# 6. Conclusions + +We propose a two-stage detection method that addresses both precise object localization and accurate classification. For precise localization, we introduce dense local regression that predicts multiple dense box offsets for a proposal. Further, a discriminative RoI pooling scheme is proposed which performs adaptive weighting to enhance discriminative features. Our D2Det achieves state-of-the-art detection results on MS COCO and UAVDT. Additionally, we present results for instance segmentation on MS COCO and iSAID, achieving promising results compared to existing methods. + +Acknowledgments This work was supported by National Natural Science Foundation of China (Nos. 61906131, 61632018), Postdoctoral Program for Innovative Talents (No. BX20180214), and China Postdoctoral Science Foundation (No. 2018M641647). + +# References + +[1] Navaneeth Bodla, Bharat Singh, Rama Chellappa, and Larry S. Davis. Soft-nms – improving object detection with one line of code. Proc. IEEE International Conf. Computer Vision, 2017. 6 +[2] Zhaowei Cai and Nuno Vasconcelos. Cascade R-CNN: Delving into high quality object detection. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2018. 2, 6 +[3] Jiale Cao, Yanwei Pang, Jungong Han, and Xuelong Li. Hierarchical shot detector. Proc. IEEE International Conf. Computer Vision, 2019. 6 +[4] Jiale Cao, Yanwei Pang, and Xuelong Li. Triply supervised decoder networks for joint detection and segmentation. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 1 +[5] Jiale Cao, Yanwei Pang, Shengjie Zhao, and Xuelong Li. High-level semantic networks for multi-scale object detection. IEEE Trans. on Circuits and Systems for Video Technology, 2020. 2 +[6] Kai Chen, Jiangmiao Pang, Jiaqi Wang, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. Hybrid task cascade for instance segmentation. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 2, 8 +[7] Liang-Chieh Chen, Alexander Hermans, George Papandreou, Florian Schroff, Peng Wang, and Hartwig Adam. Masklab: Instance segmentation by refining object detection with semantic and direction features. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2018. 8 +[8] Bowen Cheng, Yunchao Wei, Honghui Shi, Rogerio Schmidt Feris, Jinjun Xiong, and Thomas S. Huang. Revisiting rcnn: on awakening the classification power of faster rcnn. Proc. European Conf. Computer Vision, 2018. 1 +[9] Jifeng Dai, Kaiming He, and Jian Sun. Instance-aware semantic segmentation via multi-task network cascades. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2016. 8 +[10] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. Proc. IEEE International Conf. Computer Vision, 2017. 3, 5 +[11] Dawei Du, Yuankai Qi, Hongyang Yu, Yifan Yang, Kaiwen Duan, Guorong Li, Weigang Zhang, Qingming Huang, and Qi Tian. The unmanned aerial vehicle benchmark: Object detection and tracking. In Proc. European Conf. Computer Vision, 2018. 2, 5, 8 +[12] Kaiwen Duan, Song Bai, Lingxi Xie, Honggang Qi, Qingming Huang, and Qi Tian. Centernet: Keypoint triplets for object detection. Proc. IEEE International Conf. Computer Vision, 2019. 2 +[13] Mark Everingham, Luc Van Gool, Christopher K. I. Williams, John Winn, and Andrew Zisserman. The pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88(2):303-338, 2010. 2 +[14] Ziteng Gao, Limin Wang, and Gangshan Wu. Lip: Local importance-based pooling. Proc. IEEE International Conf. Computer Vision, 2019. 5, 6 + +[15] Golnaz Ghiasi, Tsung-Yi Lin, and Quoc V. Le. Nas-fpn: Learning scalable feature pyramid architecture for object detection. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 1 +[16] Spyros Gidaris and Nikos Komodakis. Attend refine repeat: Active box proposal generation via in-out localization. Proc. British Machine Vision Conference, 2016. 2 +[17] Ross Girshick. Fast R-CNN. Proc. IEEE International Conf. Computer Vision, 2015. 1, 2, 3, 4 +[18] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2014. 1, 2 +[19] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask R-CNN. Proc. IEEE International Conf. Computer Vision, 2017. 2, 3, 4, 8 +[20] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. Proc. IEEE International Conf. Computer Vision, 2016. 5 +[21] Yihui He, Chenchen Zhu, Jianren Wang, Marios Savvides, and Xiangyu Zhang. Bounding box regression with uncertainty for accurate object detection. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 1 +[22] Lichao Huang, Yi Yang, Yafeng Deng, and Yinan Yu. Densebox: Unifying landmark localization with end to end object detection. arXiv:1509.04874, 2015. 2 +[23] Zhaojin Huang, Lichao Huang, Yongchao Gong, Chang Huang, and Xinggang Wang. Mask scoring R-CNN. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019, 2, 8 +[24] Borui Jiang, Ruixuan Luo, Jiayuan Mao, Tete Xiao, and Yun-ting Jiang. Acquisition of localization confidence for accurate object detection. Proc. European Conf. Computer Vision, 2018. 2 +[25] Tao Kong, Fuchun Sun, Huaping Liu, Yuning Jiang, and Jianbo Shi. Consistent optimization for single-shot object detection. arXiv:1901.06563, 2019. 6 +[26] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. Proc. European Conf. Computer Vision, 2018, 2, 6 +[27] Shuai Li, Lingxiao Yang, Jianqiang Huang, Xian-Sheng Hua, and Lei Zhang. Dynamic anchor feature selection for single-shot object detection. Proc. IEEE International Conf. Computer Vision, 2019. 1 +[28] Yanghao Li, Yuntao Chen, Naiyan Wang, and Zhaoxiang Zhang. Scale-aware trident networks for object detection. Proc. IEEE International Conf. Computer Vision, 2019. 2, 6 +[29] Yazhao Li, Yanwei Pang, Jianbing Shen, Jiale Cao, and Ling Shao. Netnet: Neighbor erasing and transferring network for bettersingle shot object detection. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2020. 1 +[30] Yi Li, Haozhi Qi, Jifeng Dai, Xiangyang Ji, and Yichen Wei. Fully convolutional instance-aware semantic segmentation. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2017. 8 +[31] Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid + +networks for object detection. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2017. 1, 2, 5, 6, 8 +[32] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. Proc. IEEE International Conf. Computer Vision, 2017. 6, 8 +[33] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C. Lawrence Zitnick. Microsoft COCO: Common objects in context. Proc. European Conf. Computer Vision, 2014. 2, 5, 6, 7 +[34] Shu Liu, Lu Qi, Haifang Qin, Jianping Shi, and Jiaya Jia. Path aggregation network for instance segmentation. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2018. 2, 8 +[35] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C. Berg. Ssd: Single shot multibox detector. Proc. European Conf. Computer Vision, 2016. 1 +[36] Xin Lu, Buyu Li, Yuxin Yue, Quanquan Li, and Junjie Yan. Grid R-CNN. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 1, 2, 3, 5, 6, 7, 8 +[37] Xin Lu, Buyu Li, Yuxin Yue, Quanquan Li, and Junjie Yan. Grid R-CNN plus: Faster and better. arXiv:1906.05688, 2019. 2, 5, 6, 7, 8 +[38] Jing Nie, Rao Muhammad Anwer, Hisham Cholakkal, Fahad Shahbaz Khan, Yanwei Pang, and Ling Shao. Enriched feature guided refinement network for object detection. In The IEEE International Conference on Computer Vision, 2019. 6 +[39] Jiangmiao Pang, Kai Chen, Jianping Shi, Huajun Feng, Wanli Ouyang, and Dahua Lin. Libra R-CNN: Towards balanced learning for object detection. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 2, 6 +[40] Yanwei Pang, Tiancai Wang, R. M. Anwer, F. S. Khan, and L. Shao. Efficient featurized image pyramid network for single shot detector. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 1 +[41] Junran Peng, Ming Sun, Zhaoxiang Zhang, Tieniu Tan, and Junjie Yan. Pod: Practical object detection with scale-sensitive network. Proc. IEEE International Conf. Computer Vision, 2019. 1 +[42] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2016. 1 +[43] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. Proc. Advances in Neural Information Processing Systems, 2015. 1, 2, 3, 5 +[44] Bharat Singh, Mahyar Najibi, and Larry S. Davis. SNIPER: Efficient multi-scale training. Proc. Advances in Neural Information Processing Systems, 2018. 2 +[45] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. Proc. IEEE International Conf. Computer Vision, 2019. 6 +[46] Jiaqi Wang, Kai Chen, Shuo Yang, Chen Change Loy, and Dahua Lin. Region proposal by guided anchoring. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 2 + +[47] Tiancai Wang, Rao Muhammad Anwer, Hisham Cholakkal, Fahad Shahbaz Khan, Yanwei Pang, and Ling Shao. Learning rich features at high-speed for single-shot object detection. Proc. IEEE International Conf. Computer Vision, 2019. 8 +[48] Zhenyu Wu, Karthik Suresh, Priya Narayanan, Hongyu Xu, Heesung Kwon, and Zhangyang Wang. Delving into robust object detection from unmanned aerial vehicles: A deep nuisance disentanglement approach. In Proc. IEEE International Conf. Computer Vision, 2019. 5, 8 +[49] Hang Xu, Lewei Yao, Wei Zhang, Xiaodan Liang, and Zhenguo Li. Auto-fpn: Automatic network architecture adaptation for object detection beyond classification. Proc. IEEE International Conf. Computer Vision, 2019. 6 +[50] Ze Yang, Shaohui Liu, Han Hu, Liwei Wang, and Stephen Lin. Reppoints: Point set representation for object detection. Proc. IEEE International Conf. Computer Vision, 2019. 2, 6 +[51] Syed Waqas Zamir, Aditya Arora, Akshita Gupta, Salman Khan, Guolei Sun, Fahad Shahbaz Khan, Fan Zhu, Ling Shao, Gui-Song Xia, and Xiang Bai. isaid: A large-scale dataset for instance segmentation in aerial images. In Proc. IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2019. 2, 8 +[52] Xingyi Zhou, Jiacheng Zhuo, and Philipp Krahenbuhl. Bottom-up object detection by grouping extreme and center points. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 2 +[53] Chenchen Zhu, Yihui He, and Marios Savvides. Feature selective anchor-free module for single-shot object detection. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 6 +[54] Xizhou Zhu, Han Hu, Stephen Lin, and Jifeng Dai. Deformable convnets v2: More deformable, better results. Proc. IEEE Conf. Computer Vision and Pattern Recognition, 2019. 6 \ No newline at end of file diff --git a/d2dettowardshighqualityobjectdetectionandinstancesegmentation/images.zip b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..bbc54b3524a354e45a440e86a16eb7f989df2451 --- /dev/null +++ b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3be30b64f116d5b0e633313eefd1c27ff7af454e30284667b272a5cee85ef90f +size 718082 diff --git a/d2dettowardshighqualityobjectdetectionandinstancesegmentation/layout.json b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..7255cfcf28aa48493196c14ccf2c4cc0376c016d --- /dev/null +++ b/d2dettowardshighqualityobjectdetectionandinstancesegmentation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:10a3f3f630dc7273d7e8ed47b4c4f0fb3af670b4fd1fcf3d094ee202d7075a55 +size 411323 diff --git a/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/ce975e64-56cd-4db8-acc6-8343cf028953_content_list.json b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/ce975e64-56cd-4db8-acc6-8343cf028953_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..8973c17c0c8941fbf5c3ee203de67639d3cbdb8f --- /dev/null +++ b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/ce975e64-56cd-4db8-acc6-8343cf028953_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73b5b40aee91879e9e7ccb831aca089a303840ee88c0d17439dfcae1402f7d22 +size 75328 diff --git a/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/ce975e64-56cd-4db8-acc6-8343cf028953_model.json b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/ce975e64-56cd-4db8-acc6-8343cf028953_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3aadabc2fb890f1961db898c93e84cae5e08b523 --- /dev/null +++ b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/ce975e64-56cd-4db8-acc6-8343cf028953_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9ced36c64ca296f9fafa707302093eda595425a18eb2f95854b2fedf33ee3d6 +size 90605 diff --git a/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/ce975e64-56cd-4db8-acc6-8343cf028953_origin.pdf b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/ce975e64-56cd-4db8-acc6-8343cf028953_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f3a59b8836e85f09a965500ce283a87085579000 --- /dev/null +++ b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/ce975e64-56cd-4db8-acc6-8343cf028953_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:521c4bde73d2eae4a11c8c38a4c41a904c8ce6a8343a446cc35a13b8fcf4ad37 +size 1815164 diff --git a/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/full.md b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/full.md new file mode 100644 index 0000000000000000000000000000000000000000..be59473f4c7753c170a34495aac3a05b78966ecc --- /dev/null +++ b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/full.md @@ -0,0 +1,334 @@ +# D3Feat: Joint Learning of Dense Detection and Description of 3D Local Features + +Xuyang Bai $^{1}$ Zixin Luo $^{1}$ Lei Zhou $^{1}$ Hongbo Fu $^{2}$ Long Quan $^{1}$ Chiew-Lan Tai $^{1}$ $^{1}$ Hong Kong University of Science and Technology $^{2}$ City University of Hong Kong +{xbaiad, zluoag, lzhouai, quan, taicl}@cse.ust.hk hongbofu@cityu.edu.hk + +# Abstract + +A successful point cloud registration often lies on robust establishment of sparse matches through discriminative 3D local features. Despite the fast evolution of learning-based 3D feature descriptors, little attention has been drawn to the learning of 3D feature detectors, even less for a joint learning of the two tasks. In this paper, we leverage a 3D fully convolutional network for 3D point clouds, and propose a novel and practical learning mechanism that densely predicts both a detection score and a description feature for each 3D point. In particular, we propose a keypoint selection strategy that overcomes the inherent density variations of 3D point clouds, and further propose a self-supervised detector loss guided by the on-the-fly feature matching results during training. Finally, our method achieves state-of-the-art results in both indoor and outdoor scenarios, evaluated on 3DMatch and KITTI datasets, and shows its strong generalization ability on the ETH dataset. Towards practical use, we show that by adopting a reliable feature detector, sampling a smaller number of features is sufficient to achieve accurate and fast point cloud alignment. [code release] + +# 1. Introduction + +Point cloud registration aims to find an optimal transformation between two partially overlapped point cloud fragments, which is a fundamental task in applications such as simultaneous localization and mapping (SLAM) [23, 29] and 3D Lidar-based mapping [31]. In above contexts, the local keypoint detection and description serve as two keys for obtaining robust point cloud alignment results. + +The recent research on 3D local feature descriptors has shifted to learning-based approaches. However, due to the difficulty of acquiring ground-truth data, most existing works often overlook the keypoint detection learning in point cloud matching, and instead randomly sample a set of points for feature description. Apparently, this strategy might suffer from several drawbacks. First, the randomly sampled points are often poorly localized, result- + +ing in inaccurate transformation estimates during geometric verification such as RANSAC [9]. Second, those random points might appear in non-salient regions like smooth surfaces, which may lead to indiscriminative descriptors that adversely introduce noise in later matching steps. Third, to obtain a full scene coverage, an oversampling of random points is required that considerably decreases the efficiency of the whole matching process. In essence, we argue that a small number of keypoints suffice to align point clouds successfully, and well-localized keypoints can further improve the registration accuracy. The imbalance of detector and descriptor learning motivates us to learn these two tightly coupled components jointly. + +However, the learning-based 3D keypoint detector has not received much attention in previous studies. One attempt made by 3DFeat-Net [14] predicts a patch-wise detection score, whereas only limited spatial context is considered and a dense inference for the entire point cloud is not applicable in practice. Another recent work USIP [16] adopts an unsupervised learning scheme that encourages keypoints to be covariant under arbitrary transformations. However, without a joint learning of detection and description, the resulting detector might not match the capability of the descriptor, thus preventing the release of the potential for a fully learned 3D feature. Instead, in this paper, we seek for a joint learning framework that is able to not only predict keypoints densely, but also tightly couple the detector with a descriptor with shared weights for fast inference. + +To this end, we draw inspiration from D2-Net [7] in 2D domain for a joint learning of a feature detector and descriptor. However, the extension of D2-Net for 3D point clouds is non-trivial. First, a network that allows for dense feature prediction in 3D is needed instead of previous patch-based architectures. In this work, we resort to KPCov [33], a newly proposed convolutional operation on 3D point clouds, to build a fully convolutional network to consume an unstructured 3D point cloud directly. Second, we adapt D2-Net to handle the inherent density variations of 3D point clouds, which is the key to achieve highly repeatable keypoints in 3D domain. Third, observing that the original loss in D2-Net does not guarantee convergence in our context, + +we propose a novel self-supervised detector loss guided by the on-the-fly feature matching results during training, so as to encourage the detection scores to be consistent with the reliability of predicted keypoints. To summarize, our contributions are threefold: + +1. We leverage a fully convolutional network based on KPCov, and adopt a joint learning framework for 3D local feature detection and description, without constructing dual structures, for fast inference. +2. We propose a novel density-invariant keypoint selection strategy, which is the key to obtaining repeatable keypoints for 3D point clouds. +3. We propose a self-supervised detector loss that receives meaningful guidance from the on-the-fly feature matching results during training, which guarantees the convergence of tightly coupled descriptor and detector. + +We demonstrate the superiority of our method over the state-of-the-art methods by conducting extensive experiments on both 3DMatch of indoor settings, and KITTI, ETH of outdoor settings. To our best knowledge, we are the first to handle the Dense Detection and Description of 3D local Features for 3D point clouds in a joint learning framework. We refer to our approach as D3Feat. + +# 2. Related Work + +# 2.1.3D Local Descriptors + +Early approaches to extract 3D local descriptors are mainly hand-crafted [12], which generally lack robustness against noise and occlusion. To address this, recent studies on 3D descriptors have shifted to learning-based approaches, which is the main focus of our paper. + +Patch-based networks. Most existing learned local descriptors require point cloud patches as input. Several 3D data representations have been proposed for learning local geometric features in 3D data. Early attempts like [32, 38] use multi-view image representation for descriptor learning. Zeng et al. [36] and Gojcic et al. [11] convert 3D patches into a voxel grid of truncated distance function (TDF) values and smoothed density value (SDV) representation respectively. Deng et al. [5, 4] build their network upon PointNet to directly consume unordered point sets. Such patch-based methods suffer from efficiency problem as the intermediate network activations are not reused across adjacent patches, thus severely limits their usage in applications that requires high resolutional output. + +Fully-convolutional networks. Although fully convolutional networks introduced by Long et al. [17] have been widely used in the 2D image domain, it has not been extensively explored in the context of 3D local descriptor. Fully convolutional geometric feature (FCGF) [2] is the first to adopt a fully convolutional setting for dense feature description on point clouds. It uses sparse convolution proposed + +in [1] to extract feature descriptors and achieves rotation invariance by simple data augmentation. However, their method does not handle keypoint detection. + +# 2.2.3D Keypoint Detector + +Unlike the exploration of learning-based 3D local descriptors, most existing methods for 3D keypoint detection are hand-crafted. A comprehensive review of such methods can be found in [34]. The common trait among hand-crafted approaches is their reliance on local geometric properties of point clouds. Therefore, severe performance degradation occurs when such detectors are applied to real-world 3D scan data where noise and occlusion commonly exist. To make the detector learnable, Unsupervised Stable Interest Point (USIP) [16] proposes an unsupervised method to learn keypoint detection. However, USIP is unable to densely predict the detection scores and its network has the risk to be degenerate if the desired keypoint number is small. In contrast, our network is able to predict dense detection scores without having the risk of degeneracy. + +# 2.3. Joint Learned Descriptor and Detector + +In 2D image matching, several works have tackled the keypoint detection and description problems jointly [35, 6, 20, 24, 3, 26, 19]. However, adapting these methods to the 3D domain is challenging and less explored. As we know, 3DFeat-Net [14] is the only work that attempts to jointly learn the keypoint detector and descriptor for 3D point clouds. However, their method focuses more on learning the feature descriptor with an attention layer estimating the salience of each point patches as its by-product, and thus the performance of their keypoint detector is not guaranteed. Besides, their method takes point patches as input, which is inefficient as addressed before. In contrast, we aim to detect keypoint locations and extract per-point features in a single forward pass for efficient usage. Specifically, our proposed network serves a dual role by fusing the detector and descriptor network into a single one, thus saving memory and computation consumption by a large margin. + +# 3. Joint Detection and Description Pipeline + +Inspired by D2-Net, a recent approach proposed by Dusmanu et al. for 2D image matching [7], instead of training separate networks for keypoint detection and description, we design a single neural network that plays a dual role: a dense feature descriptor and a feature detector. However, adapting the idea of D2-Net to the 3D domain is non-trivial because of the irregular nature and varying sparsity of point clouds. In the following, we will first describe the fundamental steps to perform feature description and detection on irregular 3D point clouds, and then explain our strategy of dealing with the sparsity variance in the 3D domain. + +![](images/a7f4c689ac8f81582a04df103bc34f20ce34c33577a80ef798eb47b43c63a995.jpg) +Figure 1: (Left) The network architecture of D3Feat. Each block indicates a ResNet block using KPCov to replace image convolution. All layers except the last one are followed by batch normalization and ReLU. (Right) Keypoint detection. After dense feature extraction, we calculate the keypoint detection scores by applying saliency score and channel max score. This figure is best viewed with color and zoom-in. + +![](images/8eb5101eda2bda4b4d866e61de2d87a5ddbd1711dd5b1d7d9250f5d8155a9353.jpg) + +# 3.1. Dense Feature Description + +To address the issue of convolution on irregular point clouds and better capture the local geometry information, Thomas et al. proposed the Kernel Point Convolution (KPConv) [33], which uses kernel points carrying convolution weights to emulate the kernel pixels in 2D convolution, and then defines the convolution operation on the raw point clouds. We adipot KPConv as our backbone network to perform dense feature extraction. Below we first briefly review the formulas of KPConv. + +Given a set of points $P \in \mathbb{R}^{N \times 3}$ and a set of features $F_{in} \in \mathbb{R}^{N \times D_{in}}$ represented in a matrix form, let $x_{i}$ and $f_{i}$ denote the $i$ -th point in $P$ and its corresponding feature in $F_{in}$ , respectively. The general convolution by kernel $g$ at point $x$ is defined as + +$$ +\left(F _ {i n} * g\right) = \sum_ {x _ {i} \in N _ {x}} g \left(x _ {i} - x\right) f _ {i}, \tag {1} +$$ + +where $N_{x}$ is the radius neighborhood of point $x$ , and $x_{i}$ is a supporting point in this neighborhood. The kernel function is defined as + +$$ +g \left(x _ {i} - x\right) = \sum_ {k = 1} ^ {K} h \left(x _ {i} - x, \hat {x} _ {k}\right) W _ {k}, \tag {2} +$$ + +where $h$ is the correlation function between the kernel point $\hat{x}_k$ and the supporting point $x_i$ , $W_k$ is the weight matrix of the kernel point $\hat{x}_k$ , and $K$ is the number of kernel points. We refer readers to the original paper [33] for more details. + +The original formulation of KPConv is not invariant to point density. Thus we add a density normalization term, which sums up the number of supporting points in the neighborhood of $x$ , to Equation 1 to ensure that convolution is sparsity invariant: + +$$ +\left(F _ {i n} * g\right) = \frac {1}{\left| N _ {x} \right|} \sum_ {x _ {i} \in N _ {x}} g \left(x _ {i} - x\right) f _ {i}. \tag {3} +$$ + +Based on the normalized kernel point convolution, we adopt a UNet-like structure with skip connections and resid- + +ual blocks to build a fully convolutional network [17], as illustrated in Fig. 1 (Left). + +Unlike patch-based methods which only support sparse feature description, our network is able to perform dense feature description under a fully convolutional setting. The output of our network is a dense feature map in the form of a two-dimensional matrix $F \in \mathbb{R}^{N \times c}$ , where $c$ is the dimension of the feature vector. The descriptor associated with point $x_{i}$ is denoted as $d_{i}$ , + +$$ +d _ {i} = F _ {i:}, d _ {i} \in \mathbb {R} ^ {c}, \tag {4} +$$ + +where $F_{i}$ denotes the $i$ -th row of two-dimensional matrix $F$ . The descriptors are L2-normalized to unit length. + +# 3.2. Dense Keypoint Detection + +Dusmanu et al. [7] detect keypoints on 2D images based on the local maximum across the spatial and channel dimensions of the feature maps, and use a softmax operator to evaluate the local-max score of a pixel. Due to the regular structure of images, their approach simply selects the neighboring pixels as the neighborhood. To extend their approach to 3D, this strategy might be replaced by radius neighborhood to handle the non-uniform sampling setting of point clouds. However, the number of neighboring points in the radius neighborhood can vary greatly. In this case, if we simply use a softmax function to evaluate the local maximum in the spatial dimension, the local regions with few points (e.g., regions close to the boundaries of indoor scenes or far away from Lidar center of outdoor scenes) would inherently have higher scores. To handle this problem, we propose a density-invariant saliency score to evaluate the saliency of a certain point compared with its local neighborhood. + +Given the dense feature map $F \in \mathbb{R}^{N \times c}$ , we regard $F$ as a collection of 3D response $D^k$ ( $k = 1, \dots, c$ ): + +$$ +D ^ {k} = F _ {: k}, \quad D ^ {k} \in \mathbb {R} ^ {N}, \tag {5} +$$ + +where $F_{:k}$ denotes the $k$ -th column of the two-dimensional matrix $F$ . The criterion of point $x_{i}$ to be a keypoint is + +$$ +\begin{array}{l} x _ {i} \text {i s a k e y p o i n t} \Longleftrightarrow k = \arg \max _ {t} D _ {i} ^ {t} \text {a n d} \\ i = \arg \max _ {j \in N _ {x _ {i}}} D _ {j} ^ {k}, \tag {6} \\ \end{array} +$$ + +where $N_{x_i}$ is the radius neighborhood of $x_i$ . This means that the most preeminent channel is first selected, and then verified by whether or not it is a maximum of its spatial local neighborhood on that particular response map $D^k$ . During training, we soften the above process to make it trainable by applying two scores, as illustrated in Fig. 1 (Right). The details are given below. + +Density-invariant saliency score. This score aims to evaluate how salient a point is compared with other points in its local neighborhood. In D2-Net [7], the score evaluating the local-max is defined as + +$$ +\alpha_ {i} ^ {k} = \frac {\exp \left(D _ {i} ^ {k}\right)}{\sum_ {x _ {j} \in N _ {x _ {i}}} \exp \left(D _ {j} ^ {k}\right)}. \tag {7} +$$ + +This formulation, however, is not invariant to sparsity. Sparse regions inherently have higher scores than dense areas because the scores are normalized by sum. We therefore design a density-invariant saliency score as follows: + +$$ +\alpha_ {i} ^ {k} = \ln \left(1 + \exp \left(D _ {i} ^ {k} - \frac {1}{\left| N _ {x _ {i}} \right|} \sum_ {x _ {j} \in N _ {x _ {i}}} D _ {j} ^ {k}\right)\right). \tag {8} +$$ + +In this formulation, the saliency score of a point is calculated as the difference between its feature and the mean feature of its local neighborhood. Thus it measures the relative saliency of a center point with respect to that of the supporting points in the local region. Besides, using the average response in place of sum (c.f., Equation 7) prevents the score from being affected by the number of the points in the neighborhood. In our experiments (Section 6.4), we will show that our saliency score significantly improves the network's ability to handle point cloud keypoint detection with varying density. + +Channel max score. This score is designed to pick up the most preeminent channel for each point: + +$$ +\beta_ {i} ^ {k} = \frac {D _ {i} ^ {k}}{\operatorname* {m a x} _ {t} \left(D _ {i} ^ {t}\right)}. \tag {9} +$$ + +Finally, both of the scores are taken into account for the final keypoint detection score: + +$$ +s _ {i} = \max _ {k} \left(\alpha_ {i} ^ {k} \beta_ {i} ^ {k}\right). \tag {10} +$$ + +Thus after we obtain the keypoint score map of an input point cloud, we select points with top scores as keypoints. + +# 4. Joint Optimizing Detection & Description + +Designing a proper supervision signal is the key to joint learning of a descriptor and a detector. In this section, We will first describe the metric learning loss for the descriptor, and then design a detector loss from a self-supervised perspective. + +Descriptor loss. To optimize the descriptor network, many works attempt to use metric learning strategies, like contrastive loss and triplet loss. We will utilize the contrastive loss, since from our experiments we have found it to give better convergence performance. As for the sampling strategy, we adopt the hardest in batch strategy proposed in [22] to make the network focus on hard pairs. + +Given a pair of partially overlapped point cloud fragments $P$ and $Q$ , and a set of $n$ pairs of corresponding 3D points. Suppose $(A_i, B_i)$ is a correspondence pair and the two points have their corresponding descriptors $d_{A_i}$ and $d_{B_i}$ and scores $s_{A_i}$ and $s_{B_i}$ . The distance between a positive pair is defined as the Euclidean distance between their descriptors as follows: + +$$ +d _ {p o s} (i) = \left| \left| d _ {A _ {i}} - d _ {B _ {i}} \right| \right| _ {2}. \tag {11} +$$ + +The distance between a negative pair is, + +$$ +d _ {n e g} (i) = \min \left\{\left| \left| d _ {A _ {i}} - d _ {B _ {j}} \right| \right| _ {2} \right\} \text {s . t .} \left| \left| B _ {j} - B _ {i} \right| \right| _ {2} > R, \tag {12} +$$ + +where $R$ is the safe radius, and $B_{j}$ is the hardest negative sample that lies outside the safe radius of the true correspondences. The contrastive margin loss is defined as + +$$ +\begin{array}{l} L _ {d e s c} = \frac {1}{n} \sum_ {i} [ \max (0, d _ {p o s} (i) - M _ {p o s}) \tag {13} \\ \left. + \max \left(0, M _ {n e g} - d _ {n e g} (i)\right) \right], \\ \end{array} +$$ + +where $M_{pos}$ is the margin for positive pairs and $M_{neg}$ is the margin for negative pairs. + +Detector loss. To optimize the detector network, we seek for a loss formulation that encourages the easily matchable correspondences to have higher keypoint detection scores than the correspondences which are hard to match. In [7], Dusmanu et al. proposed an extension to the triplet margin loss to jointly optimize the descriptor and the detector: + +$$ +L _ {d e t} = \sum_ {i} \frac {s _ {A _ {i}} s _ {B _ {i}}}{\sum_ {i} s _ {A _ {i}} s _ {B _ {i}}} \max (0, M + d _ {\text {p o s}} (i) ^ {2} - d _ {\text {n e g}} (i) ^ {2}), \tag {14} +$$ + +where $M$ is the triplet margin. They claimed that in order to minimize the loss, the detector network should predict high scores for most discriminative correspondences and vice versa. However, their loss does not provide explicit guidance for the score term, and experimentally we found that their origin loss formulation does not guarantee convergence in our context. + +Thus we design a loss term to explicitly guide the gradient of the scores. From a self-supervised perspective, we use the on-the-fly feature matching results to evaluate the discriminativeness of each correspondence, which will guide the gradient flow of the score of each keypoint. If a correspondence is already matchable under the current descriptor network, we want the score to be higher and vice versa. Specifically, we define the detector loss as + +$$ +L _ {d e t} = \frac {1}{n} \sum_ {i} \left[ \left(d _ {p o s} (i) - d _ {n e g} (i)\right) \left(s _ {A _ {i}} + s _ {B _ {i}}\right) \right]. \tag {15} +$$ + +Intuitively, if $d_{pos}(i) - d_{neg}(i) < 0$ , it indicates that this correspondence can be correctly matched using the nearest neighbor search, and the loss term will encourage the scores $s_{A_i}$ and $s_{B_i}$ of the two points in the correspondence pair to be higher. Conversely, if $d_{pos}(i) - d_{neg}(i) > 0$ , the correspondence is not discriminative enough for the current descriptor network to establish a correspondence, and thus the loss will encourage the scores $s_{A_i}$ and $s_{B_i}$ to be lower. In order to minimize the loss, the detector should predict higher scores for matchable correspondences and lower scores for non-matchable correspondences. + +# 5. Implementation Details + +Training. Our network is implemented in TensorFlow. During training, we use all the point cloud fragment pairs with more than $30\%$ overlap. For each pair of fragments $P$ and $Q$ , we establish the correspondence set by first randomly sampling $n$ anchor points from $P$ , then applying the ground-truth transformation to these points, and performing nearest neighbor search in fragment $Q$ . The correspondence is accepted only if the Euclidean distance between two points is less than a threshold. We use grid subsampling to control the number of points and ensure the spatial consistency of point clouds. + +For the first layer, we use $0.03m$ as our grid size. The neighborhood radius is 2.5 times the grid size of the current layer. The local neighborhood for keypoint detection is the same as the first radius neighborhood. For each point cloud fragment, we apply data augmentation including adding Gaussian noise with standard deviation 0.005, random scaling $\in [0.9,1.1]$ , and random rotation angle $\in [0^{\circ},360^{\circ})$ around an arbitrary axis. We use a batch size of 1 and correspondence number $n = 64$ . We use positive margin $M_{pos} = 0.1$ , negative margin $M_{neg} = 1.4$ for the contrastive loss. The loss terms for the detector and the descriptor are equally weighted. We optimize the network using the Momentum optimizer with an initial learning rate of 0.1, which is exponentially decayed every epoch, and the momentum is set to 0.98. The network converges in about 100 epochs. + +Testing. During testing, our keypoint detection module adopts the hard selection strategy formulated by Equation 6 + +instead of soft selection to get better quality keypoints. This strategy emulates non-maximum suppression and avoids having the selected keypoints lie too close to each other. + +# 6. Experiments + +The following sections are organized as follows. First, we demonstrate our method (D3Feat) regarding point cloud registration on 3DMatch dataset [36] (indoor settings) and KITTI [10] dataset (outdoor settings), with the provided data split to train D3Feat. Next, we study the generalization ability of D3Feat on ETH dataset [25] (outdoor settings), using the model trained on 3DMatch dataset. Finally, we more specifically evaluate the keypoint repeatability on 3DMatch and KITTI datasets, to clearly demonstrate the performance of our detector. + +# 6.1. Indoor Settings: 3DMatch dataset + +We follow the same protocols in 3DMatch dataset [36] to prepare the training and testing data. In particular, the test set contains 8 scenes with partially overlapped point cloud fragments and their corresponding transformation matrices. For each fragment, 5000 randomly sampled 3D points are given for methods that do not include a detector. + +Evaluation metrics. Following [2], two evaluation metrics are used including 1) Feature Matching Recall, a.k.a. the percentage of successful alignment whose inlier ratio is above some threshold (i.e., $\tau_{2} = 5\%$ ), which measures the matching quality during pairwise registration. 2) Registration Recall, a.k.a. the percentage of successful alignment whose transformation error is below some threshold (i.e., $\mathrm{RMSE} < 0.2\mathrm{m}$ ), which better reflects the final performance in practice use. Besides, the intermediate result, Inlier Ratio, is also reported. In above metrics 1) and 3), a match is considered as an inlier if the distance between its corresponding points is smaller than $\tau_{1} = 10\mathrm{cm}$ under ground-truth transformation. For metric 2), we use a RANSAC with 50,000 max iterations (following [36]) to estimate the transformation matrices. + +Comparisons with the state-of-the-arts. We compare D3Feat with the state-of-the-arts on 3DMatch dataset. As shown in Table 1, the Feature Matching Recall is reported regarding two levels of data difficulty: the original point cloud fragments (left columns), and the randomly rotated fragments (right columns). In terms of D3Feat, we report the results both on 5000 randomly sampled points (D3Feat( rand)) and on 5000 keypoints predicted by our detector network (D3Feat(pred)). In both settings, D3Feat achieves the best performance when a learned detector is equipped. + +Moreover, we demonstrate the robustness of D3Feat by varying the error threshold (originally defined as $\tau_{1} = 10\mathrm{cm}$ and $\tau_{2} = 5\%$ ) in Feature Matching Recall. As shown in + +
OriginRotated
FMR (%)STDFMR (%)STD
FPFH [28]35.913.436.413.6
SHOT [30]23.810.923.49.5
3DMatch [36]59.68.81.11.2
CGF [15]58.214.258.514.0
PPFNet [5]62.310.80.30.5
PPF-FoldNet [4]71.810.573.110.4
PerfectMatch [11]94.72.794.92.5
FCGF [2]95.22.995.33.3
D3Feat[rand]95.32.795.23.2
D3Feat(pred)95.82.995.53.5
+ +![](images/9b960e1ffc306056fc681fba7492fe47c5ac016e91e3030107b71f60f97134dd.jpg) +Fig. 2, we observe that the D3Feat performs consistently well under all conditions. In particular, D3Feat notably outperforms other methods (left figure) under a more strict inlier ratio threshold, e.g., $\tau_{2} = 20\%$ , which indicates the advantage of adopting a detector to derive more distinctive features. In terms of varying $\tau_{1}$ , D3Feat performs slightly worse than PerfectMatch [11] when smaller inlier distance error is tolerated, which can be probably ascribed to the small voxel size (1.875cm) used in PerfectMatch, while D3Feat is performed using 3cm voxel downsampling. + +![](images/4637f727a5fe3e5f9af6fbbe79c7a2db9ff6c87f3a5207e7a79e21f037c21ee9.jpg) +Figure 2: Feature matching recall in relation to inlier ratio threshold $\tau_{2}$ (Left) and inlier distance threshold $\tau_{1}$ (Right) + +Performance under different number of keypoints. To better demonstrate the superiority of a joint learning with a detector, we further report the results when reducing the sampled point number from 5000 to 2500, 1000, 500 or even 250. As shown in Table 2, when no detector is equipped, the performance of PerfectMatch, FCGF or D3FeatRand) drops at a similar magnitude as the number of sampled points get smaller. However, once enabling the proposed detector (D3Feat(pred)), our method is able to maintain a high matching quality regarding all evaluation metrics, and outperform all comparative methods by a large margin. + +It is also noteworthy that, regarding Inlier Ratio, D3Feat(pred) is the only method that achieves improved results when smaller number of points is considered. This + +Table 1: Feature matching recall at ${\tau }_{1} = {10}\mathrm{\;{cm}},{\tau }_{2} = 5\%$ . FMR and STD indicate the feature matching recall and its standard deviation. + +
# Keypoints500025001000500250
Feature Matching Recall (%)
PerfectMatch [11]94.794.292.690.182.9
FCGF [2]95.295.594.693.089.9
D2_TripletNot Converge
D2_Contrastive94.794.294.093.292.3
w/o detector95.094.394.292.590.7
D3Feat( rand)95.395.194.293.690.8
D3Feat(pred)95.895.694.694.393.3
Registration Recall (%)
PerfectMatch80.377.573.464.850.9
FCGF87.385.885.881.073.0
D3Feat( rand)83.582.181.777.668.8
D3Feat(pred)82.284.484.982.579.3
Inlier Ratio (%)
PerfectMatch37.734.528.323.019.1
FCGF56.954.549.143.334.7
D3Feat( rand)40.638.333.328.623.5
D3Feat(pred)40.740.642.744.145.0
+ +Table 2: Evaluation results on the 3DMatch dataset under different numbers of keypoints. + +strongly indicates that the detected keypoints have been properly ranked, and the top points receive higher probability to be matched, which is a desired property that a reliable kepoint is expected to acquire. + +Rotation invariance. Previous works such as [5, 11] use sophisticated input representations or per-point local reference frames to acquire rotation invariance. However, as also observed in FCGF [2], we find that a fully convolutional network (e.g., KPCov [33] as used in this paper) is able to empirically achieve strong rotation invariance through low-cost data augmentation, as shown in the right columns of Table 1. We will provide more details about this experiment in supplementary materials. + +Ablation study. To study the effect of each component of D3Feat, we conduct thorough ablative experiments on 3DMatch dataset. Specifically, to address the importance of the proposed detector loss, we compare 1) the model trained with the original D2-Net loss (D2_Triplet) and 2) the model trained with the improved D2-Net loss (D2_Contrastive). To demonstrate the benefit from a joint learning of two tasks, we use only the contrastive loss to train a model without the detector learning (w/o detector). Other training or testing settings are kept the same for a fair comparison. + +As shown in Table 2, the proposed detector loss (D3Feat( rand)) not only guarantees better convergence than D2_Triplet, but also delivers a notable performance boost over D2_Contrastive. Besides, by comparing w/o detector and D3Feat( rand), it can be seen that a joint learning of a detector is also advantageous to strengthen the descriptor itself. + +# 6.2. Outdoor Settings: KITTI dataset + +KITTI odometry dataset comprises 11 image sequences of outdoor driving scenarios for point cloud registration. Following the data splitting method in FCGF [2], we use sequences 0 to 5 for training, 6 to 7 for validation, and 8 to 10 for testing. The ground truth transformations are provided by GPS. To reduce the noise in ground truth, we use the standard iterative closest point (ICP) method to refine the alignment. Besides, only pairs which are at least $10\mathrm{m}$ away from each other are selected. Finally, we train D3Feat with $30\mathrm{cm}$ voxel downsampling for preprocessing. + +Evaluation metrics. We evaluate the estimated transformation matrices by two error metrics: Relative Translation Error (RTE) and Relative Rotation Error (RRE) proposed in [8, 21]. The registration is considered accurate if the RTE is below $2\mathrm{m}$ and RRE is below $5^{\circ}$ following [14]. + +Comparisons to the state-of-the-arts. We compare D3Feat with FCGF [2] and 3DFeat-Net [14]. For 3DFeat-Net, we report the results as presented in [2]. For FCGF, we use the authors' implementation trained on KITTI. To compute the transformation, we use RANSAC with 50,000 max iterations. As shown in Table 3, D3Feat outperforms the state-of-the-arts regarding all metrics. Besides, we also show the registration results under different numbers of points in Table 4. In most cases, D3Feat fails to align only one pair of fragments. Even using only 250 points, D3Feat still achieves $99.63\%$ success rate, while FCGF drops to $68.62\%$ due to the lack of a reliable detector. + +
RTE(cm)RRE(°)Succ.(%)
AVGSTDAVGSTD
3DFeat-Net [14]25.926.20.570.4695.97
FCGF [2]9.521.300.300.2896.57
D3Feat6.900.300.240.0699.81
+ +Table 3: Quantitative comparisons on the KITTI dataset. The results of 3DFeat-Net are taken from [2]. For RTE and RRE, the lower of the values, the better. + +
All500025001000500250
FCGF [2]96.5796.3996.0393.6990.0968.62
D3Feat99.8199.8199.8199.8199.8199.63
+ +# 6.3. Outdoor settings: ETH Dataset + +In order to evaluate the generalization ability of D3Feat, we use the model trained on 3DMatch dataset and test it on four outdoor laser scan datasets (Gazebo-Summer, Gazebo-Winter, Wood-Summer and Wood-Autumn) from the ETH dataset [25], following the protocols defined in [11]. The evaluation metric is again Feature Matching Recall under + +the same settings as in previous evaluations. For comparisons, we use the PerfectMatch model with $6.25\mathrm{cm}$ voxel size (16 voxels per 1m), while for FCGF, we use the model trained on 5cm voxel size which we find perform significantly better than the model with $2.5\mathrm{cm}$ on this dataset. For D3Feat, we report the results on both $6.25\mathrm{cm}$ and 5cm to compare with PerfectMatch and FCGF, respectively. + +Table 4: Success rate on the KITTI dataset under different numbers of keypoints. + +
voxel size(cm)GazeboWoodAVG.
Sum.Wint.Sum.Aut.
PerfectMatch [11]6.2591.384.167.872.879.0
FCGF [2]5.0022.810.014.7816.816.1
D3Feat( rand)5.0045.723.913.022.426.2
D3Feat(pred)5.0078.962.645.237.656.3
D3Feat(pred)6.2585.963.049.648.061.6
+ +Table 5: Feature matching recall at ${\tau }_{1} = {10}\mathrm{\;{cm}},{\tau }_{2} = 5\%$ on the ETH dataset. + +For a fair comparison, the pre-sampled points provided in [11] are used for PerfectMatch, FCGF and D3Featrand) to extract the features. As shown in Table 5, under $5\mathrm{cm}$ voxel size setting, D3Feat demonstrates better generalization ability than FCGF. Once the detector is enabled, the results are improved remarkably. However, on this dataset, PerfectMatch is still the best performing method, whose generalization ability can be mainly ascribed to the use of smoothed density value (SDV) representation, as explained in the original paper [11]. Nevertheless, by comparing the results of D3Featrand) and D3Featpred), we can still find the significant improvement brought by our detector. The visualization results on ETH can be found in the supplementary materials. + +# 6.4. Keypoint Repeatability + +Besides the reliability, a keypoint is also desired to be repeatable. Thus we compare our detector in repeatability with a learning-based method USIP [16] and hand-crafted methods: ISS [37], Harris-3D [13], and SIFT-3D [18] on the 3DMatch test set and KITTI test set. + +Evaluation metric. We use the relative repeatability proposed in [16] as the evaluation metric. Specifically, given two partially overlapped point clouds and the ground truth pose, a keypoint in the first point cloud is considered repeatable if its distance to the nearest keypoint in the second point cloud is less than some threshold, under the ground truth transformation. Next, the relative repeatability is calculated as the number of repeatable keypoints over the number of detected keypoints. This threshold is set to $0.1\mathrm{m}$ and $0.5\mathrm{m}$ for 3DMatch and KITTI datasets, respectively. + +Implementation. We compare the full model D3Feat, and a baseline model that directly extends the D2-Net design to 3D domain (denoted as D3Feat(base)). We use PCL [27] to implement the classical detectors. For USIP, we take the origin implementation as well as the pretrained model to test + +on the 3DMatch test set. For the KITTI dataset, since USIP and D3Feat use different processing and splitting strategies and USIP requires surface normal and curvature as input, the results are not directly comparable. Nevertheless, for the sake of completeness, we run and test the original implementation of USIP on our processed KITTI data. For each detector, we generate 4, 8, 16, 32, 64, 128, 256, 512 keypoints and calculate the relative repeatability respectively. + +Ablation study. To recap, direct extension from D2-Net to 3D domain brings the problem that points located in more sparse region would have higher probability of being selected as keypoints, which prevents the network from predicting highly repeatable keypoints, as explained in Sec. 3. The proposed density-invariant selection strategy enables the network to handle the inherent density variations of point clouds. In the following, we will demonstrate the effect of proposed keypoints selection strategy through both qualitative and quantitative results. + +Qualitative results. The relative repeatability in relation to the number of keypoints is shown in Fig. 3. Thanks to the proposed self-supervised detector loss, our detector is encouraged to give higher scores to points with distinctive local geometry while giving lower scores to points with homogeneous neighborhood. Therefore although we do not explicitly supervise the repeatability of keypoints, D3Feat can still achieve comparable repeatability to USIP. D3Feat generally outperforms all the other detectors on 3DMatch and KITTI dataset over all different number of keypoints except worse than USIP on KITTI. In addition, the proposed saliency score significantly improves the repeatability of D3Feat over D3Feat(base), indicating the effectiveness of the proposed keypoint selection strategy. + +![](images/81da9981fe7e4f04faf68cb7b91c52d741fecb97e62547526617b25fd3532d91.jpg) +Figure 3: Relative repeatability when different numbers of keypoints are detected. + +![](images/f774d2b7013d6c674be6cfc2f2e07e09e9380955688d1a2ecc4068e02f8b360b.jpg) + +Qualitative results. As shown in Fig. 4 and Fig. 5, the proposed density-invariant selection strategy overcomes the density variations. More qualitative results are included in the supplementary materials. + +![](images/1b180a719197ec436fbb2f54a8ccd72b1633269882cbeda4aeceec7654643acc.jpg) +Figure 4: Visualization on 3DMatch. The first row are detected using D3Feat while the second row are detected using naive local max score. Points close to the boundaries are marked with black boxes. + +![](images/83b4fb40e8f0ccf76a2643d703016d76ee9c6402d70377502ee1c22a8b8585e9.jpg) +Figure 5: Visualization on KITTI. The first row are detected using D3Feat while the second row are detected using naïve local max score. Best view with color and zoom-in. + +# 7. Conclusion + +In this paper we have designed a dual-role fully convolutional network for dense feature detection and description on point clouds. A novel density-invariant saliency score has been proposed to help select keypoints under varying densities. Also a self-supervised detector loss has been proposed to guide the network to predict highly repeatable keypoints and enable joint improvement for both detector and descriptor. Extensive experiments on indoor 3DMatch and outdoor KITTI both show the effectiveness of our detector network and the distinctiveness of descriptor network. Our model outperforms the state-of-the-art methods especially when using a small number of keypoints. + +Acknowledgements. This work is supported by Hong Kong RGC GRF 16206819, 16203518 and Centre for Applied Computing and Interactive Media (ACIM) of School of Creative Media, City University of Hong Kong. + +# References + +[1] C. Choy, J. Gwak, and S. Savarese. 4d spatio-temporal convnets: Minkowski convolutional neural networks. In CVPR, 2019. 2 +[2] C. Choy, J. Park, and V. Koltun. Fully convolutional geometric features. In ICCV, 2019. 2, 5, 6, 7 +[3] P. H. Christiansen, M. F. Kragh, Y. Brodskiy, and H. Karstoft. Unsuperpoint: End-to-end unsupervised interest point detector and descriptor. arXiv preprint arXiv:1907.04011, 2019. 2 +[4] H. Deng, T. Birdal, and S. Ilic. Ppf-foldnet: Unsupervised learning of rotation invariant 3d local descriptors. In ECCV, pages 602-618, 2018. 2, 6 +[5] H. Deng, T. Birdal, and S. Ilic. Ppfnet: Global context aware local features for robust 3d point matching. In CVPR, 2018. 2, 6 +[6] D. DeTone, T. Malisiewicz, and A. Rabinovich. Superpoint: Self-supervised interest point detection and description. In CVPR Workshops, 2018. 2 +[7] M. Dusmanu, I. Rocco, T. Pajdla, M. Pollefeys, J. Sivic, A. Torii, and T. Sattler. D2-net: A trainable cnn for joint description and detection of local features. In CVPR, 2019, 1, 2, 3, 4 +[8] G. Elbaz, T. Avraham, and A. Fischer. 3d point cloud registration for localization using a deep neural network autoencoder. In CVPR, 2017. 7 +[9] M. A. Fischler and R. C. Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of The ACM, 1981. 1 +[10] A. Geiger, P. Lenz, C. Stiller, and R. Urtasun. Vision meets robotics: The kitti dataset. *IJRR*, 2013. 5 +[11] Z. Gojcic, C. Zhou, J. D. Wegner, and A. Wieser. The perfect match: 3d point cloud matching with smoothed densities. In CVPR, 2019. 2, 6, 7 +[12] Y. Guo, M. Bennamoun, F. Sohel, M. Lu, J. Wan, and N. M. Kwok. A comprehensive performance evaluation of 3d local feature descriptors. IJCV, 2016. 2 +[13] C. G. Harris, M. Stephens, et al. A combined corner and edge detector. In Alvey vision conference, 1988. 7 +[14] Z. Jian Yew and G. Hee Lee. 3dfeat-net: Weakly supervised local 3d features for point cloud registration. In ECCV, 2018. 1, 2, 7 +[15] M. Khoury, Q.-Y. Zhou, and V. Koltun. Learning compact geometric features. In ICCV, 2017. 6 +[16] J. Li and G. H. Lee. Usip: Unsupervised stable interest point detection from 3d point clouds. ICCV, 2019. 1, 2, 7 +[17] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. 2, 3 +[18] D. G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 2004. 7 +[19] Z. Luo, T. Shen, L. Zhou, J. Zhang, Y. Yao, S. Li, T. Fang, and L. Quan. Contextdesc: Local descriptor augmentation with cross-modality context. 2019. 2 +[20] Z. Luo, T. Shen, L. Zhou, S. Zhu, R. Zhang, Y. Yao, T. Fang, and L. Quan. Geodesc: Learning local descriptors by integrating geometry constraints. 2018. 2 + +[21] Y. Ma, Y. Guo, J. Zhao, M. Lu, J. Zhang, and J. Wan. Fast and accurate registration of structured point clouds with small overlaps. In CVPR Workshops, 2016. 7 +[22] A. Mishchuk, D. Mishkin, F. Radenovic, and J. Matas. Working hard to know your neighbor's margins: Local descriptor learning loss. In NeurIPS, 2017. 4 +[23] M. Montemerlo, S. Thrun, D. Koller, B. Wegbreit, et al. Fast-slam: A factored solution to the simultaneous localization and mapping problem. Aaiia/iaai, 2002. 1 +[24] Y. Ono, E. Trulls, P. Fua, and K. M. Yi. Lf-net: learning local features from images. In NeurIPS, 2018. 2 +[25] F. Pomerleau, M. Liu, F. Colas, and R. Siegwart. Challenging data sets for point cloud registration algorithms. *IJRR*, 2012. 5, 7 +[26] J. Revaud, P. Weinzaepfel, C. De Souza, N. Pion, G. Csurka, Y. Cabon, and M. Humenberger. R2d2: Repeatabe and reliable detector and descriptor. arXiv preprint arXiv:1906.06195, 2019. 2 +[27] R. Rusu and S. Cousins. 3d is here: Point cloud library (pcl). ICRA, 2011. 7 +[28] R. B. Rusu, N. Blodow, and M. Beetz. Fast point feature histograms (fpfh) for 3d registration. In ICRA, 2009. 6 +[29] R. F. Salas-Moreno, R. A. Newcombe, H. Strasdat, P. H. Kelly, and A. J. Davison. Slam++: Simultaneous localisation and mapping at the level of objects. In CVPR, 2013. 1 +[30] S. Salti, F. Tombari, and L. Di Stefano. Shot: Unique signatures of histograms for surface and texture description. In ECCV, 2010. 6 +[31] J. L. Schonberger and J.-M. Frahm. Structure-from-motion revisited. In CVPR, 2016. 1 +[32] H. Su, S. Maji, E. Kalogerakis, and E. Learned-Miller. Multiview convolutional neural networks for 3d shape recognition. In ICCV, 2015. 2 +[33] H. Thomas, C. R. Qi, J.-E. Deschaud, B. Marcotegui, F. Goulette, and L. J. Guibas. Kpconv: Flexible and deformable convolution for point clouds. ICCV, 2019. 1, 3, 6 +[34] F. Tombari, S. Salti, and L. Di Stefano. Performance evaluation of 3d keypoint detectors. IJCV, 2013. 2 +[35] K. M. Yi, E. Trulls, V. Lepetit, and P. Fua. Lift: Learned invariant feature transform. In ECCV, 2016. 2 +[36] A. Zeng, S. Song, M. Nießner, M. Fisher, J. Xiao, and T. Funkhouser. 3dmatch: Learning local geometric descriptors from rgb-d reconstructions. In CVPR, 2017. 2, 5, 6 +[37] Y. Zhong. Intrinsic shape signatures: A shape descriptor for 3d object recognition. In ICCV Workshops, 2009. 7 +[38] L. Zhou, S. Zhu, Z. Luo, T. Shen, R. Zhang, M. Zhen, T. Fang, and L. Quan. Learning and matching multi-view descriptors for registration of point clouds. In ECCV, 2018. 2 \ No newline at end of file diff --git a/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/images.zip b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fe4c9248d585adbba41ef0599a9eef3c28173110 --- /dev/null +++ b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7df5ab65e26de34731c03ad5dad7e8b9827b2b8f5ad5f52cae515eb8a7173ff3 +size 477214 diff --git a/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/layout.json b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..e506eab0057804073ad122ed6103085e5a34f196 --- /dev/null +++ b/d3featjointlearningofdensedetectionanddescriptionof3dlocalfeatures/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5edc91309b76dffb3dae10964a20e4d592a1b7b7b66f471df086e2e7ec7fa8dd +size 370693 diff --git a/d3sadiscriminativesingleshotsegmentationtracker/e2b6355f-80de-47c1-942c-6e0519fcf4d2_content_list.json b/d3sadiscriminativesingleshotsegmentationtracker/e2b6355f-80de-47c1-942c-6e0519fcf4d2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a3c3958b4ef0c1d7f2b61c1aaa02767a94330cde --- /dev/null +++ b/d3sadiscriminativesingleshotsegmentationtracker/e2b6355f-80de-47c1-942c-6e0519fcf4d2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3dc1e3127faf3cf5197351acfe73c0a3a3bd790e11059090b1c980fd5cfdec3c +size 76731 diff --git a/d3sadiscriminativesingleshotsegmentationtracker/e2b6355f-80de-47c1-942c-6e0519fcf4d2_model.json b/d3sadiscriminativesingleshotsegmentationtracker/e2b6355f-80de-47c1-942c-6e0519fcf4d2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..086ecc7192d227e74f7e01cf357b6bb43784ecba --- /dev/null +++ b/d3sadiscriminativesingleshotsegmentationtracker/e2b6355f-80de-47c1-942c-6e0519fcf4d2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:830c60cbe537df68e9be42f27713a9d1bc1ed1c9f36cdb97bd6ea5aa10e46afd +size 94597 diff --git a/d3sadiscriminativesingleshotsegmentationtracker/e2b6355f-80de-47c1-942c-6e0519fcf4d2_origin.pdf b/d3sadiscriminativesingleshotsegmentationtracker/e2b6355f-80de-47c1-942c-6e0519fcf4d2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f33e89ba6a5bf5e4c912825d3b4265c71b31a4b4 --- /dev/null +++ b/d3sadiscriminativesingleshotsegmentationtracker/e2b6355f-80de-47c1-942c-6e0519fcf4d2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1950a026477a47df02f20a50148d1ebc841c94e645a716b83ba118eef6a842e5 +size 1823555 diff --git a/d3sadiscriminativesingleshotsegmentationtracker/full.md b/d3sadiscriminativesingleshotsegmentationtracker/full.md new file mode 100644 index 0000000000000000000000000000000000000000..70ed2edc204adba0a21f6c6210f5e1dce4bef848 --- /dev/null +++ b/d3sadiscriminativesingleshotsegmentationtracker/full.md @@ -0,0 +1,283 @@ +# D3S – A Discriminative Single Shot Segmentation Tracker + +Alan Lukežić1, Jiří Matas2, Matej Kristan1 + +$^{1}$ Faculty of Computer and Information Science, University of Ljubljana, Slovenia + +$^{2}$ Faculty of Electrical Engineering, Czech Technical University in Prague, Czech Republic + +alan.lukezic@fri.uni-lj.si + +# Abstract + +Template-based discriminative trackers are currently the dominant tracking paradigm due to their robustness, but are restricted to bounding box tracking and a limited range of transformation models, which reduces their localization accuracy. We propose a discriminative single-shot segmentation tracker - D3S, which narrows the gap between visual object tracking and video object segmentation. A single-shot network applies two target models with complementary geometric properties, one invariant to a broad range of transformations, including non-rigid deformations, the other assuming a rigid object to simultaneously achieve high robustness and online target segmentation. Without per-dataset finetuning and trained only for segmentation as the primary output, D3S outperforms all trackers on VOT2016, VOT2018 and GOT-10k benchmarks and performs close to the state-of-the-art trackers on the TrackingNet. D3S outperforms the leading segmentation tracker SiamMask on video object segmentation benchmarks and performs on par with top video object segmentation algorithms, while running an order of magnitude faster, close to real-time. + +# 1. Introduction + +Visual object tracking is one of core computer vision problems. The most common formulation considers the task of reporting target location in each frame of the video given a single training image. Currently, the dominant tracking paradigm, performing best in evaluations [22, 24], is correlation bounding box tracking [11, 3, 33, 2, 54, 28] where the target represented by a multi-channel rectangular template is localized by cross-correlation between the template and a search region. + +State-of-the-art template-based trackers apply an efficient brute-force search for target localization. Such strategy is appropriate for low-dimensional transformations like translation and scale change, but becomes inefficient for more general situations e.g. such that induce an aspect ratio change and rotation. As a compromise, modern trackers combine approximate exhaustive search with sampling + +![](images/0482a2f3bffe9ee02339cda6904d1c3b849ffcadba2bc8690f9957bb6691964a.jpg) +Figure 1. The D3S tracker represents the target by two models with complementary geometric properties, one invariant to a broad range of transformations, including non-rigid deformations (GIM - geometrically invariant model), the other assuming a rigid object with motion well approximated by an euclidean transformation (GEM - geometrically constrained Euclidean model). The D3S, exploiting the complementary strengths of GIM and GEM, provides both state-of-the-art localisation and accurate segmentation, even in the presence of substantial deformation. + +and/or bounding box refinement/regression networks [10, 27] for aspect ratio estimation. However, these approaches are restricted to axis-aligned rectangles. + +Estimation of high-dimensional template-based transformation is unreliable when a bounding box is a poor approximation of the target [31]. This is common – consider e.g. elongated, rotating, deformable objects, or a person with spread out hands. In these cases, the most accurate and well-defined target location model is a binary per-pixel segmentation mask. If such output is required, tracking becomes the video object segmentation task recently popularized by DAVIS [38, 40] and YoutubeVOS [51] challenges. + +Unlike in tracking, video object segmentation challenges typically consider large targets observed for less than 100 + +frames with low background distractor presence. Top video object segmentation approaches thus fare poorly in short-term tracking scenarios [24] where the target covers a fraction of the image, substantially changes its appearance over a longer period and moves over a cluttered background. Best trackers apply visual model adaptation, but in the case of segmentation errors it leads to an irrecoverable tracking failure [41]. Because of this, in the past, segmentation has played only an auxiliary role in template-based trackers [1], constrained DCF learning [33] and tracking by 3D model construction [20]. + +Recently, the SiamRPN [28] tracker has been extended to produce high-quality segmentation masks in two stages [50] – the target bounding box is first localized by SiamRPN branches and then a segmentation mask is computed only within this region by another branch. The two-stage processing misses the opportunity to treat localization and segmentation jointly to increase robustness. Another drawback is that a fixed template is used that cannot be discriminatively adapted to the changing scene. + +We propose a new single-shot discriminative segmentation tracker, D3S, that addresses the above-mentioned limitations. The target is encoded by two discriminative visual models - one is adaptive and highly discriminative, but geometrically constrained to an Euclidean motion (GEM), while the other is invariant to broad range of transformation (GIM, geometrically invariant model), see Figure 1. + +GIM sacrifices spatial relations to allow target localization under significant deformation. On the other hand, GEM predicts only position, but discriminatively adapts to the target and acts as a selector between possibly multiple target segmentations inferred by GIM. In contrast to related trackers [50, 27, 10], the primary output of D3S is a segmentation map computed in a single pass through the network, which is trained end-to-end for segmentation only (Figure 2). + +Some applications and most tracking benchmarks require reporting the target location as a bounding box. As a secondary contribution, we propose an effective method for interpreting the segmentation mask as a rotated rectangle. This avoids an error-prone greedy search and naturally addresses changes in location, scale, aspect ratio and rotation. + +D3S outperforms all state-of-the-art trackers on most of the major tracking benchmarks [23, 24, 19, 35] despite not being trained for bounding box tracking. In video object segmentation benchmarks [38, 40], D3S outperforms the leading segmentation tracker [50] and performs on par with top video object segmentation algorithms (often tuned to a specific domain), yet running orders of magnitude faster. Note that D3S is not re-trained for different benchmarks – a single pre-trained version shows remarkable generalization ability and versatility1. + +# 2. Related Work + +Robust localization crucially depends on the discrimination capability between the target and the background distractors. This property has been studied in depth in discriminative template trackers called discriminative correlation filters (DCF) [4]. The template learning is formulated as a (possibly nonlinear) ridge regression problem and solved by circular correlation [4, 12, 17, 30]. While trackers based purely on color segmentation [8, 41] are inferior to DCFs, segmentation has been used for improved DCF tracking of non-rectangular targets [1, 31]. Lukežić et al. [33] used color segmentation to constrain DCF learning and proposed a real-time tracker with hand-crafted features which achieved performance comparable to trackers with deep features. The method was extended to long-term [32] and RGB-depth tracking [20] using color and depth segmentation. Further improvements in DCF tracking considered deep features: Danelljan et al. [11] used features pre-trained for detection, Valmadre et al. [46] proposed pretraining features for DCF localization and recently Danelljan et al. [10] proposed a deep DCF training using backpropagation. + +Another class of trackers, called Siamese trackers [2, 44, 15], has evolved in direction of generative templates. Siamese trackers apply a backbone pre-trained offline with general targets such that object-background discrimination is maximized by correlation between the search region and target template extracted in the first frame [2]. The template and the backbone are fixed during tracking, leading to an excellent real-time performance [24]. Several multi-stage Siamese extensions have been proposed. These include addition of region proposal networks for improved target localization accuracy [28, 27] and addition of segmentation branches [50] for accurate target segmentation. Recently a template adaptation technique by backprop has been proposed [29] to improve tracking robustness. + +Segmentation of moving objects is a central problem in the emerging field of video object segmentation (VOS) [38, 51]. Most recent works [47, 5, 48, 7, 53] achieve impressive results, but involve large deep networks, which often require finetuning and are slow. Hu et al. [18] and Chen et al. [6] concurrently proposed segmentation by matching features extracted in the first frame, which considerably reduces the processing time. However, the VOS task considers segmentation of large objects with limited appearance changes in short videos. Thus, these methods fare poorly on the visual object tracking task with small, fast moving objects. The work proposed in this paper aims at narrowing the gap between visual object tracking and video object segmentation. + +![](images/fb487b96cae664ed4ec2344de52d8bbea573df03b823fc0b41636d17bb1713f7.jpg) +Figure 2. The D3S segmentation architecture. The backbone features are processed by the GEM and GIM pathways, producing the target location (L), foreground similarity (F) and target posterior (P) channels. The output of the three channels are concatenated and refined into a detailed segmentation map. + +# 3. Discriminative segmentation network + +Two models are used in D3S to robustly cope with target appearance changes and background discrimination: a geometrically invariant model (GIM) presented in Section 3.1, and a geometrically constrained Euclidean model (GEM) presented in Section 3.2. These models process the input in parallel pathways and produce several coarse target presence channels, which are fused into a detailed segmentation map by a refinement pathway described in Section 3.3. See Figure 2 for the architecture outline. + +# 3.1. Geometrically invariant model pathway + +Accurate segmentation of a deformable target requires loose spatial constraints in the discriminative model. Our geometrically invariant model (GIM) is thus composed of two sets of deep feature vectors corresponding to the target and the background, i.e., $\mathbf{X}_{\mathrm{GIM}} = \{\mathbf{X}^F,\mathbf{X}^B\}$ . + +Since the pre-trained backbone features are sub-optimal for accurate segmentation, these are first processed by a $1 \times 1$ convolutional layer to reduce their dimensionality to 64, which is followed by a $3 \times 3$ convolutional layer (a ReLU is placed after each convolutional layer). Both these layers are adjusted in the network training stage to produce optimal features for segmentation. The target/background models are created in the first frame by extracting the segmentation feature vectors at pixel locations corresponding to the target $(\mathbf{X}^F)$ and from the immediate neighborhood for the background $(\mathbf{X}^B)$ . + +During tracking, the pixel-level features extracted from the search region are compared to those of GIM $(\mathbf{X}_{\mathrm{GIM}})$ to compute foreground and background similarity channels $\mathbf{F}$ and $\mathbf{B}$ following [18]. Specifically, for the $\mathbf{F}$ channel computation, each feature $\mathbf{y}_i$ extracted at pixel $i$ is compared to all features $\mathbf{x}_j^F \in \mathbf{X}^F$ by a normalized dot product + +$$ +s _ {i j} ^ {F} \left(\mathbf {y} _ {i}, \mathbf {x} _ {j} ^ {F}\right) = \langle \tilde {\mathbf {y}} _ {i}, \tilde {\mathbf {x}} _ {j} ^ {F} \rangle , \tag {1} +$$ + +where $(\cdot)$ indicates an $L_{2}$ normalization. The final per-pixel + +![](images/08a57eb194f8c636d729edb25a991da682cf1f19e00d3b899f2a1c09c8a13ae6.jpg) +Figure 3. GIM - the geometrically invariant model - features are matched to the features in the foreground-background model $\{\mathbf{X}^F, \mathbf{X}^B\}$ to obtain the target $(\mathbf{F})$ and background $(\mathbf{B})$ similarity channels. The posterior channel $(\mathbf{P})$ is the softmax of $\mathbf{F}$ and $\mathbf{B}$ . + +foreground similarity at pixel $i$ , $\mathbf{F}_i$ , is obtained by average of top-K similarities at that pixel, i.e., + +$$ +\mathbf {F} _ {i} = \operatorname {T O P} \left(\left\{s _ {i j} ^ {F} \right\} _ {j = 1: N _ {F}}, K\right), \tag {2} +$$ + +where $\mathrm{TOP}(\cdot ,K)$ is a top-K averaging operator over the set of $N_{F}$ similarities. Computation of the background similarity channel $\mathbf{B}$ follows the same principle, but with similarities computed with the background model feature vectors, i.e., $\mathbf{x}_j^B\in \mathbf{X}^B$ . Finally, a softmax layer is applied to produce a target posterior channel $\mathbf{P}$ . The GIM pathway architecture is shown in Figure 3. + +# 3.2. Geometrically constrained model pathway + +While GIM produces an excellent target-background separation, it cannot well distinguish the target from similar instances, leading to a reduced robustness (see Figure 1, first line). Robust localization, however, is a well-established quality of the discriminative correlation filters. Although they represent the target by a geometrically constrained model (i.e., a rectangular filter), efficient techniques developed to adapt to the target discriminative features [13, 33, 10] allow tracking reliably under considerable appearance changes. + +We thus employ a recent deep DCF formulation [10] in the geometrically constrained Euclidean model (GEM) pathway. Following [10], the backbone features are first reduced to 64 channels by $1 \times 1$ convolutional layer. The reduced features are correlated by a 64 channel DCF followed by a PeLU nonlinearity [45]. The reduction layer and DCF are trained by an efficient backprop formulation (see [10] for details). + +The maximum of the correlation response is considered as the most likely target position. The D3S output (i.e., segmentation), however, requires specifying a belief of target presence at each pixel. Therefore, a target location channel is constructed by computing a (Euclidean) distance transform from the position of the maximum in the correlation map to the remaining pixels in the search region. The GEM pathway is shown in Figure 4. + +![](images/17d2018c83c0f898e8dc2cfa02159ee1d9c10ca83676c70c28d47ddcd3f636c0.jpg) +Figure 4. GEM – the geometrically constrained Euclidean model – reduces the backbone features dimensionality and correlates them with a DCF. The target localisation channel (L) is the distance transform to the maximum correlation response, representing the per-pixel confidence of target presence. + +# 3.3. Refinement pathway + +The GIM and GEM pathways provide complementary information about the pixel-level target presence. GEM provides a robust, but rather inaccurate estimate of the target region, whereas the output channels from GIM show a greater detail, but are less discriminative (Figure 1). Furthermore, the individual outputs are low-resolution due to the backbone encoding. A refinement pathway is thus designed to combine the different information channels and upscale the solution into an accurate and detailed segmentation map. + +The refinement pathway takes the following inputs: the target location channel (L) from GEM and the foreground similarity and posterior channels (F and P) from the GIM. The channels are concatenated and processed by a $3 \times 3$ convolutional layer followed by a ReLU, resulting in a tensor of 64 channels. Three stages of upscaling akin to [42, 39] are then applied to refine the details by considering the features in different layers computed in the backbone. An upscaling stage consists of doubling the resolution of the input channels, followed by two $3 \times 3$ convolution layers (each followed by a ReLU). The resulting channels are summed with the adjusted features from the corresponding backbone layer. Specifically, the backbone features are adjusted for the upscaling task by a $3 \times 3$ convolution layer, followed by a ReLU. The last upscaling stage (which contains only resolution doubling, followed by a single $3 \times 3$ convolution layer) is followed by a softmax to produce the final segmentation probability map. The refinement pathway is shown in Figure 5. + +# 4. Discriminative Segmentation Tracker + +This section outlines application of the discriminative segmentation network from Section 3 to online general object tracking. Given a single supervised training example from the first frame, the network produces target segmentation masks in all the remaining frames. However, some applications and most tracking benchmarks require target location represented by a bounding box. For most benchmarks, the bounding box is trivially obtained by fitting an + +![](images/678fc2aa91bda540b220ea164035c1316c9a0882ed48a5a25aec2d784959d25e.jpg) +Figure 5. The refinement pathway combines the GIM and GEM channels and gradually upscales them by using adjusted features from the backbone. The $\mathrm{UP^{*}}$ is a modified UP layer (see the text). + +axis-aligned bounding box that tightly fits a segmentation mask. However, for the benchmark requiring a rotated bounding box, we propose a simple fitting procedure in Section 4.1. The tracking steps are outlined in Section 4.2. + +# 4.1. Bounding box fitting module + +The segmentation probability map from the discriminative segmentation network (Section 3) is thresholded at 0.5 probability to yield a binary segmentation mask. Only the largest connected component within the mask is kept and an ellipse is fitted to its outline by least squares [14]. The ellipse center, major and minor axis make up an initial estimate of the rotated bounding box. This is typically the most liberal solution with oversized rectangles, preferring most of the target pixels lying within its area, but accounts poorly for the presence of the background pixels within the region. We therefore further reduce the rectangle sides in direction of the major axes by optimizing the following modified overlap cost function $IoU^{\mathrm{MOD}}$ between the predicted segmentation mask and fitted rectangle using a coordinate descent: + +$$ +I o U ^ {\mathrm {M O D}} = \frac {N _ {\mathrm {I N}} ^ {+}}{\alpha N _ {\mathrm {I N}} ^ {-} + N _ {\mathrm {I N}} ^ {+} + N _ {\mathrm {O U T}} ^ {+}}, \tag {3} +$$ + +where $N_{\mathrm{IN}}^{+}$ and $N_{\mathrm{OUT}}^{+}$ denote the number of foreground pixels within and outside the rectangle, respectively, and $N_{\mathrm{IN}}^{-}$ denotes the number of background pixels within the rectangle. The scalar $\alpha$ controls the contribution of $N_{\mathrm{IN}}^{-}$ . The bounding box fitting method is very fast and takes on average only 2ms. + +# 4.2. Tracking with D3S + +Initialization. D3S is initialized on the first frame using the ground truth target location. The GEM and GIM initialization details depend on whether the target ground truth is presented by a bounding box or a segmentation mask. If a ground truth bounding box is available, the GEM follows the initialization procedure proposed in [10], which involves training both the dimensionality reduction network and the DCF by backprop on the first frame by considering the region four times the target size. On the other hand, if a segmentation mask is available, the ground truth target bounding box is first approximated by an axis-aligned rectangle encompassing the segmented target. + +In case a segmentation mask is available, the GIM is initialized by extracting foreground samples from the target mask and background samples from the neighborhood four times the target size. However, if only a bounding box is available, an approximate ground truth segmentation mask is constructed first. Foreground samples are extracted from within the bounding box, while the background samples are extracted from a four times larger neighborhood. A tracking iteration of D3S is then run on the initialization region to infer a proxi ground truth segmentation mask. The final foreground and background samples are extracted from this mask. This process might be iterated a few times (akin to GrabCut [43]), however, we did not observe improvements and chose only a single iteration for initialization speed and simplicity. + +Tracking. During tracking, when a new frame arrives, a region four times the target size is extracted at previous target location. The region is processed by the discriminative segmentation network from Section 3 to produce the output segmentation mask. A rotated bounding box is fitted to the mask (Section 4.1) if required by the evaluation protocol. The DCF in the GEM is updated on the estimated target location following the backprop update procedure [10]. + +# 5. Experiments + +# 5.1. Implementation details + +The backbone network in D3S is composed of the first four layers of ResNet50, pre-trained on ImageNet for object classification. The backbone features are extracted from the target search region resized to $384 \times 384$ pixels. The background tradeoff parameter from (3) is set to $\alpha = 0.25$ and the top $K = 3$ similarities are used in GIM (2). We verified in a preliminary analysis that performance is insensitive to exact values of these parameters, and we therefore keep the same values in all experiments. + +Network pre-training. The GIM pathway and the refinement pathway are pre-trained on 3471 training segmentation sequences from Youtube-VOS [51]. A training sample is constructed by uniformly sampling a pair of images + +and the corresponding segmentation masks from the same sequence within a range of 50 frames. To increase the robustness to possibly inaccurate GEM localization, the target location channel was constructed by perturbing ground truth locations uniformly from $\left[-\frac{1}{8}\sigma, \frac{1}{8}\sigma\right]$ , where $\sigma$ is target size. The network was trained by 64 image pairs batches for 40 epochs with 1000 iterations per epoch using the ADAM optimizer [21] with learning rate set to $10^{-3}$ and with 0.2 decay every 15 epochs. The training loss was a crossentropy between the predicted and ground truth segmentation mask. The training takes 20 hours on a single GPU. + +Speed. A Pytorch implementation of D3S runs at 25fps on a single NVidia GTX 1080 GPU, while 1.3s is required for loading the network to GPU and initialization. + +# 5.2. Evaluation on Tracking Datasets + +D3S was evaluated on four major short-term tracking datasets: VOT2016 [23], VOT2018 [24], GOT-10k [19] and TrackingNet [35]. In the following we discuss the results obtained on each of the datasets. + +VOT2016 and VOT2018 datasets each consist of 60 sequences. Targets are annotated by rotated rectangles to enable a more thorough localization accuracy evaluation compared to the related datasets. The standard VOT evaluation protocol [26] is used in which the tracker is reset upon tracking failure. Performance is measured by accuracy (average overlap over successfully tracked frames), robustness (failure rate) and the EAO (expected average overlap), which is a principled combination of the former two measures [25]. + +The following state-of-the-art (sota) trackers are considered on VOT2016: the VOT2016 top performers CCOT [13] and TCNN [36], a sota segmentation-based discriminative correlation filter CSR-DCF [33], and most recently published sota deep trackers SiamRPN [28], SPM [49], ASRCF [9], SiamMask [50] and ATOM [10]. + +Results reported in Table 1 show that D3S outperforms all tested trackers on all three measures by a large margin. In EAO measure, D3S outperforms the top sota tracker SPM by $14\%$ , and simultaneously outperforms the top robust sota ATOM by $25\%$ in robustness. The top sota performer in accuracy is the segmentation-based tracker SiamMask. D3S outperforms this tracker by over $3\%$ in accuracy and approximately by $50\%$ in robustness. + +The VOT2016 dataset contains per-frame target segmentation masks which can be used to evaluate segmentation performance on the small and challenging targets present. We have thus compared D3S with the most recent segmentation tracker SiamMask by computing the average IoU between the ground truth and predicted segmentation masks during periods of successful tracks (i.e., segmentation accuracy). D3S achieves a 0.66 average IoU, while SiamMask IoU is 0.63. A nearly $5\%$ improvement speaks of a considerable accuracy of the D3S segmentation mask prediction. + +
D3SSPMSiamMaskATOMASRCFSiamRPNCSRDCFCCOTTCNN
EAO ↑① 0.493② 0.434③ 0.4330.4300.3910.3440.3380.3310.325
Acc. ↑① 0.66③ 0.62② 0.640.610.560.560.510.540.55
Rob. ↓① 0.1310.2100.214② 0.180③ 0.1870.3020.2380.2380.268
+ +Table 1. VOT2016 - comparison with state-of-the-art trackers. + +
D3SSiamRPN++ATOMLADCFDaSiamRPNSiamMaskSPMASRCF
EAO ↑① 0.489② 0.414③ 0.4010.3890.3830.3800.3380.328
Acc. ↑① 0.64③ 0.600.590.510.59② 0.610.580.49
Rob. ↓① 0.1500.234③ 0.204② 0.1590.2760.2760.3000.234
+ +Table 2. VOT2018 - comparison with state-of-the-art trackers. + +
D3SATOMSiamMaskSiamFCv2SiamFCGOTURNCCOTMDNet
AO ↑① 59.7② 55.6③ 51.437.434.834.232.529.9
SR0.75 ↑① 46.2② 40.2③ 36.614.49.812.410.79.9
SR0.5 ↑① 67.6② 63.5③ 58.740.435.337.532.830.3
+ +Table 3. GOT-10k test set - comparison with state-of-the-art trackers . + +
D3SSiamRPN++SiamMaskATOMMDNetCFNetSiamFCECO
AUC ↑② 72.8① 73.3③ 72.570.360.657.857.155.4
Prec. ↑② 66.4① 69.4② 66.4③ 64.856.553.353.349.2
Prec.N ↑76.8① 80.0② 77.8③ 77.170.565.466.361.8
+ +Table 4. TrackingNet test set - comparison with state-of-the-art trackers. + +On the VOT2018 dataset, D3S is compared with the following sota trackers: the top VOT2018 performer LADCF [52] and the most recent sota trackers DaSi- amRPN [54], SiamRPN++ [27], ATOM [10], SPM [49], ASRCF [9] and SiamMask [50]. Results are reported in Table 2. Again, D3S outperforms all sota trackers in all measures. The top sota trackers in EAO, accuracy and robustness are SiamRPN++, SiamMask and LADCF, respectively. D3S outperforms the SiamRPN++ in EAO by $18\%$ SiamMask in accuracy by over $5 \%$ and LADCF by over $6 \%$ in robustness. Note that SiamMask is a segmentation tracker, which explains the top accuracy among sota. D3S outperforms this tracker by over $45\%$ in robustness, which is attributed to the discriminative formulation within the single-pass segmentation mask computation. + +GOT-10k is a recent large-scale high-diversity dataset consisting of 10k video sequences with targets annotated by axis-aligned bounding boxes. The trackers are evaluated on 180 test sequences with 84 different object classes and 32 motion patterns, while the rest of the sequences form a training set. A tracker is initialized on the first frame and let to track to the end of the sequence. Trackers are ranked according to the average overlap, but success rates $(\mathrm{SR}_{0.5}$ and $\mathrm{SR}_{0.75})$ are reported at two overlap thresholds + +0.5 and 0.75, respectively, for detailed analysis $^2$ . The following top-performing sota trackers are used in comparison [19]: SiamFCv2 [46], SiamFC [2], GOTURN [16], CCOT [13], MDNet [37] and the most-recent ATOM [10] and SiamMask [50]. We emphasize that D3S is not finetuned on the training set, while some of the top-performing sota trackers we use in comparison do utilize the GOT-10k training set. Results on GOT-10k are reported in Table 3. D3S outperforms all top-performing sota by a large margin in all performance measures, and achieves approximately $60\%$ boost in average overlap compared to the SiamFCv2, which is a top-performer on [19] benchmark. It also outperforms the most recent ATOM and SiamMask trackers by over $7\%$ and over $15\%$ in average overlap, respectively. This demonstrates considerable generalization ability over a diverse set of target types. + +TrackingNet is another large-scale dataset for training and testing trackers. The training set consists of over 30k video sequences, while the testing set contains 511 sequences. A tracker is initialized on the first frame and let to track to the end of the sequence. Trackers are ranked according to the area under the success rate curve (AUC), precision (Prec.) and normalized precision $(\mathrm{Prec}_{-N})$ . The + +reader is referred to [35] for further details about the performance measures. The performance of D3S is compared with the top-performing sota trackers according to [35]: ECO [11], SiamFC [2], CFNet [46], MDNet [37] and most recent sota trackers ATOM [10], SiamMask [50] and SiamRPN++ [27]. D3S significantly outperforms the sota reported in [35] and is on par with SiamRPN++, SiamMask and ATOM. Note that D3S is trained only on 3471 sequences from YouTube-VOS [51], while both, ATOM and SiamRPN++ are finetuned on much larger datasets (31k, and over 380k sequences, respectively), which include the TrackingNet training set. This further supports a considerable generalization capability of D3S, which is primarily trained for segmentation, not tracking. + +# 5.3. Ablation Study + +An ablation study was performed on VOT2018 using the reset-based protocol [26] to expose the contributions of different components of the D3S architecture. The following variations of D3S were created: (i) D3S without the GIM foreground similarity channel $\mathbf{F}$ $(\mathrm{D}3\mathrm{S}^{\bar{F}})$ ; (ii) D3S without the GIM target posterior channel $\mathbf{P}$ $(\mathrm{D}3\mathrm{S}^{\bar{\mathrm{P}}})$ ; (iii) D3S with only the GEM output channel and without GIM channels $\mathbf{F}$ and $\mathbf{P}$ $(\mathrm{D}3\mathrm{S}^{\bar{\mathrm{F}}\bar{\mathrm{P}}})$ ; (iv) D3S without the GEM output channel $\mathbf{L}$ $(\mathrm{D}3\mathrm{S}^{\bar{L}})$ ; (v) D3S in which the DCF is not updated from the position estimated by D3S, but rather from the position estimated by the DCF in GEM $(\mathrm{D}3\mathrm{S}^{\bar{U}})$ . Two additional D3S versions with different bounding box fitting methods were included: a minimal area rotated bounding box that contains all foreground pixels $(\mathrm{D}3\mathrm{S}^{\mathrm{MA}})$ and a min-max axis-aligned bounding box $(\mathrm{D}3\mathrm{S}^{\mathrm{MM}})$ . All variations were re-trained on the same dataset as the original D3S. + +Results of the ablation study are presented in Table 5. Removal of the foreground similarity channel from GIM $(\mathrm{D3S}^{\bar{\mathrm{F}}})$ causes a $4.5\%$ performance drop, while removal of the target posterior channel $(\mathrm{D3S}^{\bar{\mathrm{P}}})$ reduces the performance by $13.5\%$ . The accuracy of both variants is comparable to the original D3S, while the number of failures increases. In conclusion, each, foreground similarity and posterior channel individually contribute to robust target localization. + +Removal of the entire GIM module i.e., $\mathbf{F}$ and $\mathbf{P}$ $(\mathrm{D3S}^{\overline{\mathrm{FP}}})$ reduces the overall tracking performance by $27\%$ . The accuracy drops by $14\%$ , while the number of failures increases by $56\%$ . This speaks of crucial importance of the GIM module for accurate segmentation as well as tracking robustness. + +Removal of the GEM module $(\mathrm{D3S}^{\bar{\mathrm{L}}})$ reduces the tracking performance by nearly $50\%$ . This is primarily due to significant reduction of the robustness - the number of failures increases by over $270\%$ . Thus the GEM module is crucial for robust target selection in the segmentation process. + +Finally, updating the DCF in GEM module by its own + +estimated position rather than the position estimated by the final segmentation $(\mathrm{D3S}^{\bar{\mathbf{U}}})$ reduces the overall performance by $7.5\%$ , primarily at a cost of significant increase in the number of failures (over $15\%$ ). Thus, accurate target position estimation from D3S crucially affects the learning of the DCF in GEM and consequently the overall tracking performance. + +Replacing the proposed bounding box fitting method (Section 4.1) with the minimal area rotated bounding box $(\mathrm{D3S^{MA}})$ results in a $9\%$ reduction in EAO and a $6\%$ reduction in accuracy. This is still a state-of-the-art result, which means that the D3S performance boost can be primarily attributed to the segmentation mask quality. The min-max bounding box fitting method $(\mathrm{D3S^{MM}})$ leads to a $19\%$ EAO and $14\%$ accuracy reduction. Thus D3S does benefit from the rotated bounding box estimation. + +# 5.4. Evaluation on Segmentation Datasets + +Segmentation capabilities of D3S were analyzed on two popular video object segmentation benchmarks DAVIS16 [38] and DAVIS17 [40]. Under the DAVIS protocol, the segmentation algorithm is initialized on the first frame by a segmentation mask. The algorithm is then required to output the segmentation mask for all the remaining frames in the video. Performance is evaluated by two measures averaged over the sequences: mean Jaccard index $(\mathcal{I}_{\mathcal{M}})$ and mean F-measure $(\mathcal{F}_{\mathcal{M}})$ . Jaccard index represents a per-pixel intersection over union between the ground-truth and the predicted segmentation mask. The F-measure is a harmonic mean of precision and recall calculated between the contours extracted from the ground-truth and the predicted segmentation masks. For further details on these performance measures, the reader is referred to [38, 34]. + +D3S is compared to several sola video object segmentation methods specialized to the DAVIS challenge setup: OSVOS [5], OnAVOS [48], OSMN [53], FAVOS [7], VM [18] and PML [6]. In addition, we include the most recent segmentation-based tracker SiamMask [50], which is the only published method that performs well on both, short-term tracking as well as on video object segmentation benchmarks. + +Results are shown in Table 6. D3S performs on par with most of the video object segmentation top performers on DAVIS. Compared to top performer on DAVIS2016, the performance of D3S is $12\%$ and $14\%$ lower in the average Jaccard index and the F-measure, respectively. On DAVIS2017 this difference is even smaller - a $6\%$ drop in Jaccard index and $8\%$ drop in F-measure compared to the top-performer OnAVOS. This is quite remarkable, considering that D3S is 200 times faster. Furthermore, D3S delivers a comparable segmentation accuracy as pure segmentation methods ASMN and PML, while being orders of magnitude faster and achieving a near-realtime video object segmenta + +
D3SFUPFPLMAMM
EAO0.4890.4670.4520.4230.3570.2510.4440.398
Acc.0.640.650.630.600.550.600.600.55
Rob.0.1500.1870.1730.2110.2340.5670.1600.173
+ +Table 5. VOT2018 - ablation study. Removing: the GIM foreground similarity channel (F), the GIM foreground probability channel (P), both GIM channels (F P) and the GEM channel (L). The DCF in GEM is updated from its own position estimation rather than position estimated by D3S (U). D3S with a minimal area rotated bounding box (MA) and a min-max axis-aligned bounding box (MM). + +
J_M^{16}F_M^{16}J_M^{17}F_M^{17}FPS
D3S75.472.657.863.825.0
SiamMask [50]71.767.854.358.555.0
OnAVOS [48]86.184.961.669.10.1
FAVOS [7]82.479.554.661.80.8
VM [18]81.0-56.6-3.1
OSVOS [5]79.880.656.663.90.1
PML [6]75.579.3--3.6
OSMN [53]74.072.952.557.18.0
+ +Table 6. State-of-the-art comparison on the DAVIS16 and DAVIS17 segmentation datasets. Average Jaccard index and F-measure are denoted as $\mathcal{J}_{\mathcal{M}}^{16}$ and $\mathcal{F}_{\mathcal{M}}^{16}$ on DAVIS16 dataset and $\mathcal{J}_{\mathcal{M}}^{17}$ and $\mathcal{F}_{\mathcal{M}}^{17}$ on DAVIS17 dataset, respectively. + +tion, which is particularly important for many video editing applications. + +D3S also outperforms the only tracking and segmentation method SiamMask with respect to all measures. On average the segmentation is improved by over $5\%$ in the Jaccard index and the contour accuracy-based F-measure. See Figure 6 for further qualitative comparison of D3S and SiamMask on challenging targets. + +# 6. Conclusion + +A deep single-shot discriminative segmentation tracker – D3S – was introduced. The tracker leverages two models from the extremes of the spectrum: a geometrically invariant model and a geometrically restricted Euclidean model. The two models localize the target in parallel pathways and complement each other to achieve high segmentation accuracy of deformable targets and robust discrimination of the target from distractors. The end-to-end trainable network architecture is the first single-shot pipeline with online adaptation that tightly connects discriminative tracking with accurate segmentation. + +D3S outperforms state-of-the-art trackers on the VOT2016, VOT2018 and GOT-10k benchmarks and performs on par with top trackers on TrackingNet, regardless of the fact that some of the tested trackers were re-trained for specific datasets. In contrast, D3S was trained once on Youtube-VOS (for segmentation only) and the same version was used in all benchmarks. Tests on DAVIS16 and DAVIS17 segmentation benchmarks show performance close to top segmentation methods while running up to + +![](images/804b6775e2870da3b4da9c2ad78678185bdf61ec4e390eccd6436f465b56ed2c.jpg) +Figure 6. D3S vs. SiamMask segmentation quality. Bolt2: SiamMask drifts to a similar object, D3S leverages the discriminative learning in GEM to robustly track the selected target. Hand: the rigid template in SiamMask fails on a deforming target, the GIM model in D3S successfully tracks despite a significant deformation. Paragliding: clutter causes drift and failure of SiamMask while in D3S, the combination of the GIM and GEM models leads to accurate and robust segmentation. + +$200 \times$ faster, close to real-time. D3S significantly outperforms recent top segmentation tracker SiamMask on all benchmarks in all metrics and contributes towards narrowing the gap between two, currently separate, domains of short-term tracking and video object segmentation, thus blurring the boundary between the two. + +Acknowledgements. This work was supported by Slovenian research agency program P2-0214 and projects J2-8175 and J2-9433. A. Lukežić was financed by the Young researcher program of the ARRS. J. Matas was supported by the Czech Science Foundation grant GA18-05360S. + +# References + +[1] Luca Bertinetto, Jack Valmadre, Stuart Golodetz, Ondrej Miksik, and Philip H. S. Torr. Staple: Complementary learners for real-time tracking. In Comp. Vis. Patt. Recognition, pages 1401-1409, June 2016. 2 +[2] Luca Bertinetto, Jack Valmadre, João F Henriques, Andrea Vedaldi, and Philip HS Torr. Fully-convolutional siamese networks for object tracking. In ECCV VOT Workshop, 2016. 1, 2, 6, 7 +[3] Goutam Bhat, Joakim Johnander, Martin Danelljan, Fahad Shahbaz Khan, and Michael Felsberg. Unveiling the power of deep tracking. In Proc. European Conf. Computer Vision, pages 493-509, 2018. 1 +[4] David S Bolme, J Ross Beveridge, Bruce A Draper, and Yui Man Lui. Visual object tracking using adaptive correlation filters. In Comp. Vis. Patt. Recognition, pages 2544-2550, 2010. 2 +[5] Sergi Caelles, Kevis-Kokitsi Maninis, Jordi Pont-Tuset, Laura Leal-Taixe, Daniel Cremers, and Luc Van Gool. One-shot video object segmentation. In Comp. Vis. Patt. Recognition, 2017. 2, 7, 8 +[6] Yuhua Chen, Jordi Pont-Tuset, Alberto Montes, and Luc Van Gool. Blazingly fast video object segmentation with pixelwise metric learning. In Comp. Vis. Patt. Recognition, 2018. 2, 7, 8 +[7] Jingchun Cheng, Yi-Hsuan Tsai, Wei-Chih Hung, Shengjin Wang, and Ming-Hsuan Yang. Fast and accurate online video object segmentation via tracking parts. In Comp. Vis. Patt. Recognition, 2018. 2, 7, 8 +[8] D. Comaniciu, V. Ramesh, and P. Meer. Kernel-based object tracking. IEEE Trans. Pattern Anal. Mach. Intell., 25(5):564-577, May 2003. 2 +[9] Kenan Dai, Dong Wang, Huchuan Lu, Chong Sun, and Jianhua Li. Visual tracking via adaptive spatially-regularized correlation filters. In Comp. Vis. Patt. Recognition, 2019, 5, 6 +[10] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. ATOM: Accurate tracking by overlap maximization. In Comp. Vis. Patt. Recognition, June 2019, 1, 2, 3, 5, 6, 7 +[11] Martin Danelljan, Goutam Bhat, Fahad Shahbaz Khan, and Michael Felsberg. ECO: Efficient convolution operators for tracking. In Comp. Vis. Patt. Recognition, pages 6638-6646, 2017. 1, 2, 7 +[12] Martin Danelljan, Fahad Shahbaz Khan, Michael Felsberg, and Joost van de Weijer. Adaptive color attributes for real-time visual tracking. In Comp. Vis. Patt. Recognition, pages 1090-1097, 2014. 2 +[13] Martin Danelljan, Andreas Robinson, Fahad Shahbaz Khan, and Michael Felsberg. Beyond correlation filters: learning continuous convolution operators for visual tracking. In Proc. European Conf. Computer Vision, pages 472-488, 2016. 3, 5, 6 +[14] Andrew Fitzgibbon and Robert B. Fisher. A buyer's guide to conic fitting. In Proc. British Machine Vision Conference, pages 513-522, 1995. 4 + +[15] Anfeng He, Chong Luo, Xinmei Tian, and Wenjun Zeng. A twofold siamese network for real-time object tracking. In Comp. Vis. Patt. Recognition, 2018. 2 +[16] David Held, Sebastian Thrun, and Silvio Savarese. Learning to track at 100 fps with deep regression networks. In Proc. European Conf. Computer Vision, pages 749-765, 2016. 6 +[17] J. F. Henriques, R. Caseiro, P. Martins, and J. Batista. High-speed tracking with kernelized correlation filters. IEEE Trans. Pattern Anal. Mach. Intell., 37(3):583-596, 2015. 2 +[18] Yuan-Ting Hu, Jia-Bin Huang, and Alexander G. Schwing. VideoMatch: Matching based Video Object Segmentation. In Proc. European Conf. Computer Vision, 2018. 2, 3, 7, 8 +[19] Lianghua Huang, Xin Zhao, and Kaiqi Huang. GOT-10k: A large high-diversity benchmark for generic object tracking in the wild. IEEE Trans. Pattern Anal. Mach. Intell., 2019. 2, 5, 6 +[20] Ugur Kart, Alan Lukezic, Matej Kristan, Joni-Kristian Kamarainen, and Jiri Matas. Object tracking by reconstruction with view-specific discriminative correlation filters. In Comp. Vis. Patt. Recognition, 2019. 2 +[21] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015. 5 +[22] Matej Kristan, Ales Leonardis, Jiri Matas, Michael Felsberg, Roman Pflugfelder, Luka Cehovin Zajc, Tomas Vojir, Gustav Hager, Alan Lukezic, Abdelrahman Eldisokey, and Gustavo Fernandez. The visual object tracking VOT2017 challenge results. In The IEEE International Conference on Computer Vision (ICCV), 2017. 1 +[23] Matej Kristan, Aleš Leonardis, Jiri Matas, Michael Felsberg, Roman Pflugfelder, Luka Čehovin, Tomas Vojir, Gustav Hager, Alan Lukežić, and Gustavo et al. Fernandez. The visual object tracking VOT2016 challenge results. In Proc. European Conf. Computer Vision, 2016. 2, 5 +[24] Matej Kristan, Aleš Leonardis, Jiří Matas, Michael Felsberg, Roman Pflugfelder, Luka Čehovin Zajc, Tomáš Vojír, Goutam Bhat, Alan Lukežić, Abdelrahman Eldesokey, Gustavo Fernández, and et al. The sixth visual object tracking VOT2018 challenge results. In Computer Vision - ECCV 2018 Workshops, pages 3-53, 2018. 1, 2, 5 +[25] Matej Kristan, Jiri Matas, Ales Leonardis, Michael Felsberg, Luka Čehovin, Gustavo Fernandez, Tomas Vojir, Gustav Hager, Georg Nebehay, and Roman et al. Pflugfelder. The visual object tracking VOT2015 challenge results. In Int. Conf. Computer Vision, 2015. 5 +[26] M. Kristan, J. Matas, A. Leonardis, T. Vojir, R. Pflugfelder, G. Fernandez, G. Nebehay, F. Porikli, and L. Cehovin. A novel performance evaluation methodology for single-target trackers. IEEE Trans. Pattern Anal. Mach. Intell., 2016. 5, 7 +[27] Bo Li, Wei Wu, Qiang Wang, Fangyi Zhang, Junliang Xing, and Junjie Yan. SiamRPN++: Evolution of siamese visual tracking with very deep networks. In Comp. Vis. Patt. Recognition, 2019. 1, 2, 6, 7 +[28] Bo Li, Junjie Yan, Wei Wu, Zheng Zhu, and Xiaolin Hu. High performance visual tracking with siamese region proposal network. In Comp. Vis. Patt. Recognition, 2018. 1, 2, 5 + +[29] Peixia Li, Boyu Chen, Wanli Ouyang, Dong Wang, Xiaoyun Yang, and Hutchuan Lu. GradNet: Gradient-guided network for visual object tracking. In Int. Conf. Computer Vision, 2019. 2 +[30] Yang Li and Jianke Zhu. A scale adaptive kernel correlation filter tracker with feature integration. In Proc. European Conf. Computer Vision, pages 254-265, 2014. 2 +[31] A. Lukežić, L. Č. Zajc, and M. Kristan. Deformable parts correlation filters for robust visual tracking. IEEE Trans. on Cyber., 48(6):1849-1861, 2017. 1, 2 +[32] Alan Lukezic, Luka Cehovin Zajc, Tomas Vojir, Jiri Matas, and Matej Kristan. FuCoLoT - a fully-correlational long-term tracker. In ACCV, 2018. 2 +[33] Alan Lukežić, Tomáš Vojíř, Luka Čehovin Zajc, Jiří Matas, and Matej Kristan. Discriminative correlation filter with channel and spatial reliability. In Comp. Vis. Patt. Recognition, pages 6309-6318, 2017. 1, 2, 3, 5 +[34] D. R. Martin, C. C. Fowlkes, and J. Malik. Learning to detect natural image boundaries using local brightness, color, and texture cues. IEEE Trans. Pattern Anal. Mach. Intell., 26(5):530-549, 2004. 7 +[35] Matthias Muller, Adel Bibi, Silvio Giancola, Salman Alsubaihi, and Bernard Ghanem. TrackingNet: A large-scale dataset and benchmark for object tracking in the wild. In Proc. European Conf. Computer Vision, September 2018. 2, 5, 7 +[36] Hyeonseob Nam, Mooyeol Baek, and Bohyung Han. Modeling and propagating CNNs in a tree structure for visual tracking. arXiv preprint arXiv:1608.07242, 2016. 5 +[37] Hyeonseob Nam and Bohyung Han. Learning multi-domain convolutional neural networks for visual tracking. In Comp. Vis. Patt. Recognition, pages 4293-4302, June 2016. 6, 7 +[38] 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 Comp. Vis. Patt. Recognition, 2016. 1, 2, 7 +[39] Pedro O. Pinheiro, Tsung-Yi Lin, Ronan Collobert, and Piotr Dóllár. Learning to refine object segments. In Proc. European Conf. Computer Vision, pages 75–91, 2016. 4 +[40] Jordi Pont-Tuset, Federico Perazzi, Sergi Caelles, Pablo Arbeláez, Alexander Sorkine-Hornung, and Luc Van Gool. The 2017 DAVIS challenge on video object segmentation. arXiv:1704.00675, 2017. 1, 2, 7 +[41] Horst Possegger, Thomas Mauthner, and Horst Bischof. In defense of color-based model-free tracking. In Comp. Vis. Patt. Recognition, June 2015. 2 +[42] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-Net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention - MICCAI 2015, pages 234-241, 2015. 4 +[43] Carsten Rother, Vladimir Kolmogorov, and Andrew Blake. Grabcut-interactive foreground extraction using iterated graph cuts. ACM Transactions on Graphics (SIGGRAPH), August 2004. 5 +[44] Ran Tao, Efstratios Gavves, and Arnold W M Smeulders. Siamese instance search for tracking. In Comp. Vis. Patt. Recognition, pages 1420-1429, 2016. 2 + +[45] Ludovic Trottier, Philippe Gigu, Brahim Chaib-draa, et al. Parametric exponential linear unit for deep convolutional neural networks. In 2017 16th IEEE International Conference on Machine Learning and Applications (ICMLA), pages 207-214, 2017. 3 +[46] Jack Valmadre, Luca Bertinetto, Joao Henriques, Andrea Vedaldi, and Philip H. S. Torr. End-to-end representation learning for correlation filter based tracking. In Comp. Vis. Patt. Recognition, pages 2805-2813, 2017. 2, 6, 7 +[47] Paul Voigtlaender, Yuning Chai, Florian Schroff, Hartwig Adam, Bastian Leibe, and Liang-Chieh Chen. FEELVOS: Fast end-to-end embedding learning for video object segmentation. In Comp. Vis. Patt. Recognition, 2019. 2 +[48] Paul Voigtlaender and Bastian Leibe. Online adaptation of convolutional neural networks for video object segmentation. In Proc. British Machine Vision Conference, 2017. 2, 7, 8 +[49] Guangting Wang, Chong Luo, Zhiwei Xiong, and Wenjun Zeng. SPM-Tracker: Series-parallel matching for real-time visual object tracking. In Comp. Vis. Patt. Recognition, 2019, 5, 6 +[50] Qiang Wang, Li Zhang, Luca Bertinetto, Weiming Hu, and Philip H.S. Torr. Fast online object tracking and segmentation: A unifying approach. In Comp. Vis. Patt. Recognition, June 2019. 2, 5, 6, 7, 8 +[51] Ning Xu, Linjie Yang, Yuchen Fan, Dingcheng Yue, Yuchen Liang, Jianchao Yang, and Thomas Huang. YouTube-VOS: A large-scale video object segmentation benchmark. arXiv:1809.03327, 2018. 1, 2, 5, 7 +[52] T. Xu, Z. Feng, X. Wu, and J. Kittler. Learning adaptive discriminative correlation filters via temporal consistency preserving spatial feature selection for robust visual object tracking. IEEE Trans. Image Proc., 28(11):5596-5609, 2019. 6 +[53] Linjie Yang, Yanran Wang, Xuehan Xiong, Jianchao Yang, and Aggelos K. Katsaggelos. Efficient video object segmentation via network modulation. In Comp. Vis. Patt. Recognition, 2018. 2, 7, 8 +[54] Zheng Zhu, Qiang Wang, Bo Li, Wei Wu, Junjie Yan, and Weiming Hu. Distractor-aware siamese networks for visual object tracking. In Proc. European Conf. Computer Vision, pages 103-119, 2018. 1, 6 \ No newline at end of file diff --git a/d3sadiscriminativesingleshotsegmentationtracker/images.zip b/d3sadiscriminativesingleshotsegmentationtracker/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..2482e3a6dcfb744e62996827742e7d8f326b44c9 --- /dev/null +++ b/d3sadiscriminativesingleshotsegmentationtracker/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:773bc689a8e99ee6e122290c06cf3a2555ff3eafc550d834016471a2abf37e02 +size 497801 diff --git a/d3sadiscriminativesingleshotsegmentationtracker/layout.json b/d3sadiscriminativesingleshotsegmentationtracker/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c9f29a3ef6be15e46b875f5b8eaf34195a1820a9 --- /dev/null +++ b/d3sadiscriminativesingleshotsegmentationtracker/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9f9fe86f9db33016222b3ce7b5bb1c9c84903abcd68748910b751373169cf51 +size 379488 diff --git a/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/0d4647e6-4b8e-4c66-98e2-c09fdf908ba8_content_list.json b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/0d4647e6-4b8e-4c66-98e2-c09fdf908ba8_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2743189a10d69be1052ae7325c29a52ad02711eb --- /dev/null +++ b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/0d4647e6-4b8e-4c66-98e2-c09fdf908ba8_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb38f01381a05a1250d1fc2ce8716455f2c4875a1843e360ee372483c68d005e +size 94522 diff --git a/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/0d4647e6-4b8e-4c66-98e2-c09fdf908ba8_model.json b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/0d4647e6-4b8e-4c66-98e2-c09fdf908ba8_model.json new file mode 100644 index 0000000000000000000000000000000000000000..9c5fef10ab79e0e20ec65a970ed4337e5fe22972 --- /dev/null +++ b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/0d4647e6-4b8e-4c66-98e2-c09fdf908ba8_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5ee68436dd070e798e2af04abb4acc553573c7ca8a07ef3694e023ddc5c1d4e +size 119091 diff --git a/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/0d4647e6-4b8e-4c66-98e2-c09fdf908ba8_origin.pdf b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/0d4647e6-4b8e-4c66-98e2-c09fdf908ba8_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..66fa091a3cd88d11af2eccab74bea902d340d448 --- /dev/null +++ b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/0d4647e6-4b8e-4c66-98e2-c09fdf908ba8_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d73e345f1333e5330be883e093fb70db5c74c059127ff277203aea8f61cc3bf1 +size 1989091 diff --git a/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/full.md b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/full.md new file mode 100644 index 0000000000000000000000000000000000000000..f0ec1eaf84e8d1677ac4612239c84f1c88b625da --- /dev/null +++ b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/full.md @@ -0,0 +1,386 @@ +# D3VO: Deep Depth, Deep Pose and Deep Uncertainty for Monocular Visual Odometry + +Nan Yang $^{1,2}$ Lukas von Stumberg $^{1,2}$ Rui Wang $^{1,2}$ Daniel Cremers $^{1,2}$ $^{1}$ Technical University of Munich $^{2}$ Artisense + +# Abstract + +We propose D3VO as a novel framework for monocular visual odometry that exploits deep networks on three levels - deep depth, pose and uncertainty estimation. We first propose a novel self-supervised monocular depth estimation network trained on stereo videos without any external supervision. In particular, it aligns the training image pairs into similar lighting condition with predictive brightness transformation parameters. Besides, we model the photometric uncertainties of pixels on the input images, which improves the depth estimation accuracy and provides a learned weighting function for the photometric residuals in direct (feature-less) visual odometry. Evaluation results show that the proposed network outperforms state-of-the-art self-supervised depth estimation networks. D3VO tightly incorporates the predicted depth, pose and uncertainty into a direct visual odometry method to boost both the front-end tracking as well as the back-end non-linear optimization. We evaluate D3VO in terms of monocular visual odometry on both the KITTI odometry benchmark and the EuRoC MAV dataset. The results show that D3VO outperforms state-of-the-art traditional monocular VO methods by a large margin. It also achieves comparable results to state-of-the-art stereo/LiDAR odometry on KITTI and to the state-of-the-art visual-inertial odometry on EuRoC MAV, while using only a single camera. + +# 1. Introduction + +Deep learning has swept most areas of computer vision – not only high-level tasks like object classification, detection and segmentation [30, 39, 58], but also low-level ones such as optical flow estimation [12, 65] and interest point detection and description [11, 13, 79]. Yet, in the field of Simultaneously Localization And Mapping (SLAM) or Visual Odometry (VO) which estimates the relative camera poses from image sequences, traditional geometric-based approaches [16, 17, 53] still dominate the field. While monocular methods [16,52] have the advantage of low hardware cost and less calibration effort, they cannot achieve + +![](images/6dec402cd8b27189487cc589082387387483729d1224ac2f816d5875cc45d73c.jpg) + +![](images/227eede4971014c19d1fdf5b40d9c577e73b5cfdb6430f718c03459763f6c0fd.jpg) +Figure 1: We propose D3VO - a novel monocular visual odometry (VO) framework which exploits deep neural networks on three levels: Deep depth $(D)$ , Deep pose $(T_{t}^{t-1})$ and Deep uncertainty $(\Sigma)$ estimation. D3VO integrates the three estimations tightly into both the front-end tracking and the back-end non-linear optimization of a sparse direct odometry framework [16]. + +competitive performance compared to stereo [53, 74] or visual-inertial odometry (VIO) [44, 54, 56, 72], due to the scale drift [62, 77] and low robustness. Recently, there have been many efforts to address this by leveraging deep neural networks [48, 68, 80, 83]. It has been shown that with deep monocular depth estimation networks [26, 27, 43, 78], the performance of monocular VO is boosted, since deep networks are able to estimate depth maps with consistent metric scale by learning a-priori knowledge from a large amount of data [42]. + +In this way, however, deep neural networks are only used to a limited degree. Recent advances of self- and unsupervised monocular depth estimation networks [26, 86] show that the poses of the adjacent monocular frames can be predicted together with the depth. Since the pose estimation from deep neural networks shows high robustness, one question arises: Can the deep-predicted poses be employed to boost traditional VO? On the other hand, since + +SLAM/VO is essentially a state estimation problem where uncertainty plays an important role [19, 63, 69] and meanwhile many learning based methods have started estimating uncertainties, the next question is, how can we incorporate such uncertainty-predictions into optimization-based VO? + +In this paper, we propose D3VO as a framework for monocular direct (feature-less) visual VO that exploits self-supervised monocular depth estimation network on three levels: deep depth, pose and uncertainty estimation, as shown in Fig. 1. To this end, we first propose a purely self-supervised network trained with stereo videos. The proposed self-supervised network predicts the depth from a single image with DepthNet and the pose between two adjacent frames with PoseNet. The two networks are bridged by minimizing the photometric error originated from both static stereo warping with the rectified baseline and temporal warping using the predicted pose. In this way, the temporal information is incorporated into the training of depth, which leads to more accurate estimation. To deal with the inconsistent illumination between the training image pairs, our network predicts the brightness transformation parameters which align the brightness of source and target images during training on the fly. The evaluation on the EuRoC MAV dataset shows that the proposed brightness transformation significantly improves the depth estimation accuracy. To integrate the deep depth into VO system, we firstly initialize every new 3D point with the predicted depth with a metric scale. Then we adopt the virtual stereo term proposed in Deep Virtual Stereo Odometry (DVSO) [78] to incorporate the predicted pose into the non-linear optimization. Unlike DVSO which uses a semi-supervised monocular depth estimation network relying on auxiliary depth extracted from state-of-the-art stereo VO system [74], our network uses only stereo videos without any external depth supervision. + +Although the illumination change is explicitly modeled, it is not the only factor which may violate the brightness constancy assumption [40]. Other factors, e.g., non-Lambertian surfaces, high-frequency areas and moving objects, also corrupt it. Inspired by the recent research on aleatoric uncertainty by deep neural networks [35, 40], the proposed network estimates the photometric uncertainty as predictive variance conditioned on the input image. As a result, the errors originated from pixels which are likely to violate the brightness constancy assumption are downweighted. The learned weights of the photometric residuals also drive us to the idea of incorporating it into direct VO - since both the self-supervised training scheme and the direct VO share a similar photometric objective, we propose to use the learned weights to replace the weighting function of the photometric residual in traditional direct VO which is empirically set [61] or only accounts for the intrinsic uncertainty of the specific algorithm itself [16, 37]. + +Robustness is one of the most important factors in designing VO algorithm. However, traditional monocular visual VO suffers from a lack of robustness when confronted with low textured areas or fast movement [72]. The typical solution is to introduce an inertial measurement unit (IMU). But this increases the calibration effort and, more importantly, at constant velocity, IMUs cannot deliver the metric scale in constant velocity [50]. We propose to increase the robustness of monocular VO by incorporating the estimated pose from the deep network into both the front-end tracking and the back-end non-linear optimization. For the front-end tracking, we replace the pose from the constant velocity motion model with the estimated pose from the network. Besides, the estimated pose is also used as a squared regularizer in addition to direct image alignment [66]. For the back-end non-linear optimization, we propose a pose energy term which is jointly minimized with the photometric energy term of direct VO. + +We evaluate the proposed monocular depth estimation network and D3VO on both KITTI [25] and EuRoCMAV [5]. We achieve state-of-the-art performances on both monocular depth estimation and camera tracking. In particular, by incorporating deep depth, deep uncertainty and deep pose, D3VO achieves comparable results to state-of-the-art stereo/LiDAR methods on KITTI Odometry, and also comparable results to the state-of-the-art VIO methods on EuRoCMAV, while being a monocular method. + +# 2. Related Work + +Deep learning for monocular depth estimation. Supervised learning [15, 43, 45] shows great performance on monocular depth estimation. Eigen et al. [14, 15] propose to use multi-scale CNNs which directly regresses the pixel-wise depth map from a single input image. Laina et al. [43] propose a robust loss function to improve the estimation accuracy. Fu et al. [24] recast the monocular depth estimation network as an ordinal regression problem and achieve superior performance. More recent works start to tackle the problem in a self- and unsupervised way by learning the depth map using the photometric error [27, 28, 49, 73, 81, 82, 86] and adopting differentiable interpolation [32]. Our self-supervised depth estimation network builds upon MonoDepth2 [26] and extends it by predicting the brightness transformation parameters and the photometric uncertainty. + +Deep learning for uncertainty estimation. The uncertainty estimation of deep learning has recently been investigated in [35, 36] where two types of uncertainties are proposed. Klotdt et al. [40] propose to leverage the concept of aleatoric uncertainty to estimate the photometric and the depth uncertainties in order to improve the depth estimation accuracy. However, when formulating the photometric uncertainty, they do not consider brightness changes + +across different images which in fact can be modeled explicitly. Our method predicts the photometric uncertainty conditioned on the brightness-aligned image, which can deliver better photometric uncertainty estimation. Besides, we also seek to make better use of our learned uncertainties and propose to incorporate them into traditional VO systems [16]. + +Deep learning for VO / SLAM. End-to-end learned deep neural networks have been explored to directly predict the relative poses between images with supervised [70, 75, 85] or unsupervised learning [46, 73, 82, 86]. Besides pose estimation, CodeSLAM [2] delivers dense reconstruction by jointly optimizing the learned prior of the dense geometry together with camera poses. However, in terms of pose estimation accuracy all these end-to-end methods are inferior to classical stereo or visual inertial based VO methods. Building on the success of deep monocular depth estimation, several works integrate the predicted depth/disparity map into monocular VO systems [68, 78] to improve performance and eliminate the scale drift. CNN-SLAM [68] fuses the depth predicted by a supervised deep neural network into LSD-SLAM [17] and the depth maps are refined with Bayesian filtering, achieving superior performance in indoor environments [29, 64]. Other works [10, 67] explore the application of deep neural networks on feature based methods, and [34] uses Generative Adversarial Networks (GANs) as an image enhancement method to improve the robustness of VO in low light. The most related work to ours is Deep Virtual Stereo Odometry (DVSO). DVSO proposes a virtual stereo term that incooperates the depth estimation from a semi-supervised network into a direct VO pipeline. In particular, DVSO outperforms other monocular VO systems by a large margin, and even achieves comparable performance to state-of-the-art stereo visual odometry systems [53, 74]. While DVSO merely leverages the depth, the proposed D3VO exploits the power of deep networks on multiple levels thereby incorporating more information into the direct VO pipeline. + +# 3. Method + +We first introduce a novel self-supervised neural network that predicts depth, pose and uncertainty. The network also estimates affine brightness transformation parameters to align the illumination of the training images in a self-supervised manner. The photometric uncertainty is predicted based on a distribution over the possible brightness values [35, 40] for each pixel. Thereafter we introduce D3VO as a direct visual odometry framework that incorporates the predicted properties into both the tracking front-end and the photometric bundle adjustment backend. + +# 3.1. Self-supervised Network + +The core concept of the proposed monocular depth estimation network is the self-supervised training scheme + +![](images/496bd35e1a71f7cab8dea5b085acb020a946a8b07aaf4349e3b8a109de94b820.jpg) +Figure 2: Examples of point clouds and trajectories delivered by D3VO on KITTI Odometry Seq. 00, EuRoC MH_05_difficult and V1_03_difficult. The insets on EuRoC show the scenarios with low illumination and motion blur which are among the main reasons causing failures of traditional purely vision-based VO systems. + +which simultaneously learns depth with DepthNet and motion with PoseNet using video sequences [26, 86]. The self-supervised training is realized by minimizing the minimum of the photometric re-projection errors between the temporal and static stereo images: + +$$ +L _ {s e l f} = \frac {1}{| V |} \sum_ {\mathbf {p} \in V} \min _ {t ^ {\prime}} r \left(I _ {t}, I _ {t ^ {\prime} \rightarrow t}\right). \tag {1} +$$ + +where $V$ is the set of all pixels on $I_{t}$ and $t^{\prime}$ is the index of all source frames. In our setting $I_{t}$ is the left image and $I_{t^{\prime}}$ contains its two adjacent temporal frames and its opposite (right) frame, i.e., $I_{t^{\prime}} \in \{I_{t-1}, I_{t+1}, I_{ts}\}$ . The per-pixel minimum loss is proposed in Monodepth2 [26] in order to handle the occlusion among different source frames. To simplify notation, we use $I$ instead of $I(\mathbf{p})$ in the remainder of this section. $I_{t^{\prime} \rightarrow t}$ is the synthesized $I_{t}$ by warping the temporal stereo images with the predicted depth $D_{t}$ , the camera pose $\mathbf{T}_{t}^{t^{\prime}}$ , the camera intrinsics $K$ , and the differentialiable bilinear sampler [32]. Note that for $I_{t^{s} \rightarrow t}$ , the transformation $\mathbf{T}_{t}^{t^{s}}$ is known and constant. DepthNet also predicts the depth map $D_{t^{s}}$ of the right image $I_{t^{s}}$ by feeding only the left image $I_{t}$ as proposed in [27]. The training of $D_{t^{s}}$ requires to synthesize $I_{t \rightarrow t^{s}}$ and compare with $I_{t^{s}}$ . For simplicity, we will in the following only detail the loss + +![](images/a6ea5d9e4aa69ca5c6ffb484dc75e85265d92c010732989b0831fe4b89dfe7fb.jpg) +Figure 3: Examples of affine brightness transformation on EuRoC MAV [5]. Originally the source image $(I_{t'})$ and the target image $(I_t)$ show different brightness. With the predicted parameters $a, b$ , the transformed target images $I^{a',b'}$ have similar brightness as the source images, which facilitates the self-supervised training based on the brightness constancy assumption. + +regarding the left image. + +The common practice [27] is to formulate the photometric error as + +$$ +r \left(I _ {a}, I _ {b}\right) = \frac {\alpha}{2} \left(1 - \operatorname {S S I M} \left(I _ {a}, I _ {b}\right)\right) + (1 - \alpha) \| I _ {a} - I _ {b} \| _ {1} \tag {2} +$$ + +based on the brightness constancy assumption. However, it can be violated due to illumination changes and autoexposure of the camera to which both L1 and SSIM [76] are not invariant. Therefore, we propose to explicitly model the camera exposure change with predictive brightness transformation parameters. + +Brightness transformation parameters. The change of the image intensity due to the adjustment of camera exposure can be modeled as an affine transformation with two parameters $a, b$ + +$$ +I ^ {a, b} = a I + b. \tag {3} +$$ + +Despite its simplicity, this formulation has been shown to be effective in direct VO/SLAM, e.g., [16, 18, 33, 74], which builds upon the brightness constancy assumption as well. Inspired by these works, we propose predicting the transformation parameters $a, b$ which align the brightness condition of $I_{t}$ with $I_{t^{\prime}}$ . We reformulate Eq. (1) as + +$$ +L _ {s e l f} = \frac {1}{| V |} \sum_ {\mathbf {p} \in V} \min _ {t ^ {\prime}} r \left(I _ {t} ^ {a _ {t ^ {\prime}}, b _ {t ^ {\prime}}}, I _ {t ^ {\prime} \rightarrow t}\right) \tag {4} +$$ + +with + +$$ +I _ {t} ^ {a _ {t ^ {\prime}}, b _ {t ^ {\prime}}} = a _ {t \rightarrow t ^ {\prime}} I _ {t} + b _ {t \rightarrow t ^ {\prime}}, \tag {5} +$$ + +where $a_{t\rightarrow t^{\prime}}$ and $b_{t\rightarrow t^{\prime}}$ are the transformation parameters aligning the illumination of $I_{t}$ to $I_{t^{\prime}}$ . Note that both parameters can be trained in a self-supervised way without any supervisional signal. Fig. 3 shows the affine transformation examples from EuRoC MAV [5]. + +Photometric uncertainty. Only modeling affine brightness change is not enough to capture all failure cases of the brightness constancy assumption. Other cases like non-Lambertian surfaces and moving objects, are caused by the intrinsic properties of the corresponding objects which are not trivial to model analytically [40]. Since these aspects can be seen as observation noise, we leverage the concept of heteroscedastic aleatoric uncertainty of deep neural networks proposed by Kendall et al. [35]. The key idea is to + +predict a posterior probability distribution for each pixel parameterized with its mean as well as its variance $p(y|\tilde{y},\sigma)$ over ground-truth labels $y$ . For instance, by assuming the noise is Laplacian, the negative log-likelihood to be minimized is + +$$ +- \log p (y | \tilde {y}, \sigma) = \frac {| y - \tilde {y} |}{\sigma} + \log \sigma + c o n s t. \tag {6} +$$ + +Note that no ground-truth label for $\sigma$ is needed for training. The predictive uncertainty allows the network to adapt the weighting of the residual dependent on the data input, which improves the robustness of the model to noisy data or erroneous labels [35]. + +In our case where the "ground-truth" $y$ are the pixel intensities on the target images, the network will predict higher $\sigma$ for the pixel areas on $I_{t}$ where the brightness constancy assumption may be violated. Similar to [40], we implement this by converting Eq. (4) to + +$$ +L _ {s e l f} = \frac {1}{| V |} \sum_ {\mathbf {p} \in V} \frac {\min _ {t ^ {\prime}} r \left(I _ {t} ^ {a _ {t ^ {\prime}}, b _ {t ^ {\prime}}}, I _ {t ^ {\prime} \rightarrow t}\right)}{\Sigma_ {t}} + \log \Sigma_ {t}, \tag {7} +$$ + +where $\Sigma_{t}$ is the uncertainty map of $I_{t}$ . Fig. 4 shows the qualitative results of the predicted uncertainty maps on KITTI [25] and EuRoC [5] datasets, respectively. In the next section, we will show that the learned $\Sigma_{t}$ is useful for weighting the photometric residuals for D3VO. + +The total loss function is the summation of the self-supervised losses and the regularization losses on multiscale images: + +$$ +L _ {t o t a l} = \frac {1}{s} \sum_ {s} \left(L _ {s e l f} ^ {s} + \lambda L _ {r e g} ^ {s}\right), \tag {8} +$$ + +where $s = 4$ is the number of scales and + +$$ +L _ {r e g} = L _ {\text {s m o o t h}} + \beta L _ {a b} \tag {9} +$$ + +with + +$$ +L _ {a b} = \sum_ {t ^ {\prime}} \left(a _ {t ^ {\prime}} - 1\right) ^ {2} + b _ {t ^ {\prime}} ^ {2} \tag {10} +$$ + +is the regularizer of the brightness parameters and $L_{smooth}$ is the edge-aware smoothness on $D_{t}$ [27]. + +To summarize, the proposed DepthNet predicts $D_{t}$ , $D_{t^{s}}$ and $\Sigma_{t}$ with one single input $I_{t}$ . PoseNet predicts $\mathbf{T}_{t}^{t^{\prime}}$ , $a_{t\rightarrow t^{\prime}}$ and $b_{t\rightarrow t^{\prime}}$ with channel-wise concatenated $(I_t,I_{t'})$ as the input. Both DepthNet and PoseNet are convolutional networks following the widely used UNet-like architecture [59]. Please refer to our supplementary materials for network architecture and implementation details. + +# 3.2. D3VO + +In the previous section, we introduced the self-supervised depth estimation network which predicts the depth map $D$ , the uncertainty map $\Sigma$ and the relative pose $\mathbf{T}_t^{t'}$ . In this section, we will describe how D3VO integrates these predictions into a windowed sparse photometric bundle adjustment formulation as proposed in [16]. Note that + +in the following we use $\widetilde{\cdot}$ denoting the predictions from the network as $\widetilde{D},\widetilde{\Sigma}$ and $\widetilde{\mathbf{T}}_t^{t'}$ to avoid ambiguity. + +Photometric energy. D3VO aims to minimize a total photometric error $E_{photo}$ defined as + +$$ +E _ {\text {p h o t o}} = \sum_ {i \in \mathcal {F}} \sum_ {\mathbf {p} \in \mathcal {P} _ {i}} \sum_ {j \in \operatorname {o b s} (\mathbf {p})} E _ {\mathbf {p} j}, \tag {11} +$$ + +where $\mathcal{F}$ is the set of all keyframes, $\mathcal{P}_i$ is the set of points hosted in keyframe $i$ , obs(p) is the set of keyframes in which point p is observable and $E_{\mathbf{p}j}$ is the weighted photometric energy term when p is projected onto keyframe $j$ : + +$$ +E _ {\mathbf {p} j} := \sum_ {\mathbf {p} \in \mathcal {N} _ {\mathbf {p}}} w _ {\mathbf {p}} \left| \left| \left(I _ {j} \left[ \mathbf {p} ^ {\prime} \right] - b _ {j}\right) - \frac {e ^ {a _ {j}}}{e ^ {a _ {i}}} \left(I _ {i} [ \mathbf {p} ] - b _ {i}\right) \right| \right| _ {\gamma}, \tag {12} +$$ + +where $\mathcal{N}$ is the set of 8 neighboring pixels of $\mathbf{p}$ defined in [16], $a, b$ are the affine brightness parameters jointly estimated by non-linear optimization as in [16] and $||\cdot||_{\gamma}$ is the Huber norm. In [16], the residual is down-weighted when the pixels are with high image gradient to compensate small independent geometric noise [16]. In realistic scenarios, there are more sources of noise, e.g., reflection [40], that need to be modeled in order to deliver accurate and robust motion estimation. We propose to use the learned uncertainty $\widetilde{\Sigma}$ to formulate the weighting function + +$$ +w _ {\mathbf {p}} = \frac {\alpha^ {2}}{\alpha^ {2} + \left\| \tilde {\Sigma} (\mathbf {p}) \right\| _ {2} ^ {2}}, \tag {13} +$$ + +which may not only depend on local image gradient, but also on higher level noise pattern. As shown in Fig. 4, the proposed network is able to predict high uncertainty on the areas of reflectance, e.g., the windows of the vehicles, the moving object like the cyclist and the object boundaries where depth discontinuity occurs. + +The projected point position of $\mathbf{p}^{\prime}$ is given by $\mathbf{p}^{\prime} = \Pi (\mathbf{T}_i^j\Pi^{-1}(\mathbf{p},d_{\mathbf{p}}))$ where $d_{\mathbf{p}}$ is the depth of the point $\mathbf{p}$ in the coordinate system of keyframe $i$ and $\Pi (\cdot)$ is the projection function with the known camera intrinsics. Instead of randomly initializing $d_{\mathbf{p}}$ as in traditional monocular direct methods [16, 17], we initialize the point with $d_{\mathbf{p}} = \widetilde{D}_i[\mathbf{p}]$ which provides the metric scale. Inspired by [78], we introduce a virtual stereo term $E_{\mathbf{p}}^{\dagger}$ to Eq. (11) + +$$ +E _ {\text {p h o t o}} = \sum_ {i \in \mathcal {F}} \sum_ {\mathbf {p} \in \mathcal {P} _ {i}} \left(\lambda E _ {\mathbf {p}} ^ {\dagger} + \sum_ {j \in \mathrm {o b s} (\mathbf {p})} E _ {\mathbf {p} j}\right) \tag {14} +$$ + +with + +$$ +\left. E _ {\mathbf {p}} ^ {\dagger} = w _ {\mathbf {p}} \left| \left| I _ {i} ^ {\dagger} [ \mathbf {p} ^ {\dagger} ] - I _ {i} [ \mathbf {p} ] \right| \right| _ {\gamma}, \right. \tag {15} +$$ + +$$ +I _ {i} ^ {\dagger} [ \mathbf {p} ^ {\dagger} ] = I _ {i} \left[ \Pi \left(\mathbf {T} _ {\mathbf {s}} ^ {- 1} \Pi^ {- 1} \left(\mathbf {p} ^ {\dagger}, D _ {i ^ {s}} [ \mathbf {p} ^ {\dagger} ]\right)\right) \right] \tag {16} +$$ + +with $\mathbf{T_s}$ the transformation matrix from the left to the right image used for training DepthNet and + +$$ +\mathbf {p} ^ {\dagger} = \Pi \left(\mathbf {T} _ {\mathbf {s}} \Pi^ {- 1} (\mathbf {p}, d _ {\mathbf {p}})\right). \tag {17} +$$ + +The virtual stereo term optimizes the estimated depth $d_{\mathbf{p}}$ from VO to be consistent with the depth predicted by the proposed deep network [78]. + +Pose energy. Unlike traditional direct VO approaches [19, 23] which initialize the front-end tracking for each new frame with a constant velocity motion model, we leverage the predicted poses between consecutive frames to build a non-linear factor graph [41, 47]. Specifically, we create a new factor graph whenever the newest keyframe, which is also the reference frame for the front-end tracking, is updated. Every new frame is tracked with respect to the reference keyframe with direct image alignment [66]. Additionally, the predicted relative pose from the deep network is used as a factor between the current frame and the last frame. After the optimization is finished, we marginalize the last frame and the factor graph will be used for the front-end tracking of the following frame. Please refer to our supp. materials for the visualization of the factor graph. + +The pose estimated from the tracking front-end is then used to initialize the photometric bundle adjustment backend. We further introduce a prior for the relative keyframe pose $\mathbf{T}_{i - 1}^i$ using the predicted pose $\widetilde{\mathbf{T}}_{i - 1}^i$ . Note that $\widetilde{\mathbf{T}}_{i - 1}^i$ is calculated by concatenating all the predicted frame-to-frame poses between keyframe $i - 1$ and $i$ . Let + +$$ +E _ {p o s e} = \sum_ {i \in \mathcal {F} - \{0 \}} \log \left(\widetilde {\mathbf {T}} _ {i - 1} ^ {i} \mathbf {T} _ {i} ^ {i - 1}\right) ^ {\top} \Sigma_ {\widetilde {\boldsymbol {\xi}} _ {i - 1} ^ {i}} ^ {- 1} \log \left(\widetilde {\mathbf {T}} _ {i - 1} ^ {i} \mathbf {T} _ {i} ^ {i - 1}\right), \tag {18} +$$ + +where $\operatorname{Log}:\operatorname{SE}(3)\to \mathbb{R}^6$ maps from the transformation matrix $\mathbf{T}\in \mathbb{R}^{4\times 4}$ in the Lie group SE(3) to its corresponding twist coordinate $\pmb {\xi}\in \mathbb{R}^6$ in the Lie algebra se(3). The diagonal inverse covariance matrix $\Sigma_{\bar{\xi}_{i - 1}^i}$ is obtained by propagating the covariance matrix between each consecutive frame pairs that is modeled as a constant diagonal matrix. + +The total energy function is defined as + +$$ +E _ {\text {t o t a l}} = E _ {\text {p h o t o}} + w E _ {\text {p o s e}}. \tag {19} +$$ + +Including the pose prior term $E_{\text{pose}}$ in Eq. 19 can be considered as an analogy to integrating the pre-integrated IMU pose prior into the system with a Gaussian noise model. $E_{\text{total}}$ is minimized using the Gauss-Newton method. To summarize, we boost the direct VO method by introducing the predicted poses as initializations to both the tracking front-end and the optimization backend, as well as adding them as a regularizer to the energy function of the photometric bundle adjustment. + +# 4. Experiments + +We evaluate the proposed self-supervised monocular depth estimation network as well as D3VO on both the KITTI [25] and the EuRoC MAV [5] datasets. + +
ApproachTrainRMSERMSE (log)ARDSRDδ < 1.25δ < 1.252δ < 1.253
lower is betterhigher is better
MonoDepth2 [27]MS4.7500.1960.1060.8180.8740.9570.979
Ours, uncerMS4.5320.1900.1010.7720.8840.9560.978
Ours, abMS4.6500.1930.1050.7910.8780.9570.979
Ours, fullMS4.4850.1850.0990.7630.8850.9580.979
Kuznetsov et al. [42]DS4.6210.1890.1130.7410.8620.9600.986
DVSO [78]D*S4.4420.1870.0970.7340.8880.9580.980
OursMS4.4850.1850.0990.7630.8850.9580.979
+ +Table 1: Depth evaluation results on the KITTI Eigen split [15]. M: self-supervised monocular supervision; S: self-supervised stereo supervision; D: ground-truth depth supervision; $\mathbf{D}^{*}$ : sparse auxiliary depth supervision. The upper part shows the comparison with the SOTA self-supervised network Monodepth2 [26] under the same setting and the ablation study of the brightness transformation parameters (ab) and the photometric uncertainty (uncer). The lower part shows the comparison with the SOTA semi-supervised methods using stereo as well as depth supervision. Our method outperforms Monodepth2 on all metrics and can also deliver comparable performance to the SOTA semi-supervised method DVSO [78] that additionally uses the depth from Stereo DSO [74] as sparse supervision signal. + +# 4.1. Monocular Depth Estimation + +KITTI. We train and evaluate the proposed self-supervised depth estimation network on the split of Eigen at el. [15]. The network is trained on stereo sequences with the pre-processing proposed by Zhou et al. [86], which gives us 39,810 training quadruplets, each of which contains 3 (left) temporal images and 1 (right) stereo image, and 4,424 for validation. The upper part of Table 1 shows the comparison with Monodepth2 [26] which is the state-of-the-art method trained with stereo and monocular setting, and also the ablation study of the proposed brightness transformation prediction $(ab)$ and the photometric uncertainty estimation (uncer). The results demonstrate that the proposed depth estimation network outperforms Monodepth2 on all metrics. The ablation studies unveil that the significant improvement over Monodepth2 comes largely with uncer, possibly because in KITTI there are many objects with non-Lambertian surfaces like windows and also objects that move independently such as cars and leaves which violate the brightness constancy assumption. The lower part of the table shows the comparison to the state-of-the-art semi-supervised methods and the results show that our method can achieve competitive performance without using any depth supervision. + +In Figure 4 we show some qualitative results obtained from the Eigen test set [15]. From left to right, the original image, the depth maps and the uncertainty maps are shown respectively. For more qualitative results and the generalization capability on the Cityscapes dataset [8], please refer to our supp. materials. + +EuRoC MAV. The EuRoC MAV Dataset [5] is a dataset containing 11 sequences categorized as easy, medium and difficult according to the illumination and camera motion. This dataset is very challenging due to the strong motion and significant illumination changes both between stereo and temporal images. We therefore consider it as a nice test bench for validating the effectiveness of our predictive brightness transformation parameters for depth predic + +![](images/294ebda8e9a90e0ab7af5ceced79cd814fb3ca8323ea56ff9467228bcc209222.jpg) +Figure 4: Qualitative results from KITTI and EuRoC MAV. The original image, the predicted depth maps and the uncertainty maps are shown from the left to the right, respectively. In particular, the network is able to predict high uncertainty on object boundaries, moving objects, highly reflecting and high frequency areas. + +
RMSERMSE (log)ARDSRDδ < 1.25
Monodepth20.3700.1480.1020.0650.890
Ours, ab0.3390.1300.0860.0540.929
Ours, uncer0.3680.1440.1000.0650.892
Ours, full0.3370.1280.0820.0510.931
+ +Table 2: Evaluation results of V2_01 in EuRoC MAV [5]. The performance of monocular depth estimation is boosted largely by the proposed predictive brightness transformation parameters. + +
RMSERMSE (log)ARDSRDδ < 1.25
[28]0.9710.3960.3320.3890.420
Ours0.9430.3910.3300.3750.438
+ +Table 3: Evaluation results of V2_01 in EuRoC MAV [5] with the model trained with all MH sequences. + +tion. Inspired by Gordon et al. [28] who recently generated ground truth depth maps for the sequence V2_01 by projecting the provided Vicon 3D scans and filtering out occluded points, we also use this sequence for depth evaluations1. Our first experiment is set up to be consistent as in [28], for which we train models with the monocular setting on all + +MH sequences and test on V2_01 and show the results in Table 3. + +In the second experiment, we use 5 sequences $MH\_01$ , $MH\_02$ , $MH\_04$ , $V1\_01$ and $V1\_02$ as the training set to check the performance of our method in a relatively loosened setting. We remove the static frames for training and this results in 12,691 images of which 11,422 images are used for training and 1269 images are used for validation. We train our model with different ablations, as well as Monodepth2 [26] as the baseline. The results in Table 2 show that all our variations outperform the baseline and, in contrast to the case in KITTI, the proposed $ab$ improves the results on this dataset significantly. Please refer to the supp. materials for more experiments on $ab$ . In fact, it is worth noting that the results in Table 3 (trained on one scene $MH$ and tested on another scene $V$ ) are worse than the ones in Table 2 (trained on both $MH$ and $V$ ), which implies that it is still a challenge to improve the generalization capability of monocular depth estimation among very different scenarios. + +# 4.2. Monocular Visual Odometry + +We evaluate the VO performance of D3VO on both KITTI Odometry and EuRoC MAV with the network trained on the splits described in the previous section. + +KITTI Odometry. The KITTI Odometry Benchmark contains 11 (0-10) sequences with provided ground-truth poses. As summarized in [78], sequences 00, 03, 04, 05, 07 are in the training set of the Eigen split that the proposed network uses, so we consider the rest of the sequences as the testing set for evaluating the pose estimation of D3VO. We use the relative translational $(t_{rel})$ error proposed in [25] as the main metric for evaluation. Table 4 shows the comparison with other state-of-the-art mono (M) as well as stereo (S) VO methods on the rest of the sequences. We refer to [78] for the results of the compared methods. Traditional monocular methods show high errors in the large-scale outdoor scene like the sequences in KITTI due to the scale drift. D3VO achieves the best performance on average, despite being a monocular methods as well. The table also contains the ablation study on the integration of deep depth $(Dd)$ , pose $(Dp)$ and uncertainty $(Du)$ . It can be noticed that, consistent with the results in Table 1, the predicted uncertainty helps a lot on KITTI. We also submit the results on the testing sequences (11-20) to the KITTI Odometry evaluation server (link). At the time of submission, D3VO outperforms DVSO and achieves the best monocular VO performance and comparable to other state-of-the-art LiDAR and stereo methods. + +We further compare D3VO with state-of-the-art end-to-end deep learning methods and other recent hybrid methods and show the results in Table 5. Note that here we only show the results on Seq.09 and 10, since most of the end-to-end methods only provide the results on these two sequences. + +
010206080910mean
MDSO [16]9.1711442.217728.124.065.8
ORB [52]10810.314.611.59.302.5737.0
SLSD [18]2.131.091.281.241.220.751.29
ORB2 [53]1.380.810.821.070.820.580.91
S. DSO [74]1.430.780.670.980.980.490.89
Dd1.160.840.711.010.820.730.88
Dd+Dp1.150.840.701.030.800.720.87
Dd+Du1.100.810.691.030.780.620.84
D3VO1.070.800.671.000.780.620.82
+ +Table 4: Results on our test split of KITTI Odometry. The results of the SOTA monocular (M) methods are shown as baselines. The comparison with the SOTA stereo (S) methods shows that D3VO achieves better average performance than other methods, while being a monocular VO. We also show the ablation study for the integration of deep depth $(Dd)$ , pose $(Dp)$ as well as uncertainty $(Du)$ . + +
Seq. 09Seq. 10
End-to-endUnDeepVO [46]7.0110.63
SfMLearner [86]17.8437.91
Zhan et al. [82]11.9212.45
Struct2Depth [6]10.228.9
Bian et al. [1]11.210.1
SGANVO [21]4.955.89
Gordon et al. [28]2.76.8
HybridCNN-SVO [48]10.694.84
Yin et al. [80]4.141.70
Zhan et al. [83]2.612.29
DVSO [78]0.830.74
D3VO0.780.62
+ +Table 5: Comparison to other hybrid methods as well as end-to-end methods on Seq.09 and 10 of KITTI Odometry. + +We refer to [28, 78, 83] for the results for the compared methods. D3VO achieves better performance than all the end-to-end methods by a notable margin. In general, hybrid methods which combine deep learning with traditional methods deliver better results than end-to-end methods. + +EuRoC MAV. As introduced in Sec. 4.1, EuRoC MAV is very challenging for purely vision-based VO due to the strong motion and significant illumination changes. VIO methods [44, 56, 71, 72] dominate this benchmark by integrating IMU measurements to get a pose or motion prior and meanwhile estimating the absolute scale. We compare D3VO with other state-of-the-art monocular VIO $(\mathrm{M} + \mathrm{I})$ as well as stereo VIO $(\mathrm{S} + \mathrm{I})$ methods on sequences MH_03_medium, MH_05_difficult, V1_03_difficult, V2_02_medium and V2_03_difficult. All the other sequences are used for training. We refer to [9] for the results of the $\mathrm{M} + \mathrm{I}$ methods. The results of DSO and ORB-SLAM are shown as baselines. We also show the results from the proposed PoseNet (End-end VO). For the evaluation metric, we use the root mean square (RMS) of the absolute trajectory error (ATE) after aligning the estimates with ground truth. The results in Table 6 show that with the proposed framework integrating depth, pose and uncertainty from the pro + +![](images/a76c5754021458a2cb71a122cc00b89abad2d73c8c013256dced8ee8b02b40a4.jpg) + +![](images/6a12cfb0739d7be8d94e12cfc35dd97c72fcf07af3f89e2c80adc4083942eed1.jpg) + +![](images/77d1988e50fe07e589844c4e1144ee42999e8693a2e0230374a5261696e2d71f.jpg) + +![](images/d734a4d48bbf06892d6c4d453a06e30376181e76dbd106e8b440227d95a767f2.jpg) + +![](images/9ca0f92616ce8a0320f45b7c4ab71dbae21c15f15cb6dca1d79eaaa0923a1771.jpg) + +![](images/216b65f03e5482cac43aa7881fd6b295c644f745a3cc5c36729503788aca35d9.jpg) +Figure 5: Qualitative comparison of the trajectories on MH_05_difficult and V1_03_difficult from EuRoC MAV. + +![](images/72d19dce319cf129c554d1e78afce94e7e27caec1a49c56fb3e5b6d31d64b0c4.jpg) +-estimated ground-truth difference + +![](images/383b907a45989607d0bf1bd50a8c1c0c701724ecf5dd5737948bd617bdd1e16e.jpg) + +![](images/f440063df04a5fa09b1ad679047c57155a997031470277246163f02b7b6bc81a.jpg) + +![](images/f0834836aefd3a5482d6b7f81d93a4508f1119d5860a2d2a5b56d5f4fce9d875.jpg) + +
M03M05V103V202V203mean
M|DSO [16]0.180.111.420.120.560.48
ORB [52]0.080.161.481.720.170.72
M+IVINS [57]0.130.350.130.080.210.18
OKVIS [44]0.240.470.240.160.290.28
ROVIO [3]0.250.520.140.140.140.24
MSCKF [51]0.230.480.240.160.130.25
SVO [22]0.120.16XXX0.14+X
VI-ORB [54]0.090.08X0.040.070.07+X
VI-DSO [72]0.120.120.100.060.170.11
End-end VO1.800.881.001.240.781.14
Dd0.120.110.630.070.520.29
Dd+Dp0.090.090.130.060.190.11
Dd+Du0.080.090.550.080.470.25
D3VO0.080.090.110.050.190.10
S+IVINS [57]0.230.190.110.10-0.17
OKVIS [44]0.230.360.130.17-0.22
Basalt [71]0.060.120.100.05-0.08
D3VO0.080.090.110.05-0.08
+ +Table 6: Evaluation results on EuRoC MAV [5]. We show the results of DSO and ORB-SLAM as baselines and compare D3VO with other SOTA monocular VIO (M+I) and stereo VIO (S+I) methods. Note that for stereo methods, V2_03_difficult is excluded due to many missing images from one of the cameras [71]. Despite being a monocular method, D3VO shows comparable results to SOTA monocular/stereo VIO. The best results among the monocular methods are shown as black bold and the best among the stereo methods are shown as blue bold. The ablation study shows that $Dd + Dp$ delivers large improvement on V1_03_difficult and V2_03_difficult where the camera motions are very strong. + +posed deep neural network, D3VO shows high accuracy as well as robustness and is able to deliver comparable results to other state-of-the-art VIO methods with only a single camera. We also show the ablation study for the integration of predicted depth $(Dd)$ , pose $(Dp)$ and uncertainty $(Du)$ and the integration of pose prediction improves the performance significantly on V1_03_difficult and V2_03_difficult where violent camera motion occurs. + +Figure 5 shows the qualitative comparison of trajectories obtained from DSO [16], ORB-SLAM [52], visual inertial DSO [72], the end-to-end predicted poses from our network and D3VO on the $MH\_03$ and $V1\_03$ sequences. All the 5 methods can deliver fairly good results on $MH\_05\_difficult$ . On $V1\_03\_difficult$ where the motions are stronger and there are many brightness inconsistencies between temporal and stereo images, D3VO can still deliver comparable results to VI-DSO, while using only a single camera. + +# 5. Conclusion + +We presented D3VO as a monocular VO method that enhances the performance of geometric VO methods by exploiting the predictive power of deep networks on three levels integrating predictions of monocular depth, photometric uncertainty and relative camera pose. To this end, we first introduced a novel self-supervised monocular depth estimation network which explicitly addresses the illumination change in the training set with predictive brightness transformation parameters. The network achieves state-of-the-art results on KITTI and EuRoC MAV. The predicted depth, uncertainty and pose are then incorporated into both the front-end tracking and back-end non-linear optimization of a direct VO pipeline. We systematically evaluated the VO performance of D3VO on the two datasets. D3VO sets a new state-of-the-art on KITTI Odometry and also achieves state-of-the-art performance on the challenging EuRoC MAV, rivaling with leading mono-inertial and stereo-inertial methods while using only a single camera. + +Acknowledgements We would like to thank Niclas Zeller, Lukas Kostler, Oleg Muratov and other colleagues from Artisense for their continuous feedbacks. Besides, we would like to thank Jakob Engel and Tao Wu for the fruitful discussions during the early stages of the project. Last but not least, we also would like to thank the reviewers and Klaus H. Strobl for their constructive comments. + +# References + +[1] Jia-Wang 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 Thirty-third Conference on Neural Information Processing Systems (NeurIPS), 2019. 7 +[2] Michael Bloesch, Jan Czarnowski, Ronald Clark, Stefan Leutenegger, and Andrew J Davison. CodeSLAM-learning a compact, optimisable representation for dense visual SLAM. arXiv preprint arXiv:1804.00874, 2018. 3 +[3] Michael Bloesch, Sammy Omari, Marco Hutter, and Roland Siegwart. Robust visual inertial odometry using a direct EKF-based approach. In 2015 IEEE/RSJ international conference on intelligent robots and systems (IROS), pages 298-304. IEEE, 2015. 8 +[4] G. Bradski. The OpenCV Library. Dr. Dobb's Journal of Software Tools, 2000. 14 +[5] Michael Burri, Janosch Nikolic, Pascal Gohl, Thomas Schneider, Joern Rehder, Sammy Omari, Markus W Achtelik, and Roland Siegwart. The EuRoC micro aerial vehicle datasets. The International Journal of Robotics Research, 2016. 2, 4, 5, 6, 8, 13 +[6] Vincent Casser, Soeren Pirk, Reza Mahjourian, and Anelia Angelova. Depth prediction without the sensors: Leveraging structure for unsupervised learning from monocular videos. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 8001-8008, 2019. 7 +[7] Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). arXiv preprint arXiv:1511.07289, 2015. 13 +[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 Proc. of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 6, 15 +[9] Jeffrey Delmerico and Davide Scaramuzza. A benchmark comparison of monocular visual-inertial odometry algorithms for flying robots. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 2502-2509. IEEE, 2018. 7 +[10] Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. Self-improving visual odometry. arXiv preprint arXiv:1812.03245, 2018. 3 +[11] Daniel DeTone, Tomasz Malisiewicz, and Andrew Rabinovich. SuperPoint: Self-supervised interest point detection and description. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 224-236, 2018. 1 +[12] Alexey Dosovitskiy, Philipp Fischer, Eddy Ilg, Philip Hausser, Caner Hazirbas, Vladimir Golkov, Patrick van der Smagt, Daniel Cremers, and Thomas Brox. FlowNet: Learning optical flow with convolutional networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2758-2766, 2015. 1 + +[13] Mihai Dusmanu, Ignacio Rocco, Tomas Pajdla, Marc Pollefeys, Josef Sivic, Akihiko Torii, and Torsten Sattler. D2-Net: A trainable CNN for joint detection and description of local features. 2019. 1 +[14] David Eigen and Rob Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In Proceedings of the IEEE International Conference on Computer Vision, pages 2650-2658, 2015. 2 +[15] 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. 2, 6 +[16] Jakob Engel, Vladlen Koltun, and Daniel Cremers. Direct sparse odometry. IEEE transactions on pattern analysis and machine intelligence, 2017. 1, 2, 3, 4, 5, 7, 8 +[17] Jakob Engel, Thomas Schöps, and Daniel Cremers. LSD-SLAM: Large-scale direct monocular SLAM. In European Conference on Computer Vision, pages 834-849. Springer, 2014. 1, 3, 5 +[18] Jakob Engel, Jörg Stuckler, and Daniel Cremers. Large-scale direct SLAM with stereo cameras. In Intelligent Robots and Systems (IROS), 2015 IEEE/RSJ International Conference on, pages 1935-1942. IEEE, 2015. 4, 7, 13 +[19] J. Engel, J. Sturm, and D. Cremers. Semi-dense visual odometry for a monocular camera. In IEEE International Conference on Computer Vision (ICCV), 2013. 2, 5 +[20] Gunnar Farnebäck. Two-frame motion estimation based on polynomial expansion. In Scandinavian conference on Image analysis, pages 363-370. Springer, 2003. 14 +[21] Tuo Feng and Dongbing Gu. SGANVO: Unsupervised deep visual odometry and depth estimation with stacked generative adversarial networks. IEEE Robotics and Automation Letters, 4(4):4431-4437, 2019. 7 +[22] Christian Forster, Luca Carlone, Frank Dellaert, and Davide Scaramuzza. On-manifold preintegration for real-time visual-inertial odometry. IEEE Transactions on Robotics, 33(1):1-21, 2016. 8 +[23] Christian Forster, Matia Pizzoli, and Davide Scaramuzza. SVO: Fast semi-direct monocular visual odometry. In 2014 IEEE international conference on robotics and automation (ICRA), pages 15-22. IEEE, 2014. 5 +[24] Huan Fu, Mingming Gong, Chaohui Wang, Kayhan Batmanghelich, and Dacheng Tao. Deep ordinal regression network for monocular depth estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, United States, 2018. 2 +[25] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the KITTI vision benchmark suite. In Conference on Computer Vision and Pattern Recognition (CVPR), 2012. 2, 4, 5, 7, 13, 14 +[26] Clément Godard, Oisin Mac Aodha, Michael Firman, and Gabriel J. Brostow. Digging into self-supervised monocular depth estimation. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 1, 2, 3, 6, 7, 13 +[27] Clément Godard, Oisin Mac Aodha, and Gabriel J Brostow. Unsupervised monocular depth estimation with left- + +right consistency. arXiv preprint arXiv:1609.03677, 2016. 1, 2, 3, 4, 6 +[28] Ariel Gordon, Hanhan Li, Rico Jonschkowski, and Anelia Angelova. Depth from videos in the wild: Unsupervised monocular depth learning from unknown cameras. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 2, 6, 7, 14 +[29] Ankur Handa, Thomas Whelan, John McDonald, and Andrew J Davison. A benchmark for RGB-D visual odometry, 3D reconstruction and SLAM. In Robotics and automation (ICRA), 2014 IEEE international conference on, pages 1524-1531. IEEE, 2014. 3 +[30] Kaiming He, Georgia Gkioxari, Piotr Dálár, and Ross Girshick. Mask R-CNN. In Proceedings of the IEEE international conference on computer vision, pages 2961-2969, 2017. 1 +[31] 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. 13 +[32] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in neural information processing systems, pages 2017-2025, 2015. 2, 3 +[33] Hailin Jin, Paolo Favaro, and Stefano Soatto. Real-time feature tracking and outlier rejection with changes in illumination. In Proceedings Eighth IEEE International Conference on Computer Vision. ICCV 2001, volume 1, pages 684-689. IEEE, 2001. 4 +[34] E. Jung, N. Yang, and D. Cremers. Multi-Frame GAN: Image Enhancement for Stereo Visual Odometry in Low Light. In Conference on Robot Learning (CoRL), 2019. 3 +[35] Alex Kendall and Yarin Gal. What uncertainties do we need in bayesian deep learning for computer vision? In Advances in neural information processing systems, pages 5574-5584, 2017. 2, 3, 4 +[36] Alex Kendall, Yarin Gal, and Roberto Cipolla. Multi-task learning using uncertainty to weigh losses for scene geometry and semantics. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[37] Christian Kerl, Jürgen Sturm, and Daniel Cremers. Dense visual SLAM for RGB-D cameras. In 2013 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 2100-2106. IEEE, 2013. 2 +[38] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 13 +[39] Alexander Kirillov, Kaiming He, Ross Girshick, Carsten Rother, and Piotr Dólar. Panoptic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9404-9413, 2019. 1 +[40] Maria Klodt and Andrea Vedaldi. Supervising the new with the old: learning SFM from SFM. In Proceedings of the European Conference on Computer Vision (ECCV), pages 698-713, 2018. 2, 3, 4, 5 +[41] Frank R Kschischang, Brendan J Frey, and H-A Loeliger. Factor graphs and the sum-product algorithm. IEEE Transactions on information theory, 47(2):498-519, 2001. 5 + +[42] Yevhen Kuznietsov, Jörg Stuckler, and Bastian Leibe. Semi-supervised deep learning for monocular depth map prediction. arXiv preprint arXiv:1702.02706, 2017. 1, 6 +[43] Iro Laina, Christian Rupprecht, Vasileios Belagiannis, Federico Tombari, and Nassir Navab. Deeper depth prediction with fully convolutional residual networks. In 3D Vision (3DV), 2016 Fourth International Conference on, pages 239-248. IEEE, 2016. 1, 2 +[44] Stefan Leutenegger, Simon Lynen, Michael Bosse, Roland Siegwart, and Paul Furgale. Keyframe-based visual-inertial odometry using nonlinear optimization. The International Journal of Robotics Research, 34(3):314-334, 2015. 1, 7, 8 +[45] Bo Li, Chunhua Shen, Yuchao Dai, Anton van den Hengel, and Mingyi He. Depth and surface normal estimation from monocular images using regression on deep features and hierarchical CRFs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1119-1127, 2015. 2 +[46] Ruihao Li, Sen Wang, Zhiqiang Long, and Dongbing Gu. UnDeepVO: Monocular visual odometry through unsupervised deep learning. arXiv preprint arXiv:1709.06841, 2017. 3, 7 +[47] H-A Loeliger. An introduction to factor graphs. IEEE Signal Processing Magazine, 21(1):28-41, 2004. 5 +[48] Shing Yan Loo, Ali Jahani Amiri, Syamsiah Mashohor, Sai Hong Tang, and Hong Zhang. CNN-SVO: Improving the mapping in semi-direct visual odometry using single-image depth prediction. In 2019 International Conference on Robotics and Automation (ICRA), pages 5218-5223. IEEE, 2019. 1, 7 +[49] R. Mahjourian, M. Wicke, and A. Angelova. Unsupervised learning of depth and ego-motion from monocular video using 3d geometric constraints. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5667-5675, June 2018. 2 +[50] Agostino Martinelli. Closed-form solution of visual-inertial structure from motion. International journal of computer vision, 106(2):138-152, 2014. 2 +[51] Anastasios I Mourikis and Stergios I Roumeliotis. A multi-state constraint Kalman filter for vision-aided inertial navigation. In Proceedings 2007 IEEE International Conference on Robotics and Automation, pages 3565–3572. IEEE, 2007. 8 +[52] 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. 1, 7, 8 +[53] Raul Mur-Artal and Juan D Tardós. ORB-SLAM2: An open-source slam system for monocular, stereo, and rgb-d cameras. IEEE Transactions on Robotics, 33(5):1255-1262, 2017. 1, 3, 7, 14 +[54] Raul Mur-Artal and Juan D Tardós. Visual-inertial monocular SLAM with map reuse. IEEE Robotics and Automation Letters, 2(2):796-803, 2017. 1, 8 +[55] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic dif + +ferentiation in PyTorch. In NIPS Autodiff Workshop, 2017. 13 +[56] Tong Qin, Peiliang Li, and Shaojie Shen. VINS-Mono: A robust and versatile monocular visual-inertial state estimator. IEEE Transactions on Robotics, 34(4):1004-1020, 2018. 1, 7 +[57] Tong Qin, Jie Pan, Shaozu Cao, and Shaojie Shen. A general optimization-based framework for local odometry estimation with multiple sensors. arXiv preprint arXiv:1901.03638, 2019. 8 +[58] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91-99, 2015. 1 +[59] 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 +[60] 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. 13 +[61] Thomas Schops, Torsten Sattler, and Marc Pollefeys. BAD SLAM: Bundle adjusted direct RGB-D SLAM. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 134-144, 2019. 2 +[62] Hauke Strasdat, JMM Montiel, and Andrew J Davison. Scale drift-aware large scale monocular SLAM. Robotics: Science and Systems VI, 2, 2010. 1 +[63] H. Strasdat, J. M. M. Montiel, and A. J. Davison. Real-time monocular SLAM: Why filter? In 2010 IEEE International Conference on Robotics and Automation, pages 2657-2664, May 2010. 2 +[64] Jürgen Sturm, Nikolas Engelhard, Felix Endres, Wolfram Burgard, and Daniel Cremers. A benchmark for the evaluation of RGB-D SLAM systems. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pages 573-580. IEEE, 2012. 3 +[65] Deqing Sun, Xiaodong Yang, Ming-Yu Liu, and Jan Kautz. PWC-Net: CNNs for optical flow using pyramid, warping, and cost volume. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 8934-8943, 2018. 1 +[66] Richard Szeliski. Image alignment and stitching: A tutorial. Foundations and Trends in Computer Graphics and Vision, 2(1):1-104, 2006. 2, 5 +[67] Jiexiong Tang, Ludvig Ericson, John Folkesson, and Patric Jensfelt. GCNv2: Efficient correspondence prediction for real-time slam. IEEE Robotics and Automation Letters, 4(4):3505-3512, 2019. 3 +[68] Keisuke Tateno, Federico Tombari, Iro Laina, and Nassir Navab. CNN-SLAM: Real-time dense monocular SLAM with learned depth prediction. arXiv preprint arXiv:1704.03489, 2017. 1, 3 +[69] Sebastian Thrun, Wolfram Burgard, and Dieter Fox. Probabilistic robotics. MIT press, 2005. 2 + +[70] Benjamin Ummenhofer, Huizhong Zhou, Jonas Uhrig, Nikolaus Mayer, Eddy Ig, Alexey Dosovitskiy, and Thomas Brox. DeMon: Depth and motion network for learning monocular stereo. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5038-5047, 2017. 3 +[71] Vladyslav Usenko, Nikolaus Demmel, David Schubert, Jörg Stuckler, and Daniel Cremers. Visual-inertial mapping with non-linear factor recovery. arXiv preprint arXiv:1904.06504, 2019. 7, 8 +[72] Lukas Von Stumberg, Vladyslav Usenko, and Daniel Cremers. Direct sparse visual-inertial odometry using dynamic marginalization. In 2018 IEEE International Conference on Robotics and Automation (ICRA), pages 2510-2517. IEEE, 2018. 1, 2, 7, 8 +[73] C. Wang, J. M. Buenaposada, R. Zhu, and S. Lucey. Learning depth from monocular videos using direct methods. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2022-2030, June 2018. 2, 3 +[74] R. Wang, M. Schwörer, and D. Cremers. Stereo DSO: Large-scale direct sparse visual odometry with stereo cameras. In International Conference on Computer Vision (ICCV), Venice, Italy, October 2017. 1, 2, 3, 4, 6, 7, 14 +[75] Sen Wang, Ronald Clark, Hongkai Wen, and Niki Trigoni. DeepVO: Towards end-to-end visual odometry with deep recurrent convolutional neural networks. In Robotics and Automation (ICRA), 2017 IEEE International Conference on, pages 2043-2050. IEEE, 2017. 3 +[76] Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE transactions on image processing, 13(4):600-612, 2004. 4 +[77] N. Yang, R. Wang, X. Gao, and D. Cremers. Challenges in monocular visual odometry: Photometric calibration, motion bias and rolling shutter effect. IEEE Robotics and Automation Letters (RA-L), 3:2878-2885, Oct 2018. 1 +[78] Nan Yang, Rui Wang, Jorg Stuckler, and Daniel Cremers. Deep virtual stereo odometry: Leveraging deep depth prediction for monocular direct sparse odometry. In Proceedings of the European Conference on Computer Vision (ECCV), pages 817-833, 2018. 1, 2, 3, 5, 6, 7 +[79] Kwang Moo Yi, Eduard Trulls, Vincent Lepetit, and Pascal Fua. LIFT: Learned invariant feature transform. In European Conference on Computer Vision, pages 467-483. Springer, 2016. 1 +[80] Xiaochuan Yin, Xiangwei Wang, Xiaoguo Du, and Qijun Chen. Scale recovery for monocular visual odometry using depth estimated with deep convolutional neural fields. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5870-5878, 2017. 1, 7 +[81] Zhichao Yin and Jianping Shi. GeoNet: Unsupervised learning of dense depth, optical flow and camera pose. In CVPR, 2018. 2 +[82] H. Zhan, R. Garg, C. S. Weerasekera, K. Li, H. Agarwal, and I. M. Reid. Unsupervised learning of monocular depth estimation and visual odometry with deep feature reconstruction. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 340-349, June 2018. 2, 3, 7 + +[83] Huangying Zhan, Chamara Saroj Weerasekera, Jiawang Bian, and Ian Reid. Visual odometry revisited: What should be learnt? arXiv preprint arXiv:1909.09803, 2019. 1, 7 +[84] Zichao Zhang and Davide Scaramuzza. A tutorial on quantitative trajectory evaluation for visual (-inertial) odometry. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 7244-7251. IEEE, 2018. 14 +[85] Huizhong Zhou, Benjamin Ummenhofer, and Thomas Brox. DeepTAM: Deep tracking and mapping. In Proceedings of the European Conference on Computer Vision (ECCV), pages 822-838, 2018. 3 +[86] Tinghui Zhou, Matthew Brown, Noah Snavely, and David G Lowe. Unsupervised learning of depth and ego-motion from video. In CVPR, volume 2, page 7, 2017. 1, 2, 3, 6, 7, 13 \ No newline at end of file diff --git a/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/images.zip b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..07bb5afbcd63058f4a5d805f75463651c1ab3a4f --- /dev/null +++ b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f7dfe7aed56395ae0a30cfb64bfcdc2aefa7c2ef2c2f456ae50b9d462508cbb +size 654223 diff --git a/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/layout.json b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..63b57efeb905c9be7d9bb8f8239ef1e69652c93a --- /dev/null +++ b/d3vodeepdepthdeepposeanddeepuncertaintyformonocularvisualodometry/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b29763a8e15aaa613798ec565a9884aacf3e7d7c2b62ce4a9fff0768b8b1140f +size 491965 diff --git a/dastdatafreesubstitutetrainingforadversarialattacks/33a2e876-13e0-4da7-a17c-fab54e9cfae7_content_list.json b/dastdatafreesubstitutetrainingforadversarialattacks/33a2e876-13e0-4da7-a17c-fab54e9cfae7_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2b0b73ede66015b7456d3521e77c204d15927282 --- /dev/null +++ b/dastdatafreesubstitutetrainingforadversarialattacks/33a2e876-13e0-4da7-a17c-fab54e9cfae7_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eecc97221fee354fb358a5a735dda91af0bcf21879c93496d2a0616d76dd64ed +size 76236 diff --git a/dastdatafreesubstitutetrainingforadversarialattacks/33a2e876-13e0-4da7-a17c-fab54e9cfae7_model.json b/dastdatafreesubstitutetrainingforadversarialattacks/33a2e876-13e0-4da7-a17c-fab54e9cfae7_model.json new file mode 100644 index 0000000000000000000000000000000000000000..54b835e4b57be6dbd03a6c3cad1569c6cdb824bb --- /dev/null +++ b/dastdatafreesubstitutetrainingforadversarialattacks/33a2e876-13e0-4da7-a17c-fab54e9cfae7_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bd64955248fa761bfcb6ecb8fccd84ee9d2dc96f136138c20bfc912aa3bf885 +size 92360 diff --git a/dastdatafreesubstitutetrainingforadversarialattacks/33a2e876-13e0-4da7-a17c-fab54e9cfae7_origin.pdf b/dastdatafreesubstitutetrainingforadversarialattacks/33a2e876-13e0-4da7-a17c-fab54e9cfae7_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..75d12deb399016c6624c2ae92e657338e9408f38 --- /dev/null +++ b/dastdatafreesubstitutetrainingforadversarialattacks/33a2e876-13e0-4da7-a17c-fab54e9cfae7_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4db69e0c5389bfd5a9f5b730b98fb1aea70dce287962680768a0097fa4d1a483 +size 464472 diff --git a/dastdatafreesubstitutetrainingforadversarialattacks/full.md b/dastdatafreesubstitutetrainingforadversarialattacks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..48e4d9a964cb25f77c9d217f15598fadc5238bfb --- /dev/null +++ b/dastdatafreesubstitutetrainingforadversarialattacks/full.md @@ -0,0 +1,307 @@ +# DaST: Data-free Substitute Training for Adversarial Attacks + +Mingyi Zhou $^{1,2,*}$ , Jing Wu $^{1,2,*}$ , Yipeng Liu $^{1,\dagger}$ , Shuaicheng Liu $^{1,2}$ , Ce Zhu $^{1}$ $^{1}$ University of Electronic Science and Technology of China $^{1}$ $^{2}$ Megvii Technology $^{2}$ + +{zhoumingyi, wujing}@std.uestc.edu.cn, {yipengliu, liushuaicheng, eczhu}@uestc.edu.cn + +# Abstract + +Machine learning models are vulnerable to adversarial examples. For the black-box setting, current substitute attacks need pre-trained models to generate adversarial examples. However, pre-trained models are hard to obtain in real-world tasks. In this paper, we propose a data-free substitute training method (DaST) to obtain substitute models for adversarial black-box attacks without the requirement of any real data. To achieve this, DaST utilizes specially designed generative adversarial networks (GANs) to train the substitute models. In particular, we design a multi-branch architecture and label-control loss for the generative model to deal with the uneven distribution of synthetic samples. The substitute model is then trained by the synthetic samples generated by the generative model, which are labeled by the attacked model subsequently. The experiments demonstrate the substitute models produced by DaST can achieve competitive performance compared with the baseline models which are trained by the same train set with attacked models. Additionally, to evaluate the practicability of the proposed method on the real-world task, we attack an online machine learning model on the Microsoft Azure platform. The remote model misclassifies $98.35\%$ of the adversarial examples crafted by our method. To the best of our knowledge, we are the first to train a substitute model for adversarial attacks without any real data. Our codes are publicly available1. + +# 1. Introduction + +Deep neural networks have been shown vulnerable to examples with imperceptible perturbations [38]. This causes researchers a high interest in studying attacks and defenses for assessing and improving the robustness of networks. Adversarial attack methods can be categorized into two main attacks, white-box attacks that have full access to the + +attacked model and black-box attacks that have partial information of models. + +Black-box attacks are more practical in real world systems compared with white-box attacks. Among these attacks, score-based attacks [8, 19, 20, 16] and decision-based attacks [3, 9, 7] directly attack the attacked model using class probabilities or hard labels returned by the attacked model. These attack methods do not need a pre-trained substitute model, however, as a cost, they need numerous queries for attacked models to generate each attack. + +Instead, gradient-based attack methods [14, 22, 35, 30] need knowledge of the architecture and weights of the attacked models. Goodfellow et al. [14] showed that adversarial examples have the property of transferability which means that adversarial examples generated for one model through white-box attack methods can also attack other models. Therefore, to carry out attack methods in the black-box setting, they use a substitute model to find the adversarial examples and then attack the machine learning model based on the transferability of these adversarial examples. Compared with current score-based and decision-based attacks, the substitute attacks do not need queries for generating adversarial examples. However, they need a pretrained model to generate adversarial attacks. Papernot et al. [34] developed a method that uses a number of images to imitate the outputs of attacked models to obtain substitute networks. Prediction APIs were also developed to steal the machine models [39]. Orekondy et al. [32] proposed a "knockoff" to steal the function of machine learning models. These methods do not need a pre-trained model but require many real data labeled by the attacked model to train a substitute model. However, the real images are hard to get in some real-world tasks. Therefore, it is important to develop a data-free substitute attack, such that the risks faced by current machine learning models can be assessed more comprehensively. + +In this study, we propose a data-free substitute training (DaST) method to train a substitute model for adversarial attacks. We utilize generative adversarial networks (GANs) to create synthetic samples to train the substitute model. The + +substitute model uses these samples to train, where the labels of the samples are produced by the attacked model. For the performance, the synthetic samples should be equally distributed in the input space. The label of samples should span all categories. However, conventional GANs without real data may generate samples that have extremely uneven distribution and only contain few categories, which means the substitute model cannot learn the classification characteristics of the attacked model comprehensively. + +To address this problem, we design a multi-branch architecture and a label-control loss for the generative model to deal with the uneven distribution of synthetic samples. The generative model can produce synthetic samples with random labels given by the attacked model. As such, the substitute model can learn the classification characteristics of the attacked model in this adversarial training and produce adversarial examples which have strong transferability for the attacked model. The main contributions of this study are summarized as follows: + +- We are the first to train a substitute model for adversarial attacks without any real data. Attackers can use this method to train a substitute model for adversarial attacks without collecting any real data. +- We evaluate the effectiveness of DaST on both local deep learning models and the online machine learning system, which reveals a fact that the current machine learning model has significant risks to be attacked. +- we evaluate the performance of our method in two attack scenarios, including a probability-only scenario that attacker can access the output probability of the attacked model, and a label-only scenario that attacker only accesses the output label of the attacked model. Our method generates adversarial examples efficiently on both scenarios. + +In addition, we use different model architectures for the substitute model to test the influence on attack success rate caused by the model capacity. + +The rest of our paper is organized as follows: in section 2, we introduce the related works. The proposed method is described in section 3. We evaluate the performance of DaST in section 4. + +# 2. Related Works + +Adversarial Scenes Adversarial attacks are carried out in the white-box setting or the black-box setting. In the white-box setting, the attacker has access to the structure and weights of the attacked models. On the contrary, in the black-box setting, the attacker only has the substitute model (gradient-based attacks) or access the outputs returned by the attacked models (query-based attacks). Black-box attack methods are more practical on real tasks. + +Adversarial Attacks Gradient-based attacks such as FGSM [14] and BIM [22] have full access to the models, so they usually use a pre-trained substitute model to generate adversarial examples, and then attack the attacked model using the transferability of adversarial examples. FGSM aims to find adversarial examples by directly increasing the loss of the model, BIM is an iterative version of FGSM. Likewise, DeepFool [30] finds adversarial examples that are likely to cross the decision boundary. To find perturbations with minimal $\ell_p$ norm, Nicholas Carlini and David Wagner [6] introduced a method to craft these perturbations through simultaneously minimizing the perturbations. Similar to this method, Rony et al. [36] also constrain the $\ell_2$ norm of the perturbations, they decoupled the value and direction of the perturbation. In the black-box setting, these attacks rely on the transferability of adversarial examples. However, Liu et al. [25] showed that these examples nearly have no transferability on attacked attacks. Instead, Cheng et al. [8] proposed a score-based attack method zeroth order based attack (ZOO) using gradient estimation, and Ilyas et al. [20] improve the way of the gradient estimation. Instead of gradient estimation, Guo et al. [16] introduced a simple black-box attack (SimBA) which decides the direction of the perturbations based on the changes of output probability. Brendel et al. [3] first proposed a decision-based attack. Based on this method, Cheng et al. [9] and Cheng et al. [7] improved the query efficiency, which is an important metric for black-box attacks. + +Adversarial Defenses Several defense methods for increasing the robustness of models have been proposed. Adversarial training [38, 27, 23, 40] modifies the training schemes of the models, they directly train with the adversarial examples. Another method aims to modify the adversarial examples themselves such as random transformation [22, 28, 41]. Buckman et al. [4] proposed a nonlinear transformation based on one-hot encoding to inputs of models. Gradient masking methods [40, 10] destroy the gradient information so that they fail the optimization-based attacks. However, these defense methods based on gradient masking have been showed unreliable [1], and models with defenses above are still unsafe against some attacks [5, 17]. Besides, detecting adversarial examples raises the interest of researchers. Some of them detect the examples of whether they are adversarial or clean by an auxiliary network [13, 15, 29], while some find out adversarial examples through their statistical properties [2, 18, 12, 26, 33]. + +# 3. Method + +In this section, we describe the attack scenario in this study, then introduce the substitute attack and propose a data-free method to train the substitute model. + +# 3.1. Attack Scenario + +Label-only scenario Suppose the attacked machine learning model is employed online and attackers can freely probe the output labels of the attacked model. The attackers are hard to obtain any data which is in the input space of the attacked model. We name the proposed DaST on the label-only scenario as DaST-L. + +Probability-only scenario The other settings of this scenario are the same as the label-only scenario, but attackers can access the output probability of the attacked model. We name the proposed DaST on the probability-only scenario as DaST-P. + +# 3.2. Adversarial Attack + +In this subsection, we introduce the definition of adversarial substitute attacks. + +$\mathbf{X}$ denotes samples from the input space of the attacked model $T$ . $\bar{y}$ and $y^\prime$ refers to the real labels and the target labels of the samples $\mathbf{X}$ , respectively. $T(y|\mathbf{X},\theta)$ is the attacked model parameterized by $\theta$ . For non-targeted attacks, the objective of the adversarial attack can be formulated as: + +$$ +\min _ {\epsilon} \| \epsilon \| \text {s u b j e c t t o} \underset {y _ {i}} {\operatorname {a r g m a x}} T \left(y _ {i} | \overline {{\mathbf {X}}} = \mathbf {X} + \epsilon , \theta\right) \neq \bar {y} \tag {1} +$$ + +$$ +\text {a n d} \| \epsilon \| \leq r. +$$ + +For targeted attacks, the objective is: + +$$ +\min _ {\epsilon} \| \epsilon \| \text {s u b j e c t t o} \underset {y _ {i}} {\operatorname {a r g m a x}} T \left(y _ {i} \mid \overline {{\mathbf {X}}} = \mathbf {X} + \epsilon , \theta\right) = y ^ {\prime} \tag {2} +$$ + +$$ +\text {a n d} \| \epsilon \| \leq r, +$$ + +where the $\epsilon$ and $r$ are perturbation of the sample and upper bound of the perturbation, respectively. For attacking the machine learning system which is hard to detect, $r$ is set to a small value in attack methods. $\overline{\mathbf{X}} = \mathbf{X} + \epsilon$ are the adversarial examples which can lead the attacked model $T$ to output a wrong label (non-targeted setting) and a specific wrong label (targeted setting). + +For white-box attacks, they can fully access the gradient information of $T$ , then use it to generate adversarial examples to attack the $T$ . For black-box substitute attacks, they train a model $\widehat{T}$ to substitute the attacked model to generate adversarial examples and then transfer the examples to attack the $T$ . The attack success rate of these black-box attacks heavily relies on the transferability of the adversarial examples. Therefore, the key point of developing an efficient substitute attack is to train a substitute model having properties that are as similar as possible to the attacked model. Current attack methods utilize the same training set of the attacked model or collect a lot of other images labeled + +by the attacked model to train the substitute model. In the next two subsections, we will introduce a method that can train a substitute model without any image. The whole process is shown in Figure 1. + +# 3.3. Adversarial Generator-Classifier Training + +In this subsection, we introduce the basic adversarial training method and discuss its limitation. + +For training the substitute model without any image, we use a generative model $G$ to produce training data for the substitute model $D$ . The generator randomly samples the noise vector $\mathbf{z}$ from the input space and produces the data $\widehat{\mathbf{X}} = G(\mathbf{z})$ . Then, the generated data is used to probe the output $T(\widehat{\mathbf{X}})$ of the attacked model $T$ . The substitute model is trained by the image-output pair $(\widehat{\mathbf{X}}, T(\widehat{\mathbf{X}}))$ . As shown in Figure 1, the objective of $G$ is to create new samples to explore the difference between $T$ and $D$ , and the role of $D$ is to imitate the output of $T$ . It is a special two-player game, the attacked model involved in this game is a referee. To simplify the expression but without loss of generality, we utilize the binary classification as a case to analyze (the output probability can be considered as one scalar in binary classification, so does the output label). The value function of the game is presented as: + +$$ +\max _ {G} \min _ {D} \mathcal {V} _ {G, D} = d (T (\widehat {\mathbf {X}}), D (\widehat {\mathbf {X}})) \tag {3} +$$ + +where $d(T(\widehat{\mathbf{X}}),D(\widehat{\mathbf{X}}))$ is a metric to measure the output distance between $T$ and $D$ . For label-only attack scenario, this measurement can be formulated as: + +$$ +d (T, D) = \operatorname {C E} \left(D (\widehat {\mathbf {X}}), T (\widehat {\mathbf {X}})\right), \tag {4} +$$ + +where $D(\widehat{\mathbf{X}})$ and $T(\widehat{\mathbf{X}})$ in this scenario denote the output labels of the substitute model and those of the attacked model, respectively. $\mathrm{CE}(D(\widehat{\mathbf{X}}), T(\widehat{\mathbf{X}}))$ denotes the cross entropy loss, and the output labels of $T$ are utilized as the label of this loss. The function of cross entropy loss is to constrain the difference between the $T$ and $D$ . For probability-only attack scenario, this measurement is formulated as: + +$$ +d (T, D) = \left\| D (\widehat {\mathbf {X}}), T (\widehat {\mathbf {X}}) \right\| _ {F}, \tag {5} +$$ + +where $D(\widehat{\mathbf{X}})$ and $T(\widehat{\mathbf{X}})$ in this scenario denote the output probabilities of the substitute model and those of the attacked model, respectively. + +Hence the substitute model $D$ replicates the information of attacked model $T$ by this adversarial training. In the training, the loss function of $D$ is set to $\mathcal{L}_D = \mathcal{V}_{G,D}$ . In order to maintain the stability of training, the loss function of $G$ is designed as $\mathcal{L}_G = e^{-d(T,D)}$ . Therefore, the global optimal substitute network $D$ is obtained if and only if $\forall \widehat{\mathbf{X}}$ , $T(\widehat{\mathbf{X}}) = D(\widehat{\mathbf{X}})$ . At this point, $\mathcal{L}_D = 0$ and $\mathcal{L}_G = e^0 = 1$ . + +![](images/27868d32841018d011b67be618d5d5661012cb8cc011b215b9e852b444257c21.jpg) +Figure 1. The proposed adversarial data-free imitation. The architecture of $G$ is shown in the blue dotted block. $N$ denotes the number of categories. In the training stage, the objective of $G$ is to generate samples $\widehat{\mathbf{X}} = G(\mathbf{X})$ and let $y_{D}(\widehat{\mathbf{X}})\neq y_{T}(\widehat{\mathbf{X}})$ . The objective of $D$ is to guarantee $y_{D}(\widehat{\mathbf{X}}) = y_{T}(\widehat{\mathbf{X}})$ . In the testing stage, the substitute model $D$ is utilized to generate adversarial examples to attack $T$ . + +We suppose that $\forall \widehat{\mathbf{X}} = G(\mathbf{z}),\widehat{\mathbf{X}}\in \mathbb{R},\mathbb{R}$ is the input space of $T$ . If the $D$ can achieve $D(\widehat{\mathbf{X}}) = T(\widehat{\mathbf{X}})$ , the adversarial attacks carried out by our substitute model will have the same success rate as the white-box attack without the gradient information of $T$ . Therefore, for a well-trained substitute network, adversarial examples generated by $D$ have strong transferability for $T$ . + +However, it is impossible to guarantee that $D(\widehat{\mathbf{X}}) = T(\widehat{\mathbf{X}})$ in a limited time. If we do not constrain the output of $G$ , the synthetic training data for $T$ is likely only distributed in a small range of $\mathbb{R}$ , thus this training cannot work. For addressing this problem, we design a label-controllable architecture for $G$ , which can control the distribution of synthetic data and speed up the convergence of training. + +# 3.4. Label-controllable Data Generation + +In this subsection, we introduce the label-controllable architecture for the generative model $G$ . + +To obtain equally distributed synthetic data to train the substitute model $D$ , we consider developing a method that can control the distribution of $\widehat{\mathbf{X}}$ . For training a replication of $T$ , the synthetic data is used to probe the information of the attacked model. The label of samples, which is produced by the attacked model, should span all categories. Therefore, as shown in the blue dotted box of Figure 1, we design a generative network which contains $N$ upsampling deconvolutional components, $N$ is the number of categories. All upsampling components share a post-processing convolutional network. The model $G$ randomly samples the noise vector $\mathbf{z}$ from the input space and variable label value $n$ . The $\mathbf{z}$ is then entered into the $n$ -th upsampling deconvolutional network and the shared convolutional network to produce the data $\widehat{\mathbf{X}} = G(\mathbf{z}, n)$ . The additional label-control + +loss for generative model $G$ is formulated as: + +$$ +\mathcal {L} _ {C} = \operatorname {C E} (T (G (\mathbf {z}, n)), n). \tag {6} +$$ + +The above method generates data with random labels, which are produced by $T$ . However, the backpropagation of this label-control loss needs the gradient information of the attacked model $T$ , it violates the rules of black-box attacks. We need to train a label-controllable generative model without the gradient information of $T$ . For the imitation process, it can be approximated as the following objective function: + +$$ +\min _ {D} d (T (\widehat {\mathbf {X}}), D (\widehat {\mathbf {X}})). \tag {7} +$$ + +In the training progresses, the outputs of $D$ will gradually approach the outputs of $T$ under the same inputs. Therefore, we use $D$ to replace the $T$ in Eq. (6), which is formulated as: + +$$ +\mathcal {L} _ {C} = \operatorname {C E} (D (G (\mathbf {z}, n)), n). \tag {8} +$$ + +The training of substitute $D$ can avoid accessing the information of $T$ . Then we update the loss of $G$ as: + +$$ +\mathcal {L} _ {G} = e ^ {- d (T, D)} + \alpha \mathcal {L} _ {C}, \tag {9} +$$ + +where $\alpha$ controls the weight of label-control loss (we set it to 0.2 in our experiments). + +In the training stage, as the imitation ability of $D$ increases, the diversity of synthetic samples which is labeled by the $T$ will enhance. Therefore, the $D$ can learn the information of the attacked model $T$ , which can improve the transferability of adversarial examples generated by $D$ . We + +
Algorithm 1 Mini-batch stochastic gradient descent training of the proposed method DaST.
# acc denotes the accuracy of D. att denotes the attack success rate for the attacks generated by D.
1: While iteration < δ or acc, att do not increase
2: Generate m examples{X(1), ..., X(m)}by G.
3: Update the substitute model :
4: LD=d(T(X̂), D(X)).
5: Update the generative model :
6: LG=e-d(T,D)+αLC.
7: end for
+ +name this method as data-free substitute training (DaST), which is shown in Algorithm 1. + +Like the current substitute attack methods, the substitute model trained by our method is utilized to generate adversarial examples to attack $T$ . + +# 4. Experiments + +# 4.1. Experiment Setting + +In this subsection, we introduce our experiment settings, including the datasets, model architectures, attack methods, and evaluation criteria. + +Dataset: we evaluate our proposed method on MNIST [24] and CIFAR-10 [21]. The test sets of these two datasets have 10k images, respectively. + +Scenario: we evaluate our method in both label-only attack and probability-only scenario. The DaST-L and DaST-P denote the DaST in the label-only scenario and DaST in the probability-only scenario, respectively. Attackers in the scenarios of this study can freely access the output of the attacked model. Therefore, we obtain the substitute model trained by DaST when the algorithm convergence. + +Model architecture and attack method: the substitute network has no prior knowledge of the attacked model, which means it does not load any pre-trained model in experiments. For the experiments on MNIST, we design 3 different network architectures including a small network (3 convolutional layers), a medium network (4 convolutional layers) and a large network (5 convolutional layers) for evaluating the performance of our DaST with models having different capacity. We utilize the pre-trained medium network and VGG-16 [37] as the attacked model on MNIST and CIFAR-10, respectively. In addition, we use different architectures for the substitute model and attacked model to evaluate the impact of model structure on our method in CIFAR-10 experiments. In order to compare the substitute model produced by DaST with the pre-trained models, we utilize 4 attack methods to generate adversarial examples, which include FGSM [14], BIM [22], projected gradient + +Table 1. Performance of the proposed DaST on MNIST. "Pre-trained", "DaST-L" and "DaST-P": the attack success rate $(\%)$ of adversarial examples generated by the pre-trained large network and DaST-L and DaST-P, respectively. () denotes the average $L_{F}$ perturbation distance per image. + +
AttackNon-targeted
Pre-trainedDaST-PDaST-L
FGSM [14]59.72 (5.40)69.76 (5.41)35.74 (5.40)
BIM [22]85.70 (4.80)96.36 (4.81)64.61 (4.82)
PGD [27]37.93 (3.98)53.99 (3.99)23.22 (3.98)
C&W [6]23.34 (2.91)27.35 (2.74)18.16 (2.75)
AttackTargeted
Pre-trainedDaST-PDaST-L
FGSM [14]12.10 (5.46)20.45 (4.49)13.10 (5.46)
BIM [22]37.83 (4.90)57.22 (4.87)29.18 (4.87)
PGD [27]28.95 (4.60)47.57 (4.63)19.25 (4.63)
C&W [6]10.32 (2.57)23.80 (2.99)12.31 (2.98)
+ +descent (PGD) [27], C&W [6]. For testing, we use AdverTorch library [11] to generate adversarial examples. For evaluating performances of the proposed method in real-world tasks, we apply our attack to the online MNIST model of Microsoft Azure. The training tricks and machine learning methods utilized by this online model cannot be accessed. + +Evaluation criteria: for evaluating the performance of our DaST, we set the attack success rates of adversarial examples generated by other pre-trained networks as the baseline. The goals of non-targeted attacks and targeted attacks are to lead the attacked model to output wrong labels and specific wrong labels, respectively. In the non-targeted attack scenario, we only generate adversarial examples on the images classified correctly by the attacked model. In targeted attacks, we only generate adversarial examples on the images which are not classified to the specific wrong labels. The success rates of adversarial attack are calculated by $n / m$ , where $n$ and $m$ are the number of adversarial examples which can fool the attacked model and the total number of adversarial examples, respectively. + +# 4.2. Experiments on MNIST + +In this subsection, we employ the proposed DaST to train a substitute model for adversarial attacks on the MNIST dataset and evaluate the performance in terms of attack success rate in label-only and probability-only scenarios. + +First, we conduct experiments to evaluate the performance in probability-only and label-only attack scenarios. We use the medium network as the attacked model on MNIST and the large network as the substitute model of DaST. We train a pre-trained large network on the same train set of the attacked model. We utilize the attack success + +Table 2. Performances of the proposed DaST with three different substitute architectures on MNIST. "Small", "Medium" "Large": the attack success rates $(\%)$ of adversarial examples generated by DaST with small, medium and large substitute networks, respectively. () denotes the average $L_{F}$ perturbation distance per image. + +
AttackNon-targeted
SmallMediumLarge
FGSM [14]62.61 (4.38)56.21 (4.45)69.76 (5.41)
BIM [22]94.86 (4.85)92.47 (4.84)96.36 (4.81)
PGD [27]45.31 (3.99)43.62 (3.99)53.99 (3.99)
C&W [6]30.61 (2.89)24.34 (2.75)23.80 (2.99)
AttackTargeted
SmallMediumLarge
FGSM [14]19.92 (4.43))20.45 (4.49)23.93 (5.45)
BIM [22]56.73 (4.89)53.50 (4.84)57.22 (4.87)
PGD [27]39.42 (4.64)40.76 (4.60)47.57 (4.63)
C&W [6]24.86 (3.09)16.25 (3.13)23.80 (2.99)
+ +rate of adversarial examples generated by the pre-trained model as the baseline. The performances of our DaST are shown in Table 1. The substitute model trained by DaST-P and DaST-L achieve $97.82\%$ and $83.95\%$ of accuracy on the test set, respectively. The attack success rates of the substitute model produced by our DaST are higher than those of the pre-trained model on non-targeted $(10.04\%, 10.66\%, 16.06\%,$ and $4.01\%$ higher on FGSM, BIM, PGD, and C&W, respectively) and targeted attacks $(11.83\%, 19.39, 18.62, 13.48\%$ higher on FGSM, BIM, PGD, and C&W, respectively). It shows that the substitute model generated by DaST-P outperforms the models trained by the same train set (60000 images) with the attacked model. Even he substitute models trained by DaST-L perform better than baseline models on FGSM and C&W attacks (targeted). + +Then we evaluate the performances of our DaST with different substitute architectures in the probability-only scenario. We also use the medium network as the attacked model on MNIST and apply our DaST using three different substitute architectures, which include the large, medium and small networks. The attack success rates of these three substitute architectures are shown in Table 2. The large substitute model achieves the best results on FGSM, BIM, PGD attacks compared with other models. The small substitute model obtains the best results on C&W attacks compared with other models. It shows that both architectures for the substitute model obtain good results on adversarial attacks. In general, the substitute models with more complex structure can obtain better performance for adversarial attacks. + +# 4.3. Experiments on CIFAR-10 + +In this subsection, we employ the proposed DaST to train a substitute model for adversarial attacks on the CIFAR- + +Table 3. Performance of the proposed DaST on CIFAR-10. "Pre-trained", "DaST-P" "DaST-L": the attack success rates $(\%)$ of adversarial examples generated by the pre-trained large network, DaST-P and DaST-L, respectively. () denotes the average $L_{F}$ perturbation distance per image. + +
AttackNon-targeted
Pre-trainedDaST-PDaST-L
FGSM [14]39.10 (1.54)39.63 (1.54)22.65 (1.54)
BIM [22]59.18 (1.01)59.71 (1.18)28.42 (1.19)
PGD [27]35.40 (1.02)29.10 (1.10)17.80 (1.10)
C&W [6]9.76 (0.77)13.52 (0.74)10.34 (0.74)
AttackTargeted
Pre-trainedDaST-PDaST-L
FGSM [14]9.62 (1.54)6.69 (1.54)7.32 (1.54)
BIM [22]17.43 (1.00)20.22 (1.18)15.26 (1.16)
PGD [27]10.46 (1.05)14.09 (1.12)8.32 (1.10)
C&W [6]23.15 (2.05)26.53 (1.98)19.78 (2.04)
+ +10 dataset, and evaluate the performance in terms of attack success rate in label-only and probability-only scenarios. + +We conduct experiments to evaluate the performance in probability-only and label-only attack scenarios and use the VGG-16 network as the attacked model. We train a pretrained ResNet-50 network on the same train set of the attacked model. The performances of our DaST are shown in Table 3. The substitute model trained by DaST-P and DaST-L achieve $25.15\%$ and $20.35\%$ of accuracy on the test set, respectively. Our DaST also achieves competitive performance with the pre-trained model. In most cases of the probability-only scenario (FGSM, BIM, C&W for nontargeted attack, BIM, PGD, C&W for targeted attacks), the substitute models generated by DaST-P outperform baseline models. The substitute models trained by DaST-L perform better than baseline models on C&W attacks (non-targeted). + +We also evaluate the performances of our DaST with different substitute architectures in the probability-only scenario. The VGG-16 network is used as the attacked model. We apply our DaST using 3 different substitute architectures, which include the VGG-13, ResNet-18, and ResNet50. The attack success rates of these three substitute architectures are shown in Table 4. It demonstrates that both architectures for the substitute model obtain good results on adversarial attacks. In most cases (BIM, PGD, C&W for non-targeted attack, FGSM, BIM, PGD, C&W for targeted attacks), the VGG-13 outperforms other models in terms of the adversarial attack. The ResNet-50 obtains the best results on FGSM attacks (targeted). Different from experiments on MNIST, the simple model achieves the best results on CIFAR-10. We visualize the adversarial examples generated by DaST-P and DaST-L in Figure 2 and 3, respectively. The attack perturbations for these two scenarios are small. + +Table 4. Performances of the proposed DaST with three different substitute architectures on CIFAR-10. "VGG-13", "ResNet-18" "ResNet-50": the attack success rates (the high is better) of adversarial examples generated by DaST with VGG-13, ResNet-18 and ResNet-50 substitute models, respectively. The numbers in () denote the average $L_{F}$ perturbation distance per image. + +
AttackNon-targeted (%)
VGG-13ResNet-18ResNet-50
FGSM [14]6.87 (1.54)17.97 (1.54)39.63 (1.54)
BIM [22]93.13 (1.18)31.70 (1.54)59.71 (1.18)
PGD [27]56.14 (1.08)10.04 (1.11)29.10 (1.10)
C&W [6]56.80 (1.64)11.54 (1.64)13.52 (0.74)
AttackTargeted (%)
VGG-13ResNet-18ResNet-50
FGSM [14]18.27 (1.54)2.07 (1.54)6.69 (1.54)
BIM [22]62.23 (1.24)8.00 (1.52)20.22 (1.18)
PGD [27]41.48 (1.17)3.72 (1.26)14.09 (1.12)
C&W [6]33.65 (2.42)7.31 (1.46)26.53 (1.98)
+ +![](images/e72446d222a07fdad3332f39dcb8c6bd58ef4b1280f8080c574284c2b9996e14.jpg) +Figure 2. Visualization of the adversarial examples generated by DaST-L on CIFAR-10. We generate 5 samples for each attack. + +# 4.4. Experiments on Microsoft Azure + +In this subsection, we conduct experiments for attacking the online model on Microsoft Azure in two scenarios. + +We use the example MNIST model of the machine learning tutorial on Azure as the attacked model and employ it as a web service. We do not know the machine learning method and architecture of this model. The only information we can obtain is the outputs of this model. We apply the probability-based DaST and label-based DaST attacks to this model to evaluate the performance of the proposed method in real-world applications. The substitute model in this experiment has 5 convolutional layers. The substitute model trained by DaST-P and DaST-L achieve $79.35\%$ + +Table 5. Performance of the proposed DaST for attacking Microsoft Azure example model. "Pre-trained", "DaST-P" "DaST-L": the attack success rate (the high is better) of adversarial examples generated by the pre-trained large network, DaST in probability-only scenario and DaST in label-only scenario, respectively. The numbers in () denote the average $L_{F}$ perturbation distance per image. Because it is hard to generate adversarial examples for all methods on C&W [6], we omit this attack method. + +
AttackNon-targeted (%)
Pre-trainedDaST-PDaST-L
FGSM [14]77.96 (5.41)96.83 (5.25)98.21 (5.36)
BIM [22]66.25 (4.81)96.42 (4.79)98.35 (4.72)
PGD [27]59.23 (3.99)90.63 (3.88)96.97 (3.96)
AttackTargeted (%)
Pre-trainedDaST-PDaST-L
FGSM [14]13.52 (5.46)32.00 (5.21)43.99 (5.37)
BIM [22]19.31 (4.88)50.21 (4.90)71.15 (4.56)
PGD [27]19.31 (4.60)45.66 (4.46)65.91 (4.32)
+ +![](images/376a6540d95093d82e4649d921b83f11e74830a2475adc16dfc1702db1f2ac00.jpg) +Figure 3. Visualization of the adversarial examples generated by DaST-P on CIFAR-10. We generate 5 samples for each attack. + +and $90.75\%$ of accuracy on the MNIST test set, respectively. The performance on adversarial attacks of the proposed method is shown in Table 5. + +The performance of DaST-L is better than its of DaST-P on this online model. Because the attacked Azure model is too simple, the accuracy on MNIST is only $91.93\%$ . Figure 6 shows the training of DaST-P, which can access more information of attacked model than DaST-L, suffers over-fitting. DaST-L substitutes achieve a very high attack success rate on FGSM $(98.21\%)$ , BIM $(98.35\%)$ , PGD $(96.97\%)$ attacks. Moreover, our DaST method achieves a high attack success rate even on targeted attacks. Compared with the models trained by the MNIST train set, substitute models trained by DaST perform much better on label-only + +Table 6. Comparison of DaST and other attacks. "ASR": attack success rate. "Query": the number of queries in the evaluation stage. "Boundary": Decision-Based Attacks [3]. "GLS": a score-based black-box attack based on greedy local search [31]. "-" denotes our DaST does not need query in the evaluation stage. The DaST in this experiment generate attacks with BIM. + +
AttackASRDistanceQuery
DaST-P96.83%4.79-
GLS [31]40.51%4.27297.07
DaST-L98.35%4.72-
Boundary [3]100%4.69670.54
+ +(20.25%, 32.10%, 37.74% higher on non-targeted FGSM, BIM, PGD attacks, respectively. 30.47%, 51.84%, 46.60% higher on targeted FGSM, BIM, PGD attacks, respectively) and probability-only scenarios. It presents that our approach is better at attacking actual online models, even the proposed method does not need any real data. Because DaST does not need any query in the evaluation stage but needs queries in the training stage, our DaST requires different information than score-based attacks and decision-based attacks (they need queries in the evaluation stage). We show the number of queries for score-based and decision-based attacks, which have similar perturbation distance with DaST in non-targeted attacks. The results are shown in Table 6. Our DaST is trained by 20,000,000 queries for the attacked model in the training stage. Compared with decision-based and score-based attacks, the input each time the DaST accesses the attacked model is different in the training stage (current query-based attacks need to use one original data to access the attacked model numerous times to generate each attack). So the queries of DaST are harder to be tracked than other attacks. + +Visualization: we visualize the synthetic samples generated by the generative model in DaST on Azure experiments, which is shown in Figure 4. We also visualize the adversarial examples generated by DaST-P and DaST-L in Figure 5. The attack perturbations of DaST are small. + +Training convergence: We show the curve of attack success rate of BIM attacks generated by DaST in the training stage of Azure experiments, which is shown in Figure 6. The attack success rates for DaST-L and DaST-P converge after 20,000,000 and 2,000,000 queries, respectively. + +# 5. Conclusion + +We have presented a data-free method DaST to train substitute models for adversarial attacks. DaST reduces the prerequisites of adversarial substitute attacks by utilizing GANs to generate synthetic samples. This is the first method that can train substitute models without the requirement of any real data. The experiments showed the effec + +![](images/13a2f0eb6c864c70ac3d54cab0a9fe2556b749827969ad9c050e0c9f3f220ba7.jpg) +Figure 4. Visualization of the synthetic samples generated by the generator in the training of DaST. Left: samples generated by the DaST-L. Right: samples generated by the DaST-P. + +![](images/3eef76e0db50213c3fe9d0505bcb90d2bcdcf348d9a3da2cc7dee464196c8dd6.jpg) + +![](images/ac722c6acb191f05707d9423380fa4a79c82086c26e428d8c54d4bcea10543ab.jpg) +Figure 5. Visualization of the adversarial examples generated by DaST for attacking the Azure model. Left: examples generated by DaST-P. Right: examples generated by DaST-L. + +![](images/31ba34ebf2613d0865877f5ee11db53e6462650b688d2e2597a569ae5daac600.jpg) + +![](images/dbc3e7e2d80d9224c2a74699e12a508b0bb1300194c24eaa2fb58945c57da6bc.jpg) +Figure 6. Attack success rate of BIM attacks generated by DaST in training stage of Azure experiments. + +tiveness of our method. It presented that machine learning systems have significant risks, attackers can train substitute models even when the real input data is hard to collect. + +The proposed DaST cannot generate adversarial examples alone, it should be used with other gradient-based attack methods. In future work, we will design a new substitute training method, which can generate attacks directly. Furthermore, we will explore the defense for DaST. + +# 6. Acknowledgment + +This research is supported by National Natural Science Foundation of China (NSFC, No. 61602091, No. 61571102, No.61872067) and Sichuan Science and Technology Program (No. 2019YFH0008, No.2018JY0035, No.2019YFH0016). + +# References + +[1] Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In Proceedings of the 35th International Conference on Machine Learning, ICML 2018, July 2018. 2 +[2] Arjun Nitin Bhagoji, Daniel Cullina, and Prateek Mittal. Dimensionality reduction as a defense against evasion attacks on machine learning classifiers. arXiv preprint arXiv:1704.02654, 2017. 2 +[3] 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. 1, 2, 8 +[4] Jacob Buckman, Aurko Roy, Colin Raffel, and Ian Goodfellow. Thermometer encoding: One hot way to resist adversarial examples. In International Conference on Learning Representations (ICLR), 2018. 2 +[5] Nicholas Carlini and David Wagner. Adversarial examples are not easily detected: Bypassing ten detection methods. In Proceedings of the 10th ACM Workshop on Artificial Intelligence and Security, pages 3-14. ACM, 2017. 2 +[6] Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE Symposium on Security and Privacy (SP), pages 39-57. IEEE, 2017. 2, 5, 6, 7 +[7] Jianbo Chen, Michael I. Jordan, and Martin J. Wainwright. Hopskipjumpattack: A query-efficient decision-based attack, 2019. 1, 2 +[8] 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. 1, 2 +[9] Minhao Cheng, Thong Le, Pin-Yu Chen, Jinfeng Yi, Huan Zhang, and Cho-Jui Hsieh. Query-efficient hard-label black-box attack: An optimization-based approach. arXiv preprint arXiv:1807.04457, 2018. 1, 2 +[10] Guneet S. Dhillon, Kamyar Azizzadenesheli, Jeremy D. Bernstein, Jean Kossaifi, Aran Khanna, Zachary C. Lipton, and Animashree Anandkumar. Stochastic activation pruning for robust adversarial defense. In International Conference on Learning Representations, 2018. 2 +[11] Gavin Weiguang Ding, Luyu Wang, and Xiaomeng Jin. AdverTorch v0.1: An adversarial robustness toolbox based on pytorch. arXiv preprint arXiv:1902.07623, 2019. 5 +[12] Reuben Feinman, Ryan R Curtin, Saurabh Shintre, and Andrew B Gardner. Detecting adversarial samples from artifacts. arXiv preprint arXiv:1703.00410, 2017. 2 +[13] Zhitao Gong, Wenlu Wang, and Wei-Shinn Ku. Adversarial and clean data are not twins. arXiv preprint arXiv:1704.04960, 2017. 2 +[14] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. International Conference on Learning Representations (ICLR), 2015. 1, 2, 5, 6, 7 + +[15] Kathrin Grosse, Praveen Manoharan, Nicolas Papernot, Michael Backes, and Patrick McDaniel. On the (statistical) detection of adversarial examples. arXiv preprint arXiv:1702.06280, 2017. 2 +[16] Chuan Guo, Jacob Gardner, Yurong You, Andrew Gordon Wilson, and Kilian Weinberger. Simple black-box adversarial attacks. In International Conference on Machine Learning, pages 2484-2493, 2019. 1, 2 +[17] Warren He, James Wei, Xinyun Chen, Nicholas Carlini, and Dawn Song. Adversarial example defense: Ensembles of weak defenses are not strong. In 11th Workshop on Offensive Technologies (WOOT 2017), 2017. 2 +[18] Dan Hendrycks and Kevin Gimpel. Early methods for detecting adversarial images. International Conference on Learning Representations (ICLR), 2017. 2 +[19] Andrew Ilyas, Logan Engstrom, Anish Athalye, and Jessy Lin. Black-box adversarial attacks with limited queries and information. In International Conference on Machine Learning, pages 2142-2151, 2018. 1 +[20] Andrew Ilyas, Logan Engstrom, and Aleksander Madry. Prior convictions: Black-box adversarial attacks with bandits and priors. arXiv preprint arXiv:1807.07978, 2018. 1, 2 +[21] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, Cite-seer, 2009. 5 +[22] Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial examples in the physical world. International Conference on Learning Representations (ICLR), 2017. 1, 2, 5, 6, 7 +[23] Alexey Kurakin, Ian Goodfellow, and Samy Bengio. Adversarial machine learning at scale. International Conference on Learning Representations (ICLR), 2017. 2 +[24] Yann LeCun, Léon Bottou, Yoshua Bengio, Patrick Haffner, et al. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998. 5 +[25] Yanpei Liu, Xinyun Chen, Chang Liu, and Dawn Song. Delving into transferable adversarial examples and black-box attacks. International Conference on Learning Representations (ICLR), 2017. 2 +[26] Xingjun Ma, Bo Li, Yisen Wang, Sarah M. Erfani, Sudan-thi Wijewickrema, Grant Schoenebeck, Michael E. Houle, Dawn Song, and James Bailey. Characterizing adversarial subspaces using local intrinsic dimensionality. In International Conference on Learning Representations (ICLR), 2018. 2 +[27] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations(ICLR), 2018. 2, 5, 6, 7 +[28] Dongyu Meng and Hao Chen. Magnet: a two-pronged defense against adversarial examples. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, pages 135-147. ACM, 2017. 2 + +[29] Jan Hendrik Metzen, Tim Genewein, Volker Fischer, and Bastian Bischoff. On detecting adversarial perturbations. International Conference on Learning Representations (ICLR), 2017. 2 +[30] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, and Pascal Frossard. Deepfool: a simple and accurate method to fool deep neural networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2574–2582, 2016. 1, 2 +[31] Nina Narodytska and Shiva Prasad Kasiviswanathan. Simple black-box adversarial perturbations for deep networks. arXiv preprint arXiv:1612.06299, 2016. 8 +[32] Tribhuvanesh Orekondy, Bernt Schiele, and Mario Fritz. Knockoff nets: Stealing functionality of black-box models. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 1 +[33] Nicolas Papernot and Patrick McDaniel. Deep k-nearest neighbors: Towards confident, interpretable and robust deep learning. arXiv preprint arXiv:1803.04765, 2018. 2 +[34] Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In Proceedings of the 2017 ACM on Asia conference on computer and communications security, pages 506-519. ACM, 2017. 1 +[35] Nicolas Papernot, Patrick McDaniel, Somesh Jha, Matt Fredrikson, Z Berkay Celik, and Ananthram Swami. The limitations of deep learning in adversarial settings. In 2016 IEEE European Symposium on Security and Privacy (EuroS&P), pages 372-387. IEEE, 2016. 1 +[36] Jérôme Rony, Luiz G Hafemann, Luis S Oliveira, Ismail Ben Ayed, Robert Sabourin, and Eric Granger. Decoupling direction and norm for efficient gradient-based 12 adversarial attacks and defenses. arXiv preprint arXiv:1811.09600, 2018. +[37] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations (ICLR), 2015. 5 +[38] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. International Conference on Learning Representations (ICLR), 2014. 1, 2 +[39] Florian Tramér, Fan Zhang, Ari Juels, Michael K Reiter, and Thomas Ristenpart. Stealing machine learning models via prediction apis. In 25th {USENIX} Security Symposium (\{USENIX} Security 16), pages 601-618, 2016. 1 +[40] Florian Tramèr, Alexey Kurakin, Nicolas Papernot, Ian Goodfellow, Dan Boneh, and Patrick McDaniel. Ensemble adversarial training: Attacks and defenses. In International Conference on Learning Representations (ICLR), 2018. 2 +[41] Cihang Xie, Jianyu Wang, Zhishuai Zhang, Zhou Ren, and Alan Yuille. Mitigating adversarial effects through randomization. In International Conference on Learning Representations (ICLR), 2018. 2 \ No newline at end of file diff --git a/dastdatafreesubstitutetrainingforadversarialattacks/images.zip b/dastdatafreesubstitutetrainingforadversarialattacks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..25dbc6cf1601e05446532d14a484b2d3c9dfc3a3 --- /dev/null +++ b/dastdatafreesubstitutetrainingforadversarialattacks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec0cc46aee2956ddbb86deb4c9eee151ddc50a0d81d1baca704b50f6369fddf7 +size 542644 diff --git a/dastdatafreesubstitutetrainingforadversarialattacks/layout.json b/dastdatafreesubstitutetrainingforadversarialattacks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..b2696f8ef8f78f2e6d685e9b8b0f7f6afe41481a --- /dev/null +++ b/dastdatafreesubstitutetrainingforadversarialattacks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3f51b7375e65222646cae48f8512d0d835ca59bbc9cf97f14d959765690930b +size 405034 diff --git a/dataefficientsemisupervisedlearningbyreliableedgemining/a568815c-fb23-4d06-b278-29ba598706bb_content_list.json b/dataefficientsemisupervisedlearningbyreliableedgemining/a568815c-fb23-4d06-b278-29ba598706bb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..d915c872de180966ee33eb0fc474f947d23eaa32 --- /dev/null +++ b/dataefficientsemisupervisedlearningbyreliableedgemining/a568815c-fb23-4d06-b278-29ba598706bb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cbdfd41a861fd50cea440cf9a6ebc4741584ba05e4bd1c51c6a83febf6ac905 +size 75951 diff --git a/dataefficientsemisupervisedlearningbyreliableedgemining/a568815c-fb23-4d06-b278-29ba598706bb_model.json b/dataefficientsemisupervisedlearningbyreliableedgemining/a568815c-fb23-4d06-b278-29ba598706bb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8e3a4a6ce6e41f1c2184db1f809b855b0242f726 --- /dev/null +++ b/dataefficientsemisupervisedlearningbyreliableedgemining/a568815c-fb23-4d06-b278-29ba598706bb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e707b8280a1825d4eebf44c4fcb6bdd2ac4937830c04d588a745af71444a84b6 +size 94407 diff --git a/dataefficientsemisupervisedlearningbyreliableedgemining/a568815c-fb23-4d06-b278-29ba598706bb_origin.pdf b/dataefficientsemisupervisedlearningbyreliableedgemining/a568815c-fb23-4d06-b278-29ba598706bb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..db96eb7ab13e0192570c946992df2ca97ef9ba37 --- /dev/null +++ b/dataefficientsemisupervisedlearningbyreliableedgemining/a568815c-fb23-4d06-b278-29ba598706bb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:67cc52dc85710592dfd065186b112b1f22a251a250726996e22bbf701caa281e +size 2069942 diff --git a/dataefficientsemisupervisedlearningbyreliableedgemining/full.md b/dataefficientsemisupervisedlearningbyreliableedgemining/full.md new file mode 100644 index 0000000000000000000000000000000000000000..00323e8b45e0bf434bb7f198b2b9caf1a40f03e6 --- /dev/null +++ b/dataefficientsemisupervisedlearningbyreliableedgemining/full.md @@ -0,0 +1,310 @@ +# Data-Efficient Semi-Supervised Learning by Reliable Edge Mining + +Peibin Chen $^{1}$ , Tao Ma $^{1}$ , Xu Qin $^{1}$ , Weidi Xu $^{2}$ , Shuchang Zhou $^{3}$ , $^{1}$ Peking University, $^{2}$ Ant Financial Services Group, $^{3}$ Megvii + +{pbchen, taoma, qinxu}@pku.edu.cn, weidi.xwd@alibaba-inc.com, zsc@megvii.com + +# Abstract + +Learning powerful discriminative features is a challenging task in Semi-Supervised Learning, as the estimation of the feature space is more likely to be wrong with scarcer labeled data. Previous methods utilize a relation graph with edges representing 'similarity' or 'dissimilarity' between nodes. Similar nodes are forced to output consistent features, while dissimilar nodes are forced to be inconsistent. However, since unlabeled data may be wrongly labeled, the judgment of edges may be unreliable. Besides, the nodes connected by edges may already be well fitted, thus contributing little to the model training. We propose Reliable Edge Mining (REM), which forms a reliable graph by only selecting reliable and useful edges. Guided by the graph, the feature extractor is able to learn discriminative features in a data-efficient way, and consequently boosts the accuracy of the learned classifier. Visual analyses show that the features learned are more discriminative and better reveals the underlying structure of the data. REM can be combined with perturbation-based methods like II-model, TempEns and Mean Teacher to further improve accuracy. Experiments prove that our method is data-efficient on simple tasks like SVHN and CIFAR-10, and achieves state-of-the-art results on the challenging CIFAR-100. + +# 1. Introduction + +Deep neural network has shown promising advantages in many applications of machine learning, such as computation vision, speech recognition, and nature language process [15]. One of the key reasons why the technique of deep neural networks achieved such rapid developments is there are huge amounts of labeled datasets. However, it usually takes a lot of time and human efforts to construct fully-labeled datasets because of the complicated works of determining the exact labels for different samples. By contrast, since it is much easier to collect unlabeled data, there have been a lot of efforts made for utilizing the information of unlabeled data, and Semi-Supervised Learning (SSL) is an important branch among them. + +SSL aims to benefit from the limited labeled data and large amounts of unlabeled data. In order to generalize better with the unlabeled data, the methods of SSL suppose that the points which have the close proximity in a high-density region should have close outputs [2, 36]. Based upon this assumption, many perturbation-based methods have been proposed [25, 26, 33, 24]. II method [14] and Mean Teacher [14] force consistent output between student network and teacher network. VAT [21] generates a virtual adversarial example for each input and expects the model to give close output. Although these methods have achieved promising results, they only consider of the unlabeled examples but ignore the associated relationships between these examples. Some methods, such as Luo et al. [19], utilize the underlying structure of data by building a teacher graph in the embedding space. The nodes represent the data and the edges represent the consistency of labels between nodes1. Then the feature extractor is expected to output similar features for nodes from the same class (the edge is 1), while output dissimilar features for nodes from different classes (the edge is 0). However, on the one hand, they ignore the reliability of the edges (the values of these edges may be wrong), which may leads to the wrong guidance of model training. On the other hand, they ignore the usefulness2 of the edges, which may leads to the inefficient utilization of data. + +We are concerned with the task of constructing a reliable sub-graph given the original graph mentioned before. To guide the model training with the whole dataset, we expect the sub-graph to maintain the nodes in the original graph. But for efficient data utilization and reliable guidance, only useful and reliable edges are expected to be added to the sub-graph. We call the constructed sub-graph as a 'reliable graph'. + +In this work, we propose Reliable Edge Mining (REM) to construct such a reliable graph (see Fig. 1). Specifically, we add two attributes to each edge in the original graph: usefulness and certainty. According to the attribute of usefulness, we select useful edges to form some candidate sets, from which the reliable edges are mined according to the + +![](images/1542abdcc9bbef57818d838ebe14aec121f632afda0d989544eb2159b1b4ae4a.jpg) +Figure 1: Illustration of REM on a synthetic example. We explain the whole process from the perspective of A from Class II. Firstly, we utilize the label information to form a original graph. Then, the attributes of usefulness $(U)$ and certainty $(C)$ are calculated for each edge (written as (usefulness, certainty) in the figure). We preserve $k_{i}^{+}$ neighbors and $k_{i}^{-}$ non-neighbors in the graph according to the attribute of usefulness (in this example, $k_{i}^{+}$ and $k_{i}^{-}$ are set to be 2). These preserved edges are further filtered according to the attribute of certainty. Edges with higher value of certainty and usefulness are more likely to be added to the reliable graph. + +attribute of certainty. Given these reliable edges and all nodes in the original graph, we are able to construct a reliable graph, with which the feature extractor is expected to learn well using fewer epochs. REM is complementary with currently advanced perturbation-based methods. Experiments on simple tasks like SVHN and CIFAR-10 illustrate that REM achieves comparable results with other state-of-the-art methods with fewer epochs. On more challenging tasks like CIFAR-100, REM surpasses current start-of-the-art results, reducing the best known error rate from $33.62\%$ to $31.95\%$ and from $35.09\%$ to $33.73\%$ with and without augmentation, respectively. Moreover, on Tiny ImageNet, REM reduces the error rate of the baselines from $64.21\%$ to $61.72\%$ . Visualization experiments demonstrate the efficiency of REM in proving useful and reliable edges for model training. We also find that the reliable graph encourages the model for confident outputs, which has been shown beneficial in SSL [7, 16]. + +The contribution of this paper can be summarized as: (1) We propose REM to construct a reliable graph in the embedding space. The reliable graph is a sub-graph of the original graph, containing only reliable and useful edges. (2) The reliable graph is able to guide the model learning discriminative features in a data-efficient way. (3) We demonstrate that the model becomes confident in its output after training with the reliable graph. (4) REM surpasses previous teacher graph based methods by an obvious margin and achieves currently state-of-the-art results on several benchmarks. + +# 2. Related Work + +There has been a long history of developments in Semi Supervised Learning (SSL) [36]. Recently, due to the development of deep learning [15, 10, 13, 28], many SSL ideas + +have been renovated and achieved impressive improvement compared to full-supervised learning [3, 23, 30, 12, 17]. In this section, we focus on the closely related work. For a detailed review of SSL, we refer readers to [36]. + +SSL assumes the decision boundary should lie in low-density regions. Based on this assumption, many methods have been proposed [25, 26, 21, 24]. Entropy Regularization [7] minimizes the entropy of softmax output of unlabeled data to encourage low density separation between classes. Pseudo-Labeling (PL) [16] pseudo-labels unlabeled data if the maximum output probabilities are larger than a predefined threshold. These methods encourage the model to give confident outputs, and believe there is a positive correlation between probability and correctness. Our work is also based on this assumption. Given a original graph, we determine which edges are reliable according to the probabilities and select these edges to form a reliable sub-graph. Experiments show that such a graph implicitly encourages the model to give confident output (see Fig. 6). + +Graph-based methods construct a graph with labeled and unlabeled data. Each node represents an example and each edge represents the similarity of examples. There have been a lot of traditional works on building a graph [35, 9, 34]. However, these works fix the graph and only update the weights of edges during training. Luo et al. [19] constructs a 'joint-training' sparse graph based on the predicted labels. Then the graph serves as a guideline for metric learning. However, since the predicted labels can be wrong, the edges may be unreliable (see Fig. 2). In addition, as the graph can be large if considering all data in the dataset, stochastic sampling is used for generating a sub-graph from the original graph. We argue that this kind of sub-graph is data-inefficient, thus contributing little to the learning of the em + +![](images/33a05015c570d7fe94236f95bd1cdc79ee53759b0a7d7599a0c43e1416d7e2ff.jpg) +Figure 2: Reliability-Epoch curve under different methods. The precision of reliable edges is defined as the ratio of reliable edges to all edges in the sub-graph. The method of REM without Certainty represents generating the sub-graph without the certainty attribute, only considering the usefulness attribute. + +bedding space (see Fig. 3). Our work adds two attributes to the edges: reliability and usefulness. Using these attributes, we build a reliable and useful sub-graph, with which the model is trained more efficient (see Fig. 7). + +Deep metric learning is a field aiming for an embedding space in which similar data are closer than dissimilar data [22, 27, 29]. As generating all possible pairs would lead to inefficient model training, hard example mining has been widely used for generating valuable pairs. However, hard example mining requires the label information of data, which is lacking in SSL. If we directly use the predictions to be pseudo-labels, a truly positive unlabeled example may be mistaken for a hard negative when the classifier gives incorrect prediction. In our work, we filter out unreliable edges according to the predefined certainty attribute, and then sample useful edges according to the usefulness attribute, which reduces the risk of choosing wrong data. Fig. 3 and Fig. 4 show the efficiency of our method. + +# 3. Preliminaries + +Our method is described under the setting of the semi-supervised image classification, in which a training set $\mathcal{D}$ is consist of $L$ labeled examples $\{x_i,y_i\}_{i = 1}^L\in \mathcal{L}$ and $U$ unlabeled examples $\{x_i\}_{i = 1}^U\in \mathcal{U}$ , where $x_{i}\in \mathcal{X}$ and $y_{i}\in \mathcal{Y} = \{1\dots K\}$ . Here $K$ is the number of different classes. For each example $x_{i}\in \mathcal{D}$ , let $\tilde{y}_i = \arg \max_jf_\theta (x_i)_j$ where $f_{\theta}(x_{i})$ is the output of network for the $i$ -th example. + +The goal of SSL is to train a classifier with $\mathcal{L}$ and $\mathcal{U}$ , which can be written as + +$$ +L _ {\theta} = \sum_ {i = 1} ^ {L} L _ {s} \left(f _ {\theta} \left(x _ {i}\right), y _ {i}\right) + \lambda L _ {u} (\theta , \mathcal {L}, \mathcal {U}), \tag {1} +$$ + +where $L_{s}$ is the supervised part and $L_{u}$ is the unsupervised + +![](images/33ed708e77eb5b0cbe64209b16b096181e0556f01eec5eabf40622e3c4a4d0e6.jpg) +Figure 3: Usefulness-EPOCH curve under different methods. The ratio of useful edges is defined as the ratio of useful edges to all edges in the graph. REM without Usefulness means generating the sub-graph only considering the certainty attribute. From the figure, REM without Usefulness brings in a graph with less useful edges compared to SNTG. Taking the usefulness attribute into consideration, REM maintains more useful edges. + +part. A common choice of $L_{s}$ is cross-entropy, and $L_{u}$ is different based on different assumptions. + +To utilize the information in the data structure, we can construct a graph in the embedding space, and use the graph to guide the learning of discriminative features with the help of metric learning. Suppose given a graph $G$ with nodes representing the data and edges representing the consistency of labels between nodes, contrastive embedding can be learned using the following loss, + +$$ +\begin{array}{l} L _ {u} (\theta , \mathcal {L}, \mathcal {U}) = \sum_ {\left\{i, j \right\} _ {e _ {i j} = 1}} \left[ D _ {i j} - m ^ {+} \right] _ {+} ^ {2} + \\ \sum_ {\left\{i, j \right\} _ {e _ {i j} = 0}} \left[ m ^ {-} - D _ {i j} \right] _ {+} ^ {2}. \end{array} \tag {2} +$$ + +Here, $[.]_{+}$ is the ReLU function. $e_{ij} \in E$ where $E$ is the set of edges. The values of edges are 0 or 1, where 0 and 1 represent 'dissimilarity' and 'similarity' respectively. $D_{ij}$ represents the distance between node $x_{i}$ and $x_{j}$ from the set of nodes $V$ . $m^{+}$ and $m^{-}$ are hyper-parameters. In order to learn discriminative features, $e_{ij}$ is set to 1 if $x_{i}$ and $x_{j}$ come from the same class. Otherwise, $e_{ij}$ is set to 0. For unlabeled data, the predictions from the model are used in this process, thereby may introducing unreliable edges if the predictions are incorrect. + +To reduce negative effects of this unreliable graph, previous methods like Luo et al. [19] have tried to build a subgraph with randomly sampled edges from $G$ , but they still didn't consider the reliability and usefulness of $E$ , thus suffering the risk of learning the incorrect contrastive embedding or learning inefficiently. + +# 4. Our Method + +Under the settings of SSL, the accuracy of predictions for unlabeled nodes differs in different steps of training. Since the values of edges are depended on the labels of labeled nodes and predictions of unlabeled nodes, reliable edges are also changing in the training. Therefore, our target is to build different 'dynamic' reliable graphs at different training steps. In this section, we describe the proposed Reliable Edge Mining (REM) for constructing such a 'dynamic' graph in detail, which is formalized by answering the following questions: (1) how to measure the reliability of the edges? (2) does all reliable edges attribute to the training? and (3) how to train the model with the help of the graph? The overall algorithm is illustrated in Alg. 1. + +# 4.1. Measuring the Reliability of the Edges + +We define a reliable edge as an edge with high certainty about its value. Since the values of edges represent the 'dissimilarity' and 'similarity' between nodes, the certainties of edges depend on that of nodes. + +There have been many methods on calculating the certainties of the nodes. Liu et al. [18] builds a reliable classifier which outputs the labels as well as the corresponding certainties. However, the algorithm needs a generative model as well as a discrimination model, thereby introducing more parameters and training time. Temperature scaling is effective at calibrating predictions [8], but it is a post-processing method, which doesn't match our need for constructing a dynamic reliable graph during training. + +In the proposed method, the certainties of nodes are expected to be related to the network predictions. Previous methods, like Pseudo-Labeling [16], use a threshold to filter the data with high probabilities. While high network probability does not guarantee correctness, there is a positive correlation between probability and correctness [5]. We consider the entropy of the model outputs as a measure of certainty. Given the softmax output $s_i$ of node $x_i$ , the calculation of its certainty $q_i$ can be formally defined as: + +$$ +q _ {i} = 1 - \frac {\mathrm {H} \left(s _ {i}\right)}{\log (K)}, \tag {3} +$$ + +where $\mathrm{H}(\cdot)$ is the entropy function and $K$ is the number of classes. Given the certainties of nodes, we are able to measure the reliabilities of edges. We define the certainty of an edge $e_{ij}$ as $C_{ij}$ , which depends on the certainty values of $x_{i}$ and $x_{j}$ : + +$$ +C _ {i j} = \frac {q _ {i} + q _ {j}}{2}. \tag {4} +$$ + +If only considering reliable edges, we are able to obtain a pure reliable sub-graph from the original graph. However, we argue that this kind of sub-graph contributes little to the training. According to Eq. (2), a useful edge $e_{ij}$ is an edge + +whose $D_{ij}$ is larger than $m^{+}$ if $e_{ij} = 1$ or smaller than $m^{-}$ if $e_{ij} = 0$ . Those who don't meet the requirements are useless for the training. When we construct a sub-graph only considering the attribute of reliability, the edges are likely to be useless since the nodes are well-trained (see Fig. 3 for detail). + +# 4.2. Mining Edges from the Graph + +To mine reliable and useful edges from the original graph, we prefer the edges connecting the nodes which are not well-trained. Specially, an attribute $U_{ij}$ representing the usefulness of the edge $e_{ij}$ is calculated as follows: + +$$ +U _ {i j} = e ^ {\mathcal {I} \left(\tilde {y} _ {i} = \tilde {y} _ {j}\right) \cdot D _ {i j}}, \tag {5} +$$ + +where $\mathcal{I}(\cdot)$ is a indicator function that takes on a value of 1 if its augment is true, and -1 otherwise. In practice, we use the Euclidean distance to compute $D_{ij}$ . + +Now each edge is attached with the attributes of certainty and usefulness. For each node $x_{i}$ , according to the attribute of usefulness, we firstly select the top $k_{i}^{+}$ most useful edges from the list $\{e_{ij}|e_{ij} = 1,j = 1,2,\dots,L + U\}$ to form the neighbor candidate set $P_{i}$ , and select the top $k_{i}^{-}$ most useful edges from the list $\{e_{ij}|e_{ij} = 0,j = 1,2,\dots,L + U\}$ to form the non-neighbor candidate set $N_{i}$ . Then we sample one edge from $P_{i}$ and another edge from $N_{i}$ according to the attributes of certainty. These two edges and the corresponding nodes are added to the sub-graph. With repeating this process for each node on the original graph, the reliable graph is constructed, which maintains the nodes of the original graph and contains less edges. In practice, $k_{i}^{+}$ and $k_{i}^{-}$ are set as: + +$$ +\begin{array}{l} k _ {i} ^ {+} = \sum_ {j, e _ {i j} = 1} \left[ D _ {i j} > m ^ {+} \right], \\ k _ {i} ^ {-} = \sum_ {j, e _ {i j} = 0} \left[ D _ {i j} < m ^ {-} \right], \tag {6} \\ \end{array} +$$ + +where $[\cdot ]$ is the Iverson bracket that takes on a value of 1 if its augment is true, and 0 otherwise. + +To avoid over-sampling the edges and nodes with high certainties, we decay the certainty of the nodes every time the corresponding edges are added to the reliable sub-graph. Since the value of the certainty is between 0 and 1, we simply use the square function to decay the certainty. + +# 4.3. Guiding the Model with the Graph + +The reliable graph is 'joint-trained' with the model. At the start of each iteration, the reliable graph is constructed according to Alg. 1. Then, for nodes connected by the edges with value 1, we force the feature extractor to output 'similar' features. For nodes connected by the edges with value 0, we force the extractor to output 'dissimilar' features. This can be achieved by the loss function Eq. (2). Given the class-separable features, the classifier is expected + +# Algorithm 1 Generation of a Graph with REM + +Require: $G =$ the original graph + +Require: $h_i =$ the feature of node $x_i$ in $\mathcal{X}$ + +Require: $s_i$ is the softmax output of node $x_i$ in $\mathcal{X}$ + +Require: $K$ = the number of different classes + +1: for each node $x_{i}$ do +2: Compute $q_{i}$ according to Eq. (3) given $s_i$ and $K$ +3: end for + +$$ +G _ {s} = \left(V _ {s}, E _ {s}\right) +$$ + +4: for each node $x_{i}$ do +5: Calculate the certainty of all edges connected to $x_{i}$ in $G$ according to Eq. (4) +6: Calculate the usefulness of all edges connected to $x_{i}$ in $G$ according to Eq. (5) +7: Form the neighbor candidate set $P_{i}$ and non-neighbor candidate set $N_{i}$ according to the attribute of usefulness +8: Sample an edge $e_{ij}$ from $P_i$ and an edge $e_{ik}$ from $N_i$ according to the attribute of certainty +9: Add $e_{ij}$ and $e_{ik}$ to $E_s$ +10: Add $x_{i}, x_{j}$ and $x_{k}$ to $V_{s}$ +11: Decay $q_{i}$ , $q_{j}$ and $q_{k}$ +12: end for +13: return $G_{s}$ + +to be trained easier, thus providing more reliable edges to the graph. Guided by the graph with more reliable edges, the feature extractor learns better, and provides the classifier with more class-separable features. + +Consider the synthetic example in Fig. 1. REM firstly calculates the attributes of certainty and usefulness for each edge. Then for each node $x_{i}$ in the original graph, $k_{i}^{+}$ edges and $k_{i}^{-}$ edges are selected to form $P_{i}$ and $N_{i}$ according to their usefulness attributes, from which $e_{ij}$ and $e_{ik}$ are sampled. The edges and the corresponding nodes are added to the sub-graph. As we construct the sub-graph per minibatch, the sub-graph is memory-saving. + +# 5. Experiments + +To verify the efficiency of REM, a set of experiments are conducted in this section. Specifically, we firstly compare REM with recently competitive algorithms, especially the previous teacher graph based method named SNTG [19], on the widely adopted semi-supervised learning benchmarks. Then, we visualize trained pairs and discriminative features to prove the reliability and usefulness of the graph. We highlight the data-efficiency of our method by comparing REM with SNTG on several benchmarks. Finally, we show that the model guided by the reliable graph is confident in its output. + +# 5.1. Setup + +REM is evaluated on the popularly used SVHN, CIFAR-10 and CIFAR-100 datasets. In most of our experiments, we use a standard network architecture (13-layer convolutional neural network), which has been adopted as a benchmark architecture in previous methods [14, 31, 19]. We use a softmax function with certainty as input to sample two edges from the candidates for each node. $m^{+}$ and $m^{-}$ in Eq. (2) are set to be 0 and 1, respectively. The other hyperparameters are kept to be the same as previous methods. + +# 5.2. Comparison to Other Methods + +Previous advanced perturbation-based methods, including II-model [14], temporal ensembling (Tempens) model [14] and Mean Teacher [31], are used as the baseline methods for comparison. II-model and Tempens generate teacher predictions based on perturbed models. Mean Teacher averages model weights to get a teacher model, from which the teacher predictions are obtained to guide the student model. As these methods only enforce smoothness on each single example, we naturally wonder if we can combine them with REM. We also compare REM with a previous method named SNTG [19], which can be seen as a 'random' version of REM. In detail, SNTG randomly selects edges from the original graph, while REM selects useful and reliable edges according to the attributes of edges. + +We randomly sample 250, 500, 1000 labels for SVHN, 1000, 2000, 4000 labels for CIFAR-10 and 10000 labels for CIFAR-100, respectively. Table 1 and 3 show the results reported by averaging over 10 runs. The results of SNTG using the same seeds as REM are also reported (marked with *). Guided by the reliable graph, the test error rate of perturbation-based methods are reduced by a large margin, like from $56.57\%$ to $38.30\%$ using II model on CIFAR-100. Besides, REM surpasses SNTG on most benchmarks. For instance, the test error rates are reduced from $21.23\%$ to $18.64\%$ and from $39.07\%$ to $35.44\%$ using II model on CIFAR-10 with 1000 labels and CIFAR-100 with 10000 labels. CIFAR-100 is a more difficult task containing 100 classes, and our method can still make significant improvements. It suggests that the reliable graph constructed by our method really helps to improve the generalization performance of the model. Note that when the data are all labeled (CIFAR-100 all labels with/without augmentation), REM still surpasses SNTG. We explain that the improvement is because the useful-edge-mining mechanism in our method. + +# 5.3. Stronger Baselines + +FastSWA [1] is a stronger baseline. Different from Mean Teacher in Sec. 5.2, FastSWA averages weights along the trajectory of SGD with a cyclical learning rate schedule. The authors reveal that this kind of ensembling can obtain a solution centered in a more flat region of the loss, resulting + +Table 1: Test error rates (%) on CIFAR-100 with/without standard augmentation and CIFAR-10 with standard augmentation. + +
DataSetCIFAR-100CIFAR-10
Modelwith augmentationwithout augmentationwith augmentation
10000 labelsall labels10000 labelsall labels1000 labels2000 labels4000 labels
II model [14]39.19±0.3626.32±0.0456.57±0.5429.06±0.2131.65 ± 1.2017.57 ± 0.4412.36 ± 0.31
II+SNTG*39.07±0.3825.49±0.1743.48±0.3928.24±0.2221.23 ± 1.2714.65 ± 0.3111.00 ± 0.13
II+REM (ours)35.44±0.2324.68±0.1838.30±0.3826.89±0.2418.64 ± 1.2313.65 ± 0.3311.09 ± 0.16
TempEns [14]38.65±0.5126.30±0.15--23.31 ± 1.0115.64 ± 0.3912.16 ± 0.24
TempEns+SNTG*38.68±0.3325.48±0.2343.61±0.3428.23±0.1318.86 ± 1.0713.88 ± 0.3011.01 ± 0.20
TempEns+REM (ours)35.62±0.3324.59±0.1338.77±0.3026.96±0.1917.66 ± 1.1313.33 ± 0.3510.61 ± 0.16
MT [31]35.96±0.77-36.90±0.62-19.58 ± 1.0314.76 ± 0.6611.57 ± 0.31
MT+SNTG*35.81±0.27-36.71±0.41-18.69 ± 1.3813.79 ± 0.6010.74 ± 0.56
MT+REM (ours)33.22±0.28-35.09±0.33-18.23 ± 1.2613.37 ± 0.5310.56 ± 0.20
+ +Table 2: Test error rates (%) on CIFAR-100 and Tiny ImageNet. CIFAR10k-aug and CIFAR10k-woaug represent training on CIFAR-100 using 10000 labels with and without augmentation. TIN10k-aug represents training on Tiny ImageNet using 10000 labels with augmentation. + +
ModelCIFAR10k-augCIFAR10k-woaugTIN10k-aug
Supervised-only [14]44.56±0.3051.21±0.3368.91±NA
LP [11]35.92±0.47--
CCN [32]35.28±0.23--
Π+FastSWA [1]34.25±0.1636.19±0.1963.57±0.44
Π+FastSWA+REM (ours)32.81±0.6934.25±0.2861.88±0.15
MT+FastSWA [1]*33.62±0.5435.09±0.4764.21±NA
MT+FastSWA+SNTG [19]*33.60±0.3634.70±0.5464.26±0.53
MT+FastSWA+REM (ours)31.95±0.2733.73±0.5661.72±0.37
+ +Table 3: Test error rates $(\%)$ on SVHN with standard augmentation, averaged over 10 runs. + +
Model250 labels500 labels1000 labels
Supervised-only [31]42.65 ± 2.6822.08 ± 0.7314.46 ± 0.71
TempEns [14]12.62 ± 2.915.12 ± 0.134.42 ± 0.16
TempEns+SNTG [19]5.36 ± 0.574.46 ± 0.263.98 ± 0.21
TempEns+REM (ours)5.07 ± 0.384.40 ± 0.293.87 ± 0.15
+ +in better generalization performance. However, FastSWA still doesn't utilize the information in the embedding space, motivating us to think about whether this strong baseline can be further improved with REM. To verify this, we combine FastSWA with REM and test on CIFAR-100 and Tiny ImageNet. Tiny ImageNet is a subset of ImageNet [4]. It contains 200 classes with 500 training images, 50 validation images, and 50 test images for each class, which is more challenging. On CIFAR-100, we use the same standard architecture and hyper-parameters as before. But on + +Tiny ImageNet, a 12-block (26-layer) Residual Network [10] with Shake-Shake regularization [6] is used following [1]. The results are reported by averaging over 3 runs on CIFAR-100 and 2 runs on Tiny ImageNet. As the comparison presented in Table 2, REM reduces the error rate from $33.62\%$ to $31.95\%$ and from $35.09\%$ to $33.73\%$ with and without augmentation on CIFAR-100, surpassing previous advanced methods like LP [11] and CCN [32]. Moreover, in spite of large number of classes in Tiny ImageNet, REM still makes significant improvements compared with SNTG (from $64.26\%$ to $61.27\%$ ). It suggests again that the graph constructed by REM helps improve the generalization ability of the model. + +# 5.4. Visualization + +To check whether REM constructs reliable graphs, we randomly select edges from the sub-graph generated by REM and SNTG, respectively, and visualize the data connected by the edges. The experiment is done on CIFAR-100 with 10000 labeled data. As shown in Fig. 4, on one + +![](images/f1406e1a7e447c79d1a903b8606505df667b7a8bced1bacaf71131ae61e82c41.jpg) + +![](images/cf7361d1e8a58859a30747c9d1ca25322dda4d37f3995bcdc2516613b2524927.jpg) +(a) REM + +![](images/ddca2d6be05928e772d71a15d0730c5042bdf913085f809fb122d88135dc99a5.jpg) + +![](images/ac2b0cf7443674b63f2551216b53d404bc362f7f0b5bcc5b0bc0a4758df499a9.jpg) + +![](images/6529015bd9729a9ab54395af6be534859b2754b7d3bd4608ae37400f73803b28.jpg) +(b) SNTG + +![](images/0e0dcd0d65a897220b8f817a45e702b14bcdfa04e25eb635ede6fa0c67ff074b.jpg) + +![](images/9cbb913c18b1c2d844e8d3d69b96b54249734fd0ab56ec90793bb287bd6230ae.jpg) +Figure 4: We visualize the data connected by edges in the sub-graph of REM and SNTG on CIFAR-100. The first column represents each $x_{i}$ . The second and the third column are the neighbor $(x_{j})$ and non-neighbor $(x_{k})$ of this sample. Our method is able to select more challenging and reliable pairs, while SNTG may select incorrect data for training. See Sec. 5.4 for detail. +(a) SNTG + +![](images/9b58be400ae271ed7886b9f6e20da502f2e117c38a6c9725b112526e8b68335a.jpg) +(b) REM +Figure 5: Comparison of the 2D features generated by SNTG and REM on the CIFAR-10 test data. At epoch 100, our method is able to generate some compact clusters, while SNTG only generates divergent clusters. + +hand, REM finds more challenging and reliable edges (take the first row as example, a dinosaur can find another dinosaur as its neighbor and a lion as its non-neighbor). On the other hand, SNTG may find wrong neighbors or easy non-neighbors (take the first row as example, a flatfish finds a girl as its neighbor and a sunflower as its non-neighbor). This observation supports our analysis in Sec. 3 and Sec. 4. Furthermore, to explore whether REM guides the feature extractor to learn discriminative feature efficiently, we further visualize the last hidden layer on test data of CIFAR-10 with PCA [20]. The models of REM and SNTG are trained on CIFAR-10 with 500 labels using the same hyperparameters and training strategy. Fig. 5 demonstrates that REM encourages concentrated clusters while keeping distances between clusters after fewer epochs of training. On the contrary, the clusters are more divergent and closer to + +each other even after 300 epochs of training with SNTG. Therefore, REM is more efficient in learning more discriminative features. + +# 5.5. Encouraging Confident Output of the Model + +To clarify the relationships between the certainty and the correctness, we evenly split the certainty interval into four bins and add data to the corresponding bin according to their certainties. As shown in Fig. 6, for bins with high certainty, the predictions are more likely to be correct, which supports our assumption that there is a positive correlation between certainty and correctness. Moreover, when we compare SNTG and REM in Fig. 6, it can be seen that REM encourages more confident outputs than SNTG, meaning that the reliable graph encourages confident output of the model. With these two observations, we can describe REM in a joint learning way: the model first predicts some labels, based on which REM constructs a reliable sub-graph with reliable edges. In turn, the reliable graph encourages the model to give more confident outputs. As there are more reliable edges than in the original graph, REM constructs graphs with more reliable edges, which guides the model to learn better. + +# 5.6. Effectiveness of the Attributes + +To investigate whether the attributes of certainty and usefulness really contribute to the construction of a reliable graph, we compare the following methods: (1) SNTG: generating a sub-graph randomly, which can be seen as our baseline; (2) REM: generating a sub-graph considering the certainty and usefulness; (3) REM without Certainty/Usefulness: generating a sub-graph without considering the certainty or the usefulness. As shown in Fig. 2, the precision of reliable edges of REM without Certainty is much lower than SNTG, and that of REM is higher than SNTG. Similarly, Fig. 3 demonstrates that adopting the at + +![](images/0447a461a72f980ed5458d86ee85375b1b5dd95a25517018e562eb961f33e76a.jpg) +(a) Epoch 100 + +![](images/5fbd247b843e1cfd8da0d9573290d8cdc3c6acdb66876b672275e8399afa057e.jpg) +(b) Epoch 200 + +![](images/8f515c5ac260b8af9c2aa6dd83191cfe19124fbe9b75715f84dfe86fc8336479.jpg) +(c) Epoch 300 +Figure 6: Splitting the certainty interval into four bins and adding data to the corresponding bin according to their certainties. The bars with $\square$ or $\square$ represent the number of data in the interval. The bars with $\square$ or $\square$ represents the correctly predicted number of data in the interval. + +tribute of Usefulness can help REM surpasses SNTG in the ratio of useful edges mined. Therefore, we can draw a conclusion that both these two attributes of edges really contribute to the construction of a reliable graph. + +# 5.7. Comparison on Data Utilization + +As the reliable graph efficiently utilizes data and correctly guides the model, we are curious if it can help model train with seeing data less time. We study the efficiency of REM and SNTG on SVHN, CIFAR-10 and CIFAR-100 (CIFAR-10 with 500, 1000 and 4000 labels, SVHN with 500 labels, CIFAR-100 with 10000 labels, both with data augmentation). Fig. 7 shows that REM achieves the best results of SNTG with much less training iterations (about 1/3 epochs on CIFAR-100 with 10000 labels) and less time consumption, which means only changing the randomly constructed sub-graph to a reliable one can help model train more efficient. + +# 5.8. Ablation Study + +To clarify the effectiveness of the insights in REM, we compare the performances of respectively removing these components from REM. Specially, we measure the effect of (1) REM without Certainty: Randomly selecting edges from the hard neighbor candidate set and non-neighbor candidate set, which can be seen as ignoring certainty; (2) REM without Usefulness: Sampling edges considering only the attribute of certainty, which can be seen as ignoring usefulness; and (3) REM without Decaying: the certainty of the edge will not be decayed when added to the sub-graph. SNTG is used as the baseline, as it generates a sub-graph without Certainty/Usefulness/Decaying. We carry out the experiments on CIFAR-100 using 10000 labels with standard augmentation. Each result is reported by averaging over 10 runs. As shown in Table 4, each component is important for our final performance. Specially, the Certainty component and the Usefulness component can reduce the test error of SNTG by at least $2\%$ points on CIFAR-100 + +![](images/65b0e441ea5ab6b2c4eea7949c490223144ba7799df087b7a08039712845a2b2.jpg) +(a) +Figure 7: (a) Comparing the number of iterations required for SNTG and REM to achieve the same accuracy on test set. The best test accuracy of SNTG is used in the experiment. (b) Comparing the error rate obtained by SNTG and REM at the same time consumption. + +![](images/81547cd0b74d9b6dddb5d93736d73b480b467a67afc6af9cbbaff62b47655fe6.jpg) +(b) + +Table 4: Test error rates $(\%)$ on CIFAR-100 using 10000 labels with standard augmentation, averaged over 10 runs. + +
ModelCIFAR-100 with 10000 labels
SNTG [19]38.68 ± 0.33
REM without Certainty36.69 ± 0.44
REM without Usefulness35.98 ± 0.36
REM without Decaying35.69 ± 0.30
REM35.62 ± 0.33
+ +with 10000 labels. And the combination of them finally reduces the result by $3\%$ points. + +# 6. Conclusion + +This work explores how to build a reliable graph in the embedding space, for better guidance of the training of the model. We find that the random graphs generated by previous Teacher Graph based methods, can lead to data-inefficient training due to the wrongly tagged or useless edges. To solve the problem, we propose Reliable Edge Mining to build a reliable graph, which only contains carefully selected edges according to two attributes: reliability and usefulness. Guided by the graph, the feature extractor is able to learn discriminative features with less iterations over data. Our experiments demonstrate that REM utilizes data more efficiently on simple tasks like SVHN and CIFAR-10, and achieves state-of-the-art results on more difficult tasks like CIFAR-100. We also show that the model guided by the reliable graph is confident in the outputs, meaning that the method implicitly encourages the decision boundary to lie in low-density regions. + +# Acknowledgement + +This paper is supported by the National key RD plan of the Ministry of science and technology ("Grid function expansion technology and equipment for community risk prevention", Project No. 2018YFC0809704), and Beijing Academy of Artificial Intelligence, BAAI. + +# References + +[1] Ben Athiwaratkun, Marc Finzi, Pavel Izmailov, and Andrew Gordon Wilson. There are many consistent explanations of unlabeled data: Why you should average. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. Open-Review.net, 2019. 5, 6 +[2] Olivier Chapelle, Bernhard Schölkopf, and Alexander Zien. Introduction to semi-supervised learning. In Olivier Chapelle, Bernhard Schölkopf, and Alexander Zien, editors, Semi-Supervised Learning, pages 1-12. The MIT Press, 2006. 1 +[3] Zihang Dai, Zhilin Yang, Fan Yang, William W. Cohen, and Ruslan Salakhutdinov. Good semi-supervised learning that requires a bad GAN. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pages 6510-6520, 2017. 2 +[4] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Fei-Fei Li. Imagenet: A large-scale hierarchical image database. In 2009 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR 2009), 20-25 June 2009, Miami, Florida, USA, pages 248-255. IEEE Computer Society, 2009. 6 +[5] Geoffrey French, Michal Mackiewicz, and Mark H. Fisher. Self-ensembling for visual domain adaptation. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018. 4 +[6] Xavier Gastaldi. Shake-shake regularization. CoRR, abs/1705.07485, 2017. 6 +[7] Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. In François Denis, editor, Actes de CAP 05, Conférence francophone sur l'apprentissage automatique - 2005, Nice, France, du 31 mai au 3 juin 2005, pages 281-296. PUG, 2005. 2 +[8] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q. Weinberger. On calibration of modern neural networks. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pages 1321-1330. PMLR, 2017. 4 +[9] Jingrui He, Jaime G. Carbonell, and Yan Liu. Graph-based semi-supervised learning as a generative model. In Manuela M. Veloso, editor, *IJCAI* 2007, Proceedings of the 20th International Joint Conference on Artificial Intelligence, Hyderabad, India, January 6-12, 2007, pages 2492-2497, 2007. 2 +[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778. IEEE Computer Society, 2016. 2, 6 +[11] Ahmet Iscen, Giorgos Tolias, Yannis Avrithis, and Ondrej Chum. Label propagation for deep semi-supervised learning. In IEEE Conference on Computer Vision and Pattern + +Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 5070-5079. Computer Vision Foundation / IEEE, 2019. 6 +[12] Diederik P. Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Zoubin Ghahramani, Max Welling, Corinna Cortes, Neil D. Lawrence, and Kilian Q. Weinberger, editors, Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, December 8-13 2014, Montreal, Quebec, Canada, pages 3581-3589, 2014. 2 +[13] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Peter L. Bartlett, Fernando C. N. Pereira, Christopher J. C. Burges, Leon Bottou, and Kilian Q. Weinberger, editors, Advances in Neural Information Processing Systems 25: 26th Annual Conference on Neural Information Processing Systems 2012. Proceedings of a meeting held December 3-6, 2012, Lake Tahoe, Nevada, United States, pages 1106-1114, 2012. 2 +[14] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net, 2017. 1, 5, 6 +[15] Yann LeCun, Yoshua Bengio, and Geoffrey E. Hinton. Deep learning. Nature, 521(7553):436-444, 2015. 1, 2 +[16] Dong-Hyun Lee. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on Challenges in Representation Learning, ICML, volume 3, page 2, 2013. 2, 4 +[17] Chongxuan Li, Taufik Xu, Jun Zhu, and Bo Zhang. Triple generative adversarial nets. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pages 4088-4098, 2017. 2 +[18] Xiuming Liu, Dave Zachariah, and Johan Wägberg. Robust semi-supervised learning when labels are missing at random. CoRR, abs/1811.10947, 2018. 4 +[19] Yucen Luo, Jun Zhu, Mengxi Li, Yong Ren, and Bo Zhang. Smooth neighbors on teacher graphs for semi-supervised learning. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 8896-8905. IEEE Computer Society, 2018. 1, 2, 3, 5, 6, 8 +[20] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of machine learning research, 9(Nov):2579-2605, 2008. 7 +[21] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: A regularization method for supervised and semi-supervised learning. IEEE Trans. Pattern Anal. Mach. Intell., 41(8):1979–1993, 2019. 1, 2 +[22] Mohammad Norouzi, David J. Fleet, and Ruslan Salakhutdinov. Hamming distance metric learning. In Peter L. Bartlett, + +Fernando C. N. Pereira, Christopher J. C. Burges, Léon Botou, and Kilian Q. Weinberger, editors, Advances in Neural Information Processing Systems 25: 26th Annual Conference on Neural Information Processing Systems 2012. Proceedings of a meeting held December 3-6, 2012, Lake Tahoe, Nevada, United States, pages 1070-1078, 2012. 3 +[23] Augustus Odena. Semi-supervised learning with generative adversarial networks. CoRR, abs/1606.01583, 2016. 2 +[24] Sungrae Park, Jun-Keon Park, Su-Jin Shin, and Il-Chul Moon. Adversarial dropout for supervised and semi-supervised learning. In Sheila A. McIlraith and Kilian Q. Weinberger, editors, Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence, (AAAI-18), the 30th innovative Applications of Artificial Intelligence (IAAI-18), and the 8th AAAI Symposium on Educational Advances in Artificial Intelligence (EAAI-18), New Orleans, Louisiana, USA, February 2-7, 2018, pages 3917-3924. AAAI Press, 2018. 1, 2 +[25] Antti Rasmus, Mathias Berglund, Mikko Honkala, Harri Valpola, and Tapani Raiko. Semi-supervised learning with ladder networks. In Corinna Cortes, Neil D. Lawrence, Daniel D. Lee, Masashi Sugiyama, and Roman Garnett, editors, Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, pages 3546-3554, 2015. 1, 2 +[26] Mehdi Sajjadi, Mehran Javanmardi, and Tolga Tasdizen. Regularization with stochastic transformations and perturbations for deep semi-supervised learning. In Daniel D. Lee, Masashi Sugiyama, Ulrike von Luxburg, Isabelle Guyon, and Roman Garnett, editors, Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 1163-1171, 2016. 1, 2 +[27] Florian Schroff, Dmitry Kalenichenko, and James Philbin. Facenet: A unified embedding for face recognition and clustering. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2015, Boston, MA, USA, June 7-12, 2015, pages 815-823. IEEE Computer Society, 2015. 3 +[28] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In Yoshua Bengio and Yann LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. 2 +[29] Hyun Oh Song, Yu Xiang, Stefanie Jegelka, and Silvio Savarese. Deep metric learning via lifted structured feature embedding. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 4004-4012. IEEE Computer Society, 2016. 3 +[30] Jost Tobias Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. In Yoshua Bengio and Yann LeCun, editors, 4th International Conference on Learning Representations, ICLR 2016, San Juan, Puerto Rico, May 2-4, 2016, Conference Track Proceedings, 2016. 2 + +[31] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, 4-9 December 2017, Long Beach, CA, USA, pages 1195-1204, 2017. 5, 6 +[32] Si Wu, Jichang Li, Cheng Liu, Zhiwen Yu, and Hau-San Wong. Mutual learning of complementary networks via residual correction for improving semi-supervised classification. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 6500-6509. Computer Vision Foundation / IEEE, 2019. 6 +[33] Bing Yu, Jingfeng Wu, Jinwen Ma, and Zhanxing Zhu. Tangent-normal adversarial regularization for semi-supervised learning. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 10676-10684. Computer Vision Foundation / IEEE, 2019. 1 +[34] Xiaojin Zhu and Zoubin Ghahramani. Learning from labeled and unlabeled data with label propagation. Technical report, Carnegie Mellon University, 2002. 2 +[35] Xiaojin Zhu, Zoubin Ghahramani, and John D. Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In Tom Fawcett and Nina Mishra, editors, Machine Learning, Proceedings of the Twentieth International Conference (ICML 2003), August 21-24, 2003, Washington, DC, USA, pages 912-919. AAAI Press, 2003. 2 +[36] Xiaojin Jerry Zhu. Semi-supervised learning literature survey. Technical report, University of Wisconsin-Madison Department of Computer Sciences, 2005. 1, 2 \ No newline at end of file diff --git a/dataefficientsemisupervisedlearningbyreliableedgemining/images.zip b/dataefficientsemisupervisedlearningbyreliableedgemining/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..ec1bb81744e12391ed3f21a5155a7a452f4b79cd --- /dev/null +++ b/dataefficientsemisupervisedlearningbyreliableedgemining/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9e8fbcbf1686607ebd498e661790f801f2fe80b50402cb762053bd8483ac2dd +size 476229 diff --git a/dataefficientsemisupervisedlearningbyreliableedgemining/layout.json b/dataefficientsemisupervisedlearningbyreliableedgemining/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5e0cf0ff01e25e24dfeb375e9f60b18bd1b8fd03 --- /dev/null +++ b/dataefficientsemisupervisedlearningbyreliableedgemining/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a1d249da30036b4e737d062c0543c5ea3836c729aadb4c4e845681631a044826 +size 437693 diff --git a/datafreeknowledgeamalgamationviagroupstackdualgan/b596d2ea-65aa-416d-9e1e-8a6a0d2801f2_content_list.json b/datafreeknowledgeamalgamationviagroupstackdualgan/b596d2ea-65aa-416d-9e1e-8a6a0d2801f2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..bad73e7c279831d1874aa3aac9aaeed3f285978e --- /dev/null +++ b/datafreeknowledgeamalgamationviagroupstackdualgan/b596d2ea-65aa-416d-9e1e-8a6a0d2801f2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3d143ceeb587b16d96db7e7ef31f2a3253cd8fa6fc23eea0ee2e72c3752e734 +size 80282 diff --git a/datafreeknowledgeamalgamationviagroupstackdualgan/b596d2ea-65aa-416d-9e1e-8a6a0d2801f2_model.json b/datafreeknowledgeamalgamationviagroupstackdualgan/b596d2ea-65aa-416d-9e1e-8a6a0d2801f2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1763846bfc45db2933edade50c21ef03427c415b --- /dev/null +++ b/datafreeknowledgeamalgamationviagroupstackdualgan/b596d2ea-65aa-416d-9e1e-8a6a0d2801f2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e43c85cfe7aea4d1fd73ef4e531e96d5edc6bb59091f729cae6f202a98cb9512 +size 99066 diff --git a/datafreeknowledgeamalgamationviagroupstackdualgan/b596d2ea-65aa-416d-9e1e-8a6a0d2801f2_origin.pdf b/datafreeknowledgeamalgamationviagroupstackdualgan/b596d2ea-65aa-416d-9e1e-8a6a0d2801f2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6aebcfe38724746c59f967b715b203d80a165447 --- /dev/null +++ b/datafreeknowledgeamalgamationviagroupstackdualgan/b596d2ea-65aa-416d-9e1e-8a6a0d2801f2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aab474c034de515e7e9edfc45eafb21b6f4f2f4cd5d60aacf50e76af718e4f4f +size 1023456 diff --git a/datafreeknowledgeamalgamationviagroupstackdualgan/full.md b/datafreeknowledgeamalgamationviagroupstackdualgan/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5fae9b50dc6d62edb0483bb61ebd7101ac9b6392 --- /dev/null +++ b/datafreeknowledgeamalgamationviagroupstackdualgan/full.md @@ -0,0 +1,417 @@ +# Data-Free Knowledge Amalgamation via Group-Stack Dual-GAN + +Jingwen Ye $^{1}$ , Yixin Ji $^{1}$ , Xinchao Wang $^{2}$ , Xin Gao $^{3}$ , Mingli Song $^{1}$ $^{1}$ College of Computer Science and Technology, Zhejiang University, Hangzhou, China + $^{2}$ Department of Computer Science, Stevens Institute of Technology, New Jersey, United States + $^{3}$ Alibaba Group, Hangzhou, China +{yejingwen, jiyixin, brooksong} @zju.edu.cn, xinchao.w@gmail.com, zimu.gx@alibaba-inc.com + +# Abstract + +Recent advances in deep learning have provided procedures for learning one network to amalgamate multiple streams of knowledge from the pre-trained Convolutional Neural Network (CNN) models, thus reduce the annotation cost. However, almost all existing methods demand massive training data, which may be unavailable due to privacy or transmission issues. In this paper, we propose a data-free knowledge amalgamate strategy to craft a well-behaved multi-task student network from multiple single/multi-task teachers. The main idea is to construct the group-stack generative adversarial networks (GANs) which have two dual generators. First one generator is trained to collect the knowledge by reconstructing the images approximating the original dataset utilized for pre-training the teachers. Then a dual generator is trained by taking the output from the former generator as input. Finally we treat the dual part generator as the target network and regroup it. As demonstrated on several benchmarks of multi-label classification, the proposed method without any training data achieves the surprisingly competitive results, even compared with some full-supervised methods. + +# 1. Introduction + +In the past few years, deep convolutional neural networks (CNNs) have been widely used to achieve state-of-the-art performances in various artificial intelligent applications, such as tracking [22, 2], classification [16] and segmentation [33, 35]. The success of the widely used CNNs, however, heavily relies on heavy computation and storage as well as a massive number of human annotations, sometimes even up to the scales of tens of millions such as those of ImageNet. However, in many cases of the real-world applications, the training data or annotations are confidential and therefore, unavailable to the public. + +To alleviate the re-training and reproducing effort, various effective approaches have been proposed recently. For + +![](images/3234eb2eb0f58c955e9e0270143c70ae32612051b9f5ee16babf2dfd128aec83.jpg) +Figure 1. The architecture of Dual-GAN where the corresponding discriminator is not depicted. The generator (left) synthesizes the images, while the dual-generator (right) produces the label vectors. + +example, the usual transfer learning approach [37, 31] utilizes the pre-trained base network and then copies its first few layers to those of a target network to train toward the target task. Besides, the seminal work of knowledge distillation (KD) [13] learns a compact student model by the aid of the soft labels obtained from the teachers. Other than these works that learn from one single network, knowledge amalgamation (KA) [36] is proposed to effectively reuse multiple pre-trained networks, and make the learned multiknowledge settle well in one single network. Besides, the process of KA doesn't require any annotations, where only the intermediate features are treated as knowledge to guide training. + +Training with KA demands for the unlabeled dataset only, which reduces the annotation cost largely. But it is also a common situation with no access to any training samples, even the related raw input, due to the extreme privacy policy or other irresistible factors. For example, building the face detection system, it is a violation of portraits right to publish the users' profile photos. And taking the unrelated dataset as replacement leads to unsatisfying results for the existence of the domain gap. So, in this paper, we investigate a practical strategy to train a customized network + +with the knowledge amalgamated from the teachers, where neither the annotations nor the input images are required. + +In the field of training without data, only a few researches have been carried out, most of which work on the network compression [21, 19]. For example, DAFL [3] applies a modified GAN to generate the input images and the corresponding annotations. Nevertheless, these methods do work on the simple datasets like MNIST [17] and CIFAR-10 [15], but go under more complicated datasets with more difficult tasks. In this paper, we propose a new data-free knowledge amalgamation framework for training the target network, which is realized by the dual-GAN in Fig. 1. Firstly, we train a generator to amalgamate the knowledge from the pre-trained teachers. Secondly, the generator transfers the learned knowledge to the dual-generator (TargetNet) by the generated samples. Finally, the final target network is extracted from the dual-generator. + +To this end, we bring forward a feasible data-free framework into knowledge amalgamation. Our contribution is therefore an effective approach to training a student model termed TargetNet, without human annotations, even without any real input data, that amalgamates the knowledge from a pool of teachers working on different tasks. The procedure is to first collect the amalgamated knowledge into the GAN and then pass it through to TargetNet. The constructed GAN is designed into the dual-architecture consisting of several unique groups, with the intermediate features generation improving the reliability. + +# 2. Related Work + +In this section, we briefly review the recent approaches in multi-label learning, the knowledge-based methods and several data-free methods. + +Multi-task Learning. Multi-task learning(MTL) has been widely studied in many fields, including computer vision [8, 1], natural language processing [4], and machine learning [26, 42]. The main difficulty in MTL is how to well describe the hierarchical relations among tasks and effectively learn model parameters under the regularization frameworks. + +One reliable way is to utilize the tree structure. For example, Zhang et al. [10] proposes a probabilistic tree sparsity model that utilizes the tree structure to obtain the sparse solution. More recently, ML-forest [32] is proposed to learn an ensemble of hierarchical multi-label classifier trees to reveal the intrinsic label dependencies. + +Another popular way has been focused on fusing MTL with CNN to learn the shared features and the task-specific models. For example, Zhang et al. [42] proposes a deep CNN for joint face detection, pose estimation, and landmark localization. Misra et al. [20] propose a cross-stitch network for MTL to learn an optimal combination of shared and task-specific representations. In [40], a task-constrained + +deep network is developed for landmark detection with facial attribute classifications as the side tasks. Zhao et al. [43] proposes a multi-task learning system to jointly train the task of image captioning and two other related auxiliary tasks which help to enhance the CNN encoder and the RNN decoder in the image captioning model. With the consideration of a large number of possible label sets, most multi-task learning methods require sufficient labeled training samples. Multi-label co-training [39] introduces a semi-supervised method that leverages information concerning the co-occurrence of pairwise labels. To reduce the annotation cost, Durand et al. [5] propose to train a model with a partial label with a new classification loss that exploits the proportion of known labels per example. + +Knowledge-based Learning. First proposed in [13], knowledge distillation aims at training a student model of a compact size by learning from a larger teacher model or a set of teachers handling the same task, and thus finds its important application in deep model compression [38]. More recently, the work of [7] introduces a multi-teacher and single-student knowledge concentration approach. The work of [24], on the other hand, trains a student classifier by learning from multiple teachers with different classes. + +In order to handle the multi-task problem in one single network, the work of [34] proposes an effective method to train the student network on multiple scene understanding tasks, which leads to better performance than the teachers. To make it further, Ye et al. [36] apply a two-step filter strategy to customize the arbitrary task set on TargetNet. + +Data-free Learning. For the strict premise of leaving out the whole dataset, there are only a few methods proposed for training deep neural networks without the original training dataset. For example, Srinivas et al. [25] choose to minimize the expected squared difference of logits, which makes it possible to avoid using any training data for model compression. In addition, Lopes et al. [19] attempt to regenerate batches of data based on meta data collected at training time describing the activation of the network, rather than relying on the original dataset to guide the optimization. + +In addition, utilizing generative models is thought to be a more feasible way with regard to the data-free demand. GAN [9] has shown the capability of generating better high-quality images [28, 14], compared to existing methods such as Restricted Boltzmann Machines [12] and Deep Boltzmann Machines [23]. A vanilla GAN model [9] has two important components, i.e. a generator and a discriminator. The goal of generator is to generate photo-realistic images from a noise vector, while the corresponding discriminator is trying to distinguish between a real image and the image generated by the generator. DAFL [3] utilizes GAN in the scheme of teacher-student learning, which treats the original teacher network as the discriminator and generates the training samples for the light-weight student. + +![](images/f7234a2ef0a3652fcdc625d500d0c12e522040a5d5cd7c2316129420b1ec55bb.jpg) +Figure 2. Training the group-stack GAN with the knowledge amalgamated from the teachers. The figure exhibits the situation that a three-group GAN is trained with two teachers as corresponding multiple group-stack discriminators. + +# 3. Problem Definition + +In this work, we aim to explore a more effective approach to train the student network (TargetNet), without any annotations, even without any training input images, only utilizing the knowledge amalgamated from the pre-trained teachers. The TargetNet is designed to deal with multiple tasks, and particularly, we focus on the multi-label classification problem, tending to learn a customized multi-branch network that can recognize all labels selected from separate teachers. + +Notations. We denote by $C$ the number of the customized categories, and $Y_{cst} = \{y_1,y_2,\dots,y_C\} \subseteq \{0,1\}^C$ as the label vector. The problem we address here is to train the TargetNet $\mathcal{T}$ which can simultaneously handle multiple tasks on the customized label set $Y_{cst}$ . TargetNet amalgamates the knowledge from $M$ pre-trained teachers, which are denoted as $\mathcal{A} = \{\mathcal{A}_1,\mathcal{A}_2,\dots,\mathcal{A}_M\}$ . For each teacher $m$ , a $T_m$ -label classification task $Y_{m} = \{y_{m}^{1},y_{m}^{2},\dots,y_{m}^{T_{m}}\}$ is learned in advance. Then, the customized label set in TargetNet and those in the teacher networks are in the constraint: $Y_{cst}\subseteq \bigcup_{m = 1}^{M}Y_{m}$ , which reveals that either the full or the subset of classification labels is alternative for making up the customized task set. + +Specifically, we use $F_{m}^{b}$ to denote the feature maps in the $b$ -th block of the $m$ -th pre-trained teacher, which are the knowledge to be amalgamated for the student's training. + +# 4. Proposed Method + +In this section, we will describe the details of the proposed data-free framework for training a target network + +with the knowledge amalgamated from the pre-trained teachers, which is realized by constructing the group-stack GAN in the dual architecture. + +The process of obtaining the well-behaved TargetNet with the proposed data-free framework contains three steps. In the first step, we train the generator $G$ with knowledge amalgamation in the adversarial way, where the images in the same distribution of the original dataset can be manufactured. In the second step, the dual generator $\mathcal{T}$ is trained with the generated samples from $G$ in the block-wise way to produce multiple predict labels. This dual architecture containing two sub-generators can be denoted as: + +$$ +\begin{array}{l}G (z): z \rightarrow \mathcal {I}\\\tau (\tau): \tau : \text {Y}\end{array}\tag {1} +$$ + +$$ +\mathcal {T} (\mathcal {I}): \mathcal {I} \rightarrow Y _ {c s t}, +$$ + +where $\mathcal{I}$ donates the image, $z$ is the random noise and $Y_{cst}$ is the predicted labels. + +Finally in the third step, after training the whole dualGAN, we take and modify the dual-generator as TargetNet for classifying the customized label set $Y_{cst}$ . In this way, the specific GAN is embedded into the knowledge amalgamation training, thus makes it unconstrained for the training data. + +# 4.1. Amalgamating GAN + +In order to learn the customized TargetNet while avoiding using the real data, we choose first to amalgamate the knowledge from multiple teachers in an extra container (GAN). + +Let's begin with the arbitrary vanilla GAN. The original formulation of the GAN is a minimax game between a gen- + +erator, $G(z):z\to \mathcal{I}$ and a discriminator, $D(x):\mathcal{I}\rightarrow [0,1]$ , and the objective function can be defined as: + +$$ +\begin{array}{l} \mathcal {L} _ {G A N} = \mathbb {E} _ {x \sim p _ {\text {d a t a}} (\mathcal {I})} [ \log D (\mathcal {I}) ] \tag {2} \\ + \mathbb {E} _ {z \sim p _ {z} (z)} [ \log (1 - D (G (z))) ]. \\ \end{array} +$$ + +For the absence of the real data, it is infeasible to perform the traditional training by Eq. 2. Besides, in order to amalgamate multiple streams of knowledge into the generator, several modifications have been made as follows. + +Group-stack GAN. The first modification is the groupstack architecture. In this paper, the generator is designed to generate not only the images suitable for TargetNet's training, but also the intermediate activations aligned with the teachers. Thus, we set $B$ as the total group number of the generator, which is the same as the block numbers of the teacher and the student networks. In this way, the generator can be denoted as a stack of $B$ groups $\{G^1, G^2, \dots, G^B\}$ , from which both the image $\mathcal{I}_{gan}$ and the consequent activations $F_{gan}^{j}$ at group $j$ are synthesised from a random noise $z$ : + +$$ +\begin{array}{l} F _ {g a n} ^ {1} = G ^ {1} (z) \tag {3} \\ F _ {g a n} ^ {j} = G ^ {j} (F _ {g a n} ^ {j - 1}) \quad 1 < j \leq B, \\ \end{array} +$$ + +when $j = B$ , the output of the $B$ -th group $G^B$ is $F_{gan}^B$ which is also thought as the final generated image $\mathcal{I}_{gan}$ . + +Since the generator is in the group-stack architecture, the symmetric discriminator consisting of several groups is built. For each group $G^{j}$ , the corresponding discriminator is $D_{j}$ , and the group adversarial pair is presented as $[\{G^{1},D^{1}\},\{G^{2},D^{2}\},\dots,\{G^{B},D^{B}\}]$ . In this way, the satisfying $G^{j*}$ can be acquired by: + +$$ +G ^ {j *} = \arg \min _ {G ^ {j}} \mathbb {E} _ {z \sim p _ {z (z)}} [ \log (1 - D ^ {j *} (G ^ {j} (F _ {g a n} ^ {j - 1}) ], \tag {4} +$$ + +where $1 \leq j \leq B$ and $D^{j*}$ is the optimal $j$ -group discriminator. Recall that we don't have the real data, training the discriminator in the normal adversarial way becomes a virtual impossibility. Therefore, we transfer it to designing a plausible loss function to calculate the difference between the generated samples and the real ones. Thus, we take the off-the-shelf teacher network $\mathcal{A}$ to constitute each $D^{j}$ : + +$$ +D ^ {j} \leftarrow \bigcup_ {i = 1} ^ {j} \{\mathcal {A} ^ {B - j + i} \}. \tag {5} +$$ + +During the training for the group pair $\{G^j, D^j\}$ , only $G^j$ is optimized with discriminator $D^j$ fixed, whose output is for classifying multiple labels. Motivated by the work of [3], we make use of several losses to constraint the output of $D^j$ to motivate the real data's response. + +The raw output for $D$ is $\mathcal{O}(F_{\text{gan}}) = \{y^1, y^2, \dots, y^C\}$ , with the predict label as $t^i$ : + +$$ +t ^ {i} = \left\{ \begin{array}{l l} 1 & y ^ {i} \geq \epsilon \\ 0 & y ^ {i} < \epsilon \end{array} , \right. \tag {6} +$$ + +where $1 \leq i \leq C$ and $\epsilon$ is set to be 0.5 in the experiment. Then the one-hot loss function can be defined as: + +$$ +\mathcal {L} _ {o h} = \frac {1}{C} \sum_ {i} \ell \left(y ^ {i}, t ^ {i}\right), \tag {7} +$$ + +where $\ell$ is the cross entropy loss for each label's classification. And $\mathcal{L}_{oh}$ enforces the outputs of the generated samples to be close to one-hot vectors. + +In addition, the outputs need to be sparse, since an image in the real world can't be tagged with dense labels which are the descriptions for different situations. So we propose an extra discrete loss function $\mathcal{L}_{dis}$ : + +$$ +\mathcal {L} _ {d i s} = - \frac {1}{C} \sum_ {i} | y ^ {i} |, \tag {8} +$$ + +which is also known as the L1-norm loss function. + +Finally, combining all the losses, the final objective function can be obtained: + +$$ +\mathcal {L} _ {g a n} = \mathcal {L} _ {o h} + \alpha \mathcal {L} _ {a} + \beta \mathcal {L} _ {i e} + \gamma \mathcal {L} _ {d i s}, \tag {9} +$$ + +where $\alpha, \beta,$ and $\gamma$ are the hyper parameters for balancing different loss items. $\mathcal{L}_a$ and $\mathcal{L}_{ie}$ are the activation loss function and information entropy loss function, respectively. Those losses are proposed by [3] and will be detailed introduced in the supplementary. + +Multiple Targets. In this paper, the TargetNet is customized to perform multi-label classifications learning from multiple teachers. So, the generator should generate samples containing multiple targets that are learned from multiple teachers. As a result, for the $j$ -th group generator $G^{j}$ , we construct multiple group-stack discriminators $\{D_1^j, D_2^j, \dots, D_M^j\}$ in concert with teachers specializing in different task sets by Eq. 5. + +In order to amalgamate multi-knowledge into the generator by $\{D_m^j\}_{m = 1}^M$ , the teacher-level filtering is applied to $F_{gan}^{j}$ . And this filtering is conducted as: + +$$ +F _ {g a n} ^ {j, m} = f _ {m} ^ {j} \left(F _ {g a n} ^ {j}\right), \tag {10} +$$ + +where the filtering function $f_{m}^{j}$ is realized by a light learnable module consisting of a global pooling layer and two fully connected layers. $F_{gan}^{j,m}$ is the filtered generated features that approaches the output feature distribution of $\mathcal{A}_m^{B - j}$ , also known as the $(B - j)$ -th block of $\mathcal{A}_m$ . And the validity of the generated $F_{gan}^{j,m}$ is justified by $D_{m}^{j}$ , whose outputs are donated as $\mathcal{O}_{m}(F_{gan}^{j}) = D_{m}^{j}(F_{gan}^{j,m})$ . + +Then for the generated features $F_{gan}^{j}$ from $G^{j}$ , we collect from the multi-discriminator the $M$ prediction sets $\{\mathcal{O}_1(F_{gan}^j),\mathcal{O}_2(F_{gan}^j),\dots,\mathcal{O}_M(F_{gan}^j)\}$ , which are: + +$$ +\mathcal {O} _ {g a n} \left(F _ {g a n} ^ {j}\right) = \bigcup_ {m = 1} ^ {M} \mathcal {O} _ {m} \left(F _ {g a n} ^ {j}\right), \tag {11} +$$ + +which is treated as new input to the loss Eq. 9, then $\mathcal{L}_{\text{gan}}^j$ is the adversarial loss for each $G^j$ . Despite the fact that the generated features should appear like the ones extracted from the real data, they should also lead to the same predictions from the same input $z$ . Thus, the stack-generator $\{G^1, G^2, \dots, G^B\}$ can be jointly optimized by the final loss: + +$$ +\mathcal {L} _ {\text {j o i n t}} = \mathcal {L} _ {\text {g a n}} ^ {B} + \frac {1}{B - 1} \sum_ {j = 1} ^ {B - 1} \ell \left(\mathcal {O} _ {\text {g a n}} \left(F _ {\text {g a n}} ^ {j}\right), \mathcal {O} _ {\text {g a n}} \left(\mathcal {I} _ {\text {g a n}}\right)\right), \tag {12} +$$ + +where the adversarial loss $\mathcal{L}_{\text{gan}}$ only calculates from the last group $\{G^B, D^B\}$ . The rest part of the final loss is the cross-entropy loss that restrains the intermediate features generated from $G^1$ to $G^{B-1}$ to make the same predictions as $\mathcal{I}_{\text{gan}}$ , which offsets the adversarial loss $\{\mathcal{L}_{\text{gan}}^1, \dots, \mathcal{L}_{\text{gan}}^{B-1}\}$ . + +By minimizing $\mathcal{L}_{joint}$ , the optimal generator $G$ can synthesis the images that have the similar activations as the real data fed to the teacher. + +# 4.2. Dual-generator Training + +After amalgamating the multi-stream knowledge into the group-stack GAN, a set of generated training samples are obtained, which are in the form of $\mathcal{R} = \{F_{gan}^{1}, F_{gan}^{2}, \dots, F_{gan}^{B-1}\} \cup \{\mathcal{I}_{gan}\}$ including both the generated intermediate features and the RGB image. Then the next step is to train the dual-generator $\mathcal{T}$ . Also, we construct the group-discriminator for each $\mathcal{T}^b$ as: + +$$ +D _ {d u a l} ^ {b, m} \leftarrow \bigcup_ {i = 1} ^ {B - b} \left\{\mathcal {A} _ {m} ^ {b + i} \right\}, \tag {13} +$$ + +where the dual generator $\mathcal{T}$ is trained to synthesis the samples that $D_{\text{dual}}$ can't distinguish from $\mathcal{I}_{\text{gan}}$ produced by the trained $G$ . + +Motivated by the work of [36], we use the block-wise training strategy to transfer as much knowledge as possible from the generator $G$ into the dual-generator $\mathcal{T}$ . That is, we divide dual-generator into $B$ blocks as $\{\mathcal{T}^1,\mathcal{T}^2,\dots,\mathcal{T}^B\}$ , and during the training process of $\mathcal{T}^b$ ( $1 < b \leq B$ ), the whole generator $G$ and the blocks of the dual-generator $\mathcal{T}$ from 1 to $b - 1$ keep fixed. + +Take training $\mathcal{T}^b$ for example, the problem is to learn the features $F_{u}^{b}$ generated by the $b$ -th block of the dual-generator. As shown in Fig. 3, which shows the adversarial for dual-GAN block $\{\mathcal{T}^b,D^b\}$ , the generated $F_{u}^{b}$ is + +![](images/aa92469d5d214b7c926ad88e221fe635157398fbb03dd3a622755ee9a27a2f26.jpg) +Figure 3. The adversarial mode for $b$ -th block of the dual-GAN. Two levels of filtering are performed to the features generated by the $b$ -th group of the dual-generator $\mathcal{T}^b$ . + +treated as 'fake' to the discriminator with $\mathcal{I}_{\text{gan}}$ as the 'real' data in this dual part GAN. To do this, a two-level filtering method is applied to $F_u^b$ . The first step is the teacher-level filtering for multi-target demand, which transforms $F_u^b$ to $m$ teacher streams $F_u^{b,m}$ by $F_u^{b,m} = f_m^b (F_u^b)$ , as defined in Eq. 10. The second level is the task-level filtering conducted after the last few fully connected layers of the corresponding discriminator, which is established for the constraint of $Y_{cst} \subseteq \bigcup_{m=1}^{M} Y_m$ . We feed the generated features $F_u^b$ to the corresponding discriminator $D_{\text{dual}}^{b,m}$ , and derive the predictions $\mathcal{O}_m(F_u^b)$ . Then the task-level filtering $g_m$ is applied to meet the task customizable demand and embedded into the $m$ -th branch block-wise adversarial loss: + +$$ +\mathcal {L} _ {\text {d u a l}} ^ {b, m} = \ell \left(g _ {m} \left(\mathcal {O} _ {m} \left(F _ {u} ^ {b}\right)\right), g _ {m} \left(\mathcal {O} _ {m} \left(\mathcal {I} _ {\text {g a n}}\right)\right)\right), \tag {14} +$$ + +where $g_{m}$ is utilized to select the needed predictions for customized tasks in the constraint: $Y_{cst} = \bigcup_{m=1}^{M} g_{m}(Y_{m})$ . So the block-wise loss for updating dual-generator $\mathcal{T}^b$ from multiple branches can be denoted as: + +$$ +\mathcal {L} _ {\text {d u a l}} ^ {b} = \sum_ {m} \lambda_ {m} \cdot \mathcal {L} _ {\text {d u a l}} ^ {b, m}, \tag {15} +$$ + +where we set $\lambda_{m} = 1$ for $m\in \{1,\dots,M\}$ + +Since the existence of the links between the generators $G$ and $\mathcal{T}$ , the input to the present block has two streams: + +$$ +\begin{array}{l} F _ {i n} ^ {1} = \mathcal {T} ^ {b - 1} \mathcal {T} ^ {\dots} \mathcal {T} ^ {1} (\mathcal {I} _ {g a n}), \tag {16} \\ F _ {i n} ^ {2} = G ^ {B + 1 - b} G ^ {\dots} G ^ {1} (z), \\ \end{array} +$$ + +where $F_{in}^{1}$ is obtained from $\mathcal{I}_{\text{gan}}$ and $F_{in}^{2}$ is generated by $G^{B + 1 - b}$ that indicates the links in Fig. 1. Then according + +to the different inputs to $\mathcal{T}^b$ , the final loss can be rewritten from Eq. 15 as: + +$$ +\mathcal {L} _ {u} ^ {b} = \lambda_ {i n} ^ {1} \mathcal {L} _ {\text {d u a l}} ^ {b, m} \left(F _ {i n} ^ {1}\right) + \lambda_ {i n} ^ {2} \mathcal {L} _ {\text {d u a l}} ^ {b, m} \left(F _ {i n} ^ {2}\right), \tag {17} +$$ + +where $\lambda_{in}^{1}$ and $\lambda_{in}^{2}$ are the balancing weights. With Eq. 17, parameter updating takes place within block $b$ and the corresponding learnable teacher-level filters $\{f_1^b,\dots,f_M^b\}$ , and blocks from 1 to $b - 1$ remain unchanged. + +# 4.3. TargetNet Regrouping + +Once the training of all the $B$ blocks from the dual-generator has been completed by Eq. 15, the whole GAN in the dual architecture is obtained. Then we can acquire the embryo TargetNet from the dual-part of the generator $\{\mathcal{T}^1,\mathcal{T}^2,\dots,\mathcal{T}^B\}$ as well as a series of loss convergence values $\{\eta^{1,m},\eta^{2,m},\dots,\eta^{B,m}\}$ calculated from $\mathcal{L}_{\text{dual}}^{b,m}$ at each block for teacher $\mathcal{A}_m$ . $\mathcal{T}_u$ treats all the sets of labels equal and produces the final predictions at the last block $\mathcal{T}_u^B$ , which is against our expectation to make them hierarchical. Then we do the branching out on $\mathcal{T}$ and the branch-out blocks are taken to be: + +$$ +S _ {m} = \arg \min _ {b \in [ 1, B ]} \eta^ {b, m}. \tag {18} +$$ + +Once the branch-out spot $S_{m}$ for task set $g_{m}(Y_{m})$ is determined, we regroup the branched task-specific TargetNet and keep the corresponding teacher-wise filter $f_{m}^{S_{m}}$ for connecting the TargetNet and the corresponding teacher $\mathcal{A}_{m}$ as: + +$$ +\mathcal {T} _ {m} = \left[ \left\{\mathcal {T} ^ {1}, \dots , \mathcal {T} ^ {S _ {m}} \right\}, f _ {m} ^ {S _ {m}}, \left\{\mathcal {A} _ {m} ^ {S _ {m} + 1}, \dots , \mathcal {A} _ {m} ^ {B} \right\} \right], \tag {19} +$$ + +where $\mathcal{T}_m$ is specialized for the task set $g_{m}(Y_{m})$ . + +Finally, we can regroup the final TaregtNet $\mathcal{T}_u$ in the hierarchical architecture as: + +$$ +\mathcal {T} _ {u} = \bigcup_ {m = 1} ^ {M} \left\{\mathcal {T} _ {m} \right\}, \tag {20} +$$ + +which shares the first few $\min \{S_1, S_2, \ldots, S_M\}$ blocks and branches out in the following blocks for different tasks. + +The proposed data-free knowledge amalgamation method is first to amalgamate a group-stack multi-target GAN, and then utilizing the generated intermediate feature maps as well as the final output images to train the dual-generator. Finally, the TargetNet can be acquired by modifying the trained generator. The whole process of data-free training TargetNet is exhibited in Algorithm 1. + +# 5. Experiments and Results + +Here we provide our experimental settings and results. More results can be found in our supplementary material. + +Algorithm 1 Data-free Knowledge Amalgamation +Input: $\{\mathcal{A}_1,\mathcal{A}_2,\dots,\mathcal{A}_M\}$ .. $M$ pre-trained teacher set; $\{\mathcal{A}_m^1,\mathcal{A}_m^2,\dots,\mathcal{A}_m^B\}$ .. $m$ -th teacher divided into $B$ blocks for classifying $Y_{m};Y_{cst}$ : customized label set. 1: Initial the group-stack generator $\{G^{1},G^{2},\dots,G^{B}\}$ and the dual generator $\{\mathcal{T}^1,\mathcal{T}^2,\dots,\mathcal{T}^B\}$ . +2: Step I: Training the Generator. +3: Randomly sample the noise $z$ and initial $F_{gan}^{0}\gets z$ . +4: for group $j = 1:B$ do +5: Build $D^{j}$ for $G^{j}$ by Eq. 5 and get $F_{gan}^{j}$ by Eq. 3; +6: For all $m\in [1,M]$ , get $F_{gan}^{j,m}$ by Eq. 10; +7: Get predictions $\mathcal{O}_{gan}(F_{gan}^{j})$ by Eq. 11; +8: end for +9: Calculate loss $\mathcal{L}_{joint}$ by Eq. 12 to optimize $G$ . +10: Step II: Training the Dual-generator. +11: Acquire $\{F_{gan}^{1},F_{gan}^{2},\ldots F_{gan}^{B - 1}\} \cup \mathcal{I}_{gan}$ from $z$ . +12: Feed $\mathcal{I}_{gan}$ into $\mathcal{A}_m$ and initial $F_{u}^{0}\leftarrow \mathcal{I}_{gan}$ . +13: for block $b = 1:B$ do +14: Build $D_{dual}^{b}$ for $\mathcal{T}^b$ by Eq. 13; +15: Obtain $F_{in}^{1},F_{in}^{2}$ by Eq. 16 and get $F_{u}^{b} = \mathcal{T}^{b}(F_{in})$ . +16: Do the two-level filtering to $F_{u}^{b}$ . +17: Optimize $\mathcal{T}^b$ by the loss Eq. 17; +18: end for +19: Step III: Branching out. +20: Collect the convergence loss value $\eta^{k,m}$ . +21: Find branch-out point $S_{m}$ by Eq. 18; +22: Get task-specific $\mathcal{T}_m$ by Eq. 19; +23: Group and fine-tune $\mathcal{T}_u = \bigcup_{m = 1}^{M}\{\mathcal{T}_m\}$ . +Output: $\mathcal{T}_u$ : task-specific hierarchical TargetNet. + +# 5.1. Experimental Settings + +Datasets. In this paper, we evaluate the proposed method on several standard multi-label datasets: the PASCAL Visual Object Classes 2007 (VOC2007) [6] and Microsoft Common Objects in Context (MS-COCO) [18] dataset. These two datasets contain 9,963 images and 123,287 images respectively, where there are totally 20 object concepts annotated for VOC2007 and 80 for MS-COCO. In each dataset, we use the training set for pretraining the teachers. For TargetNet, we don't refer to any real data and only draw support from the knowledge amalgamated from the teachers. + +Implementation details. We implemented our model using TensorFlow with a NVIDIA M6000 of 24G memory. We adopt the poly learning rate policy. We set the base learning rate to 0.01, the power to 0.9, and the weight decay to $5e - 3$ . Due to limited physical memory on GPU cards and to assure effectiveness, we set the batch size to be 16 during training. The TargetNet which is in the same architecture as the teachers (ResNet101 [11]), is initialized with parameters pre-trained on ImageNet. + +Table 1. Comparisons of the classification results (AP in %) on the randomly selected 10-label set with other methods on VOC 2007. + +
ScenarioRequired DataplanebikebirdboatbuscarhorsemotorpersontrainmAP
TeacherNetVOC200794.281.982.481.976.289.289.482.493.189.986.0
KAUnlabeled VOC200794.383.682.582.076.789.289.582.593.290.186.4
Similar DataCIFAR10080.465.271.368.066.981.362.156.187.279.571.8
Diff DataCityScape5.447.812.86.120.063.411.113.571.020.427.2
Random NoiseNone1.23.534.513.57.89.223.729.03.519.814.6
DAFLNone32.858.037.350.528.963.151.841.675.129.446.8
Data-free KANone84.967.166.967.158.483.072.558.080.477.273.6
+ +# 5.2. Experimental Results + +# 5.2.1 Performance on VOC 2007 + +Customized Tasks of Single Teacher. There are a total 20 labels in Pascal VOC 2007, we pre-trained one teacher network ('Pretrained Teacher') on the total label set. Then the TargetNet is designed to classify 10 labels randomly selected from the 20 labels. Then we compare the results with the following methods: + +[KA]: The block-wise training method proposed by [36] based on unlabeled original dataset; + +[Similar Data]: The method trained with the real dataset similar with the original one; + +[Diff Data]: The method trained with the real dataset that is quit different from the original one; + +[Random Noise]: The method trained with Random Noise; [DAFL]: The data-free method proposed by [3]. + +Then all results are shown in Table 1 for comparison, where the AP for each label and the mAP for all are depicted. 'KA' outperforms the teacher by $0.4\%$ , which trains TargetNet with the unlabeled part of VOC 2007. And the classification results trained from the substitute datasets ('Similar Data' and 'Diff Data') show that using an unrelated dataset to replace the original one is not reliable, since it heavily depends on the dataset choosing, which makes the final results uncontrollable and stochastic. Besides, compared with the methods ('Random Noise' and 'DAFL') that don't use any training data, the effectiveness of the proposed method ('Data-free KA') can be easily proved. + +Multiple Teachers on Whole Label Set. In this setting, we divide the whole 20 labels randomly into two groups which are learned separately in two teacher networks. To the best of our knowledge, we are the first to study the data-free customized-label classification. So we set the customized task set $Y_{cst} = \bigcup_{m=1}^{M} Y_m$ , which makes the TargetNet deal with a normal multi-label task for comparison with other methods. We compare the performance of the proposed method against the following typical multi-label approaches: 'HCP-2000' [29], 'HCP-VGG' [30], 'RLSD+ft-RPN' [41] and 'KA-ResNet'. And since we have not found another data-free or unsupervised method on multi-label classification, we refer to a related work 'partial-BCE' [5]. + +Table 2. Comparisons of the classification results (mAP in %) on the whole 20-label on VOC 2007. + +
MethodsmAPDescription
HCP-200085.2Training with original dataset.
HCP-VGG90.9
RLSD+ft-RPN88.5
partial-BCE90.7Training with 10% annotations
KA-ResNet92.5Training with unlabeled dataset.
DAFL54.9Training without real data.
Data-free KA87.2
+ +Table 2 presents the results on this setting. The proposed data-free method achieves the competitive results compared with other methods that rely on the training dataset more or less. Besides, the our accuracy results do surpass some of the full-supervised methods. + +Visualization Results. As shown in Fig. 4, we visualize the images generated from the last group of $G$ , and compare them with the ones from the original data, random noise and DAFL. For lack of the real data, the trained generator is unable to synthesis the images that are thought to be 'real' by human but it can synthesis the 'real' ones by the convolutional networks' perception. And the images generated from 'DAFL' seem to be more closer to the original data than the ones generated from the GAN proposed in this paper, but the proposed method outperforms 'DAFL' a lot, which indicates the existence of the big gap between human and the neural networks. + +# 5.2.2 Performance on MS-COCO + +On MS-COCO dataset, we follow the work of [27] to select the top $k = 3$ labels for each image. + +In Table 3, we compare the overall precision ('O-P'), recall ('O-R'), F1 ('O-F1'), and per-class precision ('C-P'), recall ('C-R'), F1 ('C-F1') with other methods. Our proposed 'Data-free KA' is trained to learn from two pre-trained teachers, and outperforms some of the full-supervised methods on some metrics. Compared with the other data-free framework ('DAFL'), our method shows better results. + +![](images/b74e58fcb1a19403f8337055a6870604e5f5a9c1e638e7753edb0b156e965a9b.jpg) +Original Data + +![](images/26bf9b86ef04c5c7d7e47061a189dcd4df973c900cb5892b9d268b5b9b0ec141.jpg) +Random Noise + +![](images/265be4e3542659c6880ce3962f55a07f049fe95a76b0fc5ffd0c74a63be02615.jpg) +DAFL +Figure 4. Visualization of the generated images compared with the original dataset trained on the teachers. + +![](images/b886e2fe1619caac3819caf4f1956885aaeeac2e5a073ce46249caeb5198f221.jpg) +Dual-GAN (ours) + +Table 3. Comparison of our method and state-of-the-art methods on the MS-COCO dataset + +
MethodC-PC-RC-F1O-PO-RO-F1
RLSD+ft-RPN67.657.262.070.163.466.5
KA-ResNet79.863.569.483.965.775.0
DAFL44.023.834.348.928.336.6
Data-free KA66.555.961.069.865.468.2
+ +Table 4. Ablation study of the influence on ${\lambda }_{in}^{1}$ and ${\lambda }_{in}^{2}$ . + +
{λ1in, λ2in}{1,0}{0,1}{1,1}
mAP (%)70.259.873.6
+ +# 5.2.3 Ablation study + +We now analyze the components of our approach and demonstrate their impact on the final performance. All these ablation studies are performed on VOC2007 and learned from one single teacher. + +Discrete Loss. Compared with DAFL, we add an extra discrete loss $\mathcal{L}_{dis}$ . In Fig. 5, the final predictions got from the teacher with the generated images are depicted. In the figure, the predictions with the discrete loss have more diversity, which means that the generated images in this way are better for the TargetNet's training. + +Links in Dual-GAN. For the existence of the links between the generator and the dual-generator, the input to the dual-generator has two streams, based on which, the inputs can be divided into three cases: + +1. $\{\lambda_{in}^{1} = 1, \lambda_{in}^{2} = 0\}$ : The dual-generator is trained only with $F_{in}^{1}$ as input with no links between the generator and the dual one; +2. $\{\lambda_{in}^{1} = 0, \lambda_{in}^{2} = 1\}$ : The dual-generator is trained only with $F_{in}^{2}$ as input with the links, but $\mathcal{I}_{qan}$ is not fed into; +3. $\{\lambda_{in}^{1} = 1, \lambda_{in}^{2} = 1\}$ : The combination of 1 and 2. + +As is presented in Table 4, the dual-GAN with the main link and the link between the two dual parts performs the best in the data free knowledge amalgamation. + +![](images/e549e238a84a2b146a1b6bda24e6e33828ebf684403beac0c71015886d49251f.jpg) +(a) Without Discret Loss +Figure 5. Label distribution without/with $\mathcal{L}_{dis}$ . The add of $\mathcal{L}_{dis}$ helps the label distribution of the final output more uniform. + +![](images/228cb1792741e317681ac88f7daeff1b44ae6383c2ef3a7801c6d324304d4f1e.jpg) +(b) With Discret Loss + +# 6. Conclusion + +In this paper, we present a data-free method to customize a network on multiple tasks, under the guidance of several pre-trained teachers. The support for training without real data is drawn from a specific GAN with two vital characteristics: one is the architecture stacked with several groups which force the generator to synthesis reliable images along with reliable intermediate activations; the other one is the dual architecture which enables the two sub generators to cooperate together effectively. Once the required GAN has been trained, the target network can be constructed immediately. Experimental results show that the proposed method is able to train a well-behaved student network while avoiding the participation of the real data. + +In the future, we will explore a more effective data-free approach to train TargetNet with the knowledge directly transferred from the teachers. + +# Acknowledgement + +This work is supported by National Key Research and Development Program (2018AAA0101503), National Natural Science Foundation of China (61976186), Key Research and Development Program of Zhejiang Province (2018C01004), and the Major Scientific Research Project of Zhejiang Lab (No. 2019KD0AC01). + +# References + +[1] A. Argyriou, T. Evgeniou, and M. Pontil. Convex multi-task feature learning. Machine Learning, 73:243-272, 2007. 2 +[2] L. Bertinetto, J. Valmadre, J. F. Henriques, A. Vedaldi, and P. H. Torr. Fully-convolitional siamese networks for object tracking. In European Conference on Computer Vision, pages 850-865. Springer, 2016. 1 +[3] H. Chen, Y. Wang, C. Xu, Z. Yang, C. Liu, B. Shi, C. Xu, C. Xu, and Q. Tian. Dafl: Data-free learning of student networks. In International Conference on Computer Vision, 2019. 2, 4, 7 +[4] R. Collobert and J. Weston. A unified architecture for natural language processing: deep neural networks with multitask learning. International Conference on Machine Learning, pages 160-167, 2008. 2 +[5] T. Durand, N. Mehrasa, and G. Mori. Learning a deep convnet for multi-label classification with partial labels. In IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2, 7 +[6] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The Pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88(2):303-338, 2010. 6 +[7] J. Gao, Z. Guo, Z. Li, and R. Nevatia. Knowledge concentration: Learning 100k object classifiers in a single cnn. arXiv, 2017. 2 +[8] P. Gong, J. Zhou, F. Wei, and J. Ye. Efficient multi-task feature learning with calibration. In ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pages 761-770, 2014. 2 +[9] I. J. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. C. Courville, and Y. Bengio. Generative adversarial nets. In Neural Information Processing Systems, 2014. 2 +[10] L. Han, Y. Zhang, G. Song, and K. Xie. Encoding tree sparsity in multi-task learning: A probabilistic framework. AAAI Conference on Artificial Intelligence, pages 1854-1860, 2014. 2 +[11] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. European Conference on Computer Vision, pages 630-645, 2016. 6 +[12] G. E. Hinton, S. Osindero, and Y. W. Teh. A fast learning algorithm for deep belief nets. Neural Computation, 18(7):1527-1554, 2006. 2 +[13] G. E. Hinton, O. Vinyals, and J. Dean. Distilling the knowledge in a neural network. NeurIPS, 2015. 1, 2 +[14] T. Karras, T. Aila, S. Laine, and J. Lehtinen. Progressive growing of gans for improved quality, stability, and variation. International Conference on Learning Representations, 2018. 2 +[15] A. Krizhevsky, G. Hinton, et al. Learning multiple layers of features from tiny images. Technical report, CiteSeer, 2009. 2 +[16] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. Neural Information Processing Systems, 141(5):1097-1105, 2012. 1 + +[17] Y. LeCun, L. Bottou, Y. Bengio, P. Haffner, et al. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278-2324, 1998. 2 +[18] T. Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollar, and C. L. Zitnick. Microsoft coco: Common objects in context. European Conference on Computer Vision, pages 740-755, 2014. 6 +[19] R. G. Lopes, S. Fenu, and T. Starner. Data-free knowledge distillation for deep neural networks. arXiv: Learning, 2017. 2 +[20] I. Misra, A. Shrivastava, A. Gupta, and M. Hebert. Cross-stitch networks for multi-task learning. IEEE Conference on Computer Vision and Pattern Recognition, pages 3994-4003, 2016. 2 +[21] M. Nagel, M. van Baalen, T. Blankevoort, and M. Welling. Data-free quantization through weight equalization and bias correction. ArXiv, abs/1906.04721, 2019. 2 +[22] H. Nam and B. Han. Learning multi-domain convolutional neural networks for visual tracking. IEEE Conference on Computer Vision and Pattern Recognition, pages 4293-4302, 2015. 1 +[23] R. Salakhutdinov and G. E. Hinton. A better way to pretrain deep boltzmann machines. In Neural Information Processing Systems, 2012. 2 +[24] C. Shen, X. Wang, J. Song, L. Sun, and M. Song. Amalgamating knowledge towards comprehensive classification. In AAAI Conference on Artificial Intelligence, pages 3068-3075, 2019. 2 +[25] S. Srinivas and R. V. Babu. Data-free parameter pruning for deep neural networks. In The British Machine Vision Conference, 2015. 2 +[26] Y. Tian, P. Luo, X. Wang, and X. Tang. Pedestrian detection aided by deep learning semantic tasks. IEEE Conference on Computer Vision and Pattern Recognition, pages 5079-5087, 2015. 2 +[27] J. Wang, Y. Yang, J. Mao, Z. Huang, C. Huang, and W. Xu. Cnn-rnn: A unified framework for multi-label image classification. In IEEE Conference on Computer Vision and Pattern Recognition, pages 2285-2294, 2016. 7 +[28] X. Wang and A. Gupta. Generative image modeling using style and structure adversarial networks. In European Conference on Computer Vision, pages 318-335. Springer, 2016. 2 +[29] Y. Wei, W. Xia, J. Huang, B. ni, J. Dong, Y. Zhao, and S. Yan. Cnn: Single-label to multi-label. CoRR, 2014. 7 +[30] Y. Wei, W. Xia, M. Lin, J. Huang, B. Ni, J. Dong, Y. Zhao, and S. Yan. Hcp: A flexible cnn framework for multi-label image classification. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(9):1901-1907, 2016. 7 +[31] J. Wen, R. Liu, N. Zheng, Q. Zheng, Z. Gong, and J. Yuan. Exploiting local feature patterns for unsupervised domain adaptation. In AAAI Conference on Artificial Intelligence, 2019. 1 +[32] Q. Wu, M. Tan, H. Song, J. Chen, and M. K. Ng. Ml-forest: A multi-label tree ensemble method for multi-label classification. IEEE Transactions on Knowledge and Data Engineering, 28(10):2665-2680, 2016. 2 + +[33] J. Ye, Z. Feng, Y. Jing, and M. Song. Finer-net: Cascaded human parsing with hierarchical granularity. International Conference on Multimedia and Expo, pages 1-6, 2018. 1 +[34] J. Ye, Y. Ji, X. Wang, K. Ou, D. Tao, and M. Song. Student becoming the master: Knowledge amalgamation for joint scene parsing, depth estimation, and more. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2829-2838, 2019. 2 +[35] J. Ye, Y. Jing, X. Wang, K. Ou, D. Tao, and M. Song. Edge-sensitive human cutout with hierarchical granularity and loopy matting guidance. IEEE Transactions on Image Processing, 2019. 1 +[36] J. Ye, X. Wang, Y. Ji, K. Ou, and M. Song. Amalgamating filtered knowledge: Learning task-customized student from multi-task teachers. In International Joint Conference on Artificial Intelligence, 2019. 1, 2, 5, 7 +[37] J. Yosinski, J. Clune, Y. Bengio, and H. Lipson. How transferable are features in deep neural networks? In Neural Information Processing Systems, 2014. 1 +[38] X. Yu, T. Liu, X. Wang, and D. Tao. On compressing deep models by low rank and sparse decomposition. IEEE Conference on Computer Vision and Pattern Recognition, pages 67-76, 2017. 2 +[39] X. Yuying, Y. Guoxian, D. Carlotta, W. Jun, and Z. Zili. Multi-label co-training. In International Joint Conference on Artificial Intelligence, pages 2882-2888, 2018. 2 +[40] C. Zhang and Z. Zhang. Improving multiview face detection with multi-task deep convolutional neural networks. Winter Conference on Applications of Computer Vision, pages 1036-1041, 2014. 2 +[41] J. Zhang, Q. Wu, C. Shen, J. Zhang, and J. Lu. Multilabel image classification with regional latent semantic dependencies. IEEE Transactions on Multimedia, 20(10):2801-2813, 2018. 7 +[42] Z. Zhang, P. Luo, C. C. Loy, and X. Tang. Facial landmark detection by deep multi-task learning. European Conference on Computer Vision, pages 94-108, 2014. 2 +[43] W. Zhao, B. Wang, J. Ye, M. Yang, Z. Zhao, R. Luo, and Y. Qiao. A multi-task learning approach for image captioning. In International Joint Conference on Artificial Intelligence, pages 1205-1211, 2018. 2 \ No newline at end of file diff --git a/datafreeknowledgeamalgamationviagroupstackdualgan/images.zip b/datafreeknowledgeamalgamationviagroupstackdualgan/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8ec90ed33929b4e896e1c3f83fe6a5dad734344d --- /dev/null +++ b/datafreeknowledgeamalgamationviagroupstackdualgan/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5681805ed918aac88b08a0838e311e45e10c0ea07b4224fff6ecddae670ce85 +size 551112 diff --git a/datafreeknowledgeamalgamationviagroupstackdualgan/layout.json b/datafreeknowledgeamalgamationviagroupstackdualgan/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0e7e379ec5a0e77bee12e3fe50dd999733281f61 --- /dev/null +++ b/datafreeknowledgeamalgamationviagroupstackdualgan/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8176bb555a259902b1574cbb9f2e3c0a1bad4796e23f52a0c63683e9c502c1a8 +size 520810 diff --git a/datalessmodelselectionwiththedeepframepotential/6a93f560-b204-4f12-87b9-a8a8f5c5a593_content_list.json b/datalessmodelselectionwiththedeepframepotential/6a93f560-b204-4f12-87b9-a8a8f5c5a593_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..6a01caeac3ef382ac0484f3b266f0b3b00ab781f --- /dev/null +++ b/datalessmodelselectionwiththedeepframepotential/6a93f560-b204-4f12-87b9-a8a8f5c5a593_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f44a1910652dce1f0c85077f6f616abbfd876bc42a6f9ff5f8951ea0e40cda2c +size 82622 diff --git a/datalessmodelselectionwiththedeepframepotential/6a93f560-b204-4f12-87b9-a8a8f5c5a593_model.json b/datalessmodelselectionwiththedeepframepotential/6a93f560-b204-4f12-87b9-a8a8f5c5a593_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4e36b1b135b84261f9204637af2b3782056d1153 --- /dev/null +++ b/datalessmodelselectionwiththedeepframepotential/6a93f560-b204-4f12-87b9-a8a8f5c5a593_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2bbcc1c46842b1eec6ba125e0c17480f54ba60e84c3cb80ed9612ef3477ca70 +size 99552 diff --git a/datalessmodelselectionwiththedeepframepotential/6a93f560-b204-4f12-87b9-a8a8f5c5a593_origin.pdf b/datalessmodelselectionwiththedeepframepotential/6a93f560-b204-4f12-87b9-a8a8f5c5a593_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ee52c6e25e7477e12ccd3ff160bb7601bca62496 --- /dev/null +++ b/datalessmodelselectionwiththedeepframepotential/6a93f560-b204-4f12-87b9-a8a8f5c5a593_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:436b2857685b3c3d8a8385fbb323f94cd7f5a38d3de0f780272c52924fef9455 +size 345076 diff --git a/datalessmodelselectionwiththedeepframepotential/full.md b/datalessmodelselectionwiththedeepframepotential/full.md new file mode 100644 index 0000000000000000000000000000000000000000..2186d7b7a5ac3a5264d9d2a97e8499b37c40f9cf --- /dev/null +++ b/datalessmodelselectionwiththedeepframepotential/full.md @@ -0,0 +1,376 @@ +# Dataless Model Selection with the Deep Frame Potential + +Calvin Murdock1 Simon Lucey1,2 +1Carnegie Mellon University 2Argo AI + +{cmurdock,slucey}@cs.cmu.edu + +# Abstract + +Choosing a deep neural network architecture is a fundamental problem in applications that require balancing performance and parameter efficiency. Standard approaches rely on ad-hoc engineering or computationally expensive validation on a specific dataset. We instead attempt to quantify networks by their intrinsic capacity for unique and robust representations, enabling efficient architecture comparisons without requiring any data. Building upon theoretical connections between deep learning and sparse approximation, we propose the deep frame potential: a measure of coherence that is approximately related to representation stability but has minimizers that depend only on network structure. This provides a framework for jointly quantifying the contributions of architectural hyper-parameters such as depth, width, and skip connections. We validate its use as a criterion for model selection and demonstrate correlation with generalization error on a variety of common residual and densely connected network architectures. + +# 1. Introduction + +Deep neural networks have dominated nearly every benchmark within the field of computer vision. While this modern influx of deep learning originally began with the task of large-scale image recognition [18], new datasets, loss functions, and network configurations have quickly expanded its scope to include a much wider range of applications. Despite this, the underlying architectures used to learn effective image representations are generally consistent across all of them. This can be seen through the community's quick adoption of the newest state-of-the-art deep networks from AlexNet [18] to VGGNet [28], ResNets [13], DenseNets [15], and so on. But this begs the question: why do some deep network architectures work better than others? Despite years of groundbreaking empirical results, an answer to this question still remains elusive. + +Fundamentally, the difficulty in comparing network architectures arises from the lack of a theoretical foundation for characterizing their generalization capacities. Shal + +![](images/ae6df734e4f5bad195ed3dfcefee257d1f77107ea6c4035402d06f77affe27f4.jpg) +(a) Chain Network + +![](images/5db883c65f9cdf57fee7cd8526007f18bf152cbc25eae0d50cbcbf89bf3a633b.jpg) +(b) Residual Network + +![](images/713fb3a25995c69895e436b378572cdbd5607aaa34d933bf719643787f98a871.jpg) +(c) Densely Connected Convolutional Network + +![](images/d7c11295d9d5637ce5eef5c42d69c6a752820e3ef25ce9c7650411958a33b707.jpg) +(d) Induced Dictionary Structures for Sparse Approximation + +![](images/7ab0ca03ea5564100b99db04e7aa7652aed7e776618daefa8bb19e94bec774e4.jpg) + +![](images/76d970ab4c875a9ec03315fecc59140d6c4605ae656ac65b9f100b24a2f7acb9.jpg) +Figure 1: Why are some deep neural network architectures better than others? In comparison to (a) standard chain connections, skip connections like those in (b) ResNets [13] and (c) DenseNets [15] have demonstrated significant improvements in training effectiveness, parameter efficiency, and generalization performance. We provide one possible explanation for this phenomenon by approximating network activations as (d) solutions to sparse approximation problems with different induced dictionary structures. + +low machine learning techniques like support vector machines [6] were aided by theoretical tools like the VC-dimension [31] for determining when their predictions could be trusted to avoid overfitting. Deep neural networks, on the other hand, have eschewed similar analyses due to their complexity. Theoretical explorations of deep network generalization [24] are often disconnected from practical applications and rarely provide actionable insight into how architectural hyper-parameters contribute to performance. + +Building upon recent connections between deep learning and sparse approximation [26, 23], we instead interpret feed-forward deep networks as algorithms for approximate inference in related sparse coding problems. These problems aim to optimally reconstruct zero-padded input images as sparse, nonnegative linear combinations of atoms from architecture-dependent dictionaries, as shown in Fig. 1. We propose to indirectly analyze practical deep network architectures with complicated skip connections, like residual networks (ResNets) [13] and densely connected convolu + +tional networks (DenseNets) [15], simply through the dictionary structures that they induce. + +To accomplish this, we introduce the deep frame potential for summarizing the interactions between parameters in feed-forward deep networks. As a lower bound on mutual coherence—the maximum magnitude of the normalized inner products between all pairs of dictionary atoms [9]—it is theoretically tied to generalization properties of the related sparse coding problems. However, its minimizers depend only on the dictionary structures induced by the corresponding network architectures. This enables dataless model comparison by jointly quantifying contributions of depth, width, and connectivity. + +Our approach is motivated by sparse approximation theory [11], a field that encompasses properties like uniqueness and robustness of shallow, overcomplete representations. In sparse coding, capacity is controlled by the number of dictionary atoms used in sparse data reconstructions. While more parameters allow for more accurate representations, they may also increase input sensitivity for worse generalization performance. Conceptually, this is comparable to overfitting in nearest-neighbor classification, where representations are sparse, one-hot indicator vectors corresponding to nearest training examples. As the number of training data increases, the distance between them decreases, so they are more likely to be confused with one another. Similarly, nearby dictionary atoms may introduce instability that causes representations of similar data points to become very far apart leading to poor generalization performance. Thus, there is a fundamental tradeoff between the capacity and robustness of shallow representations due to the proximity of dictionary atoms as measured by mutual coherence. + +However, deep representations have not shown the same correlation between model size and sensitivity [34]. While adding more layers to a deep neural network increases its capacity, it also simultaneously introduces implicit regularization to reduce overfitting. This can be explained through the proposed connection to sparse coding, where additional layers increase both capacity and effective input dimensionality. In a higher-dimensional space, dictionary atoms can be spaced further apart for more robust representations. Furthermore, architectures with denser skip connections induce dictionary structures with more nonzero elements, which provides additional freedom to further reduce mutual coherence with fewer parameters as shown in Fig. 2. + +We propose to use the minimum deep frame potential as a cue for model selection. Instead of requiring expensive validation on a specific dataset to approximate generalization performance, architectures are chosen based on how efficiently they can reduce the minimum achievable mutual coherence with respect to the number of model parameters. In this paper, we provide an efficient frame potential minimization method for a general class of convolu + +![](images/4273391a51a1cfed2b83d2cd284b4f45bc798e362a54820c62f991140de8194e.jpg) +(a) Chain Network Gram Matrix + +![](images/8eadd916c836a7b1995ef5539b28ce391dae5449831caea44b9295ef99b14973.jpg) + +![](images/7ce7ce36b81f5f5a2b45afcc4365ddcdb6b8252b7e020e1242473ed2fa51a3ad.jpg) + +![](images/b45858eeec2c27c177ddf6cbc194a681b7a5e820e884e0663fa3f11d2b189aa8.jpg) +(b) ResNet + +![](images/a2f26ca04f3b978a72626ea103dda2f97ae3f814204a828a58a9f4065daaf06e.jpg) +(c) DenseNet + +![](images/d2a49f023e6acd21dfe885eccb51b923886b7122cb3d920b189382c0851cf27f.jpg) +(d) Minimum Deep Frame Potential +Figure 2: Parameter count is not a good indicator of generalization performance for deep networks. Instead, we compare different network architectures via the minimum deep frame potential, the average nonzero magnitude of inner products between atoms of architecture-induced dictionaries. In comparison to (a) chain networks, skip connections in (b) residual networks and (c) densely connected networks produce Gram matrix structures with more nonzero elements allowing for (d) lower deep frame potentials across network sizes. This correlates with improved parameter efficiency giving (e) lower validation error with fewer parameters. + +![](images/478c4d1cca0f52f295587b7ffe5e819028c4620aadbd877b00c69d7d451f01a6.jpg) +(e) Validation Error + +tional networks with skip connections, of which ResNets and DenseNets are shown to be special cases. Furthermore, we derive an analytic expression for the minimum value in the case of fully-connected chain networks. Experimentally, we demonstrate correlation with validation error across a variety of network architectures. + +# 2. Background and Related Work + +Due to the vast space of possible deep network architectures and the computational difficulty in training them, deep model selection has largely been guided by ad-hoc engineering and human ingenuity. While progress slowed in the years following early breakthroughs [20], recent interest in deep learning architectures began anew due to empirical successes largely attributed to computational advances like efficient training using GPUs and rectified linear unit (ReLU) activation functions [18]. Since then, numerous architectural changes have been proposed. For example, much deeper networks with residual connections were shown to achieve consistently better performance with fewer parameters [13]. Building upon this, densely connected convolutional networks with skip connections between more layers yielded even better performance [15]. While theoretical explanations for these improvements were lacking, consistent experimentation on standardized benchmark datasets continued to drive empirical success. + +However, due to slowing progress and the need for increased accessibility of deep learning techniques to a wider range of practitioners, more principled approaches to architecture search have recently gained traction. Motivated by observations of extreme redundancy in the parameters of trained networks [7], techniques have been proposed to systematically reduce the number of parameters without adversely affecting performance. Examples include sparsity-inducing regularizers during training [1] or through post-processing to prune the parameters of trained networks [14]. Constructive approaches to model selection like neural architecture search [12] instead attempt to compose architectures from basic building blocks through tools like reinforcement learning. Efficient model scaling has also been proposed to enable more effective grid search for selecting architectures subject to resource constraints [30]. While automated techniques can match or even surpass manually engineered alternatives, they require a validation dataset and rarely provide insights transferable to other settings. + +To better understand the implicit benefits of different network architectures, there have been adjacent theoretical explorations of deep network generalization. These works are often motivated by the surprising observation that good performance can still be achieved using highly overparametrized models with degrees of freedom that surpass the number of training data. This contradicts many commonly accepted ideas about generalization, spurring new experimental explorations that have demonstrated properties unique to deep learning. Examples include the ability of deep networks to express random data labels [34] with a tendency towards learning simple patterns first [2]. While exact theoretical explanations are lacking, empirical measurements of network sensitivity such as the Jacobian norm have been shown to correlate with generalization [25]. Similarly, Parseval regularization [22] encourages robustness by constraining the Lipschitz constants of individual layers. + +Due to the difficulty in analyzing deep networks directly, other approaches have instead drawn connections to the rich field of sparse approximation theory. The relationship between feed-forward neural networks and principal component analysis has long been known for the case of linear activations [3]. More recently, nonlinear deep networks with ReLU activations have been linked to multilayer sparse coding to prove theoretical properties of deep representations [26]. This connection has been used to motivate new recurrent architecture designs that resist adversarial noise attacks [27], improve classification performance [29], or enforce prior knowledge through output constraints [23]. + +# 3. Deep Learning as Sparse Approximation + +To derive our criterion for model selection, we build upon recent connections between deep neural networks and sparse approximation. Specifically, consider a feed-forward + +network $\pmb{f}(\pmb{x}) = \phi_l(\mathbf{B}_l^\top \dots \phi_1(\mathbf{B}_1^\top (\pmb{x})))$ constructed as the composition of linear transformations with parameters $\mathbf{B}_j$ and nonlinear activation functions $\phi_j$ . Equivalently, $\pmb{f}(\pmb{x}) = \pmb{w}_l$ where $\pmb{w}_j = \mathbf{B}_j^\top \pmb{w}_{j-1}$ are the layer activations for layers $j = 1, \ldots, l$ and $\pmb{w}_0 = \pmb{x}$ . In many modern state-of-the-art networks, the ReLU activation function has been adopted due to its effectiveness and computational efficiency. It can also be interpreted as the nonnegative soft-thresholding proximal operator associated with the function $\Phi$ in Eq. 1, a nonnegativity constraint $\mathbb{I}(\pmb{w} \geq \mathbf{0})$ and a sparsity-inducing $\ell_1$ penalty with a weight determined by the scalar bias parameter $\lambda$ . + +$$ +\Phi (\boldsymbol {w}) = \mathbb {I} (\boldsymbol {w} \geq \mathbf {0}) + \lambda \| \boldsymbol {w} \| _ {1} \tag {1} +$$ + +$$ +\phi (\boldsymbol {x}) = \operatorname {R e L U} (\boldsymbol {x} - \lambda \mathbf {1}) = \underset {\boldsymbol {w}} {\arg \min} \frac {1}{2} \| \boldsymbol {w} - \boldsymbol {x} \| _ {2} ^ {2} + \Phi (\boldsymbol {w}) +$$ + +Thus, the forward pass of a deep network is equivalent to a layered thresholding pursuit algorithm for approximating the solution of a multi-layer sparse coding model [26]. Results from shallow sparse approximation theory can then be adapted to bound the accuracy of this approximation, which improves as the mutual coherence defined below in Eq. 2 decreases, and indirectly analyze other theoretical properties of deep networks like uniqueness and robustness. + +# 3.1. Sparse Approximation Theory + +Sparse approximation theory considers representations of data vectors $\pmb{x} \in \mathbb{R}^d$ as sparse linear combinations $\pmb{x} \approx \sum_{j} w_j \pmb{b}_j = \mathbf{B} \pmb{w}$ of atoms from an over-complete dictionary $\mathbf{B} \in \mathbb{R}^{d \times k}$ . The number of atoms $k$ is greater than the dimensionality $d$ and the number of nonzero coefficients $\| \pmb{w} \|_0$ in the representation $\pmb{w} \in \mathbb{R}^k$ is small. + +Through applications like compressed sensing [8], sparsity has been found to exhibit theoretical properties that enable data representation with efficiency far greater than what was previously thought possible. Central to these results is the requirement that the dictionary be "well-behaved," essentially ensuring that its columns are not too similar. For undercomplete matrices with $k \leq d$ , this is satisfied by enforcing orthogonality, but overcomplete dictionaries require other conditions. Specifically, we focus our attention on the mutual coherence $\mu$ , the maximum magnitude normalized inner product of all pairs of dictionary atoms. Equivalently, it is the maximum magnitude off-diagonal element in the Gram matrix $\mathbf{G} = \tilde{\mathbf{B}}^{\mathrm{T}}\tilde{\mathbf{B}}$ where the columns of $\tilde{\mathbf{B}}$ are normalized to have unit norm: + +$$ +\mu = \max _ {i \neq j} \frac {\left| \boldsymbol {b} _ {i} ^ {\top} \boldsymbol {b} _ {j} \right|}{\left\| \boldsymbol {b} _ {i} \right\| \left\| \boldsymbol {b} _ {j} \right\|} = \max _ {i, j} | (\mathbf {G} - \mathbf {I}) _ {i j} | \tag {2} +$$ + +We are primarily motivated by the observation that a model's capacity for low mutual coherence increases along with its capacity for both memorizing more training data through unique representations and generalizing to more validation data through robustness to input perturbations. + +With an overcomplete dictionary, there is a space of coefficients $\pmb{w}$ that can all exactly reconstruct any data point as $\pmb{x} = \mathbf{B}\pmb{w}$ , which would not support discriminative representation learning. However, if representations from a mutually incoherent dictionary are sufficiently sparse, then they are guaranteed to be optimally sparse and unique [9]. Specifically, if the number of nonzeros $\| \pmb{w}\| _0 < \frac{1}{2} (1 + \mu^{-1})$ , then $\pmb{w}$ is the unique, sparsest representation for $\pmb{x}$ . Furthermore, if $\| \pmb{w}\| _0 < (\sqrt{2} -0.5)\mu^{-1}$ , then it can be found efficiently by convex optimization with $\ell_1$ regularization. Thus, minimizing the mutual coherence of a dictionary increases its capacity for uniquely representing data points. + +Sparse representations are also robust to input perturbations [10]. Specifically, given a noisy datapoint $\pmb{x} = \pmb{x}_0 + \pmb{z}$ where $\pmb{x}_0$ can be represented exactly as $\pmb{x}_0 = \mathbf{B}\pmb{w}_0$ with $\| \pmb{w}_0\|_0 \leq \frac{1}{4} (1 + \mu^{-1})$ and the noise $z$ has bounded magnitude $\| z\|_2 \leq \epsilon$ , then $\pmb{w}_0$ can be approximated by solving the $\ell_1$ -penalized LASSO problem: + +$$ +\underset {\boldsymbol {w}} {\arg \min } \| \boldsymbol {x} - \mathbf {B} \boldsymbol {w} \| _ {2} ^ {2} + \lambda \| \boldsymbol {w} \| _ {1} \tag {3} +$$ + +Its solution is stable and the approximation error is bounded from above in Eq. 4, where $\delta (\pmb {x},\lambda)$ is a constant. + +$$ +\left\| \boldsymbol {w} - \boldsymbol {w} _ {0} \right\| _ {2} ^ {2} \leq \frac {\left(\epsilon + \delta (\boldsymbol {x} , \lambda)\right) ^ {2}}{1 - \mu \left(4 \| \boldsymbol {w} \| _ {0} - 1\right)} \tag {4} +$$ + +Thus, minimizing the mutual coherence of a dictionary decreases the sensitivity of its sparse representations for improved robustness. This is similar to evaluating input sensitivity using the Jacobian norm [25]. However, instead of estimating the average perturbation error over validation data, it bounds the worst-cast error over all possible data. + +# 3.2. Deep Component Analysis + +While deep representations can be analyzed by accumulating the effects of approximating individual layers in a chain network as shallow sparse coding problems [26], this strategy cannot be easily adapted to account for more complicated interactions between layers. Instead, we adapt the framework of Deep Component Analysis [23], which jointly represents all layers in a neural network as the single sparse coding problem in Eq. 5. The ReLU activations $\boldsymbol{w}_j \in \mathbb{R}^{k_j}$ of a feed-forward chain network approximate the solutions to a joint optimization problem where $\boldsymbol{w}_0 = \boldsymbol{x} \in \mathbb{R}^{k_0}$ and the regularization functions $\Phi_j$ are nonnegative sparsity-inducing penalties as defined in Eq. 1. + +$$ +\begin{array}{l} \boldsymbol {w} _ {j} := \phi_ {j} \left(\mathbf {B} _ {j} ^ {\top} \boldsymbol {w} _ {j - 1}\right) \quad \forall j = 1, \dots , l \tag {5} \\ \approx \underset {\{\boldsymbol {w} _ {j} \}} {\arg \min } \sum_ {j = 1} ^ {l} \| \mathbf {B} _ {j} \boldsymbol {w} _ {j} - \boldsymbol {w} _ {j - 1} \| _ {2} ^ {2} + \Phi_ {j} (\boldsymbol {w} _ {j}) \\ \end{array} +$$ + +The compositional constraints between adjacent layers are relaxed and replaced by reconstruction error penalty terms, resulting in a convex, nonnegative sparse coding problem. + +By combining the terms in the summation of Eq. 5 together into a single system, this problem can be equivalently represented as shown in Eq. 6. The latent variables $\boldsymbol{w}_j$ for each layer are stacked in the vector $\boldsymbol{w}$ , the regularizer $\Phi(\boldsymbol{w}) = \sum_j \Phi_j(\boldsymbol{w}_j)$ , and the input $\boldsymbol{x}$ is augmented with zeros. + +$$ +\underset {\boldsymbol {w}} {\arg \min } \left\| \overbrace {\left[ \begin{array}{l l} \mathbf {B} _ {1} & \mathbf {0} \\ - \mathbf {I} & \mathbf {B} _ {2} \end{array} \right. \ddots} ^ {\mathrm {B}} \overbrace {\left[ \begin{array}{l} \boldsymbol {w} _ {1} \\ \boldsymbol {w} _ {2} \\ \vdots \\ \boldsymbol {w} _ {l} \end{array} \right]} ^ {\boldsymbol {w}} - \left[ \begin{array}{l} \boldsymbol {x} \\ \boldsymbol {0} \\ \vdots \\ \boldsymbol {0} \end{array} \right] \right\| _ {2} ^ {2} + \Phi (\boldsymbol {w}) (6) +$$ + +The layer parameters $\mathbf{B}_j \in \mathbb{R}^{k_{j-1} \times k_j}$ are blocks in the induced dictionary $\mathbf{B}$ , which has $\sum_{j} k_{j-1}$ rows and $\sum_{j} k_j$ columns. It has a structure of nonzero elements that summarizes the corresponding feed-forward deep network architecture wherein the off-diagonal identity matrices are connections between adjacent layers. + +Model capacity can be increased both by adding parameters to a layer or by adding layers, which implicitly pads the input data $x$ with more zeros. This can actually reduce the dictionary's mutual coherence because it increases the system's dimensionality. Thus, depth allows model complexity to scale jointly alongside effective input dimensionality so that the induced dictionary structures still have the capacity for low mutual coherence and improved capabilities for memorization and generalization. + +# 3.3. Architecture-Induced Dictionary Structure + +In this section, we extend this model formulation to incorporate more complicated network architectures. Because mutual coherence is dependent on normalized dictionary atoms, it can be reduced by increasing the number of nonzero elements, which reduces the magnitudes of the dictionary elements and their inner products. In Eq. 7, we replace the identity connections of Eq. 6 with blocks of nonzero parameters to allow for lower mutual coherence. + +$$ +\mathbf {B} = \left[ \begin{array}{l l l l} \mathbf {B} _ {1 1} & \mathbf {0} & & \\ \mathbf {B} _ {2 1} ^ {\top} & \mathbf {B} _ {2 2} & \ddots & \\ \vdots & \ddots & \ddots & \mathbf {0} \\ \mathbf {B} _ {l 1} ^ {\top} & \dots & \mathbf {B} _ {l (l - 1)} ^ {\top} & \mathbf {B} _ {l l} \end{array} \right] \tag {7} +$$ + +This structure is induced by the feed-forward activations in Eq. 8, which again approximate the solutions to a nonnegative sparse coding problem. + +$$ +\begin{array}{l} \boldsymbol {w} _ {j} := \phi_ {j} \left(- \mathbf {B} _ {j j} ^ {\mathsf {T}} \sum_ {k = 1} ^ {j - 1} \mathbf {B} _ {j k} ^ {\mathsf {T}} \boldsymbol {w} _ {k}\right) \quad \forall j = 1, \dots , l \tag {8} \\ \approx \underset {\{\boldsymbol {w} _ {j} \}} {\arg \min } \sum_ {j = 1} ^ {l} \left\| \mathbf {B} _ {j j} \boldsymbol {w} _ {j} + \sum_ {k = 1} ^ {j - 1} \mathbf {B} _ {j k} ^ {\top} \boldsymbol {w} _ {j} \right\| _ {F} ^ {2} + \Phi_ {j} (\boldsymbol {w} _ {j}) \\ \end{array} +$$ + +In comparison to Eq. 5, additional parameters introduce skip connections between layers so that the activations $\boldsymbol{w}_j$ of layer $j$ now depend on those of all previous layers $k < j$ . + +These connections are similar to the identity mappings in residual networks [13], which introduce dependence between the activations of pairs of layers for even $j \in [1, l-1]$ : + +$$ +\boldsymbol {w} _ {j} := \phi_ {j} \left(\mathbf {B} _ {j} ^ {\top} \boldsymbol {w} _ {j - 1}\right), \boldsymbol {w} _ {j + 1} := \phi_ {j + 1} \left(\boldsymbol {w} _ {j - 1} + \mathbf {B} _ {j + 1} ^ {\top} \boldsymbol {w} _ {j}\right) \tag {9} +$$ + +In comparison to chain networks, no additional parameters are required; the only difference is the addition of $\boldsymbol{w}_{j-1}$ in the argument of $\phi_{j+1}$ . As a special case of Eq. 8, we interpret the activations in Eq. 9 as approximate solutions to the optimization problem: + +$$ +\begin{array}{l} \underset {\{\boldsymbol {w} _ {j} \}} {\arg \min } \| \boldsymbol {x} - \mathbf {B} _ {1} \boldsymbol {w} _ {1} \| _ {2} ^ {2} + \sum_ {j = 1} ^ {l} \Phi_ {j} (\boldsymbol {w} _ {j}) \tag {10} \\ + \sum_ {\text {e v e n} j} \left\| \boldsymbol {w} _ {j} - \mathbf {B} _ {j} ^ {\top} \boldsymbol {w} _ {j - 1} \right\| _ {2} ^ {2} + \left\| \boldsymbol {w} _ {j + 1} - \boldsymbol {w} _ {j - 1} - \mathbf {B} _ {j + 1} ^ {\top} \boldsymbol {w} _ {j} \right\| _ {2} ^ {2} \\ \end{array} +$$ + +This results in the induced dictionary structure of Eq. 7 with $\mathbf{B}_{jj} = \mathbf{I}$ for $j > 1$ , $\mathbf{B}_{jk} = \mathbf{0}$ for $j > k + 1$ , $\mathbf{B}_{jk} = \mathbf{0}$ for $j > k$ with odd $k$ , and $\mathbf{B}_{jk} = \mathbf{I}$ for $j > k$ with even $k$ . + +Building upon the empirical successes of residual networks, densely connected convolution networks [15] incorporate skip connections between earlier layers as well. This is shown in Eq. 11 where the transformation $\mathbf{B}_j$ of concatenated variables $[\pmb{w}_k]_k$ for $k = 1,\dots ,j - 1$ is equivalently written as the summation of smaller transformations $\mathbf{B}_{jk}$ + +$$ +\boldsymbol {w} _ {j} := \phi_ {j} \left(\mathbf {B} _ {j} ^ {\top} \left[ \boldsymbol {w} _ {k} \right] _ {k = 1} ^ {j - 1}\right) = \phi_ {j} \left(\sum_ {k = 1} ^ {j - 1} \mathbf {B} _ {j k} ^ {\top} \boldsymbol {w} _ {k}\right) \tag {11} +$$ + +These activations again provide approximate solutions to the problem in Eq. 8 with the induced dictionary structure of Eq. 7 where $\mathbf{B}_{jj} = \mathbf{I}$ for $j > 1$ and the lower blocks $\mathbf{B}_{jk}$ for $j > k$ are all filled with learned parameters. + +Skip connections enable effective learning in much deeper networks than chain-structured alternatives. While originally motivated from the perspective of making optimization easier [13], adding more connections between layers was also shown to improve generalization performance [15]. As compared in Fig. 2, denser skip connections induce dictionary structures with denser Gram matrices allowing for lower mutual coherence. This suggests that architectures' capacities for low validation error can be quantified and compared based on their capacities for inducing dictionaries with low minimum mutual coherence. + +# 4. The Deep Frame Potential + +We propose to use lower bounds on the mutual coherence of induced structured dictionaries for the data-independent comparison of architecture capacities. Note that while one-sided coherence is better suited to nonnegativity constraints, + +![](images/bcef292790b1d366b38460f5bc432a0321ac7e3a2c80db718768b43eedf2ee9d.jpg) +(a) Convolutional Dictionary + +![](images/22edf1663f461cc2dcc6ba43b3b87a16c272411a79892ea13e7d56bcfef7ffb8.jpg) +(b) Permuted Dictionary + +![](images/b36ac546d8483892923cbc99272c7282d7dc3627c4da9d22590506d02765a334.jpg) +(c) Convolutional Gram Matrix + +![](images/3e2668602357205ed46c50817d3e7a28fb0ccbd36eb06dacc5f2369b585c0137.jpg) +(d)Permuted Gram Matrix +Figure 3: A visualization of a one-dimensional convolutional dictionary with two input channels, five output channels, and a filter size of three. (a) The filters are repeated over eight spatial dimensions resulting in a (b) block-Toeplitz structure that is revealed through row and column permutations. (c) The corresponding gram matrix can be efficiently computed by (d) repeating local filter interactions. + +it has the same lower bound [5]. Directly optimizing mutual coherence from Eq. 2 is difficult due to its piecewise structure. Instead, we consider a tight lower by replacing the maximum off-diagonal element of the Gram matrix $\mathbf{G}$ with the mean. This gives the averaged frame potential $F^2 (\mathbf{B})$ , a strongly-convex function that can be optimized more effectively [4]: + +$$ +F ^ {2} (\mathbf {B}) = N ^ {- 1} (\mathbf {G}) \left(\| \mathbf {G} \| _ {F} ^ {2} - \operatorname {T r} \mathbf {G}\right) \leq \mu^ {2} (\mathbf {B}) \tag {12} +$$ + +Here, $N(\mathbf{G})$ is the number of nonzero off-diagonal elements in the Gram matrix and $\operatorname{Tr} \mathbf{G}$ equals the total number of dictionary atoms. Equality is met in the case of equiangular tight frames when the normalized inner products between all dictionary atoms are equivalent [17]. Due to the block-sparse structure of the induced dictionaries from Eq. 7, we evaluate the frame potential in terms of local blocks $\mathbf{G}_{jj'} \in \mathbb{R}^{k_j \times k_{j'}}$ that are nonzero only if layer $j$ is connected to layer $j'$ . In the case of convolutional layers with localized spatial support, there is also a repeated implicit structure of nonzero elements as visualized in Fig. 3. + +To compute the Gram matrix, we first need to normalize the global induced dictionary $\mathbf{B}$ from Eq. 7. By stacking the column magnitudes of layer $j$ as the elements in the diagonal matrix $\mathbf{C}_j = \mathrm{diag}(\boldsymbol {c}_j)\in \mathbb{R}^{k_j\times k_j}$ , the normalized parameters can be represented as $\tilde{\mathbf{B}}_{ij} = \mathbf{B}_{ij}\mathbf{C}_j^{-1}$ . Similarly, the squared norms of the full set of columns in the global dictionary $\mathbf{B}$ are $\mathbf{N}_j^2 = \sum_{i = j}^l\mathbf{C}_{ij}^2$ . The full normalized dictionary can then be found as $\tilde{\mathbf{B}} = \mathbf{BN}^{-1}$ where + +the matrix $\mathbf{N}$ is block diagonal with $\mathbf{N}_j$ as its blocks. The blocks of the Gram matrix $\mathbf{G} = \hat{\mathbf{B}}^{\top}\hat{\mathbf{B}}$ are then given as: + +$$ +\mathbf {G} _ {j j ^ {\prime}} = \sum_ {i = j ^ {\prime}} ^ {l} \mathbf {N} _ {j} ^ {- 1} \mathbf {B} _ {i j} ^ {\mathrm {T}} \mathbf {B} _ {i j ^ {\prime}} \mathbf {N} _ {j ^ {\prime}} ^ {- 1} \tag {13} +$$ + +For chain networks, $\mathbf{G}_{jj'} \neq \mathbf{0}$ only when $j' = j + 1$ , which represents the connections between adjacent layers. In this case, the blocks can be simplified as: + +$$ +\begin{array}{l} \mathbf {G} _ {j j} = \left(\mathbf {C} _ {j} ^ {2} + \mathbf {I}\right) ^ {- \frac {1}{2}} \left(\mathbf {B} _ {j} ^ {\top} \mathbf {B} _ {j} + \mathbf {I}\right) \left(\mathbf {C} _ {j} ^ {2} + \mathbf {I}\right) ^ {- \frac {1}{2}} (14) \\ \mathbf {G} _ {j (j + 1)} = - \left(\mathbf {C} _ {j} ^ {2} + \mathbf {I}\right) ^ {- \frac {1}{2}} \mathbf {B} _ {j + 1} \left(\mathbf {C} _ {j + 1} ^ {2} + \mathbf {I}\right) ^ {- \frac {1}{2}} (15) \\ \mathbf {G} _ {l l} = \mathbf {B} _ {l} ^ {\top} \mathbf {B} _ {l} (16) \\ \end{array} +$$ + +Because the diagonal is removed in the deep frame potential computation, the contribution of $\mathbf{G}_{jj}$ is simply a rescaled version of the local frame potential of layer $j$ . The contribution of $\mathbf{G}_{j(j + 1)}$ , on the other hand, can essentially be interpreted as rescaled $\ell_{2}$ weight decay where rows are weighted more heavily if the corresponding columns of the previous layer's parameters have higher magnitudes. Furthermore, since the global frame potential is averaged over the total number of nonzero elements in $\mathbf{G}$ , if a layer has more parameters, then it will be given more weight in this computation. For more general networks with skip connections, however, the summation from Eq. 13 has additional terms that introduce more complicated interactions. In these cases, it cannot be evaluated from local properties of layers. + +Essentially, the deep frame potential summarizes the structural properties of the global dictionary $\mathbf{B}$ induced by a deep network architecture by balancing interactions within each individual layer through local coherence properties and between connecting layers. + +# 4.1. Theoretical Lower Bound for Chain Networks + +While the deep frame potential is a function of parameter values, its minimum value is determined only by the architecture-induced dictionary structure. Furthermore, we know that it must be bounded by a nonzero constant for overcomplete dictionaries. In this section, we derive this lower bound for the special case of fully-connected chain networks and provide intuition for why skip connections increase the capacity for low mutual coherence. + +First, observe that a lower bound for the Frobenius norm of $\mathbf{G}_{j(j + 1)}$ from Eq. 15 cannot be readily attained because the rows and columns are rescaled independently. This means that a lower bound for the norm of $\mathbf{G}$ must be found by jointly considering the entire matrix structure, not simply through the summation of its components. To accomplish this, we instead consider the matrix $\mathbf{H} = \tilde{\mathbf{B}}\tilde{\mathbf{B}}^{\mathrm{T}}$ , which is full rank and has the same norm as $\mathbf{G}$ : + +$$ +\left\| \mathbf {G} \right\| _ {F} ^ {2} = \left\| \mathbf {H} \right\| _ {F} ^ {2} = \sum_ {j = 1} ^ {l} \left\| \mathbf {H} _ {j j} \right\| _ {F} ^ {2} + 2 \sum_ {j = 1} ^ {l - 1} \left\| \mathbf {H} _ {j (j + 1)} \right\| _ {F} ^ {2} \tag {17} +$$ + +We can then express the individual blocks of $\mathbf{H}$ as: + +$$ +\mathbf {H} _ {1 1} = \mathbf {B} _ {1} \left(\mathbf {C} _ {1} ^ {2} + \mathbf {I} _ {k _ {1}}\right) ^ {- 1} \mathbf {B} _ {1} ^ {\top} \tag {18} +$$ + +$$ +\mathbf {H} _ {j j} = \mathbf {B} _ {j} \left(\mathbf {C} _ {j} ^ {2} + \mathbf {I}\right) ^ {- 1} \mathbf {B} _ {j} ^ {\top} + \left(\mathbf {C} _ {j - 1} ^ {2} + \mathbf {I}\right) ^ {- 1} \tag {19} +$$ + +$$ +\mathbf {H} _ {j (j + 1)} = - \mathbf {B} _ {j} \left(\mathbf {C} _ {j} ^ {2} + \mathbf {I}\right) ^ {- 1} \tag {20} +$$ + +In contrast to $\mathbf{G}_{j(j + 1)}$ in Eq. 15, only the columns of $\mathbf{H}_{j(j + 1)}$ in Eq. 20 are rescaled. Since $\tilde{\mathbf{B}}_j$ has normalized columns, its norm can be exactly expressed as: + +$$ +\left\| \mathbf {H} _ {j (j + 1)} \right\| _ {F} ^ {2} = \sum_ {n = 1} ^ {k _ {j}} \left(\frac {c _ {j n}}{c _ {j n} ^ {2} + 1}\right) ^ {2} \tag {21} +$$ + +For the other blocks, we find lower bounds for their norms through the same technique used in deriving the Welch bound, which expresses the minimum mutual coherence for unstructured overcomplete dictionaries [32]. Specifically, we apply the Cauchy-Schwarz inequality giving $\| \mathbf{A}\| _F^2\geq r^{-1}(\mathrm{Tr}\mathbf{A})^2$ for positive-semidefinite matrices $\mathbf{A}$ with rank $r$ . Since the rank of $\mathbf{H}_{jj}$ is at most $k_{j - 1}$ , we can lower bound the norms of the individual blocks as: + +$$ +\left\| \mathbf {H} _ {1 1} \right\| _ {F} ^ {2} \geq \frac {1}{k _ {0}} \left(\sum_ {n = 1} ^ {k _ {1}} \frac {c _ {1 n} ^ {2}}{c _ {1 n} ^ {2} + 1}\right) ^ {2} \tag {22} +$$ + +$$ +\left\| \mathbf {H} _ {j j} \right\| _ {F} ^ {2} \geq \frac {1}{k _ {j - 1}} \left(\sum_ {n = 1} ^ {k _ {j}} \frac {c _ {j n} ^ {2}}{c _ {j n} ^ {2} + 1} + \sum_ {p = 1} ^ {k _ {j - 1}} \frac {1}{c _ {(j - 1) p} ^ {2} + 1}\right) ^ {2} +$$ + +In this case of dense shallow dictionaries, the Welch bound depends only on the data dimensionality and the number of dictionary atoms. However, due to the structure of the architecture-induced dictionaries, the lower bound of the deep frame potential depends on the data dimensionality, the number of layers, the number of units in each layer, the connectivity between layers, and the relative magnitudes between layers. Skip connections increase the number of nonzero elements in the Gram matrix over which to average and also enable off-diagonal blocks to have lower norms. + +# 4.2. Model Selection + +For more general architectures that lack a simple theoretical lower bound, we instead propose bounding the mutual coherence of the architecture-induced dictionary through empirical minimization of the deep frame potential $F^2(\mathbf{B})$ from Eq. 12. Frame potential minimization has been used effectively to construct finite normalized tight frames due to the lack of suboptimal local minima, which allows for effective optimization using gradient descent [4]. We propose using the minimum deep frame potential of an architecture—which is independent of data and individual parameter instantiations—as a means to compare different architectures. In practice, model selection is performed by choosing the candidate architecture with the lowest minimum frame potential subject to desired modeling constraints such as limiting the total number of parameters. + +![](images/5774e7f7d9568f8c2c0bab422342639dad94b01bbae0947900d0ded536d3a502.jpg) +(a) Without Regularization + +![](images/8cadc4c215b80f5d6a1a0a79de46a3531ac5a1d79d7bba3feca57285e7ce4fd4.jpg) +(b) With Regularization +Figure 4: A comparison of fully connected deep network architectures with varying depths and widths. Warmer colors indicate models with more total parameters. (a) Some very large networks cannot be trained effectively resulting in unusually high validation errors. (b) This can be remedied through deep frame potential regularization, resulting in high correlation between minimum frame potential and validation error. + +# 5. Experimental Results + +In this section, we demonstrate correlation between the minimum deep frame potential and validation error on the CIFAR-10 dataset [19] across a wide variety of fully-connected, convolutional, chain, residual, and densely connected network architectures. Furthermore, we show that networks with skip connections can have lower deep frame potentials with fewer learnable parameters, which is predictive of the parameter efficiency of trained networks. + +In Fig. 4, we visualize a scatter plot of trained fully-connected networks with between three and five layers and between 16 and 4096 units in each layer. The corresponding architectures are shown as a list of units per layer for a few representative examples. The minimum frame potential of each architecture is compared against its validation error after training, and the total parameter count is indicated by color. In Fig. 4a, some networks with many parameters have unusually high error due to the difficulty in training very large fully-connected networks. In Fig. 4b, the addition of a deep frame potential regularization term overcomes some of these optimization difficulties for improved parameter efficiency. This results in high correlation between minimum frame potential and validation error. Furthermore, it emphasizes the diminishing returns of increasing the size of fully-connected chain networks; after a certain point, adding more parameters does little to reduce both validation error and minimum frame potential. + +To evaluate the effects of residual connections [13], we adapt the simplified CIFAR-10 ResNet architecture from [33], which consists of a single convolutional layer followed by three groups of residual blocks with activations given in Eq. 9. Before the second and third groups, the number of filters is increased by a factor of two and the spatial resolution is decreased by half through average pooling. + +![](images/19368f93da5d8774ead3a601a381455b9601e77c0a4d4091ce1bd33032cd0d1f.jpg) +(a) Validation Error +Figure 5: The effect of increasing depth in chain and residual networks. Validation error is compared against layer count for two different network widths. (a) In comparison to chain networks, even very deep residual networks can be trained effectively resulting in decreasing validation error. (b) Despite having the same number of total parameters, residual connections also induce dictionary structures with lower minimum deep frame potentials. + +![](images/c26d6b2ea7f6296cbe375a385e603ed6ce3e4dd1da4eda14a3c956508c3a1102.jpg) +(b) Minimum Deep Frame Potential + +To compare networks with different sizes, we modify their depths by changing the number of residual blocks in each group from between 2 and 10 and their widths by changing the base number of filters from between 4 and 32. For our experiments with densely connected skip connections [15], we adapt the simplified CIFAR-10 DenseNet architecture from [21]. Like with residual networks, it consists of a convolutional layer followed by three groups of the activations from Eq. 11 with decreasing spatial resolutions and increasing numbers of filters. Within each group, a dense block is the concatenation of smaller convolutions that take all previous outputs as inputs with filter numbers equal to a fixed growth rate. Network depth and width are modified by respectively increasing both the number of layers per group and the base growth rate from between 2 and 12. Batch normalization [16] was also used in all convolutional networks. + +In Fig. 5, we compare the validation errors and minimum frame potentials of residual networks and comparable chain networks with residual connections removed. In Fig. 5a, the validation error of chain networks increases for deeper networks while that of residual networks is lower and consistently decreases. This emphasizes the difficulty in training very deep chain networks. In Fig. 5b, we show that residual connections enable lower minimum frame potentials following a similar trend with respect to increasing model size, again demonstrating correlation between validation error and minimum frame potential. + +In Fig. 6, we compare chain networks and residual networks with exactly the same number of parameters, where color indicates the number of residual blocks per group and connected data points have the same depths but different widths. The addition of skip connections reduces both validation error and minimum frame potential, as visualized by consistent placement below the diagonal line indicating lower values for residual networks than comparable chain + +![](images/434b2344e5fe35e4e073bf92285dae3b7d774e6be9e310e681b8ee8f66022ec2.jpg) +(a) Validation Error + +![](images/c1f58beb2aad9e68d15fe433af90d47c2046559f9ed9825bcdd30aa032ec8cb8.jpg) +(b) Minimum Deep Frame Potential +Figure 6: A comparison of (a) validation error and (b) minimum frame potential between residual networks and chain networks. Colors indicate different depths and datapoints are connected in order of increasing widths of 4, 8, 16, or 32 filters. Skip connections result in reduced error correlating with frame potential with dense networks showing superior efficiency with increasing depth. + +networks. This effect becomes even more pronounced with increasing depths and widths. + +In Fig. 7, we compare the parameter efficiency of chain networks, residual networks, and densely connected networks of different depths and widths. We visualize both validation error and minimum frame potential as functions of the number of parameters, demonstrating the improved scalability of networks with skip connections. While chain networks demonstrate increasingly poor parameter efficiency with respect to increasing depth in Fig. 7a, the skip connections of ResNets and DenseNets allow for further reducing error with larger network sizes in Figs. 7c,e. Considering all network families together as in Fig. 2d, we see that denser connections also allow for lower validation error with comparable numbers of parameters. This trend is mirrored in the minimum frame potentials of Figs. 7b,d,f which are shown together in Fig. 2e. Despite some fine variations in behavior across different families of architectures, minimum deep frame potential is correlated with validation error across network sizes and effectively predicts the increased generalization capacity provided by skip connections. + +# 6. Conclusion + +In this paper, we proposed a technique for comparing deep network architectures by approximately quantifying their implicit capacity for effective data representations. Based upon theoretical connections between sparse approximation and deep neural networks, we demonstrated how architectural hyper-parameters such as depth, width, and skip connections induce different structural properties of the dictionaries in corresponding sparse coding problems. We compared these dictionary structures through lower bounds on their mutual coherence, which is theoretically tied to their capacity for uniquely and robustly representing data via sparse approximation. A theoretical lower bound was derived for chain networks and the deep frame potential was + +![](images/15b01f07cc9ee022d59671519c5c76496f39a8a23536713034036100b52d4c06.jpg) +(a) Chain Validation Error + +![](images/ad44a9702e3317561003cb664e85f937e8cf66c84589ac85bb4b196ccbf0537a.jpg) +(b) Chain Frame Potential + +![](images/8e42a4773dcb20ea5ab96eb099f61da2c9d95c883b7fd4be20a1884e2c741555.jpg) +(c) ResNet Validation Error + +![](images/f1eb90c48b2e71b9fef96a677baa5099d826b3738271d57b94bfbeff1c126a1c.jpg) +(d) ResNet Frame Potential + +![](images/62cc7d744ddb26c801e426b34d4175375f13ea3fc701a1d04830db74acfeb7e3.jpg) +(e) DenseNet Validation Error +Figure 7: A demonstration of the improved scalability of networks with skip connections, where line colors indicate different depths and data points are connected showing increasing widths. (a) Chain networks with greater depths have increasingly worse parameter efficiency in comparison to (c) the corresponding networks with residual connections and (e) densely connected networks with similar size, of which performance scales efficiently with parameter count. This could potentially be attributed to correlated efficiency in reducing frame potential with fewer parameters, which saturates much faster with (b) chain networks than (d) residual networks or (f) densely connected networks. + +![](images/eaaf6c49d947db30296edae4ca3362ba81079bf7ee0ac953a9be336a5336388b.jpg) +(f) DenseNet Frame Potential + +proposed as an empirical optimization objective for constructing bounds for more complicated architectures. + +Experimentally, we observed a correlation between minimum deep frame potential and validation error across different families of modern architectures with skip connections, including residual networks and densely connected convolutional networks. This suggests a promising direction for future research towards the theoretical analysis and practical construction of deep network architectures derived from connections between deep learning and sparse coding. Acknowledgments: This work was supported by the CMU Argo AI Center for Autonomous Vehicle Research and by the National Science Foundation under Grant No.1925281. + +# References + +[1] Jose Alvarez and Mathieu Salzmann. Learning the number of neurons in deep networks. In Advances in Neural Information Processing Systems (NeurIPS), 2016. 3 +[2] Devansh Arpit et al. A closer look at memorization in deep networks. In International Conference on Machine Learning (ICML), 2017. 3 +[3] Pierre Baldi and Kurt Hornik. Neural networks and principal component analysis: Learning from examples without local minima. Neural networks, 2(1), 1989. 3 +[4] John Benedetto and Matthew Fickus. Finite normalized tight frames. Advances in Computational Mathematics, 18(2-4), 2003. 5, 6 +[5] Alfred M. Bruckstein et al. On the uniqueness of nonnegative sparse solutions to underdetermined systems of equations. IEEE Transactions on Information Theory, 54(11), 2008. 5 +[6] Corinna Cortes and Vladimir Vapnik. Support-vector networks. Machine learning, 20(3), 1995. 1 +[7] Misha Denil et al. Predicting parameters in deep learning. In Advances in Neural Information Processing Systems (NeurIPS), 2013. 3 +[8] David L. Donoho. Compressed sensing. IEEE Transactions on Information Theory, 52(4), 2006. 3 +[9] David L. Donoho and Michael Elad. Optimally sparse representation in general (nonorthogonal) dictionaries via 11 minimization. Proceedings of the National Academy of Sciences, 100(5), 2003. 2, 4 +[10] David L. Donoho, Michael Elad, and Vladimir N. Temlyakov. Stable recovery of sparse overcomplete representations in the presence of noise. IEEE Transactions on Information Theory, 52(1), 2005. 4 +[11] Michael Elad. Sparse and redundant representations: from theory to applications in signal and image processing. Springer Science & Business Media, 2010. 2 +[12] Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. Journal of Machine Learning Research (JMLR), 20(55), 2019. 3 +[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 1, 2, 5, 7 +[14] Yihui He et al. Channel pruning for accelerating very deep neural networks. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 3 +[15] Gao Huang, Zhuang Liu, Kilian Weinberger, and Laurens van der Maaten. Densely connected convolutional networks. In Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 1, 2, 5, 7 +[16] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning (ICML), 2015. 7 +[17] Jelena Kovacevic, Amina Chebira, et al. An introduction to frames. Foundations and Trends in Signal Processing, 2(1), 2008. 5 +[18] Alex Krizhevsky et al. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems (NeurIPS), 2012. 1, 2 + +[19] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009. 7 +[20] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11), 1998. 2 +[21] Yixuan Li. Tensorflow densenet. https://github.com/YixuanLi/densenet-tensorflow, 2018.7 +[22] Cisse Moustapha, Bojanowski Piotr, Grave Edouard, Dauphin Yann, and Usunier Nicolas. Parseval networks: Improving robustness to adversarial examples. In International Conference on Machine Learning (ICML), 2017. 3 +[23] Calvin Murdock, MingFang Chang, and Simon Lucey. Deep component analysis via alternating direction neural networks. In European Conference on Computer Vision (ECCV), 2018. 1, 3, 4 +[24] Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generalization in deep learning. In Advances in Neural Information Processing Systems (NeurIPS), 2017. 1 +[25] Roman Novak et al. Sensitivity and generalization in neural networks: an empirical study. In International Conference on Learning Representations (ICLR), 2018. 3, 4 +[26] Vardan Papyan, Yaniv Romano, and Michael Elad. Convolutional neural networks analyzed via convolutional sparse coding. Journal of Machine Learning Research (JMLR), 18(83), 2017. 1, 3, 4 +[27] Yaniv Romano, Aviad Aberdam, Jeremias Sulam, and Michael Elad. Adversarial noise attacks of deep learning architectures-stability analysis via sparse modeled signals. Journal of Mathematical Imaging and Vision, 2018. 3 +[28] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations (ICLR), 2015. 1 +[29] Jeremias Sulam, Aviad Aberdam, Amir Beck, and Michael Elad. On multi-layer basis pursuit, efficient algorithms and convolutional neural networks. Pattern Analysis and Machine Intelligence (PAMI), 2019. 3 +[30] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In International Conference on Machine Learning (ICML), 2019. 3 +[31] Vladimir N. Vapnik and A. Ya. Chervonenkis. On the uniform convergence of relative frequencies of events to their probabilities. Theory of Probability and Its Applications, XVI(2), 1971. 1 +[32] Lloyd Welch. Lower bounds on the maximum cross correlation of signals. IEEE Transactions on Information theory, 20(3), 1974. 6 +[33] Yuxin Wu et al. Tensorpack. https://github.com/tensorpack/, 2016.7 +[34] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations (ICLR), 2017. 2, 3 \ No newline at end of file diff --git a/datalessmodelselectionwiththedeepframepotential/images.zip b/datalessmodelselectionwiththedeepframepotential/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d1c6837df23f61b6a2d25c1b1ede53e89db9b26f --- /dev/null +++ b/datalessmodelselectionwiththedeepframepotential/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62edabd6a29b2b9000d1ee6305484ca63374c4e3488fa262e6eedd5d7be28779 +size 458191 diff --git a/datalessmodelselectionwiththedeepframepotential/layout.json b/datalessmodelselectionwiththedeepframepotential/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..82a9ba4ea94adf54bb3e592788913ca4c8179bf8 --- /dev/null +++ b/datalessmodelselectionwiththedeepframepotential/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:20f9df80df6ddc8fb42cdab49c50ac4333bf204b7b0a1ae5afed8366fca56340 +size 428185 diff --git a/datauncertaintylearninginfacerecognition/091fd41c-b585-427f-be44-ca6c0c22f43f_content_list.json b/datauncertaintylearninginfacerecognition/091fd41c-b585-427f-be44-ca6c0c22f43f_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..2fa5eb5b497e7da375c38c9cc542098796023378 --- /dev/null +++ b/datauncertaintylearninginfacerecognition/091fd41c-b585-427f-be44-ca6c0c22f43f_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95f194b2e06f1b9e16cc8c7a1a3a2c49025cdb87b0ca76de59b16194bc273021 +size 86705 diff --git a/datauncertaintylearninginfacerecognition/091fd41c-b585-427f-be44-ca6c0c22f43f_model.json b/datauncertaintylearninginfacerecognition/091fd41c-b585-427f-be44-ca6c0c22f43f_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a8b91675176143e37e87cbd5accbe455e2f19324 --- /dev/null +++ b/datauncertaintylearninginfacerecognition/091fd41c-b585-427f-be44-ca6c0c22f43f_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9fa7e58baea3adcdcb3450d2618fcdc40e04ca6d21ca11b01af11223ac4f375b +size 105544 diff --git a/datauncertaintylearninginfacerecognition/091fd41c-b585-427f-be44-ca6c0c22f43f_origin.pdf b/datauncertaintylearninginfacerecognition/091fd41c-b585-427f-be44-ca6c0c22f43f_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5b5458d36aee49d9aa8fc0e6060380c1a0c2d2b3 --- /dev/null +++ b/datauncertaintylearninginfacerecognition/091fd41c-b585-427f-be44-ca6c0c22f43f_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ad0a867ca79f8f1c756845b82a370da63b910441d727fa190ac9b98a88a651e +size 3606135 diff --git a/datauncertaintylearninginfacerecognition/full.md b/datauncertaintylearninginfacerecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..0bfdefceb0fca35704cbad8621e7580d1481268c --- /dev/null +++ b/datauncertaintylearninginfacerecognition/full.md @@ -0,0 +1,315 @@ +# Data Uncertainty Learning in Face Recognition + +Jie Chang $^{1}$ , Zhonghao Lan $^{2}$ , Changmao Cheng $^{1}$ , Yichen Wei $^{1}$ $^{1}$ Megvii Inc. $^{2}$ University of Science and Technology of China + +{changjie, lanzhonghao, chengchangmao, weiyicheng}@megvii.com + +# Abstract + +Modeling data uncertainty is important for noisy images, but seldom explored for face recognition. The pioneer work [35] considers uncertainty by modeling each face image embedding as a Gaussian distribution. It is quite effective. However, it uses fixed feature (mean of the Gaussian) from an existing model. It only estimates the variance and relies on an ad-hoc and costly metric. Thus, it is not easy to use. It is unclear how uncertainty affects feature learning. + +This work applies data uncertainty learning to face recognition, such that the feature (mean) and uncertainty (variance) are learnt simultaneously, for the first time. Two learning methods are proposed. They are easy to use and outperform existing deterministic methods as well as [35] on challenging unconstrained scenarios. We also provide insightful analysis on how incorporating uncertainty estimation helps reducing the adverse effects of noisy samples and affects the feature learning. + +# 1. Introduction + +Data uncertainty1 captures the "noise" inherent in the data. Modeling such uncertainty is important for computer vision application [22], e.g., face recognition, because noise widely exists in images. + +Most face recognition methods represent each face image as a deterministic point embedding in the latent space [7, 27, 41, 42, 33]. Usually, high-quality images of the same ID are clustered. However, it is difficult to estimate an accurate point embedding for noisy face images, which are usually out of the cluster and have larger uncertainty in the embedding space. This is exemplified in Fig 1 (a). The positive example is far from its class and close to a noisy negative example, causing a mismatch. + +Probabilistic face embeddings (PFE) [35] is the first work to consider data uncertainty in face recognition. For each sample, it estimates a Gaussian distribution, instead of + +![](images/968502e5d808d56057c0477801788ba32cc8b623d4c6b80b6e84698363e31588.jpg) +Figure 1: (a) Deterministic model gives point embedding without considering the data uncertainty; (b) probabilistic model gives distributional estimation parameterised with estimated mean and estimated variance. PFE leverages the pre-trained point embedding as the mean $\mu$ , only learn the uncertainty $\sigma$ for each sample; (c) our method simultaneously learn $\sigma$ as well as $\mu$ , leading to better intra-class compactness and inter-class separability for $\mu$ in the latent space. Different classes are marked as blue or red. Best viewed in color. + +a fixed point, in the latent space. Specifically, given a pretrained FR model, the mean of the Gaussian for each sample is fixed as the embedding produced by the FR model. An extra branch is appended to the FR model and trained to estimate the variance. The training is driven by a new similarity metric, mutual likelihood score or $MLS$ , which measures the "likelihood" between two Gaussian distributions. It is shown that PFE estimates small variance for high-quality samples but large variance for noisy ones. Together with the $MLS$ metric, PFE can reduce the mismatches on noisy samples. This is illustrated in Fig 1, (b). While being effective, PFE is limited in that it does not learn the embedded feature (mean) but only the uncertainty. As a result, it is unclear how uncertainty affects feature learning. Also, the conventional similarity metric such as cosine distance cannot be used. The more complex $MLS$ metric is in demand, which takes more runtime and memory. + +For the first time, this work applies data uncertainty learning (DUL) to face recognition such that feature (mean) and uncertainty (variance) are learnt simultaneously. As illustrated in Fig 1 (c), this improves the features such that the instances in the same class are more compact and the instances in different classes are more separated. In this case, the learned feature is directly usable for conventional similarity metric. MLS metric is no longer necessary. + +Specifically, we propose two learning methods. The first + +is classification based. It learns a model from scratch. The second is regression based. It improves an existing model, similar as PFE. We discuss how the learned uncertainty affects the model training in two methods, from the perspective of image noise. We provide insightful analysis that the learned uncertainty will improve the learning of identity embeddings by adaptively reducing the adverse effects of noisy training samples. + +Comprehensive experiments demonstrate that our proposed methods improve face recognition performance over existing deterministic models and PFE on most public benchmarks. The improvement is more remarkable on benchmarks with low quality face images, indicating that model with data uncertainty learning is more suitable to unconstrained face recognition scenario, thus important for practical tasks. + +# 2. Related Work + +Uncertainty in Deep Learning The nature of uncertainties as well as the manner to deal with them have been extensively studied to help solve the reliability assessment and risk-based decision making problems for a long time [9, 31, 8]. In recent years, uncertainty is getting more attention in deep learning. Many techniques have been proposed to investigate how uncertainty specifically behaves in deep neural networks [3, 10, 11, 22]. Specific to deep uncertainty learning, uncertainties can be categorised into model uncertainty capturing the noise of the parameters in deep neural networks, and data uncertainty measuring the noise inherent in given training data. Recently, many computer vision tasks, i.e., semantic segmentation [19, 21], object detection [6, 25] and person Re-ID [50], have introduced deep uncertainty learning to CNNs for the improvement of model robustness and interpretability. In face recognition task, several works have been proposed to leverage model uncertainty for analysis and learning of face representations [13, 51, 23]. Thereinto PFE [35], is the first work to consider data uncertainty in face recognition task. + +Noisy Data Training Large-scale datasets, i.e., CASIA-WebFace [47], Vggface2 [5] and MS-Celeb-1M [14], play the important role in training deep CNNs for face recognition. It is inevitable these face datasets collected online have lots of label noise — examples have erroneously been given the labels of other classes within the dataset. Some works explore the influence of label noise [39] and how to train robust FR models in this case [17, 44, 29]. Yu et al. [50] claims in person Re-ID that another image noise brought by poor quality images also has detrimental effect on the trained model. Our methods are not specifically proposed for noisy data training, however, we provide insightful analysis about how the learned data uncertainty affects the model training from the perspective of image noise. Additionally, + +![](images/fd1f47fba5c9348914f55d2e1f514043e78f67cfb3361ba2c7901c7f12d8e5cb.jpg) +(a) noise in mapping $\mathcal{X}\rightarrow \mathcal{Y}$ + +![](images/4b01a8e4b495bdd788c4686df884802104baae6def57bbc9f29ec6cbab3a2364.jpg) +(b) "noise" in MS-Celeb-1M. +Figure 2: (a): Target $y$ in observed data pair (red-dot) is corrupted by $x$ dependent noise. Data uncertainty regression will give us the "noise level" (green-shaded) beyond the particular predicted value (green line); (b): Samples labeled with the same ID are presented in each row. Samples with red box are regarded as noisy data compared with other intra-class samples. Best viewed in color. + +we experimentally demonstrate the proposed methods perform more robustly on noisy dataset. + +# 3. Methodology + +In Section 3.1, we first reveals the data uncertainty inherently existed in continuous mapping space and our specific face datasets. In Section 3.2, we propose $\mathrm{DUL}_{\mathrm{cls}}$ to consider data uncertainty learning in a standard face classification model. We next propose another regression-based method, $\mathrm{DUL}_{\mathrm{rgs}}$ to improve existing deterministic models in Section 3.3. Last in Section 3.4, we clarify some differences between proposed methods and existing works. + +# 3.1. Preliminaries + +Uncertainty in Continuous Mapping Space Supposing a continuous mapping space $\mathcal{X}\rightarrow \mathcal{Y}$ where each $y_{i}\in \mathcal{V}$ is corrupted by some input-dependent noise, $n(\mathbf{x}_i),\mathbf{x}_i\in \mathcal{X}$ then we say this mapping space carries data uncertainty in itself. Considering a simple case, the noise is additive and drawn from Gaussian distribution with mean of zero and $x$ -dependent variance. Then each observation target $y_{i} = f(\mathbf{x}_{i}) + \epsilon \sigma (\mathbf{x}_{i})$ ,where $\epsilon \sim \mathcal{N}(0,\mathbf{I})$ and $f(\cdot)$ is the embedding function we want to find. Conventional regression model only trained to approximate $f(\mathbf{x}_i)$ given the input $\mathbf{x}_i$ . However, regression model with data uncertainty learning also estimates $\sigma (\mathbf{x}_i)$ , representing the uncertainty of the predicted value $f(\mathbf{x}_i)$ (see Fig 2, (a)). This technique has been used by many tasks [22, 4, 30, 12, 2]. + +Uncertainty in Face Datasets Similar to the above continues mapping space, face datasets composed with $\mathcal{X} \to Y$ also carries data uncertainty. Here $\mathcal{X}$ is the continues image space while $Y$ is the discrete identity labels. Typically, large amount of face images collected online are visually ambiguous (poorly aligned, severely blurred or occluded). It is difficult to filter out these poor quality samples from training set (see Fig 2, (b)). During deep learning era, each sample is represented as an embedding $\mathbf{z}_i$ in the latent space. If we + +![](images/071fdd052bb8fc027cd3cae3482df6114a03cab7b7650884bef3590dc0a80abd.jpg) +Figure 3: Overview of the proposed DULcls FR model. + +hypothesize that each $\mathbf{x}_i\in \mathcal{X}$ has an ideal embedding $f(\mathbf{x}_i)$ mostly representing its identity and less unaffected by any identity irrelevant information in $\mathbf{x}_i$ , then the embedding predicted by DNNs can reformulated as $\mathbf{z}_i = f(\mathbf{x}_i) + n(\mathbf{x}_i)$ where $n(\mathbf{x}_i)$ is the uncertainty information of $\mathbf{x}_i$ in the embedding space. + +# 3.2. Classification-based DUL for FR + +We propose $\mathrm{DUL}_{\mathrm{cls}}$ to firstly introduce data uncertainty learning to the face classification model which can be trained end-to-end. + +Distributional Representation Specifically, we define the representation $\mathbf{z}_i$ in latent space of each sample $\mathbf{x}_i$ as a Gaussian distribution, + +$$ +p \left(\mathbf {z} _ {i} \mid \mathbf {x} _ {i}\right) = \mathcal {N} \left(\mathbf {z} _ {i}; \boldsymbol {\mu} _ {i}, \boldsymbol {\sigma} _ {i} ^ {2} \mathbf {I}\right) \tag {1} +$$ + +where both the parameters (mean as well as variance) of the Gaussian distribution are input-dependent predicted by CNNs: $\pmb{\mu}_i = f_{\pmb{\theta}_1}(\mathbf{x}_i)$ , $\pmb{\sigma}_i = f_{\pmb{\theta}_2}(\mathbf{x}_i)$ , where $\pmb{\theta}_1$ and $\pmb{\theta}_2$ refer to the model parameters respectively w.r.t output $\pmb{\mu}_i$ and $\pmb{\sigma}_i$ . Here we recall that the predicted Gaussian distribution is diagonal multivariate normal. $\pmb{\mu}_i$ can be regarded as the identity feature of the face and the $\pmb{\sigma}_i$ refers to the uncertainty of the predicted $\pmb{\mu}_i$ . Now, the representation of each sample is not a deterministic point embedding any more, but a stochastic embedding sampled from $\mathcal{N}(\mathbf{z}_i; \pmb{\mu}_i, \pmb{\sigma}_i^2\mathbf{I})$ , in the latent space. However, sampling operation is not differentiable preventing the backpropagation of the gradients flow during the model training. We use re-parameterization trick [24] to let the model still take gradients as usual. Specifically, we first sample a random noise $\epsilon$ from a normal distribution, which is independent of the model parameters, and then generate $\mathbf{s}_i$ as the equivalent sampling representation (see Fig 3 for an overview pipeline), + +$$ +\mathbf {s} _ {i} = \boldsymbol {\mu} _ {i} + \epsilon \boldsymbol {\sigma} _ {i}, \quad \epsilon \sim \mathcal {N} (\mathbf {0}, \mathbf {I}). \tag {2} +$$ + +Classification Loss Since $\mathbf{s}_i$ is the final representation of each image $\mathbf{x}_i$ , we feed it to a classifier to minimize the following softmax loss, + +$$ +\mathcal {L} _ {\text {s o f t m a x}} = \frac {1}{N} \sum_ {i} ^ {N} - \log \frac {e ^ {\mathbf {w} _ {y _ {i}} \mathbf {s} _ {i}}}{\sum_ {c} ^ {C} e ^ {\mathbf {w} _ {c} \mathbf {s} _ {i}}}, \tag {3} +$$ + +In practice, we use different variants of $\mathcal{L}_{\text{softmax}}$ such as additive margin [40], feature $\ell 2$ normalization [32] and arcface [7], to train our face classification model. + +KL-Divergence Regularization Eq. 2 indicates that all identity embeddings $\pmb{\mu}_i$ are corrupted by $\sigma_{i}$ during the training period, this will prompt the model to predict small $\pmb{\sigma}$ for all samples in order to suppress the unstable ingredients in $\mathbf{s}_i$ such that Eq. 3 can still converge at last. In this case, the stochastic representation can be reformulated as $\mathbf{s}_i = \pmb {\mu}_i + c$ which is actually degraded to the original deterministic representation2. Inspired by the variational information bottleneck [1], we introduce a regularization term during the optimization by explicitly constraining $\mathcal{N}(\pmb {\mu}_i,\pmb {\sigma}_i)$ to be close to a normal distribution, $\mathcal{N}(\mathbf{0},\mathbf{I})$ , measured by Kullback-Leibler divergence (KLD) between these two distributions. This KLD term is, + +$$ +\begin{array}{l} \mathcal {L} _ {k l} = K L \left[ N \left(\mathbf {z} _ {i} \mid \boldsymbol {\mu} _ {i}, \sigma_ {i} ^ {2}\right) \mid \mid N (\epsilon | \mathbf {0}, \mathbf {I}) \right] \\ = - \frac {1}{2} \left(1 + \log \sigma^ {2} - \mu^ {2} - \sigma^ {2}\right) \tag {4} \\ \end{array} +$$ + +Noted that $\mathcal{L}_{kl}$ is monotonely decreasing w.r.t $\sigma$ under the restriction that $\sigma_{i}^{(l)}\in (0,1)$ ( $l$ refers to the $l^{th}$ dimension of the embedding). $\mathcal{L}_{kl}$ works as a good "balancer" with Eq. 3. Specifically, $\mathrm{DUL}_{\mathrm{cls}}$ is discouraged from predicting large variance for all samples, which may lead to extremely corruption on $\pmb{\mu}_i$ , thus making $\mathcal{L}_{softmax}$ hard to converge. Simultaneously, $\mathrm{DUL}_{\mathrm{cls}}$ is also discouraged from predicting lower variance for all samples, which may lead to larger $\mathcal{L}_{kl}$ to punish the model in turn. + +Last, we use $\mathcal{L}_{cls} = \mathcal{L}_{softmax} + \lambda \mathcal{L}_{kl}$ as the total cost function, and $\lambda$ is a trade-off hyper-parameter, and it is further analysed in Section 4.6. + +# 3.3. Regression-based DUL for FR + +$\mathrm{DUL}_{\mathrm{cls}}$ is a general classification model with data uncertainty learning. Next we propose another regression based method, $\mathrm{DUL}_{\mathrm{rgs}}$ , improving existing FR models by data uncertainty learning. + +Difficulty of Introducing Data Uncertainty Regression to FR $\mathrm{DUL}_{\mathrm{rgs}}$ is inspired from data uncertainty regression [26, 22] for continuous mapping space $\mathcal{X} \to \mathcal{Y}$ as described in Section 3.1. However, mapping space in face datasets is constructed by continuous image space $\mathcal{X}$ and discrete identity label $\mathcal{Y}$ , which cannot be directly fitted via data uncertainty regression. The key point lies in that the identity labels $y_{c} \in Y$ cannot serve as continues target vector to be approximated. This difficulty is also mentioned in PFE [35] but is not resolved. + +![](images/6ffffda28cf8412d6d22c4d74143ff17b379272030ce9097b29510aec09849e0.jpg) +Figure 4: Overview of the proposed $\mathrm{DUL}_{\mathrm{rgs}}$ model. All parameters in the convolution layers are pre-trained by a deterministic FR model and are fixed during the training of $\mathrm{DUL}_{\mathrm{rgs}}$ . + +Constructing New Mapping Space for FR We construct a new target space, which is continuous, for face data. Most importantly, it is nearly equivalent to the original discrete target space $Y$ , which encourages the correct mapping relationship. Specifically, we pre-train a classification-based deterministic FR model, and then utilize the weights in its classifier layers, $\mathcal{W} \in \mathbb{R}^{D \times C}$ as the expected target vector3. Since each $\mathbf{w}_i \in \mathcal{W}$ can be treated as the typical center of the embeddings with the same class, $\{\mathcal{X}, \mathcal{W}\}$ thus can be regarded as the new equivalent mapping sapce. Similar to the uncertainty in continuous mapping space as described in Section 3.1, $\{\mathcal{X}, \mathcal{W}\}$ has inherent noise. We can formulate the mapping from $\mathbf{x}_i \in \mathcal{X}$ to $\mathbf{w}_i \in \mathcal{W}$ as $\mathbf{w}_i = f(\mathbf{x}_i) + n(\mathbf{x}_i)$ , where $f(\mathbf{x}_i)$ is the "ideal" identity feature and each observed $\mathbf{w}_i$ is corrupted by input dependent noise. + +Distributional Representation Next we can estimate above $f(\mathbf{x}_i)$ and $n(\mathbf{x}_i)$ by data uncertainty regression. Specifically, a Gaussian distribution is assumed for the likelihood: $p(\mathbf{z}_i|\mathbf{x}_i) = \mathcal{N}(\mathbf{z}_i;\boldsymbol{\mu}_i,\boldsymbol{\sigma}_i^2\mathbf{I})$ where $\boldsymbol{\mu}_i$ as well as $\boldsymbol{\sigma}_i$ are also parameterised by the weights in neural networks4 (see Fig. 4). If we take each $\mathbf{w}_c$ as the target, we should maximize the following likelihood for each $\mathbf{x}_i$ , + +$$ +p \left(\mathbf {w} _ {c} \mid \mathbf {x} _ {i \in c}, \boldsymbol {\theta}\right) = \frac {1}{\sqrt {2 \pi \boldsymbol {\sigma} _ {i} ^ {2}}} \exp \left(- \frac {\left(\mathbf {w} _ {c} - \boldsymbol {\mu} _ {i}\right) ^ {2}}{2 \boldsymbol {\sigma} _ {i} ^ {2}}\right). \tag {5} +$$ + +Actually, we take the log likelihood as follows, + +$$ +\ln p \left(\mathbf {w} _ {c} \mid \mathbf {x} _ {i \in c}, \boldsymbol {\theta}\right) = - \frac {\left(\mathbf {w} _ {c} - \boldsymbol {\mu} _ {i}\right) ^ {2}}{2 \sigma_ {i} ^ {2}} - \frac {1}{2} \ln \sigma_ {i} ^ {2} - \frac {1}{2} \ln 2 \pi . \tag {6} +$$ + +Assumed that $\mathbf{x}_i, i \in 1,2,\ldots$ are independently and identically distributed (iid.), the likelihood over all data-points is $\prod_{c} \prod_{i} \ln p(\mathbf{w}_{c} | \mathbf{x}_{i \in c}, \boldsymbol{\theta})$ . Practically, we train the network to predict the log variance, $\mathbf{r}_i \coloneqq \ln \sigma_i^2$ , to stabilize the numerical during the stochastic optimization. Last, the likelihood maximization is reformulated as the minimization of + +cost function, + +$$ +\mathcal {L} _ {r g s} = \frac {1}{2 N} \sum_ {c} ^ {C} \sum_ {i \in c} [ \frac {1}{D} \sum_ {l} ^ {D} \left(\exp \left(- r _ {i} ^ {(l)}\right) \left(w _ {c} ^ {(l)} - \mu_ {i} ^ {(l)}\right) ^ {2} + r _ {i} ^ {(l)} \right], \tag {7} +$$ + +where $D$ , $N$ and $l$ refers to the size of embedding dimension, the size of data-points and the $l^{th}$ dimension of each feature vector, respectively. We omit the constant term, $\frac{D}{2} \ln 2\pi$ during the optimization. + +Loss Attenuation Mechanism By qualitatively analyzing Eq. 6, our learned variance $\sigma_{i}$ could actually be regarded as the uncertainty score measuring the confidence of the learned identity embedding, $\mu_{i}$ , belonging to $c^{th}$ class. Specifically, for those ambiguous $\mu_{i}$ located far away from its class center $\mathbf{w}_{c}$ , $\mathrm{DUL}_{\mathrm{rgs}}$ will estimate large variance to temper the error term, $\frac{(\mathbf{w}_c - \boldsymbol{\mu})^2}{2\sigma^2}$ , instead of overfitting on these noisy samples. $\mathrm{DUL}_{\mathrm{rgs}}$ is discouraged from predicting large variance for all samples, which may lead to underfitting of $(\mathbf{w}_c - \boldsymbol {\mu})^2$ and larger log $\sigma$ term will punish the model in turn. Simultaneously, $\mathrm{DUL}_{\mathrm{rgs}}$ is also discouraged from predicting very small variance for all samples, which may lead to exponentially increases of error term. Thus, Eq. 6 allows $\mathrm{DUL}_{\mathrm{rgs}}$ to adapt the weighting of error term. This makes the model learn to attenuate the effect from those ambiguous $\mu_{i}$ caused by poor quality samples. + +# 3.4. Discussion of Related Works + +We first discuss the connection between $\mathrm{DUL}_{\mathrm{cls}}$ and variational information bottleneck (VIB) [1]. VIB [1] is a variational approximation to information bottleneck (IB) principle [38] under the framework of deep learning. VIB seeks a stochastic mapping from input data $X$ to latent representation $Z$ , in terms of the fundamental trade-off between making $Z$ as concise as possible but still have enough ability to predict label $Y$ [38]. It is noted that $\mathcal{L}_{\mathrm{cls}}$ is similar to the objective function in VIB. However, we analyze this classification method from data uncertainty perspective while VIB derived this objective function from the view of information bottleneck. + +We next clarify some differences between $\mathrm{DUL}_{\mathrm{rgs}}$ and PFE [35]. Although both PFE and $\mathrm{DUL}_{\mathrm{rgs}}$ formally encode the input uncertainty as variance representation. However, PFE essentially measures the likelihood of each positive pair of $\{\mathbf{x}_i,\mathbf{x}_j\}$ sharing the same latent embedding: $p(\mathbf{z}_i = \mathbf{z}_j)$ . While $\mathrm{DUL}_{\mathrm{rgs}}$ interprets a conventional Least-Square Regression technique as a Maximum likelihood Estimation with a data uncertainty regression model. + +Last, both $\mathrm{DUL}_{\mathrm{cls}}$ and $\mathrm{DUL}_{\mathrm{rgs}}$ learn identity representation $\mu$ as well as uncertainty representation $\sigma$ , which ensure our predicted $\mu$ can be directly evaluated by common-used matching metric. However, PFE has to use mutual likelihood score (MLS) as the matching metric to improve the + +performance of deterministic model because identity representation is not learnt in PFE. + +# 4. Experiments + +In this section, we first evaluate the proposed methods on standard face recognition benchmarks. Then we provide qualitative and quantitative analysis to explore what is the meaning of the learned data uncertainty and how data uncertainty learning affects the learning of FR models. Last, we conduct experiments on the noisy MS-Celeb-1M dataset to demonstrate that our methods perform more robustly than deterministic methods. + +# 4.1. Datasets and Implementation Details + +We describe the public datasets that are used, and our implementation details. + +Datasets We use MS-Celeb-1M datasets with 3,648,176 images of 79,891 subjects as training set. 2 benchmarks including LFW [18] and MegaFace $[20]^5$ , and 3 unconstrained benchmarks: CFP $[34]^6$ , YTF [43] and IJB-C [28], are used to evaluate the performance of DULcls/rgs following the standard evaluation protocols. + +Architecture We train baseline models on ResNet [15] backbone with SE-blocks [16]. The head of the baseline model is: Backbone-Flatten-FC-BN with embedding dimensions of 512 and dropout probability of 0.4 to output the embedding feature. Compared with baseline model, DULcls has an additional head branch sharing the same architecture to output the variance. DULrgs also has an additional head branch whilst its architecture is: Backbone-Flatten-FC-BN-ReLU-FC-BN-exp, to output the variance. + +Training All baseline models and $\mathrm{DUL}_{\mathrm{cls}}$ models are trained for 210,000 steps using a SGD optimizer with a momentum of 0.9, weight decay of 0.0001, batch size of 512. We use triangular learning rate policy [36] with the max_lr of 0.1 and base_lr of 0. For most $\mathrm{DUL}_{\mathrm{cls}}$ models, we set trade-off hyper-parameter $\lambda$ as 0.01. For the proposed $\mathrm{DUL}_{\mathrm{rgs}}$ , we first train baseline model for 210,000 steps and then fix parameters in all convolution layers (step 1). Then we train the mean branch as well as the variance branch in head from scratch for additional 140,000 steps with batch size of 256 (step 2). During step 2, we set learning rate starting at 0.01, and then decreased to 0.001 and 0.0001 at 56,000 and 84,000 steps. + +![](images/91fe7bb35fd4be45d946ccefaa0e5c8606875215d42e24e38d262a050ccaaea2.jpg) + +![](images/3c121f12da1e1bd954da07bc5ba0f957111d1a42da5a316af2faa286d4e74a96.jpg) +Figure 5: Top: TPR&FPR vs. threshold on IJB-C; Bottom: false acceptance cases mostly happened in the baseline model (left); false acceptance cases mostly happened in $\mathrm{DUL}_{\mathrm{cls}}$ (right). Both baseline model and $\mathrm{DUL}_{\mathrm{cls}}$ are trained by ResNet18 with AM-Softmax on MS-Celeb-1M dataset. Best viewed in color. + +![](images/7580b1626e57336173a10e4add062fa4b87a924986e7c767302a48f7ea94b90c.jpg) + +# 4.2. Comparing DUL with Deterministic Baselines + +In this part, all baseline models are trained with ResNet18 backbone [15], equipped with different variants of softmax loss, i.e., AM-Softmax [40], ArcFace [7] and L2-Softmax [32]. Both the embedding features and the weights in classifier are $\ell 2$ -normalized during the training. Our proposed DULcls models are trained with the same backbone and loss functions. Our proposed DULrgs models are trained based on the different pre-trained baseline models, as described in Section 4.1. + +Table 1 reports the testing results obtained by the baseline models ("Original") and the proposed DUL models. Cosine similarity is used for evaluation. Our proposed methods outperform the baseline deterministic models on most benchmarks7. This demonstrates that the proposed methods are effective on different state-of-the-art loss functions. These results indicate that the identity embeddings $(\mu$ in our methods) trained with data uncertainty $(\sigma$ in our method) present better intra-class compactness and inter-class separability than the point embeddings estimated by baseline models, especially on those unconstrained benchmarks: CFP with frontal/profile photos and YTF/IJB-C with most blur photos collected from YouTube videos, compared with benchmarks with most clear and frontal photos (LFW and MegaFace). + +The proposed DUL achieves most remarkable improvement on verification protocols of IJB-C benchmark, which is also the most challenging one. We thus plot how true acceptance rate (TPR) and false acceptance rate (TPR) perform along with the change of thresholds. As illustrated in Fig 5, $\mathrm{DUL}_{\mathrm{cls}}$ achieves higher TPR and lower FPR than + +
Base ModelRepresentationLFWCFP-FPMegaFace(R1)YTFIJB-C (TPR@FPR)
0.001%0.01%0.1%AUC
AM-Softmax [40]Original99.6396.8597.1196.0975.4388.6594.7387.51
PFE [35]99.6894.5797.1896.1286.2492.1195.7191.71
DULcls99.7197.2897.3096.4688.2592.7895.5792.40
DULrgs99.6697.6196.8596.2887.0291.8495.0291.44
ArcFace [7]Original99.6496.7797.0896.0673.8088.7894.3086.94
PFE [35]99.6895.3496.5596.3286.6992.2895.6691.89
DULcls99.7697.0197.2296.2087.2292.4395.3892.10
DULrgs99.6697.1196.8396.3886.2191.0394.5390.79
L2-Softmax [32]Original99.6095.8790.3495.8977.6086.1992.5585.83
PFE [35]99.6686.4590.6495.9879.3387.2893.4187.01
DULcls99.6397.2493.1996.5679.9087.8093.4487.38
DULrgs99.6696.3589.6696.0874.4683.2391.0983.10
+ +baseline model at different settings of matching threshold. Additionally, the lower FPR is set, the better $\mathrm{DUL}_{\mathrm{cls}}$ performs on TPR. Fig 5 also shows the vast majority cases of false acceptance respectively happened in baseline model and $\mathrm{DUL}_{\mathrm{cls}}$ . We can see that $\mathrm{DUL}_{\mathrm{cls}}$ resolves more FP cases with extreme noises, which are typically occurring in the baseline model. This indicates that model with data uncertainty learning is more applicable to the unconstrained face recognition scenario than deterministic model. + +We have the similar conclusion for $\mathrm{DUL}_{\mathrm{rgs}}$ + +# 4.3. Comparing DUL with PFE + +For comparison, we re-implemented PFE on all baseline models according to the recommended settings of implementation details in [35] $^{8}$ . We note that our reimplementation has achieved similar or slightly better results than those in [35]. Our $\mathrm{DUL}_{\mathrm{cls} / \mathrm{rgs}}$ use averaged pooling aggregation for features in template and are evaluated by cosine similarity. Compared with PFE, our proposed $\mathrm{DUL}_{\mathrm{cls}}$ achieves better performances in all cases, and the proposed $\mathrm{DUL}_{\mathrm{rgs}}$ also shows competitive performances. Results are reported in Table 1. + +PFE interprets the point embedding learned by deterministic FR models as the mean of its output distributional estimation and only learn the uncertainty (variance) for each sample. Thus, PFE has to use $MLS$ metric, which takes the predicted variance into account. Although PFE achieves better results with the help of the matching measurement with more precision, it still suffers more computational complexity for matching. Specifically, for verification of 6000 face pairs (LFW), standard cosine metric takes less than 1 second via matrix multiplication, while $MLS$ takes 1min28s, on two GTX-1080. + +Table 1: Results of models (ResNet18) trained on MS-Celeb-1M. "Original" refers to the deterministic embeddings. The better performance among each base model are shown in bold numbers. We use $\sigma$ both for fusion and matching (with mutual likelihood scores) in PFE. AUC is calculated when FPR spans on the interval [0.001%, 0.1%] and we rescale it. + +
MethodTraining DataLFWYTFMegaFaceCFP-FP
FaceNet [33]200M99.6395.1--
DeepID2+ [37]300K99.4793.2--
CenterFace [42]0.7M99.2894.965.2376.52
SphereFace [27]0.5M99.4295.075.7789.14
ArcFace [7]5.8M99.8398.0281.0396.98
CosFace [41]5M99.7397.677.1189.88
L2-Face [32]3.7M99.7896.08--
Yin et al. [49]1M98.27--94.39
PFE [35]4.4M99.8297.3678.9593.34
Baseline3.6M99.8396.5098.3098.75
PFE rep3.6M99.8296.5098.4897.28
DULcls3.6M99.7896.7898.6098.67
DULrgs3.6M99.8396.8498.1298.78
+ +Table 2: Comparison with the state-of-the-art methods on LFW, YTF, MegaFace (MF) and CFP-FP. “-” indicates that the author did report the performance on the corresponding protocol. “ $\mathrm{PFE}_{\mathrm{rep}}$ ” means we reproduce PFE by ourselves. Backbone: ResNet64. + +# 4.4. Comparison with State-Of-The-Art + +To compare with state-of-the-art, we use a deeper and stronger backbone, ResNet64, trained with AM-Softmax loss on MS-Celeb-1M dataset, as our baseline model. Then we train the proposed DUL models following the setting described in section 4.1. + +The results are illustrated in Table 2. Noted that performances of baseline model have been saturated on LFW and CFP-FP, where the merit of data uncertainty learning is not obvious. However, $\mathrm{DUL}_{\mathrm{cls / rgs}}$ still slightly improve the accuracy on YTF and MegaFace9. Table 3 reports the results of different methods on IJB-C. Both PFE and DUL achieve much better performances over baseline models. + +# 4.5. Understand Uncertainty Learning + +In this part, we qualitatively and quantitatively analyze the proposed DUL to gain more insights about data uncertain learning. + +
MethodTraining DataIJB-C (TPR@FPR)
0.001%0.01%0.1%AUC
Yin et al. [48]0.5M--69.3-
Cao et al. [5]3.3M74.784.091.0-
Multicolumn [46]3.3M77.186.292.7-
DCN [45]3.3M-88.594.7-
PFE [35]4.4M89.6493.2595.49-
Baseline3.6M83.0692.1695.8391.97
PFE rep3.6M89.7794.1496.3793.74
DULcls3.6M88.1894.6196.7093.97
DULrgs3.6M90.2394.2196.3293.88
+ +Table 3: Comparison with the state-of-the-art methods on IJB-C. Backbone: ResNet64. + +![](images/8d7bfe7dd3bb2d3ebf0454b224dd68e54b7469e21760208817f86e165b987226.jpg) +Figure 6: Uncertainty distribution on different dataset for $\mathrm{DUL}_{\mathrm{rgs}}$ . Similar uncertainty distribution has also been observed in $\mathrm{DUL}_{\mathrm{cls}}$ . Best viewed in color. + +What is the meaning of the learned uncertainty? The estimated uncertainty is closely related to the quality of face images, for both $\mathrm{DUL}_{\mathrm{cls}}$ and $\mathrm{DUL}_{\mathrm{rgs}}$ . This is also observed in PFE [35]. For visualization, we show the learned uncertainty10 of different dataset in Figure 6. It illustrates that the learned uncertainty increases along with the image quality degradation. This learned uncertainty could be regarded as the quality of the corresponding identity embedding estimated by the model, measuring the proximity of the predicted face representation to its genuine (or true) point location in the latent space. + +Therefore, two advantages are obtained for face recognition with data uncertainty learning. First, the learned variance can be utilized as a "risk indicator" to alert FR systems that the output decision is unreliable when the estimated variance is very high. Second, the learned variance also can be used as the measurement of image quality assessment. In this case, we note that it is unnecessary to train a separate quality assessment model which requires explicit quality labels as before. + +How the learned uncertainty affects the FR model? In this part, we attempt to shed some light on the mechanism of how the learned data uncertainty affects the model training + +![](images/9cd8e53dc56b1366ad7033011ee3efe7354543d94b5876fa2e630c9ec95ec7d6.jpg) +Figure 7: Bad case analysis between baseline model and $\mathrm{DUL}_{\mathrm{cls}}$ . Best viewed in color. + +and helps to obtain better feature embeddings. + +We classify the training samples in MS-Celeb-1M dataset into three categories according to the degree of estimated uncertainty by $\mathrm{DUL}_{\mathrm{cls}}$ : easy samples with low variance, semi-hard samples with medium variance and hard samples with large variance. We calculated the proportion of mis-classified samples in each of the three categories to all mis-classified samples respectively produced by baseline model and our $\mathrm{DUL}_{\mathrm{cls}}$ . Fig 7 illustrates that our $\mathrm{DUL}_{\mathrm{cls}}$ causes relatively less bad cases on easy samples as well as semi-hard samples, compared with the baseline model. However, for those hard samples with extreme noises, baseline model produces less bad cases, when compared with $\mathrm{DUL}_{\mathrm{cls}}$ . This demonstrates that FR networks with data uncertainty learning focus more on those training samples which should be correctly classified and simultaneously "give up" those detrimental samples, instead of over-fitting them. This supports our previous discussion in Section 3.2. + +We also conduct similar experiment for $\mathrm{DUL}_{\mathrm{rgs}}$ . We calculate the averaged euclidean distances[11] between the class center $\mathbf{w}_c$ and its intra-class estimated identity embedding, $\pmb{\mu}_{i\in c}$ , respectively for baseline model and $\mathrm{DUL}_{\mathrm{rgs}}$ . As illustrated in Fig 8, $\mathrm{DUL}_{\mathrm{rgs}}$ pulls the easy and semi-hard samples closer to their class center whilst pushes those hard samples further away. This also supports our discussion in Section 3.3 that Eq. 6 effectively prevents model over-fitting on extremely noisy samples by the adaptive weighting mechanism w.r.t $\pmb{\sigma}$ . + +Last, we manually construct imposter/genuine test pair with different blurriness to compare the cosine similarity respectively obtained by baseline model and our methods. As illustrated in Fig 9, along with the increase of blurriness, both baseline model and DUL deteriorate rapidly. However, our proposed DUL achieves higher similarity score for genuine pair and lower similarity score for imposter pair than baseline model, indicating that it is more robust. + +![](images/ebb487790cf91053e08e18fc3d4de962d48fa85e1a0c8b7bf6c2704d88734b86.jpg) +Figure 8: Averaged intra-class distances $||\pmb{\mu}_{i \in c} - \mathbf{w}_c||_2$ between base model and DULrgs. + +harmonic_std $||w_{c} - \mu_{i\in c}||_{2}$ + +
baseDULrgs
<0.0320.7030.671 ↓
0.032~0.0450.7950.760 ↓
>0.0451.1461.252 ↑
+ +![](images/4b80093dd28cfee44aeee9c88a9ced4abb0a9f0b5b17644964719ca140b381ef.jpg) +(a) + +![](images/325c1e8cda7ba945aa6cfc6bff344b8d04134aa96129703d6448252a5cd10214.jpg) +(b) +Figure 9: (a) Blur genuine and imposter pair; (b) Cosine similarity score obtained by baseline and proposed DUL for each pair. + +# 4.6. Other Experiments + +Impact of hyper-parameter of $\mathrm{DUL}_{\mathrm{cls}}$ In this part, we qualitatively analyze what the trade-off hyper-parameter $\lambda$ controls in $\mathrm{DUL}_{\mathrm{cls}}$ . As mentioned in VIB [1], KLD term works as a regularization to trade off the conciseness and the richness of the information preserved in bottleneck embeddings. We experimentally find the KL divergence in our method affects the representational capacity of $\sigma$ . As illustrated in Table 4, $\mathrm{DUL}_{\mathrm{cls}}$ without the optimization of KLD term $(\lambda = 0)$ performs close to baseline model. In this case, $\mathrm{DUL}_{\mathrm{cls}}$ estimates relatively small $\sigma_{i}$ for all samples, which makes the sampled representation $\mu_{i} + \epsilon \sigma_{i}$ nearly deterministic. With the enhancement of the optimization strength of KLD term $(\lambda \uparrow)$ , $\mathrm{DUL}_{\mathrm{cls}}$ is prone to "assign" larger variance for noisy samples and small variance for high quality ones (as illustrated in Fig 7). However, overly minimizing KLD $(\lambda = 1)$ term will prompt the model to predict large variance for all samples, which makes $\mathcal{L}_{\mathrm{cls}}$ in Eq. 3 hard to converge, thus the performances deteriorate rapidly (see Table 4). + +DUL performs more robustly on noisy training data. Based on the analysis of Section 3.4 about how the learned variance affects the model training. We further conduct experiments on noisy MS-Celeb-1M to prove it. We randomly select different proportions of samples from MS-Celeb-1M to pollute them with Gaussian blur noise. Table 5 demonstrates that our proposed $\mathrm{DUL}_{\mathrm{cls / rgs}}$ performs more robustly on noisy training data. + +
λσYTFMegaFaceIJB-C (TPR@FPR)
0.001%0.01%0.1%
baseline-96.0997.1175.3288.6594.73
0.00.256296.1497.1364.9288.5594.64
0.00010.307496.3697.2565.4485.2294.44
0.0010.356796.2697.3862.8886.6594.46
0.010.517196.4697.3088.2592.7895.57
0.10.850596.4295.0787.1991.7895.13
0.50.901287.4085.7340.2352.7058.52
1.00.952075.1463.901.7704.53013.02
+ +Table 4: Results of $\mathrm{DUL}_{\mathrm{cls}}$ trained with different trade-off $\lambda$ . $\overline{\sigma}$ represents we average the harmonic mean of the estimated variance over all training samples in MS-Celeb-1M. The backbone is ResNet18 with AM-Softmax loss. + +
percentModelMegaFaceLFWYTFIJB-C (TPR@FPR)
0.001%0.01%0.1%
0%baseline97.1199.6396.0975.3288.6594.73
10%baseline96.6499.6396.1664.9686.0094.82
PFE [35]97.0299.6396.183.3991.3395.54
DULCLS96.8899.7596.4488.0493.2195.96
DULrgs96.0599.7196.4684.7491.5695.30
20%baseline96.2099.6196.0043.5280.4894.22
PFE [35]96.9099.6195.8682.0390.8995.38
DULCLS96.3799.7196.6889.0193.2495.97
DULrgs95.5199.6696.6481.1090.9195.27
30%baseline95.7299.6095.4531.5176.0993.11
PFE [35]96.8299.6196.1280.9290.3195.29
DULCLS95.8699.7396.3886.0591.8095.02
DULrgs94.9699.6696.6681.5491.2095.32
40%baseline95.1499.5695.5139.6977.1293.73
PFE [35]96.5999.5995.9477.7289.4694.82
DULCLS95.3399.6696.5484.1592.6095.85
DULrgs94.2899.5896.6878.1387.6494.67
+ +Table 5: Comparison of baseline model and proposed DULcls/rgs trained on noisy MS-Celeb-1M. Backbone model is ResNet18 with AM-Softmax loss. + +# 5. Conclusion + +In this work, we propose two general learning methods to further develop and perfect the data uncertainty learning (DUL) for face recognition: $\mathrm{DUL}_{\mathrm{cls}}$ and $\mathrm{DUL}_{\mathrm{rgs}}$ . Both methods give a Gaussian distributional estimation for each face image in the latent space and simultaneously learn identity feature (mean) and uncertainty (variance) of the estimated mean. Comprehensive experiments demonstrate that our proposed methods perform better than deterministic models on most benchmarks. Additionally, we discuss how the learned uncertainty affects the training of model from the perspective of image noise by both qualitative analysis and quantitative results. + +# 6. Acknowledgement + +This paper is supported by the National key R&D plan of the Ministry of science and technology (Project Name: "Grid function expansion technology and equipment for community risk prevention", Project No.2018YFC0809704) + +# References + +[1] Alexander A Alemi, Ian Fischer, Joshua V Dillon, and Kevin Murphy. Deep variational information bottleneck. In Proceedings of the International Conference on Learning Representations, 2017. +[2] Christopher M Bishop and Cazhaow S Quazaz. Regression with input-dependent noise: A bayesian treatment. In Advances in Neural Information Processing Systems, pages 347-353, 1997. +[3] Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural networks. arXiv preprint arXiv:1505.05424, 2015. +[4] Axel Brando, Jose A Rodríguez-Serrano, Mauricio Ciprian, Roberto Maestre, and Jordi Vitria. Uncertainty modelling in deep networks: Forecasting short and noisy series. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 325-340. Springer, 2018. +[5] Qiong Cao, Li Shen, Weidi Xie, Omkar M Parkhi, and Andrew Zisserman. Vggface2: A dataset for recognising faces across pose and age. In 2018 13th IEEE International Conference on Automatic Face & Gesture Recognition (FG 2018), pages 67-74. IEEE, 2018. +[6] 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 The IEEE International Conference on Computer Vision (ICCV), October 2019. +[7] Jiankang Deng, Jia Guo, Niannan Xue, and Stefanos Zafeiriou. Arcface: Additive angular margin loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4690-4699, 2019. +[8] Armen Der Kiureghian and Ove Ditlevsen. Aleatory or epistemic? does it matter? Structural Safety, 31(2):105-112, 2009. +[9] Michael Havbro Faber. On the treatment of uncertainties and probabilities in engineering decision analysis. Journal of Offshore Mechanics and Arctic Engineering, 127(3):243-248, 2005. +[10] Yarin Gal. Uncertainty in deep learning. PhD thesis, PhD thesis, University of Cambridge, 2016. +[11] Yarin Gal and Zoubin Ghahramani. Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pages 1050-1059, 2016. +[12] Paul W Goldberg, Christopher KI Williams, and Christopher M Bishop. Regression with input-dependent noise: A gaussian process treatment. In Advances in neural information processing systems, pages 493-499, 1998. +[13] Sixue Gong, Vishnu Naresh Boddeti, and Anil K Jain. On the capacity of face representation. arXiv preprint arXiv:1709.10433, 2017. +[14] Yandong Guo, Lei Zhang, Yuxiao Hu, Xiaodong He, and Jianfeng Gao. Ms-celeb-1m: A dataset and benchmark for large-scale face recognition. In European Conference on Computer Vision, pages 87–102. Springer, 2016. + +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016. +[16] Jie Hu, Li Shen, and Gang Sun. Squeeze-and-excitation networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 7132-7141, 2018. +[17] Wei Hu, Yangyu Huang, Fan Zhang, and Ruirui Li. Noise-tolerant paradigm for training face recognition cnns. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11887-11896, 2019. +[18] Gary B Huang, Marwan Mattar, Tamara Berg, and Eric Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. 2008. +[19] Shuya Isobe and Shuichi Arai. Deep convolutional encoder-decoder network with model uncertainty for semantic segmentation. In 2017 IEEE International Conference on Innovations in Intelligent SysTems and Applications (INISTA), pages 365-370. IEEE, 2017. +[20] Ira Kemelmacher-Shlizerman, Steven M Seitz, Daniel Miller, and Evan Brossard. The megaface benchmark: 1 million faces for recognition at scale. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4873-4882, 2016. +[21] Alex Kendall, Vijay Badrinarayanan, and Roberto Cipolla. Bayesian segnet: Model uncertainty in deep convolutional encoder-decoder architectures for scene understanding. BMVC, 2015. +[22] Alex Kendall and Yarin Gal. What uncertainties do we need in bayesian deep learning for computer vision? In Advances in neural information processing systems, pages 5574-5584, 2017. +[23] Salman Khan, Munawar Hayat, Syed Waqas Zamir, Jianbing Shen, and Ling Shao. Striking the right balance with uncertainty. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 103-112, 2019. +[24] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. ICLR, 2014. +[25] Florian Kraus and Klaus Dietmayer. Uncertainty estimation in one-stage object detection. arXiv preprint arXiv:1905.10296, 2019. +[26] Quoc V Le, Alex J Smola, and Stephane Canu. Heteroscedastic gaussian process regression. In Proceedings of the 22nd international conference on Machine learning, pages 489-496. ACM, 2005. +[27] Weiyang Liu, Yandong Wen, Zhiding Yu, Ming Li, Bhiksha Raj, and Le Song. Spherface: Deep hypersphere embedding for face recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 212-220, 2017. +[28] Brianna Maze, Jocelyn Adams, James A Duncan, Nathan Kalka, Tim Miller, Charles Otto, Anil K Jain, W Tyler Niggel, Janet Anderson, Jordan Cheney, et al. Iarpa janus benchmark-c: Face dataset and protocol. In 2018 International Conference on Biometrics (ICB), pages 158-165. IEEE, 2018. + +[29] Hong-Wei Ng and Stefan Winkler. A data-driven approach to cleaning large face datasets. In 2014 IEEE International Conference on Image Processing (ICIP), pages 343-347. IEEE, 2014. +[30] David A Nix and Andreas S Weigend. Estimating the mean and variance of the target probability distribution. In Proceedings of 1994 IEEE International Conference on Neural Networks (ICNN'94), volume 1, pages 55-60. IEEE, 1994. +[31] M Elisabeth Paté-Cornell. Uncertainties in risk analysis: Six levels of treatment. Reliability Engineering & System Safety, 54(2-3):95–111, 1996. +[32] Rajeev Ranjan, Carlos D Castillo, and Rama Chellappa. L2-constrained softmax loss for discriminative face verification. arXiv preprint arXiv:1703.09507, 2017. +[33] 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. +[34] Soumyadip Sengupta, Jun-Cheng Chen, Carlos Castillo, Vishal M Patel, Rama Chellappa, and David W Jacobs. Frontal to profile face verification in the wild. In 2016 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 1-9. IEEE, 2016. +[35] Yichun Shi, Anil K Jain, and Nathan D Kalka. Probabilistic face embeddings. In Proceedings of the IEEE International Conference on Computer Vision, 2019. +[36] Leslie N Smith. Cyclical learning rates for training neural networks. In 2017 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 464-472. IEEE, 2017. +[37] Yi Sun, Xiaogang Wang, and Xiaou Tang. Deeply learned face representations are sparse, selective, and robust. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2892-2900, 2015. +[38] Naftali Tishby and Noga Zaslavsky. Deep learning and the information bottleneck principle. In 2015 IEEE Information Theory Workshop (ITW), pages 1-5. IEEE, 2015. +[39] Fei Wang, Liren Chen, Cheng Li, Shiyao Huang, Yanjie Chen, Chen Qian, and Chen Change Loy. The devil of face recognition is in the noise. In Proceedings of the European Conference on Computer Vision (ECCV), pages 765-780, 2018. +[40] Feng Wang, Jian Cheng, Weiyang Liu, and Hajun Liu. Additive margin softmax for face verification. IEEE Signal Processing Letters, 25(7):926-930, 2018. +[41] Hao Wang, Yitong Wang, Zheng Zhou, Xing Ji, Dihong Gong, Jingchao Zhou, Zhifeng Li, and Wei Liu. Cosface: Large margin cosine loss for deep face recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5265-5274, 2018. +[42] Yandong Wen, Kaipeng Zhang, Zhifeng Li, and Yu Qiao. A discriminative feature learning approach for deep face recognition. In European conference on computer vision, pages 499-515. Springer, 2016. +[43] Lior Wolf, Tal Hassner, and Itay Maoz. Face recognition in unconstrained videos with matched background similarity. In CVPR 2011. + +[44] Xiang Wu, Ran He, Zhenan Sun, and Tieniu Tan. A light cnn for deep face representation with noisy labels. IEEE Transactions on Information Forensics and Security, 13(11):2884-2896, 2018. +[45] Weidi Xie, Li Shen, and Andrew Zisserman. Comparator networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 782-797, 2018. +[46] Weidi Xie and Andrew Zisserman. Multicolumn networks for face recognition. In BMVC, 2018. +[47] Dong Yi, Zhen Lei, Shengcai Liao, and Stan Z Li. Learning face representation from scratch. arXiv preprint arXiv:1411.7923, 2014. +[48] Bangjie Yin, Luan Tran, Haoxiang Li, Xiaohui Shen, and Xiaoming Liu. Towards interpretable face recognition. arXiv preprint arXiv:1805.00611, 2018. +[49] Xi Yin and Xiaoming Liu. Multi-task convolutional neural network for pose-invariant face recognition. IEEE Transactions on Image Processing, 27(2):964-975, 2017. +[50] Tianyuan Yu, Da Li, Yongxin Yang, Timothy M Hospedales, and Tao Xiang. Robust person re-identification by modelling feature uncertainty. In Proceedings of the IEEE International Conference on Computer Vision, pages 552–561, 2019. +[51] Umara Zafar, Mubeen Ghafoor, Tehseen Zia, Ghufran Ahmed, Ahsan Latif, Kaleem Razzaq Malik, and Abdullahi Mohamud Sharif. Face recognition with bayesian convolutional networks for robust surveillance systems. EURASIP Journal on Image and Video Processing, 2019(1):10, 2019. \ No newline at end of file diff --git a/datauncertaintylearninginfacerecognition/images.zip b/datauncertaintylearninginfacerecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..d95e9d9d74a67b344ee8a337b56da0ab5e47537c --- /dev/null +++ b/datauncertaintylearninginfacerecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2765640d7921e25784fd90ade547106334e77f5f9732d015ca70876796ecb9ae +size 579017 diff --git a/datauncertaintylearninginfacerecognition/layout.json b/datauncertaintylearninginfacerecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..43b14697bfc061e6bf3191790f52726f10134a13 --- /dev/null +++ b/datauncertaintylearninginfacerecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ec21ab8ac0fb11b9c719c23046e56a69217e2fb9b78c0447722ff3fe3448f22 +size 510357 diff --git a/davdnetdeepaudioaidedvideodecompressionoftalkingheads/7b49c6b9-ccd0-485f-a4b5-98e99731f0b9_content_list.json b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/7b49c6b9-ccd0-485f-a4b5-98e99731f0b9_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..c66872864fa468143e7adc2a441c0e7c5ced3ce2 --- /dev/null +++ b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/7b49c6b9-ccd0-485f-a4b5-98e99731f0b9_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca055f229bf687c3889870b4e0f62170da631d5a3ae3f9308cf4ddaf18a9d2c1 +size 68322 diff --git a/davdnetdeepaudioaidedvideodecompressionoftalkingheads/7b49c6b9-ccd0-485f-a4b5-98e99731f0b9_model.json b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/7b49c6b9-ccd0-485f-a4b5-98e99731f0b9_model.json new file mode 100644 index 0000000000000000000000000000000000000000..768a113db0026094a28de62773880fcd757c5844 --- /dev/null +++ b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/7b49c6b9-ccd0-485f-a4b5-98e99731f0b9_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91fdc9744382a211b49e74411574d82cee141de9b6e28d04df9e62e6649c3f1f +size 85441 diff --git a/davdnetdeepaudioaidedvideodecompressionoftalkingheads/7b49c6b9-ccd0-485f-a4b5-98e99731f0b9_origin.pdf b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/7b49c6b9-ccd0-485f-a4b5-98e99731f0b9_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7cfbe67654487c43f7d8b9b7dc93a003f2dcbf78 --- /dev/null +++ b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/7b49c6b9-ccd0-485f-a4b5-98e99731f0b9_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3172381c07ccb66e1784c6bee3002cf5850c954e23bb7aa0763abcdfeab9784f +size 603286 diff --git a/davdnetdeepaudioaidedvideodecompressionoftalkingheads/full.md b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/full.md new file mode 100644 index 0000000000000000000000000000000000000000..bcc7f12684fd672250da03318c3c5908fb37d8af --- /dev/null +++ b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/full.md @@ -0,0 +1,297 @@ +# DAVD-Net: Deep Audio-aided Video Decompression of Talking Heads + +Xi Zhang $^{1}$ Xiaolin Wu $^{2\dagger}$ Xinliang Zhai $^{3}$ Xianye Ben $^{3}$ Chengjie Tu $^{4}$ Shanghai Jiao Tong University $^{1}$ McMaster University $^{2}$ Shandong University $^{3}$ Tencent $^{4}$ + +zhangxi_19930818@sjtu.edu.cn xwu@ece.mcmaster.ca + +xinliangzhai@mail.sdu.edu.cn benxianye@sdu.edu.cn chengjietu@tencent.com + +# Abstract + +Close-up talking heads are among the most common and salient object in video contents, such as face-to-face conversations in social media, teleconferences, news broadcasting, talk shows, etc. Due to the high sensitivity of human visual system to faces, compression distortions in talking head videos are highly visible and annoying. To address this problem, we present a novel deep convolutional neural network method for very low bit rate video reconstruction of talking heads. The key innovation is a new DCNN architecture that can exploit the audio-video correlations to repair compression defects in the face region. We further improve reconstruction quality by embedding into our DCNN the encoder information of the video compression standards and introducing a constraining projection module in the network. Extensive experiments demonstrate that the proposed DCNN method outperforms the existing state-of-the-art methods on videos of talking heads. + +# 1. Introduction + +Videos constitute roughly 80 percent of all IP traffic and still climbing. They are putting and will continue to put pressures on communication bandwidth and content storage. This makes video compression an indispensable enabling technology in today's digitally interconnected societies. For acceptable cost effectiveness, popular video compression methods (e.g., MPEG-4 [24], H.264 [31], HEVC [25]) have to compress the video data enough to achieve required savings in bandwidth and storage. For high compression ratio or low bit rates, lossy video compression inevitably produces objectionable artifacts, such as blocking, blurring, ringing and jaggies. Recently quite a few deep learning methods are proposed to remove video compression artifacts. Compared with the pure end-to-end DCNN approach for video compression [19, 14], the meth + +Compressed Image only Audio-aided Ground Truth + +![](images/5afe7219404b182af005f6f2820e62f697016c3bf100f27a99f64d3402224b94.jpg) +Figure 1. The reconstruction results without and with the assistance of audio signal. The lower teeth are completely missing in the frame reconstructed without using audio information. + +ods of compression artifacts removal [35, 20, 37] have the operational advantage of being compatible with existing video compression standards, as they are essentially a post-processing step of restoring already-decoded videos by the standards. We call this CNN-based video restoration strategy deep video decompression. + +In this work, we focus on CNN-based restoration of heavily compressed face videos with audio side information. Talking heads are arguably the most common and salient object in daily Internet video communications. For examples, conversational faces are the focal centerpiece in social media, teleconferences, Internet talk shows (TED and the alike), self media, etc. High reconstruction quality of faces in compressed videos is crucial to satisfactory user experiences, particularly when the network communication channels are congested and sporadic. Much to the advantage of algorithm or CNN designers, talking faces have very strong priors that can greatly reduce the solution space of the underlying inverse problem of video restoration. To start, the object is a face, a highly structured object; in many cases the face is known to be of a particular person. Furthermore, the audio of the speaking person is also available. Physiologically, facial muscles, particularly those in the lips, shape the sound and air stream into speech. This is why people can read lips, i.e., recognizing uttered words by watching the speaker's lips even without sound. It will be interesting to know how much one can improve the perceptual quality of compressed face videos by incorporating all the above priors into the design of deep decompression CNNs. To advance this line of enquiry, we design a + +novel neural network architecture, called Deep Audio-aided Video Decompression Network (DAVD-Net), for achieving the best possible quality of talking head videos even at very low bit rates (see Fig. 1). The success of the DAVD-Net hinges on how effectively the network can exploit the high correlation of a person's speech and her/his facial dynamics. + +Besides accompanying audio, the structural information of the encoder in the video compression standards, such as coding block organization, quantization table, etc., also offers strong priors to reduce the uncertainty of the underlying video restoration problem. If used properly in the DAVID-Net, these priors can improve the video reconstruction quality further, but they are overlooked by the existing methods. To profit from the structural prior information of the encoder, we introduce a constraining projection module in the DAVID-Net. It refines the network output results by imposing both upper and lower bounds on the ground truth DCT coefficients of prediction residuals defined in video compression standards. + +In summary, the major contributions of this research are the follows: (1) A baseline CNN method for deep decompression of talking head videos that outperforms existing CNN methods for the removal of compression artifacts, particularly at very low bit rates. (2) The DAVID-Net architecture design that exploits the joint audio-video statistics to extract additional performance gain over our baseline method out of the correlations of a talking head video and the associated speech. (3) A systematic performance evaluation and analysis of the DAVID-Net methodology with the availability of priors of different strengths: the DAVID-Net trained for compressed videos of a particular known speaker with and without his/her voices, and for generic talking heads with and without the accompanying voices. + +This research will have a lasting practical significance even minus the pressure of communication bandwidth exerted by mass social media in extensively networked virtual communities. As the data volume of face-to-face conversations increases by order of magnitude from voice to video, backing up all conversational videos is unsustainable even for big social media service providers. The DAVID-Net technique allows such video contents to be archived in aggressively compressed form without the risk of fidelity loss, because it is capable of repairing compression defects if recalled in the future. + +The rest of the paper is organized as follows. After a brief review of related works in Section 2, we present, in Section 3, the justifications and details of our network design. In Section 4, we describe the design of our experiments, explain the datasets used, and report our empirical findings. The experiments demonstrate that the proposed DAVD-Net outperforms the existing state-of-the-art methods on videos of talking heads for compression artifact reduction. Section 5 concludes the paper. + +# 2. Related Work + +Image compression artifact reduction. There is a large body of literature on removing compression artifacts in images [11, 40, 18, 3, 8]. The majority of the studies on the subject focus on post-processing JPEG images to alleviate compression noises, apparently because JPEG is the most widely used lossy compression standard. + +Inspired by successes of deep learning in image restoration, a number of CNN-based compression artifacts removal methods were developed [9, 27, 13, 12]. Borrowing the CNN for super-resolution (SRCNN), Dong et al. [9] proposed an artifact reduction CNN (ARCNN). The ARCNN has a three-layer structure: a feature extraction layer, a feature enhancement layer, and a reconstruction layer. This CNN structure is designed in the principle of sparse coding. It was improved by Svoboda et al. [27] who combined residual learning and symmetric weight initialization. Guo et al. [13] and Galteri et al. [12] proposed to reduce compression artifacts by Generative Adversarial Network (GAN), as GAN is able to generate sharper image details. Zhang et al [38, 39] proposed to incorporate an $\ell_{\infty}$ fidelity criterion in the design of networks to protect small, distinctive structures in the framework of near-lossless image compression. + +Deep restoration of compressed videos. All above methods for image compression artifact reduction can be viewed as of single-frame approach to video restoration without using any temporal correlations between neighboring frames. Yang et al. [37] introduced the first CNN-based multi-frame method for restoring compressed videos, which takes advantage of information in the neighboring frames. Xue et al. [35] proposed a multi-task learning approach to jointly carry out motion estimation and a video restoration task. He et al. [15] utilized the coding block information of the encoder structures to guide the video decompression process. Lu et al. [20] modeled the video artifact reduction task as a Kalman filtering procedure and restored decoded frames through a deep Kalman filtering network. The main idea is to utilize the less noisy previously restored frames instead of directly decoded frames as temporal references. Recently, Xu et al. [34] introduced an non-local strategy in ConvLSTM to trace the spatiotemporal dependency in a video sequence, and achieved the state-of-the-art performance. + +Joint audio-video generation and processing. Suwajanakorn et al. [26] proposed an interesting technique to automatically edit a video of a given speaker with accurate lip synchronization guided by his own audio in a different speech. Chung et al. [5] presented a method to animate a face image according to audio signals. Vougioukas et al. [29] proposed to do speech-driven animation with temporal GANS. Chen et al. [4] presented a method to do speech-driven facial animation with spatial attention. Afouras et al. [1] designed a deep audio-visual speech sep + +![](images/2ee13131a559220f9d3cef12b5d94a74d4d34ec83147e984ae13acb9259131b0.jpg) +Figure 2. The framework of the proposed DAVD-Net. + +aration network that is able to separate a speaker's voice from a noisy background given lip regions of the accompanying video of the speaker. Shlizerman et al. [23] presented a method that gets as input an audio of violin or piano playing, and generates a video of skeleton predictions to animate an instrument playing avatar. Wiles et al. [32] proposed a neural network that controls the pose and expression of a given face, using the talking head video of another person. + +All the above CNN methods focused on video or audio generation with assistance of accompanying audio or video. To our best knowledge, no research has been reported on deep learning based methods for video artifacts reduction using joint audio-video statistics. + +# 3. Methodology + +# 3.1. Overview + +Given an original video sequence $\{X_{t}|t = 0,1,2\dots \}$ , $\{X_{t}\}$ must be compressed by a video compression standard (e.g. H.264/265) that removes spatial and temporal redundancies to gain efficiency in transmission and storage. Then the compressed video will be decompressed by users to obtain a decoded video sequence, denoted by $\{Y_{t}|t = 0,1,2\dots \}$ . + +In the deep decompression task, the aim is to compute a refined reconstruction $\hat{X}_t$ from a decoded frame $Y_t$ by maximally removing compression artifacts in $Y_t$ . In order to utilize the temporal information, most existing methods take the current decoded frame and neighboring frames as input and output a restored current frame, that is: + +$$ +\hat {X} _ {t} = G \left(\mathcal {Y} _ {t \pm n}\right) \tag {1} +$$ + +where $\mathcal{Y}_{t\pm n} = \{Y_{t - n},\dots ,Y_{t + n}\}$ denotes a consecutive $(2n + 1)$ compressed frames and $G$ is the network to be optimized. In the context of talking heads videos, the audio + +signal is a useful piece of information for the video restoration due to the strong correlation between speech and facial movements. To factor in the audio, the video reconstruction problem should be reformulated as: + +$$ +\hat {X} _ {t} = G \left(\mathcal {Y} _ {t \pm n}, \mathcal {A} _ {t \pm m}\right) \tag {2} +$$ + +where $\mathcal{A}_{t\pm m} = \{A_{t - m},\dots ,A_{t + m}\}$ is the consecutive audio signal temporally centered on $A_{t}$ . + +The overall architecture of the proposed DAVID-Net is shown in Fig. 2. It consists of two branches, for audio and video respectively. In the audio processing branch, we apply bidirectional LSTM to extract audio features, and feed them to a generation network that produces a cluster of 2-D feature maps in preparation for being combined with video feature maps. In the video processing branch, after alignment and fusion of neighboring decoded frames, we use several residual blocks to extract features of the aligned frames. Next, we design a spatial attention fusion module to dynamically fuse the audio and video features. A reconstruction module consisting of a cascade of 10 residual blocks operates on the fused video and audio features. Finally, before output, the reconstructed video is refined by a projection module that constrains the solution space by the quantization boundaries in the transform domain of the video compression standard. + +Next, we detail the individual components of the proposed DAVD-Net. + +# 3.2. Audio feature extraction + +In our design the audio signal is represented by the standard Mel-frequency cepstral coefficients (MFCC) [33, 22]. When a person talks, at each time instance $t$ , the facial image, particularly in parts around the mouth, depends not only on the current audio frame $A_{t}$ but also on previous and future audio frames. For this reason, the network takes + +![](images/3f0f0eb2bdd1fd1e489ffab479a3662bb19476f6ed2763546c7e5fb5aa5bc619.jpg) +Figure 3. Left: The architecture layout of the A-subnet. Right: The detailed architecture of a upsampling ResBlock. + +a consecutive audio feature sequence $\{A_{t - m},\dots,A_{t + m}\}$ as input in order to benefit from higher order statistical dependencies between the audio and video. To prepare the audio features for being combined with video features, we use a network block, called A-subnet, to extract and organize audio features in a 2D form. We do not directly use the MFCC coefficients to generate the 2-D feature maps. Instead, we adopt a three-layers bidirectional LSTM module to extract features from the MFCC coefficients. That is $\mathcal{L}_{t\pm m} =$ LSTM(A $t\pm m)$ , where $\mathcal{L}_{t\pm m} = \{L_{t - m},\dots,L_{t + m}\}$ is the extracted LSTM feature sequence of equal length to $\mathcal{A}_{t\pm m}$ + +The A-subnet takes the $\mathcal{L}_{t\pm m}$ as input and outputs a cluster of 2-D feature maps of the same size as the video frame. The sub-network consists of one linear layer and five upsampling residual blocks, are illustrated in Fig. 3. + +# 3.3. Video feature extraction + +In order to fully exploit spatiotemporal correlations in video signals, our network takes a group of consecutive $(2n + 1)$ compressed frames $\{Y_{t - n},\dots,Y_{t + n}\}$ as the second input in addition to associated audio. Due to motions of camera or/and object (head in our case), the current frame $Y_{t}$ and its neighboring frames are misaligned. Aligning these video frames helps the CNN blocks for feature extraction to learn or predict spatial details more accurately. In recent studies on video super-resolution, Tian et al. [28] and Wang et al. [30] proposed to use deformable convolutions [7] to align each neighboring frame to the reference frame and have achieved the state-of-the-art performance in video super-resolution task. Inspired by their success, we also adopted the deformable convolutions to align the current frame and its neighboring frames in the DAVD-Net. After alignment, a network block called V-subnet is designated to extract features from the aligned video frames. The V-subnet is a cascade of 5 residual blocks. + +![](images/d870987303182810eafa8ff286b31f5e30d4d84e916135d2415537927764a275.jpg) +Figure 4. The detailed architecture of the proposed spatial attention fusion module. + +# 3.4. Spatial attention fusion + +After extracting temporally related audio and video features, the next task is to fuse them productively to facilitate the removal of compression artifacts. A simple approach is to concatenate the audio and video features directly. However, observing talking heads in videos reveals that the voice audio correlates most strongly to the image parts around the mouth (e.g., lips, cheeks, and chin), instead of the entire face. That is, the 2-D feature maps generated from the audio signal are not equally contributive in the spatial dimension, they should be used to guide the reconstruction of the mouth region. + +However, natural head movements during talking change the position and even orientation of the speaker's mouth. To capture such dynamics the network needs to temporally adjust audio feature maps and video feature maps at pixel-level. To this end, we introduce a spatial attention fusion module to allow time varying associations of audio and video features, as illustrated in Fig. 4. + +In our design, the network computes an attention map from the audio and video features with a range from 0 to 1, where 0 represents that the audio feature at this position is completely useless for recovery and 1 represents extremely helpful. The attention map $M_{t}$ is formulated as: + +$$ +M _ {t} = \operatorname {S i g m o d} \left(\operatorname {L i n e a r} \left(\left[ F _ {t} ^ {v}, F _ {t} ^ {a} \right]\right)\right) \tag {3} +$$ + +where $F_{t}^{v}$ and $F_{t}^{a}$ are the feature maps generated from video and audio, respectively. The $[\cdot ,\cdot ]$ denotes the concatenation operation. The sigmoid activation function is used to restrict the outputs $M_t$ in [0, 1]. Next, the audio feature maps $F_{t}^{a}$ are multiplied in a pixel-wise manner by the attention map and then aggregated with the video feature maps $F_{t}^{v}$ using a few convolutional layers, that is: + +$$ +F _ {a g g} = \operatorname {C o n v} \left(\left[ F _ {t} ^ {v}, M _ {t} \odot F _ {t} ^ {a} \right]\right) \tag {4} +$$ + +where $F_{agg}$ is the aggregated feature map. Then as illustrated in 2, we feed the aggregated feature maps $F_{agg}$ into a reconstruction module consisting of 10 residual blocks. + +# 3.5. Constraining projection + +Most existing methods for reducing video compression artifacts operate on the decoded frame sequences only, ignoring the encoder information contained in the code stream. Some researchers [15, 20, 10] did realize that the encoder prior information contained in the compressed video stream could help improve the performance of video restoration. However, they only fed the encoding prior like prediction residuals or unfiltered frames into neural networks along with the decoded frames, which is straightforward to do but has limited effect. A potentially highly profitable piece of information is left unused: the DCT coefficient quantization intervals, which can be extracted out of the compression standard code stream. To exploit the prior information we add a projection module; its role is to constrain the solution space by the quantization boundaries in the transform domain to further polish the reconstructed video. This projection module can be implemented using a piecewise linear activation function embedded in the neural network. + +In modern video compression standards, prediction based coding is a core operation. In prediction based coding, given the original frame $X_{t}$ to be coded, inter/intra frame prediction technique is used to obtain a prediction frame of $X_{t}$ , denoted by $P_{t}$ . Then the prediction residual $E_{t} = X_{t} - P_{t}$ will be transformed to DCT domain and quantized, followed by the entropy coding. In the encoding phase, the DCT coefficients of $E_{t}$ (denoted by $E_{t}^{dct}$ ) are divided by a quantization table $Q$ , and then are rounded to the nearest integers. When decoding, the decoder performs decompression by multiplying back the quantization table $Q$ in the DCT domain. The overall quantization and dequantization process can be formulated as: + +$$ +\hat {E} _ {t} ^ {d c t} = \left[ \left(E _ {t} ^ {d c t}\right) / Q \right] * Q \tag {5} +$$ + +where $[\cdot ]$ represents the round operation and $\hat{E}_t^{dct}$ denotes the decoded DCT coefficients of the prediction residual block. The decoded frame is obtained via inverse DCT transform of $\hat{E}_t^{dct}$ and adding the prediction frame, that is $Y_{t} = P_{t} + \hat{E}_{t}$ , where $\hat{E}_t = \mathrm{IDCT}(\hat{E}_t^{dct})$ . + +Eq.5 implies the following DCT coefficient range constraint: + +$$ +\hat {E} _ {t} ^ {d c t} - Q / 2 \leq E _ {t} ^ {d c t} \leq \tilde {E} _ {t} ^ {d c t} + Q / 2 \tag {6} +$$ + +That is, from the decoded DCT coefficients of the prediction error, we can derive the lower and upper bounds of the original DCT coefficients of the prediction residuals. + +We can enforce the DCT coefficient bounds in the decision of the DAVD-Net by inserting a projection module before the final output (see Fig 5). Letting $\hat{Y}_t$ be the output of the reconstruction module, the projection module imposes + +![](images/c492f4d20062010558fe54e429b426dcf27c8f7a92dddae5b89500c7edbb77f8.jpg) +Figure 5. The architecture of the constraining projection module. + +constrains on the DCT coefficients of $\tilde{E}_t = \tilde{Y}_t - P_t$ : + +$$ +F \left(\tilde {E} _ {t} ^ {d c t}\right) = \left\{ \begin{array}{l l} L (i, j), & \tilde {E} _ {t} ^ {d c t} (i, j) < L (i, j) \\ \tilde {E} _ {t} ^ {d c t} (i, j), & \tilde {E} _ {t} ^ {d c t} \in [ L (i, j), U (i, j) ] \\ U (i, j), & \tilde {E} _ {t} ^ {d c t} (i, j) > U (i, j) \end{array} \right. \tag {7} +$$ + +where $L = \hat{E}_t^{dct} - Q / 2$ and $U = \hat{E}_t^{dct} + Q / 2$ , $i$ and $j$ are the indexes in the DCT domain. The projection function $F(\cdot)$ can be implemented as a piecewise linear activation in the neural network. Finally, the reconstructed frame $\hat{X}_t$ is given by + +$$ +\hat {X} _ {t} = \operatorname {I D C T} \left(F \left(\tilde {E} _ {t} ^ {d c t}\right)\right) + P _ {t} \tag {8} +$$ + +In order to implement the proposed projection module, encoder structural information like the DCT transform block partition, prediction frame and prediction residual image are required. In video compression standards, the pixels are organized by a hierarchical block structure, and the transform block is the basic coding unit. Unlike the fixed $8 \times 8$ transform block size used in JPEG, video coding standards like (H.264/265) adopt different transform block sizes in different regions, adaptively determined according to the image content. However, the common video decoding tools like FFmpeg is not able to extract the DCT transform block partition and other encoding information from the code stream. To overcome this difficulty and get all encoder priors required by the projection module, we developed a tool to extract the encoding information from the compressed code stream, including transform block partition, prediction frame and prediction residual, etc. Some pieces of encoding information of H.264 (prediction frame, prediction residual and transform unit (TU) partition are shown in Fig.6. + +# 4. Experiments + +To systematically evaluate and analyze the performance of the DAVID-Net methodology conditioned on priors of different strengths, we conduct extensive experiments on two datasets: Obama dataset (single person) and VoxCeleb2 dataset (multiple persons) [21, 6]. In these two sets of experiments, the DAVID-Net is trained for compressed videos + +![](images/4d736062c4c1cee16414ed97756d727b18f31db3473ee11dbb336a080247234a.jpg) +Figure 6. The illustration of encoder information of the H.264 video compression standard. Left: prediction frame in Y channel. Middle: prediction residual image in Y channel. Right: transform unit (TU) partition. + +![](images/71366863fcad190317fe3e1bef273072fe8e21960c068b0c9833ee589eb00f29.jpg) + +![](images/48ea8c49ec6c7a036f84bebe7c5f33d48f04dcd1c885383f85a07aeab6e861d5.jpg) + +of a particular known speaker with and without his voices, and for generic talking heads with and without the accompanying voices, respectively. + +# 4.1. Data Preparation + +Obama Dataset. We collect 198 high-quality Barack Obama's Weekly Address videos from YouTube. Each video is approximately three to six minutes long and 790 minutes in total. This dataset is divided into two parts: 160 videos for training/validation, and the rest 38 videos for testing. We detect and crop the face region from each frame and then resize it to $128 \times 128$ resolution. + +VoxCeleb2 Dataset. VoxCeleb2 is an audio-visual dataset consisting of short clips of human speech, extracted from interview videos uploaded to YouTube. It contains speech from speakers spanning a wide range of different ethnicities, accents, professions and ages. All speaking face-tracks are captured "in the wild", with background chatter, laughter, overlapping speech, pose variation and different lighting conditions. Specifically, VoxCeleb2 contains over 1 million utterances for 6,112 celebrities. Due to the limited computing resources, we train the model using a subset (200 celebrities) randomly selected from the VoxCeleb2 development set and test the trained model using the VoxCeleb2 test set. + +The compressed videos are all generated by FFmpeg with x264 video codec and rate control parameter CRF=42 and CRF=45. + +# 4.2. Training Details + +We apply an end-to-end training of all modules presented in the DAVID-Net, except of the constraining projection module, which has no parameters to be learned. The channel size in each residual block is set to 64. The upsample module in the A-subnet is implemented by deconvolution. Mini-batch size is set to 32. We use the cropped RGB face images of size $128 \times 128$ and $224 \times 224$ as input for Obama dataset and VoxCeleb dataset, respectively. The window size for video signal is 5 and for audio signal is 21. That is, $\mathcal{Y}_{t \pm 2} = \{Y_{t - 2}, Y_{t - 1}, Y_t, Y_{t + 1}, Y_{t + 2}\}$ and $\mathcal{A}_{t \pm 10} =$ + +$\{A_{t - 10}, A_{t - 9}, \dots, A_{t + 9}, A_{t + 10}\}$ . The training loss is set to $L_{1}$ loss only, defined by $L_{1}(X_{t}, \hat{X}_{t}) = ||X_{t} - \hat{X}_{t}||_{1}$ . + +We train the DAVD-Net with Adam optimizer [17] by setting $\beta_{1} = 0.9$ and $\beta_{2} = 0.999$ , with initializing learning rate as $1\times 10^{-4}$ . We implement the proposed DAVD model in PyTorch [16] and train it with NVIDIA 2080 Ti GPUs. The training takes about 2 days (50 epochs) to converge on the VoxCeleb2 dataset. + +# 4.3. Comparison with State-of-the-art Methods + +We compare our DAVD-Net with several state-of-the-art methods on video restoration: DSCNN [36], DKFN [20], MFQE [37], EDVR [30]. where DSCNN, DKFN and MFQE are particularly designed for the task of video compression artifacts removal and EDVR is claimed as a unified framework that is extensible to various video restoration tasks. + +To demonstrate the advantages of tailoring the restoration network to talking heads over generic objects, we compare our network with the DKFN and MFQE models pretrained by the authors using generic videos (the only two pretrained models available to us). On both Obama and VoxCeleb2 datasets, the DAVD-Net outperforms DKFN and MFQE by as much as 2.5dB. This is not surprising, because the other two networks are all trained using generic video datasets like Vimeo-90K [35] or JCT-VC [2]. In order to factor out the effects of different training sets and conduct a fair comparison, we retrain all CNN networks in the comparison group from scratch using the same datasets (Obama and VoxCeleb2) in our experiments. + +The quantitative results on Obama dataset and VoxCeleb2 dataset are shown in Tables 1 and 2, respectively. On the obama dataset, our DAVD-Net outperforms the existing methods by a large margin, which means that if the network is trained for a particular known person, the assistance of accompanying voices can achieve significant performance gains on face video restoration task. On the VoxCeleb2 dataset, the proposed DAVD-Net achieves the reasonable performance gain over the existing state-of-the-art methods. This implies that by trained with a large dataset + +![](images/9d5b4873f7d4420878894b322c15af36c728f1f813d571cbbb9e36f96b42d8c2.jpg) +Compressed +DKFN [20] +MFQE [37] +EDVR [30] +Proposed +Ground Truth +Figure 7. Qualitative results of different methods in the comparison group on Obama dataset. + +![](images/00156d63215066c91ec5a5050e6aa60ce6346bbb33cb859fb9d85ca2f95e9abb.jpg) +Compressed +DKFN [20] +MFQE [37] +EDVR [30] +Proposed +Ground Truth + +![](images/bb89c5d6f70913e22a7fa423ec934267a184e2c86bb651ef4067de0e73464e2a.jpg) + +![](images/3a7b4a40c0bedd88309a8362f993856f1b9417b85092e937ff90bafd840ec939.jpg) + +![](images/a593c193c131383ed93d0d03a5b17ccc8b39928506266432db90b4bb02b9a82b.jpg) +Figure 8. Qualitative results of different methods in the comparison group on VoxCeleb2 dataset. + +Table 1. Average quantitative results (PSNR/SSIM) on Obama dataset for compression quality parameter CRF=42 and CRF=45. + +
MethodsCRF=42CRF=45
DSCNN [36]32.91/0.931131.19/0.9142
DKFN [20]33.15/0.934831.40/0.9180
MFQE [37]33.21/0.936531.48/0.9183
EDVR [30]33.45/0.940231.64/0.9217
DAVD(Ours)33.94/0.946832.08/0.9272
+ +Table 2. Average quantitative results (PSNR/SSIM) on VoxCeleb2 dataset for compression quality parameter CRF=42 and CRF=45. + +
MethodsCRF=42CRF=45
DSCNN [36]29.18/0.860227.61/0.8231
DKFN [20]29.49/0.866127.85/0.8259
MFQE [37]29.54/0.868327.91/0.8264
EDVR [30]29.73/0.871028.03/0.8289
DAVD(Ours)30.12/0.874128.39/0.8335
+ +containing various persons with accompanying voices, neural network can figure out the common correlations between face dynamics and speaking voices, and utilize it to guide the restoration of faces. + +Qualitative results are presented in Figs. 7 and 8. If trained for a particular person, with the assistance of accompanying voices, DAVID can restore facial features better (note clearer teeth, sharper lips and muscle contours) than other methods, as shown in Fig. 7. If trained for generic talking heads, the improvement in perceptual image quality is lesser than the case of training the network for a given person. Nevertheless, the results of DAVID still appear to be better than the other methods, see mouth regions in Fig. 8. Please refer to the supplementary material for more qualitative results including images and videos. + +# 4.4. Ablation Studies + +In this subsection, we test various ablations of our full architecture to evaluate the effects of each component of the proposed network. + +Ablation study of voices. Here we evaluate the effectiveness of using voices in face video restoration. We build a baseline that only contains the video feature extraction branch and the reconstruction module, then train it using Obama and VoxCeleb2 datasets. The performance of the baseline is shown in the first row of Table 3 and 4. As expected, the performance of our baseline is comparable to EDVR because they have similar structure and complexity. Then we combine the audio feature extraction branch into network and fuse the audio and video features with a simple convolutional layer. As shown in the second row of Table 3 and 4, the accompanying voices can significantly improve the quality of restored faces by $0.25\mathrm{dB}$ in Obama dataset and $0.17\mathrm{dB}$ in VoxCeleb2 dataset. + +Table 3. Quantitative results (PSNR/SSIM) of ablation studies on the Obama dataset. VPB: video processing branch; APB: audio processing branch; SAF: spatial attention fusion; CPM: constraining projection module. + +
VPBAPBSAFCPMPSNR/SSIM
✓33.42/0.9401
✓✓33.67/0.9445
✓✓✓33.78/0.9452
✓✓✓✓33.94/0.9468
+ +Table 4. Quantitative results (PSNR/SSIM) of ablation studies on the VoxCeleb2 dataset. VPB: video processing branch; APB: audio processing branch; SAF: spatial attention fusion; CPM: constraining projection module. + +
VPBAPBSAFCPMPSNR/SSIM
✓29.71/0.8702
✓✓29.88/0.8731
✓✓✓29.97/0.8735
✓✓✓✓30.12/0.8741
+ +Ablation study of spatial attention fusion. We further evaluate the effectiveness of the proposed spatial attention fusion module. By aggregating the audio and video features using a spatial attention module instead of a simple convolutional layer, recovery performance increases by about 0.11dB in Obama dataset and 0.09dB in VoxCeleb2 dataset, as shown in the third row of Table 3 and 4. + +Ablation study of constraining projection. As shown in the last row of Table 3 and Table 4, by introducing the constraining projection module into the network, restoration performance increases by $0.16\mathrm{dB}$ in Obama dataset and $0.15\mathrm{dB}$ in VoxCeleb2 dataset, respectively. + +# 5. Conclusion + +We propose and justify a novel DCNN design for restoring highly compressed videos of talking heads. The key innovation is a new DCNN architecture that can exploit the audio-video correlations to repair compression defects in the face region. We also embed into our network the structural information of the encoder in the video compression standards and introduce a constraining projection module in the network to further improve the restoration. Experiments show that the proposed DAVID outperforms existing methods appreciably. + +Acknowledgements. This research is supported by Natural Sciences and Engineering Research Council of Canada (NSERC), Shandong Provincial Key Research and Development Program (Major Scientific and Technological Innovation Project, NO.2019JZZY010119). This research is also supported in part by 111 plan B07022. + +# References + +[1] Triantafyllos Afouras, Joon Son Chung, and Andrew Zisserman. The conversation: Deep audio-visual speech enhancement. arXiv preprint arXiv:1804.04121, 2018. 2 +[2] Frank Bossen et al. Common test conditions and software reference configurations. JCTVC-L1100, 12, 2013. 6 +[3] Huibin Chang, Michael K Ng, and Tieyong Zeng. Reducing artifacts in jpeg decompression via a learned dictionary. IEEE transactions on signal processing, 62(3):718-728, 2014. 2 +[4] Lele Chen, Ross K Maddox, Zhiyao Duan, and Chenliang Xu. Hierarchical cross-modal talking face generation with dynamic pixel-wise loss. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7832-7841, 2019. 2 +[5] Joon Son Chung, Amir Jamaludin, and Andrew Zisserman. You said that? arXiv preprint arXiv:1705.02966, 2017. 2 +[6] Joon Son Chung, Arsha Nagrani, and Andrew Zisserman. Voxceleb2: Deep speaker recognition. arXiv preprint arXiv:1806.05622, 2018. 5 +[7] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In Proceedings of the IEEE international conference on computer vision, pages 764-773, 2017. 4 +[8] Yehuda Dar, Alfred M Bruckstein, Michael Elad, and Raja Giryes. Postprocessing of compressed images via sequential denoising. IEEE Transactions on Image Processing, 25(7):3044-3058, 2016. 2 +[9] Chao Dong, Yubin Deng, Chen Change Loy, and Xiaou Tang. Compression artifacts reduction by a deep convolutional network. In Proceedings of the IEEE International Conference on Computer Vision, pages 576-584, 2015. 2 +[10] Longtao Feng, Xinfeng Zhang, Shanshe Wang, Yue Wang, and Siwei Ma. Coding prior based high efficiency restoration for compressed video. In 2019 IEEE International Conference on Image Processing (ICIP), pages 769-773. IEEE, 2019. 5 +[11] Alessandro Foi, Vladimir Katkovnik, and Karen Egiazarian. Pointwise shape-adaptive dct for high-quality denoising and deblocking of grayscale and color images. IEEE Transactions on Image Processing, 16(5):1395-1411, 2007. 2 +[12] Leonardo Galteri, Lorenzo Seidenari, Marco Bertini, and Alberto Del Bimbo. Deep generative adversarial compression artifact removal. arXiv preprint arXiv:1704.02518, 2017. 2 +[13] Jun Guo and Hongyang Chao. One-to-many network for visually pleasing compression artifacts reduction. arXiv preprint arXiv:1611.04994, 2016. 2 +[14] Amirhossein Habibian, Ties van Rozendaal, Jakub M Tomczak, and Taco S Cohen. Video compression with rate-distortion autoencoders. In Proceedings of the IEEE International Conference on Computer Vision, pages 7033-7042, 2019. 1 +[15] Xiaoyi He, Qiang Hu, Xiaoyun Zhang, Chongyang Zhang, Weiyao Lin, and Xintong Han. Enhancing hevc compressed videos with a partition-masked convolutional neural network. In 2018 25th IEEE International Conference on Image Processing (ICIP), pages 216-220. IEEE, 2018. 2, 5 + +[16] Nikhil Ketkar. Introduction to pytorch. In Deep learning with python, pages 195-208. Springer, 2017. 6 +[17] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 6 +[18] Yu Li, Fangfang Guo, Robby T Tan, and Michael S Brown. A contrast enhancement framework with JPEG artifacts suppression. In European Conference on Computer Vision, pages 174-188. Springer, 2014. 2 +[19] Guo Lu, Wanli Ouyang, Dong Xu, Xiaoyun Zhang, Chunlei Cai, and Zhiyong Gao. Dvc: An end-to-end deep video compression framework. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11006-11015, 2019. 1 +[20] Guo Lu, Wanli Ouyang, Dong Xu, Xiaoyun Zhang, Zhiyong Gao, and Ming-Ting Sun. Deep kalman filtering network for video compression artifact reduction. In Proceedings of the European Conference on Computer Vision (ECCV), pages 568-584, 2018. 1, 2, 5, 6, 7, 8 +[21] Arsha Nagrani, Joon Son Chung, and Andrew Zisserman. Voxceleb: a large-scale speaker identification dataset. arXiv preprint arXiv:1706.08612, 2017. 5 +[22] Md Sahidullah and Goutam Saha. Design, analysis and experimental evaluation of block based transformation in mfcc computation for speaker recognition. Speech Communication, 54(4):543-565, 2012. 3 +[23] Eli Shlizerman, Lucio Dery, Hayden Schoen, and Ira Kemelmacher-Shlizerman. Audio to body dynamics. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7574-7583, 2018. 3 +[24] Thomas Sikora. Thempeg-4 video standard verification model. IEEE Transactions on circuits and systems for video technology, 7(1):19-31, 1997. 1 +[25] Gary J Sullivan, Jens-Rainer Ohm, Woo-Jin Han, and Thomas Wiegand. Overview of the high efficiency video coding (hevc) standard. IEEE Transactions on circuits and systems for video technology, 22(12):1649-1668, 2012. 1 +[26] Supasorn Suwajanakorn, Steven M Seitz, and Ira Kemelmacher-Shlizerman. Synthesizing obama: learning lip sync from audio. ACM Transactions on Graphics (TOG), 36(4):95, 2017. 2 +[27] Pavel Svoboda, Michal Hradis, David Barina, and Pavel Zemcik. Compression artifacts removal using convolutional neural networks. arXiv preprint arXiv:1605.00366, 2016. 2 +[28] Yapeng Tian, Yulun Zhang, Yun Fu, and Chenliang Xu. Tdan: Temporally deformable alignment network for video super-resolution. arXiv preprint arXiv:1812.02898, 2018. 4 +[29] Konstantinos Vougioukas, Stavros Petridis, and Maja Pantic. End-to-end speech-driven facial animation with temporal gans. arXiv preprint arXiv:1805.09313, 2018. 2 +[30] Xintao Wang, Kelvin CK Chan, Ke Yu, Chao Dong, and Chen Change Loy. Edvr: Video restoration with enhanced deformable convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019. 4, 6, 7, 8 +[31] Thomas Wiegand, Gary J Sullivan, Gisle Bjontegaard, and Ajay Luthra. Overview of the h. 264/avc video coding stan + +dard. IEEE Transactions on circuits and systems for video technology, 13(7):560-576, 2003. 1 +[32] Olivia Wiles, A Sophia Koepke, and Andrew Zisserman. X2face: A network for controlling face generation using images, audio, and pose codes. In Proceedings of the European Conference on Computer Vision (ECCV), pages 670-686, 2018. 3 +[33] Min Xu, Ling-Yu Duan, Jianfei Cai, Liang-Tien Chia, Changsheng Xu, and Qi Tian. Hmm-based audio keyword generation. In Pacific-Rim Conference on Multimedia, pages 566-574. Springer, 2004. 3 +[34] Yi Xu, Longwen Gao, Kai Tian, Shuigeng Zhou, and Huyang Sun. Non-local convlstm for video compression artifact reduction. In Proceedings of the IEEE International Conference on Computer Vision, pages 7043-7052, 2019. 2 +[35] Tianfan Xue, Baian Chen, Jiajun Wu, Donglai Wei, and William T Freeman. Video enhancement with task-oriented flow. International Journal of Computer Vision, 127(8):1106-1125, 2019. 1, 2, 6 +[36] Ren Yang, Mai Xu, and Zulin Wang. Decoder-side hevc quality enhancement with scalable convolutional neural network. In 2017 IEEE International Conference on Multimedia and Expo (ICME), pages 817-822. IEEE, 2017. 6, 8 +[37] Ren Yang, Mai Xu, Zulin Wang, and Tianyi Li. Multi-frame quality enhancement for compressed video. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6664-6673, 2018. 1, 2, 6, 7, 8 +[38] Xi Zhang and Xiaolin Wu. Near-lossless $\ell_{\infty}$ -constrained image decompression via deep neural network. In 2019 Data Compression Conference (DCC), pages 33-42. IEEE, 2019. 2 +[39] Xi Zhang and Xiaolin Wu. Ultra high fidelity image compression with $\ell_{\infty}$ -constrained encoding and deep decoding. arXiv preprint arXiv:2002.03482, 2020. 2 +[40] Xinfeng Zhang, Ruiqin Xiong, Xiaopeng Fan, Siwei Ma, and Wen Gao. Compression artifact reduction by overlapped-block transform coefficient estimation with block similarity. IEEE transactions on image processing, 22(12):4613-4626, 2013. 2 \ No newline at end of file diff --git a/davdnetdeepaudioaidedvideodecompressionoftalkingheads/images.zip b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..c5b3cae326ee3f1ca4ca6ef99b52b971c1f61e53 --- /dev/null +++ b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e471be5f4e224f005f01f1e7cf1cb585ad5b212d3b3fba8adea17bdc527b40c3 +size 561097 diff --git a/davdnetdeepaudioaidedvideodecompressionoftalkingheads/layout.json b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..414b9d98554084cc4df1d163346edcb122de5e7f --- /dev/null +++ b/davdnetdeepaudioaidedvideodecompressionoftalkingheads/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:03fb87d2ea7aef7d1b4001e578fddfeb7ce48a7d0005b4f281551d4d2848fa68 +size 352486 diff --git a/deblurringbyrealisticblurring/9810e0ab-6685-4813-a0ca-73c169522154_content_list.json b/deblurringbyrealisticblurring/9810e0ab-6685-4813-a0ca-73c169522154_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..314f143c17ceab73867190d321af163ce8b957b4 --- /dev/null +++ b/deblurringbyrealisticblurring/9810e0ab-6685-4813-a0ca-73c169522154_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8a6fa016c480d8fbe024fa846d33b7688b5a4567132ef6e4fabe6767bc18ee3 +size 74780 diff --git a/deblurringbyrealisticblurring/9810e0ab-6685-4813-a0ca-73c169522154_model.json b/deblurringbyrealisticblurring/9810e0ab-6685-4813-a0ca-73c169522154_model.json new file mode 100644 index 0000000000000000000000000000000000000000..1082306f15b13e4051e702813d77ca6cbdf8c2e1 --- /dev/null +++ b/deblurringbyrealisticblurring/9810e0ab-6685-4813-a0ca-73c169522154_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38e9f4fcba07d37e30dde70bdf05b4b08e73f67506b997a27fcf623585354672 +size 90486 diff --git a/deblurringbyrealisticblurring/9810e0ab-6685-4813-a0ca-73c169522154_origin.pdf b/deblurringbyrealisticblurring/9810e0ab-6685-4813-a0ca-73c169522154_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..de4538c1fa92b6bc5c98f4ddd4e39005e8e2d2ab --- /dev/null +++ b/deblurringbyrealisticblurring/9810e0ab-6685-4813-a0ca-73c169522154_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05d5b896d194aada4e1259de29272354d728b44c68e587ec0a5de748a953c6d6 +size 2135880 diff --git a/deblurringbyrealisticblurring/full.md b/deblurringbyrealisticblurring/full.md new file mode 100644 index 0000000000000000000000000000000000000000..5d3cd3222f144cb43c8cf92f7657f9e633a97d82 --- /dev/null +++ b/deblurringbyrealisticblurring/full.md @@ -0,0 +1,373 @@ +# Deblurring by Realistic Blurring + +Kaihao Zhang $^{1}$ Wenhan Luo $^{2}$ Yiran Zhong $^{1,4}$ Lin Ma $^{2}$ Björn Stenger $^{3}$ Wei Liu $^{2}$ Hongdong Li $^{1,4}$ $^{1}$ Australian National University $^{2}$ Tencent AI Lab $^{3}$ Rakuten Institute of Technology $^{4}$ ACRV + +# Abstract + +Existing deep learning methods for image deblurring typically train models using pairs of sharp images and their blurred counterparts. However, synthetically blurring images do not necessarily model the genuine blurring process in real-world scenarios with sufficient accuracy. To address this problem, we propose a new method which combines two GAN models, i.e., a learning-to-Blur GAN (BGAN) and learning-to-DeBlur GAN (DBGAN), in order to learn a better model for image deblurring by primarily learning how to blur images. The first model, BGAN, learns how to blur sharp images with unpaired sharp and blurry image sets, and then guides the second model,DBGAN, to learn how to correctly deblur such images. In order to reduce the discrepancy between real blur and synthesized blur, a relativistic blur loss is leveraged. As an additional contribution, this paper also introduces a Real-World Blurred Image (RWBI) dataset including diverse blurry images. Our experiments show that the proposed method achieves consistently superior quantitative performance as well as higher perceptual quality on both the newly proposed dataset and the public GOPRO dataset. + +# 1. Introduction + +Image deblurring is a classic problem in low-level computer vision, and it remains an active topic in the vision research community. Given a blurred image, which is corrupted by some unknown blur kernel or a spatially variant kernel, the task of (blind) image deblurring is to recover the sharp version of the original image, by reducing or removing the undesirable blur in the blurred image. Traditional deblurring methods handle this problem via estimating a blur kernel, through which a sharp version of the blurred input image can be recovered. Often, special characteristics of the blur kernel are assumed, and natural image priors are exploited in the deblurring process [5, 7, 22, 40, 41]. However, estimating the optimal blur kernel is a difficult task and can therefore impair the overall performance. + +Recently, deep learning methods, particularly convolutional neural networks (CNNs), have been applied to + +![](images/76fabce297aa0e067045d01cb6056fb10bb006bb8cca4031a9b57fc7dc90d405.jpg) +(a) + +![](images/9fbd7d47c347cce1be1fdc1a04b0978913304c1a97674da92277b31d5afcf1aa.jpg) +(b) +Figure 1. (a) The differences between real and synthetic blurry images; (b) an illustration of learning to blur. Sharp images and random noises are fed into the BGAN_G model to generate realistic blurry images via the RBL loss and the RWBI dataset. + +tackle this task and obtained a remarkable success, e.g., [21, 33, 36, 42]. Existing deep learning methods focus on training deblurring models using paired blurry and sharp images. For example, Nah et al. [21] propose a multiscale loss function to implement a coarse-to-fine processing pipeline. Tao et al. [36] and Gao et al. [6] improve the work by using shared network weights among different scales, achieving state-of-the-art performance. + +However, many common effects are not adequately captured by the current deep learning models in the following sense. First, since in real-world scenarios, an image is captured during a time window (i.e., the exposure duration), the blurred image is in fact the integration of multi-frame + +instant and sharp snapshots [10]. This can be formulated as + +$$ +I _ {B} = g \left(\frac {1}{T} \int_ {t = 0} ^ {T} I _ {S (t)} \mathrm {d} t\right), \tag {1} +$$ + +where $I_{S}$ is an instant sharp frame and $I_{B}$ is the blurry image. $T$ is the exposure time period and $g(\cdot)$ is the Camera Response Function (CRF). In contrast, in conventional deblurring methods, blurry images used in the training set are often artificially synthesized by approximating the integration step with a simple averaging operation, as shown in Eq. (2), where $M$ is the number of frames: + +$$ +I _ {B} \simeq g \left(\frac {1}{M} \sum_ {t = 1} ^ {M} I _ {S [ t ]}\right). \tag {2} +$$ + +Prior methods use $M$ sharp frames $I_{S[t]}$ to replace the continuous sequence $I_{S(t)}$ and generate paired training data, avoiding the complexity of obtaining pairs of real blurry and sharp images. However, there is a clear gap between real blurry images and those artificially blurred images. Fig. 1(a) shows the generation of real and synthetic blurry images. + +Second, in real situations there are multi-fold factors (not limited to a single linear integration or summation) which can cause image blurs, for instance, camera shake, fast object motion, and small aperture with a wide depth of field. Many of these factors are very difficult to model precisely. To design a better deblurring algorithm, all these factors should be taken into consideration. If the real blurred images are different from the samples in the training set, the trained model may not perform well on the testing data. This observation inspires us to develop a new deblurring method which does not assume any particular blur type; rather such a method will be able to learn a blurring process in order to achieve better deblurring quality. + +Specifically, in this paper we propose a method which contains a leaning-to-Blur GAN (BGAN) module and a learning-to-DeBlur GAN (DBGAN) module. BGAN andDBGAN are two complementary processes, in the sense that BGAN learns to mimic properties of real-world blurs by generating photo-realistic blurry images. This module is trained using unpaired sharp and blurry images, thus relaxing the requirement of needing paired data. Recently, Shaham et al. propose SinGAN [27] to produce different images based on random noises, which inspires us to generate various blurry images given different noises. During the generation, sharp images are also fed into BGAN to make the generated blurry images bear the same content as the input images. TheDBGAN module learns to recover sharp images from blurry images with real sharp and generated blurry images. We further employ a relativistic blur loss, which helps predict the probability that a real blurry image is relatively more realistic than a synthesized one. Finally, a + +Real-World Blurry Image (RWBI) dataset is created to help train the BGAN model and evaluate the performance of our proposed image deblurring model. Fig. 1(b) shows the process of learning realistic blur. + +The contributions of this paper are three-fold: (1) We develop a new image deblurring framework which contains the process of image blurring and image deblurring. In contrast to previous deep learning methods which solely focus on image deblurring, our framework also considers image blurring, which generates realistic blurry images to help enhance the performance and robustness of image deblurring. (2) In order to train the BGAN model and generate blurry images like those in the real world, a relativistic blur loss is introduced. We also contribute a real-world blurry dataset RWBI, which can be used for training an image blurring module and for evaluating deblurring models. (3) Experimental results show that the proposed method achieves not only the state-of-the-art quantitative performance on the public GOPRO benchmark, but also consistently superior perceptual quality on real-world blurry images. + +# 2. Related Works + +Our work in this paper is closely related to image blurring and image deblurring, which are briefly introduced as follows, respectively. + +# 2.1. Image Blurring + +Blur artifacts are caused by various factors. The blurring process can be mathematically formulated as [8, 38], + +$$ +I _ {B} = K * I _ {S} + N, \tag {3} +$$ + +where $I_B$ and $I_S$ are blurry and sharp images, respectively. $K$ is the unknown (blind) or known (non-blind) blur kernel and $N$ is additive noise. For images with spatially varying blurs there are no camera response function (CRF) estimation techniques [35]. Alternatively, the CRF can be approximated as the average of known CRFs as follows: + +$$ +g \left(I _ {S [ i ]}\right) = I _ {S ^ {\prime} [ i ]} ^ {\frac {1}{\gamma}}, \tag {4} +$$ + +where $\gamma$ is a parameter. The latent realistic sharp images $I_{S[i]}$ can be obtained based on the observed sharp images $I_{S^{\prime}[i]}$ . The blurry images can then be generated based on Eq. (2). Eq. (2) and Eq. (3) are the two main methods to generate image pairs for training. However, neither of them is able to synthesize realistic blurry images like Eq. (1). + +# 2.2. Image Deblurring + +Early works use image priors, including total variation [3], a heavy-tailed gradient prior [28], or a hyperLaplacian prior [15], which are typically applied to images in a coarse-to-fine manner. Recently, deep learning methods + +![](images/9606bbf7ee190f03f04d84e751402ceeb2c50c1a1ed06428f54d22ea92f44606.jpg) +Figure 2. The proposed framework and training process. This framework contains two main modules, a BGAN and a DBGAN. $D$ and $G$ denote discriminator and generator networks, respectively. The BGAN takes sharp images as input and outputs realistic blurry images, which are then fed into the DBGAN in order to learn to deblur. During the inference stage, only the DBGAN is applied. + +have achieved a great success in the areas of object recognition [9, 44, 43, 19, 18] and image reconstruction including video deblurring [45], video dehazing [25], and other GAN-based generation tasks [29, 24, 39, 37]. For image deblurring, Sun et al. [34] propose a CNN-based model to estimate a kernel and remove non-uniform motion blur. Chakrabarti [2] uses a network to compute estimations of sharp images that are blurred by an unknown motion kernel. Nah et al. [21] propose a multi-scale loss function to apply a coarse-to-fine strategy and an adversarial loss. Kupyn et al. propose DeblurGAN [16] and DeblurGAN-v2 [17] to remove blur kernels based on adversarial learning. Further, RNN-based methods have been proposed for image deblurring. Zhang et al. [42] propose a spatially variant neural network, which includes three CNNs and one RNN. Tao et al. [36] propose an SRN-DeblurNet, which includes one LSTM and CNNs for multi-scale image deblurring. Shen et al. [30] introduce a human-aware deblurring method to remove blur from foreground humans and background. Gao et al. [6] propose a nested skip connection structure which achieves state-of-the-art performance. + +All these above neural network based methods focus on solely recovering sharp images from blurry images (i.e., image deblurring), rather than better modeling the blurring process itself. Pan et al. [23] try to generate blurry images in their algorithm based on deblurred results, and then calculate the difference between the generated blurry images and "GT" blurry images to update models. Therefore, these methods actually propose a new loss function, rather than data augmentation. The idea of data augmentation has been widely applied in different fields [31], like face verification [20] and SR [1]. For deblurring, one of the most relevant works is from the field of video deblurring [4]. However, + +it generates blurred images based videos and it does not consider to generate realistic blurry images based on real blurred ones. More recently, a SinGAN [27] model is proposed to learn how to generate different related images from one input image based on random noises. Inspired by this method, a GAN-based model is proposed to generate various blurry images based on different noises. + +# 3. Deblurring by Blurring + +# 3.1. Overall Architecture + +Our framework contains two primary modules. Similar to prior image deblurring works, our framework includes a learning-to-DeBlur GAN (DBGAN) module, which is trained on paired sharp and blurry images to recover sharp images from blurry images. The paired sharp-blurry images are obtained from the BGAN module. The BGAN is trained on unpaired data, where sharp images come from a public dataset, while the blurry images come from a new real-world blurry dataset. Fig. 2 shows the overall architecture of the proposed framework. + +We further enhance the standard GAN model with a relativistic blur loss. In traditional GAN-based models for image deblurring, the discriminator $D$ estimates the probability that the input data is real, and the generator $G$ is trained to increase the probability that the generated data looks real. The developed relativistic blur loss estimates the probability that the given real-world blurry images are more realistic than the generated blurry images. + +In the training stage, sharp images are input into the BGAN generator and its output is fed into the DBGAN to learn how to deblur. The generators in the DBGAN and BGAN modules generate corresponding images, and the + +discriminators conduct discrimination to create more realistic synthetic images. During the inference stage, only the DBGAN generator network is required for the image deblurring task. + +# 3.2. BGAN: Learning to Blur + +The BGAN module is the primary difference from other neural network based methods for image deblurring. Similar to other GAN based models, the BGAN consists of a generator network and a discriminator network. In this section, we first discuss its architecture and loss functions. + +BGAN Generator. The input to the BGAN generator is a sharp image from a public dataset. Given the numerous possible factors that can cause undesired blurring artifacts, we concatenate the input image with a noise map to model the different conditions. To obtain the noise map, we sample a noise vector of length 4 from a normal distribution and duplicate it $128 \times 128$ times in the spatial dimension to obtain a $4 \times 128 \times 128$ noise map as in [46]. In this way, we can generate various blurry images based on one sharp image. The network architecture consists of one convolutional layer, 9 residual blocks (ResBlocks) [9] and extra two convolutional layers. Each ResBlock consists of 5 convolutional layers ( $64 \times 3 \times 3$ ) and 4 ReLU activations. There is also a skip connection in each ResBlock, connecting the input and output features (refer to Fig. 2). The output of our BGAN generator is a blurry image of the same size as the sharp input image. + +BGAN Discriminator. The input to the BGAN discriminator is the output of the BGAN generator. Its architecture is the same as the VGG19 network [32], and its output is the probability of the blurry image being classified as real. + +BGAN Loss. The generator and discriminator of the BGAN are trained with a perceptual loss and an adversarial loss. Specifically, the perceptual loss is calculated based on the synthesized blurry images from the proposed BGAN and images taken from a public dataset. In this way, they can have similar contents. The adversarial loss is calculated between the synthesized and real blurry images. The real blurry images are taken from our newly created dataset. + +# 3.3. DBGAN: Learning to Deblur + +The BGAN module aims to mimic the real-world blurry images and cover as many blur cases as possible. Its goal is to drive the DBGAN module to be more effective in recovering sharp images from blurry images. In the following, we present the architecture and loss of the DBGAN. + +DBGAN Generator. The input to the DBGAN generator is a blurry image. Many approaches have been proposed for this task [2, 21, 34, 36]. When we design the DBGAN generator, we adopt their advantages. Specifically, we remove the batch normalization layers, which have been shown to increase the computational complexity and de + +crease the performance on different tasks [21]. Secondly, we use additive residual layers in each block, which combine multi-level residual networks and dense connections [11]. The BGAN consists of one convolutional layer, 16 residual blocks (ResBlocks) [9] and two more convolutional layers. The kernel size in ResBlocks is $63 \times 3 \times 3$ . The details can be referred to Fig. 2. The output of the DBGAN generator is the desired sharp image. + +DBGAN Discriminator. Similar to the BGAN discriminator, the DBGAN also adopts the VGG19 network [32] as its discriminator. The output of this model is the probability of the given sharp images looking realistic. + +DBGAN Loss. Like the BGAN module, the proposed DBGAN model is trained using a perceptual loss and an adversarial loss. We also use an $L_{1}$ loss to update the DBGAN. All the three types of loss functions are calculated based on the generated and real sharp images, so the DBGAN is trained on paired images. + +# 3.4. Relativistic Blur Loss + +In this section, we describe a Relativistic Blur Loss (RBL) and other loss functions which are used to train our framework. + +Perceptual Loss. In contrast to previous image deblurring methods [21, 36], the proposed framework applies a perceptual loss $\mathcal{L}_{\text {perceptrual }}$ to update models. Note that Johnson et al. [13] use a similar loss. However, in contrast to their work, we calculate the perceptual loss based on features before rather than after the ReLU activation layer. + +Content Loss. The Mean Squared Error (MSE) is widely used as a loss function for image restoration methods. Based on the MSE, the content loss between ground-truth and generated images is calculated. + +Relativistic Blur Loss. In order to drive the BGAN generator to produce blurry images similar to the real-world images, we develop a relativistic blur loss based on [14] to update the model. The BGAN generator parameters are updated in order to fool the BGAN discriminator. The adversarial loss $D$ is formulated as: + +$$ +\begin{array}{l} D (I _ {b l u r r y} ^ {r e a l}) = \sigma (C (I _ {b l u r r y} ^ {r e a l})) \rightarrow 1, \\ D \left(I _ {\text {b l u r r y}} ^ {\text {f a k e}}\right) = D \left(G \left(I _ {\text {s h a r p}} ^ {\text {r e a l}}\right)\right) = \sigma \left(C \left(G \left(I _ {\text {s h a r p}} ^ {\text {r e a l}}\right)\right)\right)\rightarrow 0, \tag {5} \\ \end{array} +$$ + +where $D(\cdot)$ is the probability that the input is a real image. $C(\cdot)$ is the feature representation before activation and $\sigma (\cdot)$ is the sigmoid function. The generator $G$ is trained to increase the probability that synthesized images are real. Real and synthesized images are labeled as 0 or 1 by $D$ , respectively. As Fig. 3 (a) shows, the effect of $G$ is to transfer real sharp images to blurry images and "push" these generated images (label=0) closer to real blurry images (label=1). However, during the training stage, only the second part of Eq. (5), i.e., $D(I_{blurry}^{fake}) = D(G(I_{sharp}^{real})) \to 0$ , updates + +![](images/002c19927ac6d919b795efd412e9146b34c1197cbe8a6c075b40fa20147384c1.jpg) +(a) Traditional Loss + +![](images/7a4b4da4c90444c5f5f4087a089f58ddf8bd9a8f2bdc2e8eb35a3fd383700544.jpg) +(b) Relativistic Blur Loss (one kind of blur) +Figure 3. An illustration of the Relativistic Blur Loss (RBL). Real and synthesized images are labeled as 1 and 0, respectively. (a) A traditional loss function is used to update the generator to create blurry images (label=0) which are similar to real ones (label=1). (b) The RBL not only increases the probability that generated images look real ( $0 \to 0.5$ , which is labeled as "Push"), but also simultaneously decreases the output probability that real images are real ( $1 \to 0.5$ , which is labeled as "Pull"). (c) In order to increase the variations of blurry images, different blurry images are used to model the different types of blurs in the real world. + +![](images/ba13ba0c869b0d95be914ce429ab078a40d9e1dd0193909c94dd024602b5f949.jpg) +(c) Relativistic Blur Loss (different kinds of blurs) + +the parameters of generator $G$ , while the first part is used to update the discriminator $D$ model rather than the generator $G$ [21]. In fact, a powerful generator $G$ should also decrease the probability that real blurry images are real. This is because a realistic synthesized image labeled as fake is similar to real one, and will thus fool the $D$ model to learn to distinguish real and fake in the training stage. Based on this idea, we add $D(I_{blurry}^{real})$ into the process of learning $G$ in BGAN. Specially, a Relativistic Blur Loss (RBL) is developed to help calculate whether a real blurry image is more realistic than the synthesized blurry image. The formulation of Eq. (5) is modified to + +$$ +\sigma \left(C \left(I _ {\text {b l u r r y}} ^ {\text {r e a l}}\right) - E \left(C \left(G \left(I ^ {\text {i n p u t}}\right)\right)\right)\right)\rightarrow 1, \tag {6} +$$ + +$$ +\sigma (C (I _ {b l u r r y} ^ {f a k e}) - E (C (I _ {b l u r r y} ^ {r e a l}))) \rightarrow 0, +$$ + +where $E(\cdot)$ denotes the averaging operation over images in one batch. Fig. 3 (b) shows the aim of RBL. Although the goal is still to generate realistic blurry images which are similar to real-world ones, the optimization objective is different. RBL aims to update $G$ to generate synthetic images which are near 0.5, and meanwhile to fool the $D$ model, making it difficult to distinguish real images from fake ones. In this way, the probability of real blurry images predicted by $D$ is also near to 0.5. We term the effects as "push" and "pull", respectively, which can complement each other to update the generator $G$ . As Fig. 3 shows, the sharp and blurry images can be regarded as two different domains. In order to rapidly generate blurry images and utilize prior research results of generating blurry images, we first train our BGAN model with artificially blurry images as Fig. 3(b) shows. We then add other types of blurry images to increase the variations of the produced blurry images based on Eq. (6) to cover different conditions in the real world, which is + +shown in Fig. 3(c). + +Based on Eq. (6) and Fig. 3, our RBL, which is used in the BGAN generator, can be represented as + +$$ +\begin{array}{l} \mathcal {L} _ {R B L} = - \left[ \right. \log \left(\sigma \left(C \left(I _ {\text {b l u r r y}} ^ {\text {r e a l}}\right) - E \left(C \left(G \left(I ^ {\text {i n p u t}}\right)\right)\right)\right)\right. \\ + \log (1 - (\sigma (C (G (I ^ {i n p u t})) - E (C (I _ {\text {b l u r r y}} ^ {\text {r e a l}})))) ]. \tag {7} \\ \end{array} +$$ + +Based on the RBL, we apply a Relativistic Deblur loss (RDBL) in the DBGAN generator as + +$$ +\begin{array}{l} \mathcal {L} _ {R D B L} = - \left[ \log \left(\sigma \left(C \left(I _ {\text {s h a r p}} ^ {\text {r e a l}}\right) - E \left(C \left(G \left(I ^ {\text {i n p u t}}\right)\right)\right)\right)\right) \right. \\ + \log (1 - (\sigma (G (I ^ {i n p u t})) - E (C (I _ {s h a r p} ^ {r e a l}))) ]. \tag {8} \\ \end{array} +$$ + +Balance of Different Loss Functions. During the training stage, the loss functions for DBGAN and BGAN are combinations of different terms using a weighted fusion, + +$$ +\mathcal {L} _ {B G A N} = \mathcal {L} _ {\text {p e r c e p t u a l}} + \beta \cdot \mathcal {L} _ {R B L}, \tag {9} +$$ + +$$ +\mathcal {L} _ {D B G A N} = \mathcal {L} _ {\text {p e r c e p t u a l}} + \alpha \cdot \mathcal {L} _ {\text {c o n t e n t}} + \beta \cdot \mathcal {L} _ {R D B L}. \tag {10} +$$ + +In order to balance the different kinds of losses, we use two hyper-parameters $\alpha$ and $\beta$ to yield the final loss $\mathcal{L}$ for BGAN and DBGAN. + +# 4. Experiments + +# 4.1. Datasets + +GOPRO Dataset. We evaluate the performance of our model on the public GOPRO dataset [21], which contains 3,214 image pairs. The training and testing sets include 2,103 and 1,111 pairs, respectively. Existing methods convolve sharp images with a blur kernel [2, 26, 34] to synthesized blurry images. These synthetic blurry images + +![](images/b23636a736e7b669a53808486b0471b00abd3e1bc9734aed8c73492911447f2c.jpg) +Figure 4. Synthesized blurry images. Examples of different blurry images created by the proposed BGAN. The first column shows input sharp images, and the next three columns are the produced blurred images used to train the DBGAN(+). + +![](images/4372001c5b14bf3c91ed0252b99078239136f5a9e5ce2e00e0b83e6a8516481e.jpg) + +![](images/afdfe2ca94b83f8e17075b8ad60b0f8d34010c35a04ffabd1771999c4f230062.jpg) + +![](images/24c459035a13eeb4b1774bd7cb8edf1bd44a363b1dfc6c9b62a7a995315f8287.jpg) + +are different from real ones captured by camera. In order to model more realistic blurry conditions, in the GOPRO dataset, sharp images with a high-speed camera and synthesize blurry images were collected by averaging these sharp images from videos. + +RWBI Dataset. In order to train our BGAN model and evaluate the performance of deblurring models, we collect a Real-World Blurry Image dataset. The blurry images are captured with different hand-held devices, including an iPhone XS, a Samsung S9 Plus, a Huawei P30 Pro and a Go-Pro Hero 5 Black. Multiple devices are used to reduce the bias towards one specific device which may capture blurry images with unique characteristics. The dataset contains 22 different sequences of 3, 112 diverse blurry images. + +We compare the performance of the proposed method with the state-of-the-art methods on the public GOPRO dataset quantitatively and qualitatively. As there is no ground truth of the developed RWBI dataset, we only conduct a qualitative comparison. + +# 4.2. Implementation Details + +When training BGAN and DBGAN, we use a Gaussian distribution with zero mean and a standard deviation of 0.01 to initialize the weights. In each iteration, we update all the weights after learning a mini-batch of size 4. To augment the training set, we crop a $128 \times 128$ patch at any location of an image. To further increase the number of training samples, we also randomly flip frames. We use a learning rate annealing scheme, starting with a value of $10^{-4}$ and reducing it to $10^{-6}$ after the training loss gets converged. The hyper-parameters $\alpha$ and $\beta$ are set as 0.005 and 0.01, respectively. + +# 4.3. Ablation Study + +In this section, we conduct experiments to investigate the effectiveness of different components of our model. The proposed model has three variants: + +(1) DBGAN is the model for learning to deblur. Its + +![](images/33ef1338005152e65e387ba860d1e7e14c2d68904ef1115dffbdd4eeffe7a08d.jpg) + +![](images/538d06accf3af8cc97dfeafb233914582eb644f12f16c04867cc803685faef71.jpg) + +![](images/f0641d1502b3e9be473c31a8d8cd0eb1f437ce4469a4da995ddda128216c1f4a.jpg) + +![](images/6e41b717c74ba5747a2b1c2819812fa2fd9d2c6dd78610512ef2b46fcb5d1301.jpg) + +![](images/81ca8dde48afe17bab97a2b4b376a2841e9709f143d29ff8b2d4b4d7d90ceba3.jpg) +Input + +![](images/61803c3e3519e2dad766893185fd5c6e0f7418352a9244531707409a9be7170a.jpg) +DBGAN(-) + +![](images/78ca95df76fcacf89fcb8f3fa6bd9e08f7035a144308495cf80548b364a61707.jpg) +DBGAN + +![](images/b6f1891fe6841cec1c1eb73cbe1481c19aa356798bd44cd7dcd66b41751591fa.jpg) +DBGAN(+) +Figure 5. Qualitative ablation results. Examples of deblurred images generated by the proposed framework with different model structures. The first column shows input blurred images, and the next three columns are the deblurred images produced by DBGAN(-), DBGAN and DBGAN(+), respectively. + +input is a blurry image and the output is a deblurred image. Similar to previous GAN-based deblurring methods [21, 16], this model contains generator and discriminator networks. Thus its loss function is a combination of $\mathcal{L}_{\text{perceptual}}$ , $\mathcal{L}_{\text{content}}$ and $\mathcal{L}_{RDBL}$ with weights $\alpha$ and $\beta$ . The final loss function is shown in Eq. (10). + +(2) DBGAN(-) has the same architecture as DBGAN. Differently, we replace the $\mathcal{L}_{RDBL}$ with a traditional adversarial loss as [21]. Namely, the training process does not contain the relativistic loss functions. It is trained based on $\mathcal{L}_{\text{perceptual}}$ , $\mathcal{L}_{\text{content}}$ and the traditional adversarial loss. +(3) DBGAN $(+)$ is our full method. It has a similar architecture to DBGAN with the main difference of additionally employing the BGAN module during the fine-tuning stage. Specially, we firstly train a DBGAN model as above, and then blurry images generated by the BGAN model are randomly added into the training samples to enhance the learning performance of DBGAN. Fig. 4 shows the examples of different blurry images produced by the proposed BGAN. + +Fig. 5 shows results of the qualitative comparison. The proposed DBGAN outperforms the DBGAN(-), which shows the effectiveness of the relativistic loss function for image deblurring. With the learning-to-blur module, DBGAN(+) achieves a further improvement over DBGAN, suggesting the benefits of learning to deblur by learning to blur. + +# 4.4. Comparison with Existing Methods + +To verify the effectiveness of our model, we compare its performance with several state-of-the-art approaches on the GOPRO dataset quantitatively and qualitatively. [12] by + +![](images/49d4c7b89c729126dc7e734381bf530bc5326876e744a90bccf4a9293d320301.jpg) + +![](images/40c435d912d4155958aa6fc502b25c34d95feffc4100cb03a54660cac5f9049f.jpg) + +![](images/b210a8d70289106a116751ded3c1ab17bdfda81834940f14ffae36d138c9669f.jpg) + +![](images/b34ecd4cb9be43f08d84b08749def0b97afd4e21369d28116d60a2c259ceba06.jpg) + +![](images/750d2c1f811c3391d0cd9aa04c7a61349844fc53a435b2e96275afb82d1f6317.jpg) + +![](images/88001cae4f08801a5802686e7cbd3add08a2e1c46caea5df7766377dc957ba0f.jpg) + +![](images/542875dee5177f0454840542b2aea9fad7c5ffef3e1b91e50b69beb425565a38.jpg) + +![](images/862703c29cc52b92dbb9040abb58e576933bca35374a91044bceb228e2ccf225.jpg) + +![](images/8b584992603ecc83c5d80af0ac571da4c9f25c4a5ceecdf115f63c2bb72f1339.jpg) + +![](images/571b11718a6268f614c813b84b3d877775423aa8a35b28fdc75df14b52e300aa.jpg) + +![](images/c1dcf6dbf11318b5fb0d15af267b67b822e5a6b75562a756ad16717e67546c6e.jpg) + +![](images/46d697a78e24ba77d4c55595e71d7e456cc8140d734f70a8f79b5a366bc04ec7.jpg) + +![](images/15a4d4e535d4642eb2f8faf2a54cb79c9960a578a4705be86c2c9bd5d97410c6.jpg) + +![](images/daf602cfe7d690d4762552cd8ad4e44147a9cbf143d8e0f43a52eabc24db44bc.jpg) + +![](images/4ebb3f7582fcdf5a8168df6e7bf775646acfc13a653f9f574d13ccbfa35b06c1.jpg) + +![](images/7a17770178442a9d9d0b78983bcbb2f2ee8200b8a7689a6ba2eb4d7c55048a35.jpg) + +![](images/5ece4a303eaccdb85bcbc5758e2d8bf5ebfef0eb09d5db5b4b50743f6e44adc6.jpg) + +![](images/40c6ef12de825f27b634cd55d03254e038f80144ad45465aff82a37661ce2b35.jpg) +Figure 6. Comparison with state-of-the-art deblurring methods. From left to right: blurry images, results of Nah et al. [21], Tao et al. [36] and the proposed DBGAN $(+)$ method. The improvement is clearly visible in the magnified patches. + +![](images/6ef5847d582144bd165adf9abfe5dd8ea7998b7ea6b9809eabfc84065ae7d3ee.jpg) + +![](images/67c9be17b99b3ef8ddc600a56c05170646e184dadf9b2dd0cffb7ba6011023ec.jpg) + +![](images/9308ee9fb3c7beb2df9a41b978ec62ec99d16f8b2b7f13cc8209758c1b653359.jpg) + +![](images/9162129eb223154d297d50d649ff77ac752f2b715ba8ce6d6337be61cdd63c6d.jpg) + +![](images/0e06548c7f61f3c3008b7e3738a416570d414e9ae0cb8de3af9169b690f5eb68.jpg) + +![](images/8b04d5ea9e3c0ee62069a9fb9f4befe14664e98fa7301e2fe0747f0adb620e3a.jpg) + +Kim et al. is a traditional method to handle complex dynamic blurring images. For deep learning methods, Sun et al. [34] use a CNN network to estimate blur kernels and apply traditional deconvolution methods to synthesize sharp images. Nah et al. [21] propose a multi-scale function to model the coarse-to-fine approach. Similar to [21], Tao et al. [36] propose a multi-scale network via sharing network weights between different scales to recover sharp images. In addition, Shen et al. [30] introduce a human-aware deblurring method and Gao et al. [6] propose a nested skip connection structure and achieve state-of-the-art performance. Table 1 shows the results of the quantitative comparison. DBGAN outperforms most of previous methods, while DBGAN $(+)$ achieves the state-of-the-art performance due to the framework of learning to deblur by learning to blur. For fair comparison, all values refer to the performance achieved by single model trained on the GOPRO dataset. Qualitative comparisons with some state-of-the-art methods are shown in Fig. 6, demonstrating that our method consistently achieves better visual quality results. Fig. 7 compare the proposed method with Gao et al.* [6]. * means this model is trained with extra pairs of images. + +![](images/9604115c4a1cddd144da3f1a18ff1e78ddc03f32c40f0b29c62739a94d614f5c.jpg) +(a) The blurry image + +![](images/d6190eaa1f022b396ca72f73c6e773aa012c02ad74d784a1c7887f0b20ae4fe5.jpg) +(b) Gao et al. \* [6] + +![](images/ed651ca1a9d0f31339710a9dd2e9d0d505f9edf395a81da62aeffd18b516e0cc.jpg) +(c) Ours +Figure 7. Comparison with [6], which is trained with extra pairs of images. + +# 4.5. Performance in Real-World Scenarios + +To validate the effectiveness of our method, we compare the performance of our approach with several state-of-the-art methods on the RWBI dataset of real-world blurry images. Fig. 8 shows qualitative results of different models. The blurry images in the first column are from the RWBI dataset, and the images in the following columns are the results of Nah et al. [21], Tao et al. [36] and the proposed DBGAN $(+)$ . Fig. 8 shows that our method achieves better performance on real-world blurry images. + +Table 1. Performance comparison on the GOPRO Large dataset. + +
MethodKim et al.Sun et al.Nah et al.Tao et al.Shen et al.Gao et al.DBGANDBGAN(+)
PSNR23.6424.6429.0830.1030.2630.9230.4331.10
SSIM0.82390.84290.91350.93230.9400.94210.93720.9424
+ +![](images/702ee0e4c5b605a30405fdc1c32e0a2d5d13295bc1317d3299dd02425c36c9ac.jpg) +Figure 8. Performance comparison on real-world blurry images. From left to right: blurry images, results of Nah et al. [21], Tao et al. [36] and the proposed DBGAN $(+)$ method. The improvement is clearly visible in the magnified patches. + +# 5. Conclusion + +This paper has presented a new framework which firstly learns how to transfer sharp images to realistic blurry images via a learning-to-blur GAN (BGAN) module. This framework trains a learning-to-deblur GAN (DBGAN) module to learn how to recover a sharp image from a blurry image. In contrast to prior work which solely focuses on learning to deblur, our method learns to realistically synthesize blurring effects using unpaired sharp and blurry images. In order to generate more realistic blurred images, a relativistic blur loss is employed to help the BGAN module reduce the gap between synthesized blur and real blur. In addition, a RWBI dataset is built to help train + +and test deblurring models. The Experimental results have demonstrated that our method not only yields results of consistently superior perceptual quality, but also outperforms state-of-the-art methods quantitatively. + +# Acknowledgment + +This work is funded in part by the ARC Centre of Excellence for Robotics Vision (CE140100016), ARC-Discovery (DP 190102261) and ARC-LIEF (190100080) grants, as well as a research grant from Baidu on autonomous driving. The authors gratefully acknowledge the GPUs donated by NVIDIA Corporation. We thank all anonymous reviewers and ACs for their constructive comments. + +# References + +[1] Adrian Bulat, Jing Yang, and Georgios Tzimiropoulos. To learn image super-resolution, use a gan to learn how to do image degradation first. In ECCV, 2018. 3 +[2] Ayan Chakrabarti. A neural approach to blind motion deblurring. In ECCV, 2016. 3, 4, 5 +[3] Tony F Chan and Chiu-Kwong Wong. Total variation blind deconvolution. TIP, 1998. 2 +[4] Huaijin Chen, Jinwei Gu, Orazio Gallo, Ming-Yu Liu, Ashok Veeraraghavan, and Jan Kautz. Reblur2deblur: Deblurring videos via self-supervised learning. In ICCP, 2018. 3 +[5] Sunghyun Cho and Seungyong Lee. Fast motion deblurring. TOG, 2009. 1 +[6] Hongyun Gao, Xin Tao, Xiaoyong Shen, and Jiaya Jia. Dynamic scene deblurring with parameter selective sharing and nested skip connections. In CVPR, 2019. 1, 3, 7 +[7] Amit Goldstein and Raanan Fattal. Blur-kernel estimation from spectral irregularities. In ECCV, 2012. 1 +[8] Ankit Gupta, Neel Joshi, C Lawrence Zitnick, Michael Cohen, and Brian Curless. Single image deblurring using motion density functions. In ECCV, 2010. 2 +[9] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 3, 4 +[10] Michael Hirsch, Christian J Schuler, Stefan Harmeling, and Bernhard Schölkopf. Fast removal of non-uniform camera shake. In ICCV, 2011. 2 +[11] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, 2017. 4 +[12] Tae Hyun Kim, Byeongjoo Ahn, and Kyoung Mu Lee. Dynamic scene deblurring. In ICCV, 2013. 6 +[13] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016. 4 +[14] Alexia Jolicoeur-Martineau. The relativistic discriminator: a key element missing from standard gan. *ICLR*, 2019. 4 +[15] Dilip Krishnan and Rob Fergus. Fast image deconvolution using hyper-laplacian priors. In NeurIPS, 2009. 2 +[16] Orest Kupyn, Volodymyr Budzan, Mykola Mykhailych, Dmytro Mishkin, and Jiří Matas. Deblurgan: Blind motion deblurring using conditional adversarial networks. In CVPR, 2018. 3, 6 +[17] Orest Kupyn, Tetiana Martyniuk, Junru Wu, and Zhangyang Wang. Deblurgan-v2: Deblurring (orders-of-magnitude) faster and better. In ICCV, 2019. 3 +[18] Dongxu Li, Cristian Rodriguez, Xin Yu, and Hongdong Li. Word-level deep sign language recognition from video: A new large-scale dataset and methods comparison. In WACV, 2020. 3 +[19] Dongxu Li, Xin Yu, Chenchen Xu, Lars Petersson, and Hongdong Li. Transferring cross-domain knowledge for video sign language recognition. arXiv preprint arXiv:2003.03703, 2020. 3 +[20] Yu Liu, Fangyin Wei, Jing Shao, Lu Sheng, Junjie Yan, and Xiaogang Wang. Exploring disentangled feature representation beyond face identification. In CVPR, 2018. 3 + +[21] Seungjun Nah, Tae Hyun Kim, and Kyoung Mu Lee. Deep multi-scale convolutional neural network for dynamic scene deblurring. In CVPR, 2017. 1, 3, 4, 5, 6, 7, 8 +[22] Jinshan Pan, Zhe Hu, Zhixun Su, and Ming-Hsuan Yang. Deblurring text images via 10-regularized intensity and gradient prior. In CVPR, 2014. 1 +[23] Jinshan Pan, Yang Liu, Jiangxin Dong, Jiawei Zhang, Jimmy Ren, Jinhui Tang, Yu-Wing Tai, and Ming-Hsuan Yang. Physics-based generative adversarial models for image restoration and beyond. TPAMI, 2018. 3 +[24] Wenqi Ren, Lin Ma, Jiawei Zhang, Jinshan Pan, Xiaochun Cao, Wei Liu, and Ming-Hsuan Yang. Gated fusion network for single image dehazing. In CVPR, 2018. 3 +[25] Wenqi Ren, Jingang Zhang, Xiangyu Xu, Lin Ma, Xiaochun Cao, Gaofeng Meng, and Wei Liu. Deep video dehazing with semantic segmentation. TIP, 2018. 3 +[26] Christian J Schuler, Michael Hirsch, Stefan Harmeling, and Bernhard Scholkopf. Learning to deblur. TPAMI, 2016. 5 +[27] Tamar Rott Shaham, Tali Dekel, and Tomer Michaeli. Singan: Learning a generative model from a single natural image. In ICCV, 2019. 2, 3 +[28] Qi Shan, Jiaya Jia, and Aseem Agarwala. High-quality motion deblurring from a single image. TOG, 2008. 2 +[29] Ziyi Shen, Wei-Sheng Lai, Tingfa Xu, Jan Kautz, and Ming-Hsuan Yang. Deep semantic face deblurring. In CVPR, 2018. 3 +[30] Ziyi Shen, Wenguan Wang, Xiankai Lu, Jianbing Shen, Haibin Ling, Tingfa Xu, and Ling Shao. Human-aware motion deblurring. In ICCV, 2019. 3, 7 +[31] Connor Shorten and Taghi M Khoshgoftaar. A survey on image data augmentation for deep learning. Journal of Big Data, 2019. 3 +[32] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. *ICLR*, 2015. 4 +[33] Shuochen Su, Maurizio Delbracio, Jue Wang, Guillermo Sapiro, Wolfgang Heidrich, and Oliver Wang. Deep video deblurring for hand-held cameras. In CVPR, 2017. 1 +[34] Jian Sun, Wenfei Cao, Zongben Xu, and Jean Ponce. Learning a convolutional neural network for non-uniform motion blur removal. In CVPR, 2015. 3, 4, 5, 7 +[35] Yu-Wing Tai, Xiaogang Chen, Sunyeong Kim, Seon Joo Kim, Feng Li, Jie Yang, Jingyi Yu, Yasuyuki Matsushita, and Michael S Brown. Nonlinear camera response functions and image deblurring: Theoretical analysis and practice. TPAMI, 2013. 2 +[36] Xin Tao, Hongyun Gao, Xiaoyong Shen, Jue Wang, and Jiaya Jia. Scale-recurrent network for deep image deblurring. In CVPR, 2018. 1, 3, 4, 7, 8 +[37] Xintao Wang, Ke Yu, Shixiang Wu, Jinjin Gu, Yihao Liu, Chao Dong, Yu Qiao, and Chen Change Loy. Esrgan: Enhanced super-resolution generative adversarial networks. In ECCV, 2018. 3 +[38] Oliver Whyte, Josef Sivic, Andrew Zisserman, and Jean Ponce. Non-uniform deblurring for shaken images. *IJCV*, 2012. 2 + +[39] Wei Xiong, Jiahui Yu, Zhe Lin, Jimei Yang, Xin Lu, Connelly Barnes, and Jiebo Luo. Foreground-aware image inpainting. In CVPR, 2019. 3 +[40] Li Xu and Jiaya Jia. Two-phase kernel estimation for robust motion deblurring. In ECCV, 2010. 1 +[41] Li Xu, Shicheng Zheng, and Jiaya Jia. Unnatural 10 sparse representation for natural image deblurring. In CVPR, 2013. 1 +[42] Jiawei Zhang, Jinshan Pan, Jimmy Ren, Yibing Song, Linchao Bao, Rynson WH Lau, and Ming-Hsuan Yang. Dynamic scene deblurring using spatially variant recurrent neural networks. In CVPR, 2018. 1, 3 +[43] Kaihao Zhang, Wenhan Luo, Lin Ma, and Hongdong Li. Cousin network guided sketch recognition via latent attribute warehouse. In AAAI, 2019. 3 +[44] Kaihao Zhang, Wenhan Luo, Lin Ma, Wei Liu, and Hongdong Li. Learning joint gait representation via quintuplet loss minimization. In CVPR, 2019. 3 +[45] Kaihao Zhang, Wenhan Luo, Yiran Zhong, Lin Ma, Wei Liu, and Hongdong Li. Adversarial spatio-temporal learning for video deblurring. TIP, 2018. 3 +[46] Jun-Yan Zhu, Richard Zhang, Deepak Pathak, Trevor Darryll, Alexei A Efros, Oliver Wang, and Eli Shechtman. Toward multimodal image-to-image translation. In NeurIPS, 2017. 4 \ No newline at end of file diff --git a/deblurringbyrealisticblurring/images.zip b/deblurringbyrealisticblurring/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8ee3512e405b37161e29f426c9f2afed06611001 --- /dev/null +++ b/deblurringbyrealisticblurring/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e33cfc6260d0d13e7e67404ca052ae4ca658e3843cac284cf48fee65434e4b29 +size 809874 diff --git a/deblurringbyrealisticblurring/layout.json b/deblurringbyrealisticblurring/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6cbfd71f3c6af09d10ddfbba35a87312782af94d --- /dev/null +++ b/deblurringbyrealisticblurring/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6e94e8b68290859e76ae0951e43a57f0ad30b98416e29d300943afdd59de685 +size 412869 diff --git a/deblurringusinganalysissynthesisnetworkspair/3aca1528-3d2e-40d8-b3f5-3f716d5b56f2_content_list.json b/deblurringusinganalysissynthesisnetworkspair/3aca1528-3d2e-40d8-b3f5-3f716d5b56f2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..10df993f2e85e467ac0e6e185cff0099db9a2db7 --- /dev/null +++ b/deblurringusinganalysissynthesisnetworkspair/3aca1528-3d2e-40d8-b3f5-3f716d5b56f2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e682e2a8431d3379c3a158438aa2b4ea908229b576ce5e96960af682f7f25d28 +size 74944 diff --git a/deblurringusinganalysissynthesisnetworkspair/3aca1528-3d2e-40d8-b3f5-3f716d5b56f2_model.json b/deblurringusinganalysissynthesisnetworkspair/3aca1528-3d2e-40d8-b3f5-3f716d5b56f2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..61c0391f3a7cf2312d374bf566416e5efc5544fd --- /dev/null +++ b/deblurringusinganalysissynthesisnetworkspair/3aca1528-3d2e-40d8-b3f5-3f716d5b56f2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a724e0e0be99d7c638c7ae9b7a60f9194de8fc953c46d6456e0f474d06d2a1e +size 92465 diff --git a/deblurringusinganalysissynthesisnetworkspair/3aca1528-3d2e-40d8-b3f5-3f716d5b56f2_origin.pdf b/deblurringusinganalysissynthesisnetworkspair/3aca1528-3d2e-40d8-b3f5-3f716d5b56f2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ec1be7b3bcd603f3c5f92f5fb2a29f33593b2970 --- /dev/null +++ b/deblurringusinganalysissynthesisnetworkspair/3aca1528-3d2e-40d8-b3f5-3f716d5b56f2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d0675a882baab7ba98c5d65fad633de9cf4b0043e17e92d95587bb787bd2f83 +size 3074447 diff --git a/deblurringusinganalysissynthesisnetworkspair/full.md b/deblurringusinganalysissynthesisnetworkspair/full.md new file mode 100644 index 0000000000000000000000000000000000000000..fabeaefaf68dd81abe76f46e0c3a08258d8f2e0a --- /dev/null +++ b/deblurringusinganalysissynthesisnetworkspair/full.md @@ -0,0 +1,299 @@ +# Deblurring using Analysis-Synthesis Networks Pair + +Adam Kaufman + +adam.kaufman@mail.huji.ac.il + +Raanan Fattal + +raananf@cs.huji.ac.il + +School of Computer Science and Engineering + +The Hebrew University of Jerusalem, Israel + +# Abstract + +Blind image deblurring remains a challenging problem for modern artificial neural networks. Unlike other image restoration problems, deblurring networks fail behind the performance of existing deblurring algorithms in case of uniform and 3D blur models. This follows from the diverse and profound effect that the unknown blur-kernel has on the deblurring operator. + +We propose a new architecture which breaks the deblurring network into an analysis network which estimates the blur, and a synthesis network that uses this kernel to deblur the image. Unlike existing deblurring networks, this design allows us to explicitly incorporate the blur-kernel in the network's training. + +In addition, we introduce new cross-correlation layers that allow better blur estimations, as well as unique components that allow the estimate blur to control the action of the synthesis deblurring action. + +Evaluating the new approach over established benchmark datasets shows its ability to achieve state-of-the-art deblurring accuracy on various tests, as well as offer a major speedup in runtime. + +# 1. Introduction + +When taking a photo using a handheld device, such as a smartphone, camera shakes are hard to avoid. If the scene is not very bright, the movement during exposure results in a blurry image. This becomes worse as the scene is darker and a longer exposure time is needed. + +The task of recovering a blur-free image given a single blurry photo is called deblurring and is typically divided into blind and non-blind cases, depending on whether the blur-kernel is known and unknown respectively. Both cases were studied extensively in the computer vision literature, and were addressed using dedicated algorithms [26, 36, 17, 44, 31, 5] and using Artificial Neural Networks (ANNs), which are either used for implementing parts of the de + +blurring pipeline [35, 43, 49, 1, 37] or carrying-out the entire pipeline [28, 39, 19, 20, 29]. Due to the ill-posedness of the blind deblurring case, classic methods use various constraints and image priors to regularize the space of solutions [7, 3, 26, 41, 9]. Typically these methods consist of a time-consuming iterative optimization, where both the sharp image and blur-kernel are recovered, as well as relay on specific image priors that may fail on certain types of images. + +In these respects, the ANN-based solutions offer a clear advantage. While they may require a long training time, their subsequent application consists of a rather efficient feed-forward procedure. Furthermore, using suitable training sets they achieve a (locally) optimal performance over wide classes of images. It is worth noting that in this domain the training sets are produced automatically by applying a set of blur-kernels over a set of sharp images involving no manual effort. + +Nevertheless, unlike other image restoration problems, such as denoising [50, 51], upscaling [6, 14, 24], and inpainting [32, 45, 47], even the case of spatially-uniform blind deblurring ANN-based approaches fail to show a clear improvement over existing algorithms when it comes to the accuracy of the deblurred image. This major shortcoming stems from the fact that the space of blur-kernels, which specifies the blur degradation, is very large and has a very diverse effect over the inverse operator. Indeed, this is in contrast to the one-dimensional space of noise amplitude $\sigma$ that governs denoising. While it is shown that a single network trained over a wide range of $\sigma$ can achieve a denoising accuracy over a specific $\sigma^{*}$ which is comparable to a network trained over that particular value [50]. The analog experiment shows that this is far from being the case for image deblurring, as reported in [35] and demonstrated in Figure 1. + +In this paper we describe a novel network architecture and training scheme that account for the unique nature of the deblurring operation. The design of this new network incorporates various components found in image deblurring algorithms, and allows it to mimic and generalize their op- + +![](images/fe8dd86b6678fbf61619bd26992f0b1978141f3ad677711d45fd7861a68b1f72.jpg) +Input + +![](images/558dc292622cb5a06e038e5838f26d250c83447ea1d351310b05c7e012b8afc1.jpg) +Figure 1. Different network configurations. Column 2 from the left shows the results obtained when training our synthesis network without the analysis. Like existing deblurring-networks, this requires it cope with every possible blur-kernel. The results of our network pair archives a better deblurring in Column 3. Providing the ground-truth (GT) kernel to the synthesis network achieves better results (Column 4) suggesting that our synthesis network performs better than our analysis. Finally, the result of a network trained for a single specific kernel is shown in Column 5, offering a moderate improvement. These configurations were tested on 1000 images and resulted in the following mean PSNR: No analysis 23.7, our 26.6, GT kernel 28.28, Kernel-Expert 33.75. + +![](images/84a6fccede00dfe2eb1561d9b1550741bf8eb9c13ccf2068ef5432b62ba4c58d.jpg) +No Analysis + +![](images/b758db936be1cce7168693dfd7c10661a9d3228865fb452c2b9a3808f5fe02b5.jpg) + +![](images/ab14ed478cdeb71de0b9c7d08179cacd4049df6f375cd24b96953f9e67da6053.jpg) +Ours (Analysis+Synthesis) + +![](images/9145adfe665b3995d1effbe9a9e1d58e36bf7590beb83a9fbde698f6ae40af38.jpg) + +![](images/0eba1ca4aae2e89c11e6404ee2ad3c7414fc12bb451360fefa64515a800dff9a.jpg) +Synthesis + GT kernel + +![](images/d8162d2c5f0b26e88a3d6e233299872a7ce05b7da9e2b98d22a13635bf517235.jpg) + +![](images/af17a12c1690b1d7e053097d59e63efd61e3d25ea1fc18e7cbe0806be26fc032.jpg) +Kernel-Expert Syntheses + +![](images/9fed35365aa6a43eb3aabd36bd6d5a0b49e59ef82aa0ca2a5d05f1c7fe949e22.jpg) + +eration. More specifically, similarly to blind-deblurring algorithms that recover the blur-kernel, our architecture is divided into a pair of analysis and synthesis networks, where the first is trained to estimate the blur-kernel, and the second uses it to deblur the image. Unlike existing ANN-based architectures, this data path allows our training process to explicitly utilize the ground-truth blur-kernel in the training process. + +Moreover, inspired by the success of recent algorithms to recover the blur-kernel from irregularities in the autocorrelation of the blurry image, we introduce this computation as a layer of the analysis network, allowing it to perform this recovery as well as generalize it. + +Finally, the recovered blur-kernel governs the non-blind deblurring operation globally and uniformly across the image. This further motivates us to introduce an additional component into the synthesis network, allowing it to encode and spread the kernel globally across its layers. + +Evaluation of this new approach over the case of spatially-uniform blur (convolution) consistently demonstrates its ability to achieve superior deblurring accuracy compared to existing deblurring networks. These tests also show that the new network compares favorably to existing state-of-the-art deblurring algorithms. + +# 2. Previous Work + +Image deblurring has been the topic of extensive research in the past several decades. Since this contribution relates to the blind image deblurring, we will limit the sur + +vey of existing art to this case. + +In case of 2D camera rotation, the blur is uniform across the image and can be expressed by a convolution with a single 2D blur-kernel. To resolve the ambiguity between the blur and the image inherent to the blind deblurring case, as well as to compensate for the associated data loss, different priors are used for the recovery of the latent image and blur-kernel. The image priors typically model the gradients distribution found in natural images, and the blur-kernel is often assumed to be sparse. Chan and Wong [2] use the total variation norm for image regularization. Fergus et al. [7] employ a maximum a-posteriori estimation that uses a mixture of Gaussians to model the distribution the image gradients and a mixture of exponential distributions to model the blue-kernel. Shan et al. [36] suggest a different approximation for the heavy-tailed gradient distribution and add a regularization term to promote sparsity in the blur-kernel. Cho and Lee [3] accelerates the estimation by considering the strong edges in the image. Xu and Jia [42] use edge selection mask to ignore small structures that undermine the kernel estimation. Following this work, Xu et al. [44] add an $L_{0}$ regularization term to suppress small-amplitude structures in the image to improve the kernel estimation. + +Another line of works exploit regularities that natural images exhibit in the frequency domain. Yitzhaky et al. [46] assume a 1D motion blur and use auto-correlation over the image derivative to find the motion direction. Hu et al. [12] use 2D correlation to recover 2D kernels and use the eight-point Laplacian for whitening the image spectrum. Gold- + +stein and Fattal [9] use an improved spectral whitening for recovering the correlations in the images as well as use a refined power-law model the spectrum. These method resolve the power spectrum of the kernel, and use a phase retrieval algorithm to recover its phase [8]. In order to allow our analysis network to use such a kernel recovery process, we augment it with special layers that compute the correlation between different activations. + +The case of a 3D camera rotation, the blur is no longer uniform across the image but can be expressed by a 3D blur-kernel. Gupta et al. [10] as well as Whyte et al. [41] use the maximum a-posteriori estimation formulation to recover these kernels. Finally, the most general case of blur arises from camera motion and parallax or moving objects in the scene, in which case a different blur applies to different objects in the scene, and is addressed by segmenting the image [25]. + +More recently the training and use of artificial neural networks, in particular Convolutions Neural Networks (CNNs), became the dominant approach for tackling various image restoration tasks, including image deblurring. Earlier works focused on the non-blind uniform deblurring, for example Schuler et al. [35] use a multi-layer perceptron in order to remove the artifacts produced by a non-blind deblurring algorithm. Xu et al. [43] based their network on the kernel separability theorem and used the SVD of the pseudo-inverse of the blur kernel to initialized the weights of large 1D convolutions. Both those methods need to be trained per kernel, which burdens their use at run-time. + +Zhang et al. [49] managed to avoid per-kernel training by first applying a non ANN based deconvolution module, followed by a FCNN to remove noise and artifacts from the gradients. This is done iteratively where the denoised gradients are used as image priors to guide the image deconvolution in the next iteration. However, this method is still limited to the non-blind case for the initial deblurring step. On the other hand, a few architecture were purposely for blur estimation. Chakrabarti [1] train a network to estimate the Fourier coefficients of a deconvolution filter, and used the non-blind EPLL [53] method to restore the sharp image and generate comparable performance to state-of-the-art iterative blind deblurring methods. Sun et al. [37] trained a classification network to generate a motion field for non-uniform deblurring. The classification is performed locally and restricted to 73 simple linear blur-kernels, and therefore limited to simple blurs. Both of the above methods [1, 37] use a traditional non-blind method to deblur the image. + +Most recent effort focuses on end-to-end (E2E) networks, trained over dataset containing non-uniform parallax deblurring (dynamic scene). Nah et al. [28] proposed an E2E multi-scale CNN which deblurs the image in a coarse-to-fine fashion. This network tries to recover the latent sharp image at different scales using a loss per level. + +Following this work, Tao et al. [39] used a scale-recurrent network with share parameters across scales to perform deblurring in different scales. This reduce the number of parameters and increase stability. Kupyn et al. [19] use a discriminator-based loss, which encourages the network to produce realistic-looking content in the deblurred image. While capable of deblurring complex scenes with multiple moving objects, those methods fall short in the uniform blur case. As we show below, this case greatly benefits from using the ground-truth kernels in the training. Nimisha et al. [29] use an auto-encoder to deblur images, by mapping their latent representation into a blur-free one using a dedicated generator network. While this approach provides an E2E network, it was trained over a uniform blur. + +# 3. Method + +The construction of the new deblurring networks pair that we describe here is inspired by the computation pipeline of existing blind deblurring algorithms [9, 3]. Similarly to these algorithms our deblurring process first recovers the blur-kernel using a dedicated analysis network. The estimated kernel, along with the input image, are then fed into a second synthesis network that performs the non-blind deblurring and recovers the sharp image. This splitting of the process allows us to employ a blur-kernel reconstruction loss over the analysis network, on top of the sharp image reconstruction loss that applies to both networks. In Section 3.4 we describe this training process. + +Several deblurring algorithms [46, 9, 12] successfully recover the blur-kernel based on the irregularities it introduces to the auto-correlation of the input image. In order to utilize this computational path in our analysis network, we introduce in Section 3.1 a unique layer that computes these correlations as well as generalizes them. + +Finally, in case of the uniform 2D blur, i.e., convolution, that we consider (as well as the 3D non-uniform case), the sharp image recovery consists of a global operator (deconvolution) whose operation is dictated by the blur-kernel across the entire image. This fundamental fact inspires another design novelty that we introduce in the synthesis network architecture. As we describe in Section 3.2, the synthesis network consists of a fairly-standard U-Net architecture which carries out the image sharpening operation. In order to allow the estimated kernel to dictate its operation, and do so in a global manner, we augment this network with specialized components that encode the kernel into multipliers and biases that affect the U-Net action across the entire image domain and all the layers. + +The derivation of our new approach, as well as its evaluation in Section 4, assumes a uniform blur (2D convolution). In Section 5 we discuss the option of generalizing this approach to handle more general blurring. + +![](images/7e65c8829c935158c174c51d5e5beae73b0cf25088894c80e462d2156c7626bd.jpg) +Figure 2. Analysis Network Architecture. The first stage consists of extracting features (activations) at multiple scales by applying convolution layers, and pooling operations. At the second stage, the cross-correlation between the resulting activations are computed at all scales. Finally, the estimated blur-kernel is reconstructed from coarse to fine by means of un-pooling and convolution steps. The pooling and up-pooling operations apply x2 scaling. We use 64 filters in the feature extracting step, and reduce them to 32 channels before computing the cross-correlation stage. This illustration shows only two spatial scalings, whereas our implementation consists of three. + +# 3.1. Analysis Network + +The first network in our pipeline is the analysis network which receives the input blurry image and estimates the underlining blur-kernel. The novel layers that we introduce to its architecture are inspired by previous works [46, 9, 12] that describe how the Fourier power-amplitudes components of the blur-kernel can be estimated from the autocorrelation function of the blurry image. These methods rely on the observation that natural images lose their spatial correlation upon differentiation. Thus, any deviations from a delta auto-correlation function can be attributed to the blur-kernel's auto-correlation (or power-amplitudes in Fourier space). + +Standard convolutional networks do not contain this multiplicative step between its filter responses, and hence mimicking this kernel-recovery pipeline may be difficult to be learned. Rather than increasing the networks capacity by means of increasing its depth, number of filters and nonlinearities, we incorporate these computational elements as a new correlations layers that we add to its architecture. + +Correlations Layers. The analysis network consists of the following three functional layers: (i) a standard convolutional layer that receives the input image and extracts (learnable) features from it. This process is applied recursively to produce three spatial levels. Specifically, at each + +level we use 3 convolution layers applying 64 filters of size 7-by-7, separated by x2 pooling, to extract feature maps for the correlation layer that follows. By convolution layers we imply also the addition of bias terms and a point-wise application of a ReLU activation function. Since the correlation between every pair of filters is quadratic in their number, we reduce their number by half (at each level), by applying 32 filters of size 1-by-1. Next, (ii) we compute the cross-correlation, $C_{ij}(s,t) = \sum_{x,y}f_i(x - s,y - t)f_j(x,y)$ , between each pair of these activation maps $f_{i}$ at a limited spatial range of $2^{-l}m\leq s,t\leq 2^{-l}m$ pixels, where $m$ is the spatial dimension of the recovered kernel grid, and $l = 0\dots$ is the level (scale). Note that since $C_{ij}(s,t) = C_{ji}(-s, - t)$ , only half of these coefficients needs to be computed. This stage results with a fairly large number of channels, i.e., $32\times 31 = 992$ , which we reduce back to 32 again, using 32 filters of size 1-by-1. Note that these correlations are computed between activations derived from the same data. Hence the standard auto-correlation function can be carried out if the filters applied, at previous convolution layer, correspond to delta-functions. In this case, the correlation within each channel $C_{ii}$ will correspond to the auto-correlation of that channel. Note that by learning different filters, the network generalizes this operation. + +Finally, (iii) the maps of size $(2^{-l}m + 1)$ -by- $(2^{-l}m + 1)$ -by-32, extracted from the correlations at every scales $l$ , and are integrated back to the finest scale. This is done by recursively applying x2 un-pooling (upsampling), followed by a convolution with 32 filters of size 5-by-5. This result is concatenated with the map of the following level, and the number of channels is reduced from 64 back to 32, by applying a convolution with 32 filters of size 1-by-1. + +At the finest level, the 32 channels are reduced gradually down to a single-channeled 2D blur kernel. This is done by a sequence of 3-by-3 convolution layers that produce intermediate maps of 24, 16, 8 and 1 channels. Figure 2 sketches the architecture of the analysis network. The resulting $m$ -by- $m$ map is normalized to sum 1 in order to provide an admissible blur-kernel estimate. We use an $L_{1}$ loss between the true and estimated kernels when training this network. Finally, we note that the analysis network is trained to produce a monochromatic blur-kernel by considering the Y channel of the input image in YUV color-space. + +# 3.2. Synthesis Network + +A uniform 2D blur process is expressed via a convolution, $B = I*k$ , where $B$ is the blurry image, $I$ the blur-free image that we wish to recover, and $k$ is the blur-kernel. In this case, non-blind deblurring boils down to a deconvolution of $B$ with $k$ , i.e., a convolution with $k^{-1}$ . While the blur-kernel is typically compact, its inverse is generally not compact. Hence, the deconvolution operator is a global op + +![](images/16c8c79097172ee134a651c53764254b2fe0ee3b6ce185d1f8da12d07cf7d261.jpg) +Figure 3. Synthesis Network Architecture. A standard U-Net is augmented with kernel guided convolutions at all its layers. As shown in the red schematic, the activations in these convolutions are modulated and biased by vectors derived from the blur-kernel using FC layers. Each convolution layer consists of 3 successive convolutions using 128 filters, separated by ReLU activations. + +erator that operates the same across the image (translation-invariant). This implies that the architecture of deconvolution network should allow such global dependencies as well as a sufficient level of translation-invariance. In these respects, the spatial shrinking and expansion of convolutional auto-encoders [23] or U-Nets architecture [34] fit the bill. Indeed, the use of such architectures for non-blind deblurring is used in [28, 29]. It is important to note that a typical blur-kernel is either non-invertable, due to singularities in its spectrum, or close to being so by falling below the noise level. Hence, state-of-the-art non-blind deblurring algorithms incorporate various image priors to cope with the lost data, and the deconvolution networks [43] are expected to employ their non-linearity to express an operator beyond a linear deconvolution. + +In view of these considerations, we opt for using a U-Net as part of the synthesis network that synthesizes the blur-free image given the blurry input. However, global and stationary operation are not the only requirements the discussion above suggests. Being its inverse, the deconvolution kernel $k^{-1}$ 's action is completely defined by the blur-kernel $k$ itself, hence the U-Net's action must be dictated by the blur-kernel estimated by the analysis network. Thus, an additional component must be introduced to the synthesis network to accommodate this form of guided non-blind deblurring. + +Kernel Guided Convolution. The option of defining the U-net's filter weights as function of the blur-kernel will require a large number of fairly large fully-connected layers in order to model the non-trivial mapping between $k$ , which contains thousands of pixels, and the even larger number of + +weights in the U-Net. Moreover, this additional dependency between the learned weights will increase the degree of nonlinearity and may undermine the learning optimization. + +A considerably simpler approach is to map the blur-kernel $k$ into a list of biases and multipliers that modulate and shift the output of the convolutions at each layer of the U-Net. More specifically, at each layer of the U-Net the activations from other layers are concatenated together and the first operation they undergo is a convolution. Let us denote the result of this convolution (at a particular layer) by $r$ . At this very step, we augment the synthesis network with two vectors, namely the multipliers $m(k)$ and biases $b(k)$ , that depend on the blur-kernel $k$ and operate on $r$ by + +$$ +r = r \odot (1 + m (k)) + b (k), \tag {1} +$$ + +where $\odot$ denotes a point-wise multiplication. As prescribed by the discussion above, this operation allows the blur-kernel to affect the U-Net's action uniformly across the entire spatial domain. + +The synthesis-guiding unit, that models the functional dependency of $m(k)$ and $b(k)$ over the blur-kernel, is depicted in Figure 3 and consists of three layers of fully-connected layers, biases and ReLU operations (except for the last layer). The input dimension is the total number of pixels in the blur-kernel, the intermediate dimension is set to 128, and the final dimensions equals to the number of channels at that layer. Each layer of the U-Net is augmented with its own synthesis-guiding unit, as shown in Figure 3. We note that a similar form of control units was recently suggested in the context of image translation [13]. In Section 4 we report an ablation study that demonstrates the benefit in + +![](images/4f9b768d95a7c24d44861592a88b507b9061fcfa6c9cb3f92f7265c5aeba687b.jpg) +Figure 4. Estimated Kernels. We show here the kernel estimated by the analysis network once it was pre-trained to estimate the ground-truth kernel, and once it was further trained to minimize the image loss in the end-to-end training step. + +incorporating the guided convolution. + +Architecture Details. The U-Net architecture we use is the convolutional encoder-decoder one described in [34] and depicted in Figure 3. This encoder-decoder architecture has connections between every layer in the encoder and the decoder at the same depth. The number of channels at all the layers is set to 128. The un-pooling in the decoder is followed by a convolution with 128 filters of size 5-by-5 pixels and the ones arriving from the corresponding encoding are convolved with the same number of filters whose size is 3-by-3. These activations are concatenated into a 256 channels tensor which is reduced back to 128 channels by 128 filters of size 1-by-1 pixels. These activations as well as the ones in the encoding layers go through the $k$ -dependent multiplicative and additive steps in Eq. 1 which are produced by layer-specific synthesis-guiding units. The resulting activations go through three steps of convolution with 128 filters of size 3-by-3 interleaved with ReLU operation as shown in Figure 3. The pooling and un-pooling steps between the layers perform x2 scaling. Finally, the synthesis network is trained to minimize $L_{2}$ reconstruction loss with respect to the corresponding sharp training images + +# 3.3. Scale Optimized Networks + +As we report in Section 4, a further increase in deblurring accuracy is obtained by allowing the analysis and synthesis networks to specialize on a narrower range of blur-kernel sizes. Specifically, we split the kernel size range into three segments [0, 31], (31, 61] and (61, 85] and train a network to classify an input blurry image into one of these three classes of kernel size. We then use the classification of this network to train three pairs of analysis and synthesis network, each trained over images belonging to the different class of blur size. As a classification network we used a single scale analysis network augmented with an output fully-connected layer with three neurons and trained it using a categorical cross entropy loss. + +# 3.4. Training + +There are several options for training the analysis and synthesis networks. One possible approach is to train both networks to optimize the final sharp image reconstruction loss, which is our ultimate goal. Our experiments however show that better convergence is attained using the following training strategy. + +Both the analysis and synthesis networks are first pretrained independently to optimize the kernel and image-reconstruction losses respectively. Unlike in other approach, this stage makes use of the ground-truth blur-kernels. We then train the entire network, i.e., the composition of the analysis and synthesize networks, to optimize the output image reconstruction while omitting blur-kernel reconstruction loss. + +This end-to-end (E2E) training allows the synthesis network to learn to cope with the inaccuracies in the estimated kernel, as well as trains the analysis network to estimates the blur under the metric induced by the image reconstruction loss. Furthermore, as shown in Figure 4, omitting the kernel loss allows the networks to abstract its representation for achieving a better overall deblurring performance. In Section 4 we report an ablation study exploring the benefit in our training strategy versus alternative options. + +# 4. Results + +Implementation. We implemented the networks using the Keras library [4] and trained them using two Geforce GTX 1080 Ti GPUs running in parallel. The training was performed using an ADAM optimizer [15] with an initial learning-rate of $10^{-4}$ which was reduced by $20\%$ whenever the loss stagnated over 5 epochs. We used a small batch size of 4 examples. This required us to perform a fairly large number of training iterations, around $10^{6}$ at the pre-training stage, and another $10^{5}$ iterations at the end-to-end stage. At run time, its takes our trained network about 0.45 seconds to deblur a 1024-by-768 pixels image. + +Training Set. We obtained the sharp images from the Open Image Dataset [21], and used random crops of 512-by-512 pixels to produce the training samples. Each training example is produced on the fly and consists of a triplet of a sharp image sample $I$ , a blur-kernel $k$ , and the resulting blurred image $B = I*k + \eta$ , where $\eta \sim \mathcal{N}(0,0.02^2)$ . As noted in Section 3.1, the analysis network operates only on Y channel of the input image. Normalizing this channel to have a zero mean and unit variance does not effect the blur, but appears to improve the convergence of its estimation. + +The training set was produced from 42k images, and the test set was produced from a separate set of 3k images. The blur-kernels we used for simulating real-world camera shake were produced by adapting the method in [1]. This consists of randomly sampling a spline, mimicking camera + +
MethodAll TrajectoriesExcluding 8,9,10
PSNRMSSIMPSNRMSSIM
Deblurring Algos.
Cho [3]28.980.93330.390.953
Xu [42]29.530.94431.050.964
Shan [36]25.890.84227.570.905
Fergus [7]22.730.68224.060.756
Krishnan [18]25.720.84627.900.909
Whyte [40]28.070.84830.820.941
Hirsch [11]27.770.85230.010.945
Deblurring Nets.
DeepDeblur [28]26.480.807--
DeblurGAN [19]26.100.816--
DeblurGAN-v2[20]26.970.83028.870.921
SRN [39]27.060.84029.220.923
Ours29.970.91531.870.961
Ours scale opt. nets30.220.91532.240.961
+ +Table 1. Table reports the mean PSNR and MSSIM obtained over the Kohler dataset [16]. Note that DeepDeblur [28], DeblurGAN [19], DeblurGAN-v2 [20] and SRN [39] are network based methods, whereas the rest are blind deblurring algorithms. The scores were computed using the script provided in [16]. The output images of DeepDelur and DeblurGAN were not available for us for calculating the scores without the large trajectories. + +motion speed and acceleration, as well as a various sensor point spread functions. We make this code available along with the implementation of our networks. + +Finally, let us note that our networks were trained once, over this training set, and were evaluated on test images arriving from other benchmark datasets. + +Köhler Dataset. This dataset [16] consists of 48 blurred images captured by a robotic platform that mimics the motion of a human arm. While the blur results from 6D camera motion, most of the images exhibit blur that ranges from being approximately uniform up to admitting a 3D blur model. Trajectories 8,9, and 10 in this set contain blur which is larger than the maximal kernel size we used in our training ( $m = 85$ ). Hence, on these specific trajectories, we first applied an x2 downscaling, applied our networks, and upsampled the result back to the original resolution. This interpolation reduced the reconstruction accuracy by 1.6dB on average, and can be avoided by training a larger network. + +As Table 1 shows, our network achieves an improvement of $0.69\mathrm{dB}$ in PSNR in comparison to state-of-the-art deblurring algorithm, which is made more substantial when excluding the trajectories 8,9, and 10. Moreover, the use of feed-forward networks also offers a speedup of x10 and higher in deblurring time. Compared to state-of-the-art deblurring networks, Table 1 shows a significant improvement of $3.16\mathrm{dB}$ in deblurring accuracy, which we attribute to our novel design of analysis and synthesis networks pair which + +
MethodPSNRMSSIM
Deblurring Algos.
Sun [38]20.470.781
Zhong [52]18.950.719
Fergus [7]15.600.508
Cho [3]17.560.636
Xu [42]20.780.804
Krishnan [18]17.640.659
Levin [26]16.570.569
Whyte [41]17.4440.570
Xu [44]19.860.772
Zhang [48]16.700.566
Michaeli [27]18.910.662
Pan [30]19.330.755
Perrone [33]19.180.759
Deblurring Nets.
DeblurGAN-v2 [20]17.980.595
SRN [39]17.280.590
Ours20.670.799
Ours scale optimized20.890.819
+ +Table 2. Mean PSNR and SSIM on the Lai synthetic uniform-blur dataset [22]. DeblurGAN-v2 [20] and SRN [39] are deep learning methods, whereas the other are classical blind deblurring methods. The scores were computed by adapting the script provided in [16] + +explicitly estimate the blur-kernel and use it to guide the deblurred-image synthesis. Figure 5 shows some of the images produced by the SRN [39], DelburGAN-v2 [20] and our networks. + +Lai Dataset. This dataset [22] consists of real and synthetic blurry images. The synthetic dataset is created by both uniform and non-uniform blurs. We focus on the former, which was produced by blurring 25 high-definition images with 4 kernels. This dataset is more challenging due to the strong blur and saturated pixels it contains. + +Table 2 portrays a similar picture, where our method achieves state-of-the-art deblurring accuracy, and outperforms existing deblurring networks. Finally, Figure 6 provide a visual comparison between the deblurring networks and ours, on synthetic and real-world images respectively, both taken from this dataset. Again, our resulting deblurred images appear sharper where some of the letters are made more readable. + +Ablation study. Finally, Table 3 evaluates the contribution of different elements in our design. The table reports the deblurring accuracy obtained by the synthesis network with different implementations of the guided convolution, as well as the inferior accuracy without it (-3.93dB). The table also shows the added value of our end-to-end training, where the analysis network's output is plugged into the synthesis network during training (+1.96dB). The importance of initiating this training stage with pre-trained analysis and + +Input + +SRN [39] + +DeblurGAN-v2 [20] + +Ours + +![](images/07b7729b9b17b07c7c62832af16dae576aeddfca3d2f2bd4b03a9f75bef16144.jpg) + +![](images/60ab74c5db76980f378e45056e46808b2c528e5a69cb46414000a9de079efb32.jpg) + +![](images/b7951a5b3ca94fd990dbe36e9f751cd45486de822228362e22ec3252b4af947b.jpg) + +![](images/376724bc312c80e27ee3f8db4731a434e474ce6366eab6d1df25e0d70ab6d7f0.jpg) + +![](images/d49d465e1513751062bded6486aeb4a9a618efdf4cd8a07c2cffce7567b8a2f5.jpg) +Figure 5. Visual comparison against alternative deblurring networks, over the Kohler dataset. + +![](images/3fa3176aa08f7263619da6fa9f6d9afb79a295e5665fe7d364ba639aab899b21.jpg) + +![](images/e133b4db0eb62920d141b2549f1d3f6cae3e04d19e2cce2c977983b87bfa798f.jpg) + +![](images/6492072697441cfeddcb5f8e38edc3e4ab7749ad1089ca7170373062550696dd.jpg) + +![](images/91600b47c80babb210308d66d603c94c75fed6989bd93d2f15734a7c4b59d918.jpg) +Input DeblurGAN- SRN[39] Ours v2[20] +Figure 6. Visual comparison on blurry images from Lai dataset. The top two images are synthetically blurred, while the bottom two are real-world blurry images. + +synthesis networks is also evident from the table (+1dB). Finally, A small improvement can be achieved by using multiple networks, as described in 3.3. + +# 5. Discussion + +We presented a new deblurring network which, like existing deblurring algorithms, breaks the blind image deblur + +
ConfigurationPSNR
Synthesis + GT Kernels
No guidance24.80
Additive guidance28.58
Multiplicative guidance28.41
Additive+Multiplicative guidance28.73
Training Strategy
Random initialization25.70
Pre-training before E2E training24.82
Pre-training after E2E training26.78
scale opt. nets27.12
+ +Table 3. Ablation study. Table reports the mean PSNR obtained by different elements of our design. Our validation set is used for this evaluation. The guided convolution is explored in different settings in which the multiplication and additive terms are omitted from Eq. 1. + +ring problem into two steps. Each step is tackled with a dedicated and novel task-specific network architecture. This design allows us to explicitly make use of the blur-kernel during the networks' training. The analysis network contains novel correlation layers allowing it to mimic and generalize successful kernel-estimation procedures. The synthesis network contains unique convolution guided layers that allow the estimated kernel to control its operation. + +While we derived and implemented our approach for 2D uniform blur, we believe that can be extended to 3D rotational blur, which will require adding a third axis of rotation into the cross-correlation layers. + +# References + +[1] Ayan Chakrabarti. A neural approach to blind motion deblurring. 03 2016. 1, 3, 6 +[2] T. F. Chan and Chiu-Kwong Wong. Total variation blind deconvolution. Trans. Img. Proc., 7(3):370-375, Mar. 1998. 2 +[3] Sunghyun Cho and Seungyong Lee. Fast motion deblurring. In ACM SIGGRAPH Asia 2009 Papers, SIGGRAPH Asia '09, pages 145:1-145:8, New York, NY, USA, 2009. ACM. 1, 2, 3, 7 +[4] François Chollet et al. Keras. https://keras.io, 2015.6 +[5] Maurizio Delbracio and Guillermo Sapiro. Burst deblurring: Removing camera shake through fourier burst accumulation. 06 2015. 1 +[6] Chao Dong, Chen Change Loy, Kaiming He, and Xiaou Tang. Image super-resolution using deep convolutional networks. CoRR, abs/1501.00092, 2015. 1 +[7] Rob Fergus, Barun Singh, Aaron Hertzmann, Sam T. Roweis, and William T. Freeman. Removing camera shake from a single photograph. ACM Trans. Graph., 25(3):787-794, July 2006. 1, 2, 7 +[8] James Fienup. Phase retrieval algorithms: a comparison. Applied optics, 21:2758-69, 08 1982. 3 +[9] Amit Goldstein and Raanan Fattal. Blur-kernel estimation from spectral irregularities. pages 622-635, 10 2012. 1, 3, 4 +[10] Ankit Gupta, Neel Joshi, C. Lawrence Zitnick, Michael Cohen, and Brian Curless. Single image deblurring using motion density functions. In Proceedings of the 11th European Conference on Computer Vision: Part I, ECCV'10, pages 171-184, Berlin, Heidelberg, 2010. Springer-Verlag. 3 +[11] Michael Hirsch, Christian J. Schuler, Stefan Harmeling, and Bernhard Scholkopf. Fast removal of non-uniform camera shake. In Proceedings of the 2011 International Conference on Computer Vision, ICCV '11, pages 463-470, Washington, DC, USA, 2011. IEEE Computer Society. 7 +[12] Wei Hu, Jianru Xue, and Nanning Zheng. Psf estimation via gradient domain correlation. Trans. Img. Proc., 21(1):386-392, Jan. 2012. 2, 3, 4 +[13] Xun Huang, Ming-Yu Liu, Serge J. Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. In ECCV, 2018. 5 +[14] Jiwon Kim, Jung Kwon Lee, and Kyoung Mu Lee. Accurate image super-resolution using very deep convolutional networks. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 1 +[15] Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 12 2014. 6 +[16] Rolf Kohler, Michael Hirsch, Betty Mohler, Bernhard Schölkopf, and Stefan Harmeling. Recording and playback of camera shake: Benchmarking blind deconvolution with a real-world database. In Proceedings of the 12th European Conference on Computer Vision - Volume Part VII, ECCV'12, pages 27-40, Berlin, Heidelberg, 2012. Springer-Verlag. 7 + +[17] Dilip Krishnan and Rob Fergus. Fast image deconvolution using hyper-laplacian priors. In Proceedings of the 22Nd International Conference on Neural Information Processing Systems, NIPS'09, pages 1033-1041, USA, 2009. Curran Associates Inc. 1 +[18] D. Krishnan, T. Tay, and R. Fergus. Blind deconvolution using a normalized sparsity measure. In Proceedings of the 2011 IEEE Conference on Computer Vision and Pattern Recognition, CVPR '11, pages 233-240, Washington, DC, USA, 2011. IEEE Computer Society. 7 +[19] Orest Kupyn, Volodymyr Budzan, Mykola Mykhailych, Dmytro Mishkin, and Jiri Matas. Deblurgan: Blind motion deblurring using conditional adversarial networks. 11 2017. 1, 3, 7 +[20] Orest Kupyn, Tetiana Martyniuk, Junru Wu, and Zhangyang Wang. Deblurgan-v2: Deblurring (orders-of-magnitude) faster and better, 2019. 1, 7, 8 +[21] 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, 2018. 6 +[22] Wei-Sheng Lai, Jia-Bin Huang, Zhe Hu, Narendra Ahuja, and Ming-Hsuan Yang. A comparative study for single image blind deblurring. In IEEE Conferene on Computer Vision and Pattern Recognition, 2016. 7 +[23] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. *Neural Comput.*, 1(4):541-551, Dec. 1989. 5 +[24] Christian Ledig, Lucas Theis, Ferenc Huszar, 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 *The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)*, July 2017. 1 +[25] Anat Levin. Blind motion deblurring using image statistics. In Proceedings of the 19th International Conference on Neural Information Processing Systems, NIPS'06, pages 841-848, Cambridge, MA, USA, 2006. MIT Press. 3 +[26] Anat Levin, Yair Weiss, Fredo Durand, and William T. Freeman. Understanding blind deconvolution algorithms. IEEE Trans. Pattern Anal. Mach. Intell., 33(12):2354-2367, Dec. 2011. 1, 7 +[27] Tomer Michaeli and Michal Irani. Blind deblurring using internal patch recurrence. volume 8691, pages 783-798, 09 2014. 7 +[28] Seungjun Nah, Tae Kim, and Kyoung Lee. Deep multi-scale convolutional neural network for dynamic scene deblurring. pages 257-265, 07 2017. 1, 3, 5, 7 +[29] T Nimisha, Akash Kumar Singh, and A Rajagopalan. Blur-invariant deep learning for blind-deblurring. pages 4762-4770, 10 2017. 1, 3, 5 +[30] J. Pan, Z. Hu, Z. Su, and M. Yang. Deblurring text images via 10-regularized intensity and gradient prior. In 2014 + +IEEE Conference on Computer Vision and Pattern Recognition, pages 2901-2908, June 2014. 7 +[31] Jinshan Pan, Deqing Sun, Hanspeter Pfister, and Ming-Hsuan Yang. Blind image deblurring using dark channel prior. In Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), pages 1628-1636, 2016. 1 +[32] Deepak Pathak, Philipp Krahenbuhl, Jeff Donahue, Trevor Darrell, and Alexei A. Efros. Context encoders: Feature learning by inpainting. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 1 +[33] D. Perrone and P. Favaro. Total variation blind deconvolution: The devil is in the details. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, pages 2909-2916, June 2014. 7 +[34] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. volume 9351, pages 234-241, 10 2015. 5, 6 +[35] Christian Schuler, Harold Burger, Stefan Harmeling, and Bernhard Scholkopf. A machine learning approach for non-blind image deconvolution. pages 1067-1074, 06 2013. 1, 3 +[36] Qi Shan, Jiaya Jia, and Aseem Agarwala. High-quality motion deblurring from a single image. ACM Trans. Graph., 27(3):73:1-73:10, Aug. 2008. 1, 2, 7 +[37] Jian Sun, Wenfei Cao, Zongben Xu, and J. Ponce. Learning a convolutional neural network for non-uniform motion blur removal. pages 769-777, 06 2015. 1, 3 +[38] Libin Sun, Sunghyun Cho, Jue Wang, and James Hays. Edge-based blur kernel estimation using patch priors. In Proc. IEEE International Conference on Computational Photography, 2013. 7 +[39] Xin Tao, Hongyun Gao, Yi Wang, Xiaoyong Shen, Jue Wang, and Jiaya Jia. Scale-recurrent network for deep image deblurring. 02 2018. 1, 3, 7, 8 +[40] Oliver Whyte, Josef Sivic, and Andrew Zisserman. Deblurring shaken and partially saturated images. volume 110, pages 745-752, 11 2011. 7 +[41] Oliver Whyte, Josef Sivic, Andrew Zisserman, and Jean Ponce. Non-uniform deblurring for shaken images. International Journal of Computer Vision, 98(2):168-186, Jun 2012. 1, 3, 7 +[42] Li Xu and Jiaya Jia. Two-phase kernel estimation for robust motion deblurring. In Proceedings of the 11th European Conference on Computer Vision: Part I, ECCV'10, pages 157-170, Berlin, Heidelberg, 2010. Springer-Verlag. 2, 7 +[43] Li Xu, Jimmy S. J. Ren, Ce Liu, and Jiaya Jia. Deep convolutional neural network for image deconvolution. In Proceedings of the 27th International Conference on Neural Information Processing Systems - Volume 1, NIPS'14, pages 1790-1798, Cambridge, MA, USA, 2014. MIT Press. 1, 3, 5 +[44] Li Xu, Shicheng Zheng, and Jiaya Jia. Unnatural 10 sparse representation for natural image deblurring. In Proceedings of the 2013 IEEE Conference on Computer Vision and Pattern Recognition, CVPR '13, pages 1107-1114, Washington, DC, USA, 2013. IEEE Computer Society. 1, 2, 7 + +[45] 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 The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. 1 +[46] Y. Yitzhaky, I. Mor, A. Lantzman, and N. S. Kopeika. A direct method for restoration of motion blurred images. J. Opt. Soc. Am. A, page 1998. 2, 3, 4 +[47] Jiahui Yu, Zhe Lin, Jamei Yang, Xiaohui Shen, Xin Lu, and Thomas S. Huang. Generative image inpainting with contextual attention. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2018. 1 +[48] Haichao Zhang, David Wipf, and Yanning Zhang. Multi-image blind deblurring using a coupled adaptive sparse prior. In Proceedings of the 2013 IEEE Conference on Computer Vision and Pattern Recognition, CVPR '13, pages 1051-1058, Washington, DC, USA, 2013. IEEE Computer Society. +[49] Jiawei Zhang, Jinshan Pan, Wei-Sheng Lai, Rynson Lau, and Ming-Hsuan Yang. Learning fully convolutional networks for iterative non-blind deconvolution. 11 2016. 1, 3 +[50] 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, July 2017. 1 +[51] K. Zhang, W. Zuo, and L. Zhang. Ffdnet: Toward a fast and flexible solution for cnn-based image denoising. IEEE Transactions on Image Processing, 27(9):4608-4622, Sep. 2018. 1 +[52] Lin Zhong, Sunghyun Cho, Dimitris Metaxas, Sylvain Paris, and Jue Wang. Handling noise in single image deblurring using directional filters. In Proceedings of the 2013 IEEE Conference on Computer Vision and Pattern Recognition, CVPR '13, pages 612-619, Washington, DC, USA, 2013. IEEE Computer Society. 7 +[53] Daniel Zoran and Yair Weiss. From learning models of natural image patches to whole image restoration. In Proceedings of the 2011 International Conference on Computer Vision, ICCV '11, pages 479-486, Washington, DC, USA, 2011. IEEE Computer Society. 3 \ No newline at end of file diff --git a/deblurringusinganalysissynthesisnetworkspair/images.zip b/deblurringusinganalysissynthesisnetworkspair/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..0a3c7625252efa2851249e20cb3927a50bff1fdb --- /dev/null +++ b/deblurringusinganalysissynthesisnetworkspair/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ebd39bda7997de291b0e50f9b492b3190d729ea38415f46b06fc39034667e031 +size 622632 diff --git a/deblurringusinganalysissynthesisnetworkspair/layout.json b/deblurringusinganalysissynthesisnetworkspair/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..0e6744d0171981c4b2eb1a0dd14f4b209d225096 --- /dev/null +++ b/deblurringusinganalysissynthesisnetworkspair/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b8fad78d2405d4d5e8400ffc5a661a56bb6795c4da2f545dc185aa64992562c +size 346870 diff --git a/decoupledrepresentationlearningforskeletonbasedgesturerecognition/e20c1e21-4c2f-410c-a39d-125e5707f279_content_list.json b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/e20c1e21-4c2f-410c-a39d-125e5707f279_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..927004bf54d17cd8118b120051bc177decea7fe6 --- /dev/null +++ b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/e20c1e21-4c2f-410c-a39d-125e5707f279_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f48e5ff4efc46162b2c34b75902c0c39ff4b3ecab87a30508b0270757e9a2b09 +size 72211 diff --git a/decoupledrepresentationlearningforskeletonbasedgesturerecognition/e20c1e21-4c2f-410c-a39d-125e5707f279_model.json b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/e20c1e21-4c2f-410c-a39d-125e5707f279_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ef34163e714342ec7f352d8ee191ef2bdc6665e2 --- /dev/null +++ b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/e20c1e21-4c2f-410c-a39d-125e5707f279_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a722027cc59539711e32f9e30489bbcd6fe2d06afcab78eb4ec63ed51b41f08 +size 87573 diff --git a/decoupledrepresentationlearningforskeletonbasedgesturerecognition/e20c1e21-4c2f-410c-a39d-125e5707f279_origin.pdf b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/e20c1e21-4c2f-410c-a39d-125e5707f279_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..db90bb60103c22b4c41b336bbe6118e6825e99ea --- /dev/null +++ b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/e20c1e21-4c2f-410c-a39d-125e5707f279_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18d77515dd0951485a40cb08014948df121f4d660af8d13022561e4c7712d4f5 +size 879033 diff --git a/decoupledrepresentationlearningforskeletonbasedgesturerecognition/full.md b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/full.md new file mode 100644 index 0000000000000000000000000000000000000000..4b8e9e0936823a95c1eeb10966e8e1c0038311f8 --- /dev/null +++ b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/full.md @@ -0,0 +1,301 @@ +# Decoupled Representation Learning for Skeleton-Based Gesture Recognition + +Jianbo Liu†‡ Yongcheng Liu†‡ Ying Wang*† Véronique Prinet† Shiming Xiang†‡ Chunhong Pan† + +†National Laboratory of Pattern Recognition, Institute of Automation, Chinese Academy of Sciences ‡School of Artificial Intelligence, University of Chinese Academy of Sciences + +Email: {jianbo.liu, yongcheng.liu, ywang, prinet, smxiang, chpan}@nlpr.i.a.ac.cn + +# Abstract + +Skeleton-based gesture recognition is very challenging, as the high-level information in gesture is expressed by a sequence of complexly composite motions. Previous works often learn all the motions with a single model. In this paper, we propose to decouple the gesture into hand posture variations and hand movements, which are then modeled separately. For the former, the skeleton sequence is embedded into a 3D hand posture evolution volume (HPEV) to represent fine-grained posture variations. For the latter, the shifts of hand center and fingertips are arranged as a 2D hand movement map (HMM) to capture holistic movements. To learn from the two inhomogeneous representations for gesture recognition, we propose an end-to-end two-stream network. The HPEV stream integrates both spatial layout and temporal evolution information of hand postures by a dedicated 3D CNN, while the HMM stream develops an efficient 2D CNN to extract hand movement features. Eventually, the predictions of the two streams are aggregated with high efficiency. Extensive experiments on SHREC'17 Track, DHG-14/28 and FPHA datasets demonstrate that our method is competitive with the state-of-the-art. + +# 1. Introduction + +Gesture recognition is an attractive research topic due to its wide range of applications in many fields, e.g. assisted living, virtual game control and sign language interpretation. Early works for this task are mainly based on RGB videos or depth sequences. However, both modalities have the drawback of plausible background changes, which is often harmful to gesture recognition. More recently, hand skeleton has become a popular modality. Skeleton inherently highlights the key information of hand gestures, whilst being robust to various illuminations and complex back + +![](images/7bce06604132d5b70b3efbd5e19342e1d4d47844ac676d08a3ae70eb0d71e3f4.jpg) +Figure 1. The motivation of this paper. Dynamic hand gesture can be decomposed into hand posture variations and hand movements. + +grounds. Accordingly, skeleton-based gesture recognition has drawn much attention in recent years. + +Motivated by the remarkable success of deep learning in vision tasks, much effort has focused on applying CNN [9,19,23,25], RNN [10,34] and LSTM [22,25,30] to skeleton-based gesture recognition. In these methods, hand skeletons are usually constructed as a sequence of joint-coordinate vectors or a pseudo image. More recently, some authors apply graph convolutional network (GCN) to analyze hand skeletons [4]. They often embed skeleton sequences into a predefined spatio-temporal graph structure. These deep learning-based methods represent skeleton sequences in a predefined and fixed structure. Hand gestures always contain the interactions of different joints. Aggregating the local features of these joints is crucial for hand gesture recognition. However, the fixed structure for skeletons could be under-effective to capture local features for all interactive joints, since these joints may be nonadjacent in the predefined structure. Moreover, most of these methods work with a single deep model, which may have difficulty in analyzing the complexly composite hand gestures. + +As is shown in Figure 1 a dynamic hand gesture can be decomposed into hand posture variations and hand movements. Previous deep learning based works aim to learn the + +two features in a single stream. However, using a single network to learn these two features may yield sub-optimal performance. Motivated by this observation, we propose to decouple the dynamic gesture into hand posture variations and hand movements. The former captures the spatial layout changes of hand joints, while the latter reflects global motion trajectories. Intuitively, the great difference between the two representations motivates us to develop a two-stream framework for gesture recognition, which is illustrated in Figure 2 + +Specifically, two representations for hand posture variations and hand movements are first decoupled from raw skeleton sequence and then learned by two networks separately. For posture variations, skeleton sequence is embedded into a Hand Posture Evolution Volume (HPEV) with a gap between adjacent skeletons, ignoring hand relative positions. In this way, the spatial and temporal information of posture evolution can be encoded effectively. Then a 3D CNN based network (named, HPEV-Net) is designed to aggregate both the spatial layout and temporal evolution information. By volume representation and using 3D CNN based network, we can alleviate the limitations imposed by the above mentioned predefined-structure methods. Since the interactive joints tend to be adjacent to each other in volume space, the 3D convolution kernel can aggregate the local features of these joints naturally. Nevertheless, the volume representation may lose details of subtle hand motion due to the resolution restriction. As a remedy, we introduce Fingertip Relative Position Vector (FRPV) as a compensatory cue for subtle gesture recognition. For hand movements, the shifts of both fingertips and hand center are arranged as Hand Movement Map (HMM). Then, a 2D CNN based network (named, HMM-Net) is applied to learn the hand movement features. Eventually, recognition results can be obtained by fusing the predictions of the two networks. + +In summary, the main contributions of this paper can be summarized as follows: + +- We propose a novel method for gesture modeling: we represent the gesture as hand posture variations and hand movements and model them separately by Hand Posture Evolution Volume (HPEV) and Hand Movement Map (HMM). The method can simultaneously enhance the expressive power of the posture and motion information. +- We introduce a unified and efficient two-stream framework to effectively learn the decoupled representations. Extensive experiments on benchmarks demonstrate its superior performance in gesture recognition. + +# 2. Related work + +With the success of deep learning, many works applied deep learning to gesture and action recognition in an + +end-to-end manner. By transforming the raw skeleton sequence to a pseudo image, CNN is used to extract gesture and action features [9] [19] [23] [25]. RNN [10] [34] and LSTM [22] [25] [30] are wildly used to capture spatial and temporal relationships among joints. Moreover, attention mechanism based approaches are applied in [35]. Recently, deep learning on manifolds and graphs has increasingly attracted attention. The goal is to improve gesture and action recognition using manifold learning [24] and GCN [36]. Most of these methods model skeleton sequences in a predefined and fixed structure. Therefore, they cannot capture the local features of interactive joints efficiently. This drawback is alleviated by spatial and temporal volume modeling for skeletons [32]. However, skeletons are embedded in the volume corresponding to the whole motion region. Gestures with significant movements may suffer from low-resolution representation for hand skeletons leading to inferior performance. In this paper, we ignore hand relative positions when building Hand Posture Evolution Volume (HPEV). Hence, the skeletons can be represented with high resolution. + +Liu et al. [21] first proposed a two-stream network for action recognition. They introduce shape and motion evolution maps to represent action and use the two-stream network to learn these features. Compared with this method, our approach models hand posture variations and hand movements using two different modalities, which is more effective. Moreover, due to the different skeletal topologies, actions and gestures have different motion characteristics. The representation dedicated to action recognition may not be optimal for gesture recognition. Compared to actions, gestures can be clearly decomposed into two parts: the hand posture changes and the hand movements. Precisely inspired by this observation, we design a specialized decoupled representation to improve gesture recognition. + +# 3. Proposed method + +The overall architecture of the proposed method is shown in Figure 2 Given a skeleton sequence, a hand posture evolution volume (HPEV) and a hand movement map (HMM) are generated to represent hand posture variations and hand movements respectively. We design a 3D CNN based HPEV-Net for learning a discriminative feature vector of hand posture variations from HPEV. As a supplementary clue, a fingertip relative position vector (FRPV) is concatenated to this feature vector. Simultaneously, the HMM is fed into a CNN based HMM-Net to capture hand movement information. Each sub-network is terminated by a fully connected layer. Finally, the classification scores of two subnets are fused to produce the final prediction. + +![](images/3231162af5a67c9ba2878ca17934523528d16f159b6882b8deb8867793690f1e.jpg) +Figure 2. The framework architecture of our two-stream network. The gesture is decoupled into the hand posture evolution volume (HPEV) and the hand movement map (HMM) to represent hand posture variations and hand movements. The HPEV-Net and HMM-Net extract two feature vectors for these characteristics respectively. The feature of the fingertip relative position vector (FRPV) is concatenated to the hand posture variations feature vector as a compensate cue for subtle gestures. The scores obtained by the two subnets are averaged to produce the final prediction for inference. + +# 3.1. Hand Posture Volume + +In the skeleton-based hand gesture recognition field, hand gesture is described as a hand skeleton sequence. For the $n$ -th hand gesture sample $G_{n}$ , it can be represented as $G_{n} = \{S_{t}^{n}|t = 1,2,\dots,T_{n}\}$ , where $S_{t}^{n}$ is the hand skeleton of $t$ -th frame, and $T_{n}$ is the length of the skeleton sequence. Hand skeleton is a collection of 3D positions of hand joints, i.e. $S_{t}^{n} = \{\mathbf{p}_{i,t}^{n}|\mathbf{p}_{i,t}^{n} = (x_{i,t}^{n},y_{i,t}^{n},z_{i,t}^{n}),i = 1,2,\ldots ,J\}$ , where $\mathbf{p}_{i,t}^{n}$ is the 3D coordinates of hand joint $i$ at frame $t$ , and $J$ is the number of hand joints. + +Since each skeleton sequence sample has a different length, $T_{n}$ varies in a large range. In order to fix the input size, it is necessary to process the original skeleton sequences to obtain a constant length $T$ . Specifically, when $T_{n} > T$ , the skeleton sequence is sampled uniformly. For $T_{n} < T$ , some frames are repeated until the skeleton sequence reaches $T$ frames. The sampling processing from $G_{n}$ to $G_{n}^{T}$ with $T$ frames can be formulated as: + +$$ +G _ {n} ^ {T} = \left\{S _ {\tau} ^ {n} \mid \tau = \left\lceil \frac {T _ {n}}{T} \times t \right\rceil , t = 1, 2, \dots , T \right\}. \tag {1} +$$ + +Before diving into hand posture evolution volume, we first focus on how to construct hand posture volume for encoding the spatial configurations of the hand skeleton. To model the skeleton into a cube volume, the raw coordinates of skeletons should be transformed into the volume coordinates. To this end, the raw coordinates are normalized to $[-1, 1]$ , then the normalized coordinates are scaled to the volume coordinates. During hand posture evolution volume modeling, we only focus on the hand posture and its variation, ignoring the hand movements. Thus, when building hand posture volume, each skeleton in the sequence is supposed to be put in the center of volume without considering + +the hand position. In addition, the skeleton should occupy the volume as much as possible in order to take full advantage of the volume space to model the skeleton with a high resolution. Therefore, we propose to normalize raw coordinates of each skeleton to $[-1, 1]$ with the origin at the center of the volume using the maximum bounding box of skeletons in all training data. More specifically, for the $n$ -th hand gesture $G_{n}$ , the hand skeleton at frame $t$ is $S_{t}^{n}$ . The side lengths of bounding box for the skeleton $S_{t}^{n}$ are defined as $\Delta x_{t}^{n}, \Delta y_{t}^{n}$ and $\Delta z_{t}^{n}$ , and they can be formulated as follows: + +$$ +\left\{ \begin{array}{l} \Delta x _ {t} ^ {n} = \max \left(x _ {i, t} ^ {n}\right) - \min \left(x _ {i, t} ^ {n}\right) \\ \Delta y _ {t} ^ {n} = \max \left(y _ {i, t} ^ {n}\right) - \min \left(y _ {i, t} ^ {n}\right) \\ \Delta z _ {t} ^ {n} = \max \left(z _ {i, t} ^ {n}\right) - \min \left(z _ {i, t} ^ {n}\right) \end{array} \quad i = 1, 2, \dots , J. \right. \tag {2} +$$ + +Subsequently, the maximum side lengths of bounding box for all skeletons are defined as $\Delta x_{max}$ , $\Delta y_{max}$ and $\Delta z_{max}$ , $\Delta x_{max}$ can be formulated as: + +$$ +\Delta x _ {\max } = \max \left(\Delta x _ {t} ^ {n}\right), \tag {3} +$$ + +where $t = 1,2,\dots ,T$ , $n = 1,2,\ldots ,N$ and $N$ is the number of skeleton sequence samples in training data. $\Delta y_{max}$ and $\Delta z_{max}$ are obtained in the same way as $\Delta x_{max}$ . Finally, the raw coordinates of each skeleton are normalized to $[-1,1]$ using $\Delta x_{max}$ , $\Delta y_{max}$ and $\Delta z_{max}$ as the scale factor for each dimension. Hence, the x-coordinate of each joint for skeleton is normalized as: + +$$ +x _ {\text {n o r m}} = \frac {x - \frac {x _ {\text {m i n}} + x _ {\text {m a x}}}{2}}{\Delta x _ {\text {m a x}}} \times 2, \tag {4} +$$ + +where $x_{min}$ and $x_{max}$ are the minimum and maximum x-coordinate values of this skeleton, $x$ is the original x-coordinate, and $x_{norm}$ is the normalized x-coordinate. The + +normalization processes of y-coordinate and z-coordinate are implemented in the same way as x-coordinate. By normalization, the center of skeleton is aligned to $(0,0,0)$ . Next, the normalized coordinates are scaled and discretized to the volume coordinates. If the skeleton is embedded into a cube volume with $R\times R\times R$ resolution, the normalized x-coordinates can be transformed to the volume coordinates according to Eq. (5), where $x_{norm}$ is the normalized x-coordinate and $x_{v}$ is the x-coordinate under the volume coordinate system, $x_{v}\in \{1,2,\ldots ,R\}$ . + +$$ +x _ {v} = \operatorname {r o u n d} \left(\left(x _ {\text {n o r m}} + 1\right) \times \frac {R}{2}\right), \tag {5} +$$ + +During hand posture volume modeling, the skeleton is put into a volume space. The values of the occupied voxels equal to 1 and the values of the rest of the voxels equal to 0. In this way, all joints of the skeleton are embedded in the volume, the spatial configurations of joints are encoded naturally. For hand gesture $G_{v} = \{S_{v,t}|t = 1,2,\dots ,T\}$ , $G_{v}$ and $S_{v,t}$ indicate that the coordinates of skeletons are transformed into volume coordinates, the hand posture volume for skeleton $S_{v,t}$ can be represented as a tensor $V$ of $(R,R,R)$ dimension, the entry with index $(i,j,k)$ of tensor $V$ can be written as Eq. (6), where $i,j,k = 1,2,\ldots ,R$ . + +$$ +V (i, j, k) = \left\{ \begin{array}{l l} 1, & \text {i f} (i, j, k) \in S _ {v, t} \\ 0, & \text {o t h e r w i s e .} \end{array} \right. \tag {6} +$$ + +# 3.2. Hand Posture Evolution Volume (HPEV) + +The Hand Posture Evolution Volume (HPEV) accounts for the temporal variations of skeletons. We concatenate all skeletons of a sequence into a volume with a gap between adjacent skeletons, therefore turning the skeleton sequence into a set of point clouds in the volume space. More specifically, with respect to hand gesture $G_{v}$ , the hand posture volume $V_{t}$ for $S_{v,t}$ is constructed according to Eq. (6). The final hand posture evolution volume $V_{HPEV}$ for $G_{v}$ with $(R + \theta (T - 1), R, R)$ dimension can be derived as: + +$$ +V _ {H P E V} (i + \theta (t - 1), j, k) = \left\{ \begin{array}{l l} 1, & \text {i f} (i, j, k) \in S _ {v, t}, \\ 0, & \text {o t h e r w i s e}, \end{array} \right. \tag {7} +$$ + +where $t = 1,2,\ldots ,T$ , and $\theta$ is the gap between adjacent skeletons. The HPEV encodes the spatial configurations of each skeleton and the posture variations of the gesture. + +# 3.3. Hand Movement Map (HMM) + +Hand movements always include the motion of the whole hand and the shift of each joint. For the motion of the whole hand, we use the central point of all hand joints to represent its position. For the shift of joints, five fingertips instead of all joints are used to stand for joint motion. The reason is that when performing hand gestures, + +the motion of the fingertip is similar to the motion of the other three joints in one finger. Besides, compared with these three joints, the fingertip is always visible and the motion of fingertip is notable. Concretely, for hand gesture $G = \{S_{t}|t = 1,2,\ldots ,T\}$ , the centroid of skeleton $S_{t} = \{\mathbf{p}_{i,t}|\mathbf{p}_{i,t} = (x_{i,t},y_{i,t},z_{i,t}),i = 1,2,\ldots ,J\}$ is: + +$$ +C _ {t} = \frac {1}{J} \sum_ {i = 1} ^ {J} \mathbf {p} _ {i, t}. \tag {8} +$$ + +Hence, the movements of hand can be formulated as: + +$$ +M _ {H} = \left\{C _ {t} - C _ {1} \mid t = 1, 2, \dots , T \right\}. \tag {9} +$$ + +Correspondingly, the movements of fingertips are: + +$$ +M _ {F, j} = \left\{\mathbf {p} _ {j, t} - \mathbf {p} _ {j, 1} \mid t = 1, 2, \dots , T \right\}, \tag {10} +$$ + +where $j$ is the index of the five fingertips. + +Finally, we arrange the hand movements and fingertip motion as a Hand Movement Map (HMM), where the frame is treated as the column of the map, five fingertips and central point are treated as the row, the coordinates are treated as the three channels of the map. + +# 3.4. Fingertip Relative Position Vector (FRPV) + +Using volume to model the hand skeleton, the spatial configurations of joints are displayed naturally. However, due to the restriction of the resolution, the volume representation is difficult to express subtle finger motion. This is why we introduce the fingertip relative position vector (FRPV), describing finger motion precisely. The shifting of the fingertip is correlated with the other three joints in one finger. Besides, hand gestures always contain the interactions of thumb with four fingers. Therefore, the relative positions of four fingers and thumb of each frame are used to construct the FRPV. In particular, for frame $t$ , the four relative positions are concatenated as a vector $\mathbf{v}_{\mathbf{t}}$ as follows: + +$$ +\begin{array}{l} \mathbf {v} _ {\mathbf {t}} = \left(\mathbf {p} _ {I, t}, \mathbf {p} _ {M, t}, \mathbf {p} _ {R, t}, \mathbf {p} _ {L, t}\right) \tag {11} \\ - \left(\mathbf {p} _ {0, t}, \mathbf {p} _ {0, t}, \mathbf {p} _ {0, t}, \mathbf {p} _ {0, t}\right), \\ \end{array} +$$ + +where $\mathbf{p}_{0,t}$ is the coordinate of thumb of the $t$ -th frame, and $\mathbf{p}_{I,t}, \mathbf{p}_{M,t}, \mathbf{p}_{R,t}$ and $\mathbf{p}_{L,t}$ are the coordinates of index fingertip, middle fingertip, ring fingertip and little fingertip at frame $t$ respectively. Finally, $\mathbf{v_t}$ of each frame is concatenated as the FRPV: + +$$ +\mathbf {V} _ {\mathbf {F R P V}} = \left(\mathbf {v} _ {1}, \mathbf {v} _ {2}, \dots , \mathbf {v} _ {t}, \dots , \mathbf {v} _ {T}\right). \tag {12} +$$ + +# 3.5. HPEV-Net and HMM-Net + +We learn the discriminative hand posture variations from HPEV using the 3D CNN based HPEV-Net. As shown in Figure3 we first use a 3D convolution layer to extract the + +![](images/dabc798d6c2cbf856ecc42c1cfcc754d1b844c5998ee174f1762602a84bb82c9.jpg) +Figure 3. The network details of HPEV-Net and HMM-Net. The left is the HPEV-Net, and the right is the HMM-Net. + +low-level features. Since there is a gap $\theta$ between adjacent skeletons in HPEV, the kernel size is set to $7 \times 3 \times 3$ to capture both the local spatial configurations and temporal information. Then, we stack four bottleneck modules [14] to learn high-level hand posture variation features gradually from the HPEV. Within the bottleneck module, the input features are turned into 64 channels using a $1 \times 1 \times 1$ convolution layer. In order to shrink the model, we use a depthwise separable convolution [5] with $3 \times 3 \times 3$ kernel size instead of common convolution in the bottleneck. The output of the depthwise separable convolution is followed by a $1 \times 1 \times 1$ convolution to match the output channels. For residual connection, the input features go through a $1 \times 1 \times 1$ convolution and the output is added to the output of the bottleneck. The output channels of the four bottleneck modules are 128, 128, 256 and 512. Three $4 \times 2 \times 2$ max pooling layers are used to reduce the size of output features in the first convolution layer and two bottleneck modules. Batch Normalization and ReLU are used after 3D convolution at each layer. The output features of the last bottleneck module are turned into a feature vector using global average pooling. + +As shown in Figure 2 in order to remedy the resolution restriction of volume representation, the FRPV feature is concatenated to the hand posture variation feature vector as a supplementary cue for hand gesture recognition. We apply a fully connected layer with Batch Normalization and ReLU to the FRPV before concatenation, so as to guaranty that + +the two feature vectors are on the same order of magnitude. Finally, we append HPEV-Net with a fully connected layer to classify the hand gesture sequences. + +We extract hand movement features from HMM using the CNN based HMM-Net. Our architecture is based on the co-occurrence module from Hierarchical Co-occurrence Network (HCN) [20]. We first use an HCN module to extract features. Similarly, four stacked bottleneck modules are used to learn high-level hand movement features and the output is turned into a feature vector using the global average pooling. Once again, we append the network with a fully connected layer. In the end, the scores provided by the HPEV-Net and HMM-Net are averaged to produce the final prediction. + +# 4. Experiments and analysis + +# 4.1. Datasets + +We carry out experiments and perform comparison with related approaches on three public benchmarks: SHREC'17 Track, DHG-14/28 and FPHA dataset. + +SHREC'17 Track. The SHREC'17 Track dataset [31] is a challenging hand gesture dataset, it contains 14 gestures performed by 28 individuals in two ways: using one finger and the whole hand. It comprises 2800 sequences, which are divided into 1960 sequences for training and 840 sequences for testing. Coordinates of 22 hand joints are provided for each skeleton. + +DHG-14/28. The DHG-14/28 dataset [7] includes 14 gestures with 2800 sequences provided by 20 individuals. The DHG-14/28 dataset has the same hand joints and data collection method as the SHREC'17 Track dataset. We use the leave-one-subject-out experimental protocol for training and testing [7,24,4]. + +FPHA. The FPHA dataset [13] provides first-person dynamic hand action sequences performed by 6 actors. It comprises 1175 action samples, including 45 categories manipulating 26 different objects in 3 scenarios. 3D coordinates of 21 hand joints as the SHREC'17 Track dataset except for the palm joint are provided. We use a 1:1 setting with 600 action sequences for training and 575 for testing [13,24]. + +# 4.2. Training details + +All experiments are conducted using PyTorch on NVIDIA TITAN Xp. Adam is applied as the optimization strategy. Cross-entropy is selected as the loss function. As shown in Figure 2 the scores of two subnets are fused to produce the final prediction. This final prediction is used to compute the cross-entropy loss and the loss is backpropagated jointly for the two sub-networks. The batch size for training is 40. The initial learning rate is 3e-4 and the learning rate is reduced by a factor of 10 once learning stagnates. The training process is stopped when the learning + +Table 1. Recognition accuracy $(\%)$ of our method for different input combinations on SHREC'17 Track dataset and FPHA dataset. 14G and 28G represent 14 and 28 gesture settings. + +
MethodSHRECFPHA
14G28G
HPEV73.4571.4377.04
HMM92.7486.6766.78
FRPV62.8658.8166.43
HPEV+HMM94.4090.2482.96
HPEV+HMM+FRPV94.8892.2690.96
+ +Table 2. Performance on fine and coarse category of SHREC'17 Track dataset with 14 gestures protocol. + +
MethodFineCoarse
HPEV84.8467.85
HMM92.5493.14
FRPV83.7552.58
HPEV+HMM94.9594.14
HPEV+HMM+FRPV95.3194.67
+ +rate reaches 3e-8. The default settings of other parameters are $T = 60$ , $\theta = 3$ and $R = 32$ as described in Section 4.3 + +The parameters and FLOPs of the overall framework with default settings are 2.05M and 1.46G respectively. It achieves about 70 gestures per second for testing. This demonstrates that our method is efficient due to the specialized design of the framework. Hence, our method has great potential for real-world applications. + +# 4.3. Ablation study + +In this section, we explore the influence of different components and settings of our method. The default settings of parameters are $T = 60$ , $\theta = 3$ and $R = 32$ . + +Different input combinations. To examine the influence of different input descriptor combinations (HPEV, HMM, FRPV), we conduct ablation experiments on both SHREC'17 Track and FPHA dataset. Results shown in Table 1 confirm that these three descriptors are critical for gesture recognition indeed. Combining all three descriptors achieves the best performance consistently. Note that HMM contributes more than HPEV on the SHREC'17 Track dataset, while the results are reversed on the FPHA dataset. The reason is that half of the gestures in the SHREC'17 Track dataset are about swiping, which have high correlations with hand movements. Moreover, using FRPV obtains about a $8\%$ increase for accuracy on the FPHA dataset, since most gestures in the FPHA dataset involve subtle motion, e.g. writing, reading letters, cleaning glasses, and so on. + +There are two groups in the SHREC'17 Track dataset, + +![](images/51ed3d13493a46f0bea0635de01e3b36a4055b76c93c3fafe7ba42db5a31169f.jpg) +Figure 4. Comparison of recognition accuracy using different input combinations for some gestures on FPHA dataset. + +Table 3. Recognition accuracy $(\%)$ of our method for different HPEV structures on SHREC'17 Track dataset and FPHA dataset. 14G and 28G represent 14 and 28 gesture settings. + +
MethodSHRECFPHA
14G28G
HPEM+HMM+FRPV92.8590.3585.74
HPEV+HMM+FRPV94.8892.2690.96
+ +fine and coarse gestures. In order to explore the performance of different input combinations on the fine and coarse gestures, the recognition accuracies of these two categories on the SHREC'17 Track dataset with 14 gestures protocol are listed in Table2. Fine gestures always involve hand posture changes, while coarse gestures involve hand movements. Therefore, it is reasonable that both HPEV and FRPV perform much better on fine gestures, while HMM performs better on coarse gestures. + +The recognition accuracy of some gesture classes on the FPHA dataset is provided in Figure 4. The HPEV+HMM input combination usually outperforms both the HPEV and the HMM, showing the complementary property of HPEV and HMM. The FRPV is beneficial to subtle gestures. Especially for the gesture "write", the FRPV achieves a performance boost over $20\%$ . The results demonstrate the effectiveness of our approach for hand gesture modeling. + +Influence of HPEV structure. To investigate the influence of the HPEV structure, we use HMM like structure to model the hand posture variations as Hand Posture Evolution Map (HPEM). The performance of HPEV and HPEM is given in Table3. The results for HPEM on SHREC'17 Track and FPHA dataset are about $2\%$ , $2\%$ and $5\%$ decrease compared with HPEV. This shows the effectiveness of the HPEV structure for modeling hand posture variations, especially for the FPHA dataset which contains numerous gestures involving hand posture changes. + +Table 4. Recognition accuracy $(\%)$ of our method for different gaps $\theta$ on SHREC'17 Track dataset with 14 gestures protocol. + +
Gap (θ)HPEVHPEV+HMM+FRPV
062.2693.10
170.9093.93
272.7493.93
373.4594.88
572.8694.76
+ +![](images/017382a335c11675f204f61edb8c3cc3aedd74665879114874b3bcc3a59eeafd.jpg) +Figure 5. Recognition accuracy of our method for different resolution $R$ on SHREC'17 Track dataset with 14 gestures protocol. + +Different gaps. To explore the influence of different gaps, we conduct the ablation study on the SHREC'17 Track dataset with 14 gestures protocol. In this experiment, the gap $\theta$ between adjacent skeletons varies from 0 to 5, other settings are kept unchanged. Table $④$ shows the performance of our method with different gap settings. Note that the accuracy decreases rapidly for $\theta = 0$ when using only the HPEV feature. This shows the gap is important for hand posture evolution volume modeling. Results suggest that using gap $\theta = 3$ is sufficient to obtain good performance. + +Different resolution. To investigate the influence of different resolution when building HPEV, we conducted ablation experiments on the SHREC'17 Track dataset with 14 gestures protocol. Results with $R = 16,24,32,40$ are shown in Figure 5 Performance gets worse with lower resolution. Results suggest that using resolution $R = 32$ is sufficient to achieve good performance. Comparing the two curves corresponding to HPEV+HMM and HPEV+HMM+FRPV, it is obvious that when the resolution is increased, the FRPV helps gain less recognition accuracy. + +# 4.4. Comparison with the state-of-the-art + +We perform the experimental comparison with several state-of-the-art approaches on the DHG-14/28, SHREC'17 Track and FPHA dataset respectively. The results are shown and discussed as follows. + +SHREC'17 Track dataset. The state-of-the-art meth- + +Table 5. Recognition accuracy and comparison with the state-of-the-art approaches on SHREC'17 Track dataset with 1960 sequences for training and 840 sequences for testing. 14G and 28G represent 14 and 28 gesture settings. + +
MethodAccuracy (%)
14G28G
HON4D [28]78.5074.00
Devanne et al. [8]79.4062.00
Ohn-Bar et al. [26]83.9076.50
SoCJ+Direction+Rotation [6]86.9084.20
SoCJ+HoHD+HoWR [7]88.2081.90
Caputo et al. [2]89.50-
Boulahia et al. [1]90.5080.50
Two-stream 3D CNN [32]83.4577.43
SEM-MEM+WAL [21]90.8385.95
Res-TCN [15]91.1087.30
STA-Res-TCN [15]93.6090.70
ST-GCN [36]92.7087.70
ST-TS-HGR-NET [24]94.2989.40
DG-STA [4]94.4090.70
Ours94.8892.26
+ +ods we used for comparison on SHREC'17 Track dataset are divided into five categories: 1) Hand-crafted methods: HON4D [28], Devanne et al. [8], Ohn-Bar et al. [26], SoCJ+Direction+Rotation [6], SoCJ+HoHD+HoWR [7], Caputo et al. [2] and Boulahia et al. [1]; 2) CNN-based methods: SEM-MEM+WAL [21], Res-TCN [15] and STA-Res-TCN [15]; 3) 3D-CNN-based method: Two-stream 3D CNN [32]; 4) Graph-based methods: ST-GCN [36] and DG-STA [4]; 5) Manifold-learning-based method: ST-TS-HGR-NET [24]. + +Table 5 lists the recognition accuracy of all methods. Two-stream 3D CNN [32] and SEM-MEM+WAL [21] are closely related to our method. We implemented these two approaches and applied them on SHREC'17 Track dataset. The results of other methods are collected from papers [4,24]. Our approach achieves state-of-the-art performance under both the 14-gesture and 28-gesture settings. In particular, our method obtains $94.88\%$ on the 14-gesture protocol and $92.26\%$ on the 28-gesture protocol. It outperforms the most recent work DG-STA [4] by $0.48\%$ and $1.5\%$ for experiments with 14 and 28 gestures respectively. + +DHG-14/28 dataset. In addition to the methods listed in Table 5 we also compare with: a RNN-based method 3, a CNN-based method 35 and a LSTM-based method 25 on DHG-14/28 dataset. Table 6 shows that our method achieves state-of-the-art performance under both the 14-gesture and 28-gesture settings on the DHG-14/28 dataset. We collect the results of other baseline methods from papers 4 24. Although the DHG-14/28 dataset has the same hand gestures with the SHREC'17 Track dataset, it is more + +Table 6. Recognition accuracy and comparison with the state-of-the-art methods on DHG-14/28 dataset using the leave-one-subject-out experimental protocol. 14G and 28G represent 14 and 28 gesture settings. + +
MethodAccuracy (%)
14G28G
SoCJ+HoHD+HoWR [7]83.1080.00
Chen et al. [3]84.7080.30
CNN+LSTM [25]85.6081.10
Weng et al. [35]85.8080.40
Res-TCN [15]86.9083.60
STA-Res-TCN [15]89.2085.00
ST-GCN [36]91.2087.10
ST-TS-HGR-NET [24]87.3083.40
DG-STA [4]91.9088.00
Ours92.5488.86
+ +challenging due to the leave-one-subject-out experimental protocol. As shown in Table 6, our method obtains $92.54\%$ on 14-gesture protocol and $88.86\%$ on 28-gesture protocol. It outperforms the most recent work DG-STA [4] by 0.64 and 0.86 percent point for experiments with 14 and 28 gestures respectively. Note that the good performance is more notable with 28 gestures setting than that with 14 gestures setting. We argue that our HPEV for hand skeleton encodes the spatial configurations of the hand effectively. Thus, the network can distinguish the gestures performed using one finger and the whole hand efficiently. + +FPHA dataset. FPHA dataset is a new and challenging dataset for studying first-person dynamic hand actions interacting with 3D objects. Compared with the SHREC'17 Track dataset and the DHG-14/28 dataset, it includes more gesture categories, i.e. 45 daily hand action classes. Due to the obvious inter-subject and intra-subject variations on style, speed, scale, and viewpoint, to recognize the hand action sequences is a challenge. + +Table shows the recognition accuracy of our approach and recent methods on FPHA dataset. We quote the results of compared methods from paper [24]. Our method achieves competitive performance. Note that ST-TS-HGR-NET [24] outperforms our method. However, on the other hand, our approach is superior to ST-TS-HGR-NET both on the SHREC'17 Track dataset and DHG-14/28 dataset. Particularly for the DHG-14/28 dataset, our method outperforms ST-TS-HGR-NET by 5.24 and 5.46 percent points for 14 gestures and 28 gestures protocol. ST-TS-HGR-NET is based on manifold learning with SVM classifier. It has better generalization ability on the FPHA dataset which is a small dataset with 600 samples for training. For the DHG-14/28 dataset with about 2660 samples for training, it lacks learning capacity for the larger dataset. However, + +Table 7. Performance comparison with the state-of-the-art methods on FPHA dataset. C, D, P represent color, depth and pose. + +
MethodCDPAcc. (%)
Two stream-color [11]✓✗✗61.56
Two stream-flow [11]✓✗✗69.91
Two stream-all [11]✓✗✗75.30
HOG2-depth [27]✗✓✗59.83
HOG2-depth+pose [27]✗✓✓66.78
HON4D [28]✗✓✗70.61
Novel View [29]✗✓✗69.21
JOULE-color [16]✓✗✗66.78
JOULE-depth [16]✗✓✗60.17
JOULE-pose [16]✗✗✓74.60
JOULE-all [16]✓✓✓78.78
1-layer LSTM [39]✗✗✓78.73
2-layer LSTM [39]✗✗✓80.14
Moving Pose [37]✗✗✓56.34
Lie Group [33]✗✗✓82.69
HBRNN [10]✗✗✓77.40
Gram Matrix [38]✗✗✓85.39
TF [12]✗✗✓80.69
Huang et al. [17]✗✗✓84.35
Huang et al. [18]✗✗✓77.57
ST-TS-HGR-NET [24]✗✗✓93.22
Ours✗✗✓90.96
+ +our method is based on deep networks showing powerful learning ability for large datasets. + +# 5. Conclusion + +We propose a new method for hand gesture modeling. The gesture is decomposed into hand posture variations and hand movements, which are encoded into the HPEV and the HMM respectively. We introduce a framework including the HPEV-Net and HMM-Net to learn these two features for gesture recognition. Due to the specialized design of the framework, our method has great potential for real-world applications. Extensive experiments demonstrate that our method is competitive or superior to related work. + +# Acknowledgement + +The authors thank anonymous reviewers very much for their valuable comments. This research was supported by the Major Project for New Generation of AI under Grant No. 2018AAA0100400, the National Natural Science Foundation of China under Grants 91646207, 61976208, 61620106003, and 61773377, and the Beijing Natural Science Foundation under Grant 4162064. + +# References + +[1] Said Yacine Boulahia, Eric Anquetil, Franck Multon, and Richard Kulpa. Dynamic hand gesture recognition based on 3d pattern assembled trajectories. In IPTA, pages 1-6. IEEE, 2017. +[2] Fabio M Caputo, Pietro Prebianca, Alessandro Carcangiu, Lucio D Spano, and Andrea Giachetti. Comparing 3d trajectories for simple mid-air gesture recognition. Computers & Graphics, 73:17-25, 2018. +[3] Xinghao Chen, Hengkai Guo, Guijin Wang, and Li Zhang. Motion feature augmented recurrent neural network for skeleton-based dynamic hand gesture recognition. In ICIP, pages 2881-2885. IEEE, 2017. +[4] Yuxiao Chen, Long Zhao, Xi Peng, Jianbo Yuan, and Dimitris N Metaxas. Construct dynamic graphs for hand gesture recognition via spatial-temporal attention. In BMVC, 2019. +[5] François Chollet. Xception: Deep learning with depthwise separable convolutions. In CVPR, pages 1251-1258, 2017. +[6] Quentin De Smedt. Dynamic hand gesture recognition-From traditional handcrafted to recent deep learning approaches. PhD thesis, 2017. +[7] Quentin De Smedt, Hazem Wannous, and Jean-Philippe Vandeborre. Skeleton-based dynamic hand gesture recognition. In CVPRW, pages 1–9, 2016. +[8] Maxime Devanne, Hazem Wannous, Stefano Berretti, Pietro Pala, Mohamed Daoudi, and Alberto Del Bimbo. 3-d human action recognition by shape analysis of motion trajectories on riemannian manifold. IEEE transactions on cybernetics, 45(7):1340-1352, 2014. +[9] Guillaume Devineau, Fabien Moutarde, Wang Xi, and Jie Yang. Deep learning for hand gesture recognition on skeletal data. In $FG$ , pages 106-113. IEEE, 2018. +[10] Yong Du, Wei Wang, and Liang Wang. Hierarchical recurrent neural network for skeleton based action recognition. In CVPR, pages 1110-1118, 2015. +[11] Christoph Feichtenhofer, Axel Pinz, and Andrew Zisserman. Convolutional two-stream network fusion for video action recognition. In CVPR, pages 1933-1941, 2016. +[12] Guillermo Garcia-Hernando and Tae-Kyun Kim. Transition forests: Learning discriminative temporal transitions for action recognition and detection. In CVPR, pages 432-440, 2017. +[13] Guillermo Garcia-Hernando, Shanxin Yuan, Seungryul Baek, and Tae-Kyun Kim. First-person hand action benchmark with rgb-d videos and 3d hand pose annotations. In CVPR, pages 409-419, 2018. +[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. +[15] Jingxuan Hou, Guijin Wang, Xinghao Chen, Jing-Hao Xue, Rui Zhu, and Huazhong Yang. Spatial-temporal attention res-tn for skeleton-based dynamic hand gesture recognition. In ECCV, pages 0–0, 2018. +[16] Jian-Fang Hu, Wei-Shi Zheng, Jianhuang Lai, and Jianguo Zhang. Jointly learning heterogeneous features for rgb-d activity recognition. In CVPR, pages 5344-5352, 2015. + +[17] Zhiwu Huang and Luc Van Gool. A riemannian network forspd matrix learning. In AAAI, 2017. +[18] Zhiwu Huang, Jiqing Wu, and Luc Van Gool. Building deep networks on grassmann manifolds. In AAAI, 2018. +[19] Qiuhong Ke, Mohammed Bennamoun, Senjian An, Ferdous Sohel, and Farid Boussaid. A new representation of skeleton sequences for 3d action recognition. In CVPR, pages 3288-3297, 2017. +[20] Chao Li, Qiaoyong Zhong, Di Xie, and Shiliang Pu. Cooccurrence feature learning from skeleton data for action recognition and detection with hierarchical aggregation. In IJCAI, 2018. +[21] Hanying Liu, Juanhui Tu, Mengyuan Liu, and Runwei Ding. Learning explicit shape and motion evolution maps for skeleton-based human action recognition. ICASSP, pages 1333-1337, 2018. +[22] Jun Liu, Gang Wang, Ping Hu, Ling-Yu Duan, and Alex C Kot. Global context-aware attention LSTM networks for 3d action recognition. In CVPR, pages 1647-1656, 2017. +[23] Mengyuan Liu, Hong Liu, and Chen Chen. Enhanced skeleton visualization for view invariant human action recognition. Pattern Recognition, 68:346-362, 2017. +[24] Xuan Son Nguyen, Luc Brun, Olivier Lézoray, and Sébastien Bougleux. A neural network based on spd manifold learning for skeleton-based hand gesture recognition. In CVPR, pages 12036-12045, 2019. +[25] Juan C Nunez, Raul Cabido, Juan J Pantrigo, Antonio S Montemayor, and Jose F Velez. Convolutional neural networks and long short-term memory for skeleton-based human activity and hand gesture recognition. Pattern Recognition, 76:80-94, 2018. +[26] Eshed Ohn-Bar and Mohan Trivedi. Joint angles similarities and hog2 for action recognition. In CVPRW, pages 465-470, 2013. +[27] Eshed Ohn-Bar and Mohan Manubhai Trivedi. Hand gesture recognition in real time for automotive interfaces: A multimodal vision-based approach and evaluations. IEEE transactions on intelligent transportation systems, 15(6):2368-2377, 2014. +[28] Omar Oreifej and Zicheng Liu. Hon4d: Histogram of oriented 4d normals for activity recognition from depth sequences. In CVPR, pages 716-723, 2013. +[29] Hossein Rahmani and Ajmal Mian. 3d action recognition from novel viewpoints. In CVPR, pages 1506-1515, 2016. +[30] Amir Shahroudy, Jun Liu, Tian-Tsong Ng, and Gang Wang. Ntu $\mathrm{rgb + }$ d: A large scale dataset for 3d human activity analysis. In CVPR, pages 1010-1019, 2016. +[31] Quentin De Smedt, Hazem Wannous, Jean-Philippe Vandeborre, Joris Guerry, Bertrand Le Saux, and David Filliat. Shrec'17 track: 3d hand gesture recognition using a depth and skeletal dataset. In 3DOR, 2017. +[32] Juanhui Tu, Mengyuan Liu, and Hanying Liu. Skeleton-based human action recognition using spatial temporal 3d convolutional neural networks. ICME, pages 1-6, 2018. +[33] Raviteja Vemulapalli, Felipe Arrate, and Rama Chellappa. Human action recognition by representing 3d skeletons as points in a lie group. In CVPR, pages 588-595, 2014. + +[34] Hongsong Wang and Liang Wang. Modeling temporal dynamics and spatial configurations of actions using two-stream recurrent neural networks. In CVPR, pages 499-508, 2017. +[35] Junwu Weng, Mengyuan Liu, Xudong Jiang, and Junsong Yuan. Deformable pose traversal convolution for 3d action and gesture recognition. In ECCV, pages 136-152, 2018. +[36] Sijie Yan, Yuanjun Xiong, and Dahua Lin. Spatial temporal graph convolutional networks for skeleton-based action recognition. In AAAI, 2018. +[37] Mihai Zanfir, Marius Leordeanu, and Cristian Sminchisescu. The moving pose: An efficient 3d kinematics descriptor for low-latency action recognition and detection. In ICCV, pages 2752-2759, 2013. +[38] Xikang Zhang, Yin Wang, Mengran Gou, Mario Sznaier, and Octavia Camps. Efficient temporal sequence comparison and classification using gram matrix embeddings on a riemannian manifold. In CVPR, pages 4498-4507, 2016. +[39] Wentao Zhu, Cuiling Lan, Junliang Xing, Wenjun Zeng, Yanghao Li, Li Shen, and Xiaohui Xie. Co-occurrence feature learning for skeleton based action recognition using regularized deep LSTM networks. In AAAI, 2016. \ No newline at end of file diff --git a/decoupledrepresentationlearningforskeletonbasedgesturerecognition/images.zip b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..fb53766855044ff9194592fdd1ded5429ce29dfe --- /dev/null +++ b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe079f3ea95fa4959a23da7e7f0b1ff700f2addf1ea4fd74086ea39ad8650d43 +size 551384 diff --git a/decoupledrepresentationlearningforskeletonbasedgesturerecognition/layout.json b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..34e5abe6e7b1e278d7d8586051224e5550e850e2 --- /dev/null +++ b/decoupledrepresentationlearningforskeletonbasedgesturerecognition/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be99d1bb6597c10dcb3c3208b1ed5eb7f440501a63052b971f30aa03feaca2ad +size 372693 diff --git a/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/6574d78c-fea1-4066-b5d0-0d6cd224a4b2_content_list.json b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/6574d78c-fea1-4066-b5d0-0d6cd224a4b2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..164cf70a256eb33b509bb5fe7b70e3af103af76c --- /dev/null +++ b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/6574d78c-fea1-4066-b5d0-0d6cd224a4b2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:84ff74a462b5df541785035c598d7f1123f1a8e1ea0372245145a96e6dc58cc0 +size 86048 diff --git a/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/6574d78c-fea1-4066-b5d0-0d6cd224a4b2_model.json b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/6574d78c-fea1-4066-b5d0-0d6cd224a4b2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..bb06a6432b4b879e40175f082bfd39668941ae9f --- /dev/null +++ b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/6574d78c-fea1-4066-b5d0-0d6cd224a4b2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8b673f22428cf90e58ce8d139cf54a597b6949ced25c3b9e096a58caeb72c8ad +size 106493 diff --git a/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/6574d78c-fea1-4066-b5d0-0d6cd224a4b2_origin.pdf b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/6574d78c-fea1-4066-b5d0-0d6cd224a4b2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..984d641b55703698b43894e1dfc87b25ad16cda4 --- /dev/null +++ b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/6574d78c-fea1-4066-b5d0-0d6cd224a4b2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a790e168dd7408176de9c3dcc6318d3c3fc7974a9b54d2cb6ef3774ae73b6eef +size 3618959 diff --git a/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/full.md b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/full.md new file mode 100644 index 0000000000000000000000000000000000000000..968f8e336f40a3c6c0adf7f26016d04b89913771 --- /dev/null +++ b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/full.md @@ -0,0 +1,412 @@ +# Deep 3D Capture: Geometry and Reflectance from Sparse Multi-View Images + +Sai Bi + +Zexiang Xu + +Kalyan Sunkavalli + +UC San Diego + +David Kriegman + +2Adobe Research + +Ravi Ramamoorthi1 + +# Abstract + +We introduce a novel learning-based method to reconstruct the high-quality geometry and complex, spatially-varying BRDF of an arbitrary object from a sparse set of only six images captured by wide-baseline cameras under collocated point lighting. We first estimate per-view depth maps using a deep multi-view stereo network; these depth maps are used to coarsely align the different views. We propose a novel multi-view reflectance estimation network architecture that is trained to pool features from these coarsely aligned images and predict per-view spatially-varying diffuse albedo, surface normals, specular roughness and specular albedo. Finally, we fuse and refine these per-view estimates to construct high-quality geometry and per-vertex BRDFs. We do this by jointly optimizing the latent space of our multiview reflectance network to minimize the photometric error between images rendered with our predictions and the input images. While previous state-of-the-art methods fail on such sparse acquisition setups, we demonstrate, via extensive experiments on synthetic and real data, that our method produces high-quality reconstructions that can be used to render photorealistic images. + +# 1. Introduction + +Reconstructing the 3D geometry and reflectance properties of an object from 2D images has been a long-standing problem in computer vision and graphics, with applications including 3D visualization, relighting, and augmented and virtual reality. Traditionally this has been accomplished using complex acquisition systems [5, 17, 41, 45, 56] or multi-view stereo (MVS) methods [13, 40] applied to dense image sets [34, 49]. The acquisition requirements for these methods significantly limits their practicality. Recently, deep neural networks have been proposed for material estimation from a single or a few images. However, many of these methods are restricted to estimating the spatially-varying BRDF (SVBRDF) of planar samples [10, 15, 31]. Li et al. [32] demonstrate shape and reflectance reconstruction from a single image, but their reconstruction quality is limited by their single image input. + +Our goal is to enable practical and high-quality shape + +![](images/3ada4e719942c3f6188c2f85332854fcb29e8e505ea7fbfd0954c45090a09ea4.jpg) + +![](images/f1b36c8fafa1bbe480869e3f0fc7a7f95bf7f9843ad4cd32756f2873526bb9e0.jpg) +Diffuse albedo +Normal +Roughness +Specular albedo +Geometry +Rendering +Figure 1: From six wide-baseline input images of an object captured under collocated point lighting (top row), our method reconstructs high-quality geometry and spatially-varying, non-Lambertian reflectance (bottom row, a tone mapping is performed on specular albedo to make it more visible), allowing us to re-render the captured object under novel viewpoint and illumination (bottom, right). + +and appearance acquisition. To this end, we propose using a simple capture setup: a sparse set of six cameras—placed at one vertex and the centers of the adjoining faces of a regular icosahedron, forming a $60^{\circ}$ cone—with collocated point lighting (Fig. 2 left). Capturing six images should allow for better reconstruction compared to single image methods. However, at such wide baselines, the captured images have few correspondences and severe occlusions, making it challenging to fuse information across viewpoints. + +As illustrated in Fig. 2, we propose a two-stage approach to address this problem. First, we design multi-view geometry and reflectance estimation networks that regress the 2D depth, normals and reflectance for each input view by robustly aggregating information across all sparse viewpoints. We estimate the depth for each input view using a deep multi-view stereo network [50, 53] (Sec. 3.1). Because of our sparse capture, these depth maps contain errors and cannot be used to accurately align the images to estimate per-vertex BRDFs [34, 56]. Instead, we use these depth maps to warp the images to one viewpoint and use a novel deep multi-view reflectance estimation network to estimate per-pixel normals and reflectance (parameterized by diffuse albedo, specular albedo and roughness in a simplified Disney BRDF model [24]) for that viewpoint (Sec. 3.2). This network extracts features from the warped images, aggregates + +![](images/3c484468b92f8224943a290c1fbbaf43909dbd8a65df97cd58504a9012d2ec9f.jpg) + +![](images/130fb302727f64a66f20e5877ee9db0fbfd03a7c41502bcc5830789036ce5c53.jpg) +Figure 2: Our acquisition setup (leftmost figure) and framework. We capture six images with collocated cameras and lights placed at a vertex (green circle 1) and five adjoining face centers (green circle 2-6) of an icosahedron. Using the six images, we predict per-view depth (red block). We warp the input images using the predicted depths and pass them to a multi-view SVBRDF estimation network to get per-view SVBRDFs (blue block). Finally, we reconstruct 3D geometry from the estimated depth and normals, and perform a joint optimization to get refined geometry and per-vertex BRDFs (yellow block). + +them across viewpoints using max-pooling, and decodes the pooled features to estimate the normals and SVBRDF for that viewpoint. This approach to aggregate multi-view information leads to more robust reconstruction than baseline approaches like a U-Net architecture [38], and we use it to recover normals and reflectance for each view. + +Second, we propose a novel method to fuse these per-view estimates into a single mesh with per-vertex BRDFs using optimization in a learnt reflectance space. First, we use Poisson reconstruction [25] to construct a mesh from the estimated per-view depth and normal maps (Sec. 3.3). Each mesh vertex has multiple reflectance parameters corresponding to each per-view reflectance map, and we fuse these estimates to reconstruct object geometry and reflectance that will accurately reproduce the input images. Instead of optimizing the per-vertex reflectance parameters, which leads to outliers and spatial discontinuities, we optimize the latent features of our multi-view reflectance estimation network (Sec. 3.4). We pass these latent features to the reflectance decoder to construct per-view SVBRDFs, fuse them using per-vertex blending weights, and render them to compute the photometric error for all views. This entire pipeline is differentiable, allowing us to backpropagate this error and iteratively update the reflectance latent features and per-vertex weights till convergence. This process refines the reconstruction to best match the specific captured images, while leveraging the priors learnt by our reflectance estimation network. + +We train our networks with a large-scale synthetic dataset comprised of procedurally generated shapes with complex SVBRDFs [50, 52] and rendered using a physically-based renderer. While our method is trained with purely synthetic data, it generalizes well to real scenes. This is illustrated in Figs. 1 and 8, where we are able to reconstruct real objects with complex geometry and non-Lambertian reflectance. Previous state-of-the-art methods, when applied to sparse input images for such objects, produce incomplete, noisy geometry and erroneous reflectance estimates (Figs. 4 and 7). In con + +trast, our work is the first to reconstruct detailed geometry and high-quality reflectance from sparse multi-view inputs, allowing us to render photorealistic images under novel view and lighting. + +# 2. Related Works + +3D reconstruction. To reconstruct 3D geometry from image sets, traditional methods [14, 28, 40] find correspondences between two or more images utilizing specific image features. Such methods are sensitive to illumination changes, non-Lambertian reflectance and textureless surfaces. The existence of multiple points with similar matching costs also require these methods to have a large number of images to get high-quality reconstructions (we refer the interested readers to [14] for more details). In contrast, our method reconstructs high-quality geometry for complex real scenes from an order of magnitude fewer images. + +Recently, numerous learning-based methods have been proposed to reconstruct 3D shape using various geometric representations, including regular volumes [21, 36, 47], point clouds [1, 42] and depth maps [18, 53]. These methods cannot produce high-resolution 3D meshes. We extend recent learning-based MVS frameworks [50, 53] to estimate depth from sparse multi-view images of objects with complex reflectance. We combine this depth with estimated surface normals to reconstruct 3D meshes with fine details. + +SVBRDF acquisition. SVBRDF acquisition is a challenging task that often requires a dense input image set [12, 34, 49]. Many methods utilize sophisticated hardware [33] or light patterns [17, 22, 41]. Reconstruction from sparse images has been demonstrated for planar objects [3, 31, 51], and known geometry [56]. In contrast, we reconstruct the geometry and complex reflectance of arbitrary objects from a sparse set of six input images. + +Photometric stereo methods have been proposed to reconstruct arbitrary shape and SVBRDFs [4, 16]; however, they focus on single-view reconstruction and require hundreds + +of images. Recent works [19, 34] utilize images captured by a collocated camera-light setup for shape and SVBRDF estimation. In particular, Nam et al. [34] capture more than sixty images and use multi-view reconstruction and physics-based optimization to recover geometry and reflectance. In contrast, by designing novel deep networks, we are able to reconstruct objects from only six images. + +Learning-based methods have been applied for normal and SVBRDF acquisition. Deep photometric stereo methods reconstruct surface normals from tens to hundreds of images [6, 7] but they do not address reflectance or 3D geometry estimation. Most deep SVBRDF acquisition methods are designed for planar samples [2, 10, 11, 15, 30, 31]. Some recent multi-image SVBRDF estimation approaches pool latent features from multiple views [11] and use latent feature optimization [15] but they only handle planar objects. Li et al. [32] predict depth and SVBRDF from a single image; however, a single input does not provide enough information to accurately reconstruct geometry and reflectance. By capturing just six images, our approach generates significantly higher quality results. + +# 3. Algorithm + +Our goal is to accurately reconstruct the geometry and SVBRDF of an object with a simple acquisition setup. Recent work has utilized collocated point illumination for reflectance estimation from a sparse set of images [2, 3, 10, 31]; such lighting minimizes shadows and induces high-frequency effects like specularities, making reflectance estimation easier. Similarly, Xu et al. [50] demonstrate novel view synthesis from sparse multi-view images of a scene captured under a single point light. + +Motivated by this, we utilize a similar capture system as Xu et al.—six cameras placed at one vertex of a regular icosahedron and the centers of the five faces adjoining that vertex. Unlike their use of a single point light for all images, we capture each image under a point light (nearly) collocated with the corresponding camera (see Fig. 2 left). The setup is calibrated giving us a set of $n = 6$ input images, $\{I_i\}_{i=1}^n$ with the corresponding camera calibration. This wide baseline setup—with an angle of $37^\circ$ between the center and boundary views—makes it possible to image the entire object with a small set of cameras. In the following, we describe how we reconstruct an object from these sparse input images. + +# 3.1. Multi-View Depth Prediction + +Traditional MVS methods depend on hand-crafted features such as Harris descriptors to find correspondence between views. Such features are not robust to illumination changes or non-Lambertian surfaces, making them unusable for our purposes. In addition, due to the sparse inputs and large baselines, parts of the object may be visible in as few + +as two views. These factors cause traditional MVS methods to fail at finding accurate correspondences, and thus fail to reconstruct high-quality geometry. + +Instead, we make use of a learning-based method to estimate the depth. Given the input images $\{I_i\}_{i=1}^n$ , we estimate the depth map $D_i$ for view $i$ . Similar to recent works on learning-based MVS [20, 50, 53], our network consists of two components: a feature extractor $\mathcal{F}$ and a correspondence predictor $\mathcal{C}$ . The feature extractor is a 2D U-Net [38] that extracts a 16-channel feature map for each image $I_i$ . To estimate the depth map at $I_i$ , we warp the feature maps of all views to view $i$ using a set of 128 pre-defined depth levels, and build a 3D plane sweep volume [9] by calculating the variance of feature maps over views. The 3D volume is further fed to the correspondence predictor $\mathcal{C}$ that is a 3D U-Net to predict the probability of each depth level. We calculate the depth as a probability-weighted sum of all depth levels. The training loss is defined as the $L_1$ loss between predicted depths and ground truth depths. By learning the feature representations and correspondence, the proposed framework is more robust to illumination changes and specularities, thus producing more accurate pixel-wise depth predictions than traditional methods. + +While such networks are able to produce reasonable depth, the recovered depth has errors in textureless regions. To further improve the accuracy, we add a guided filter module [46] to the network, which includes a guided map extractor $\mathcal{G}$ as well as a guided layer $g$ . Let the initial depth prediction at view $i$ be $D_{i}^{\prime}$ . The guided map extractor $\mathcal{G}$ takes image $I_{i}$ as input and learns a guidance map $\mathcal{G}(I_i)$ . The final depth map is estimated as: + +$$ +D _ {i} = g \left(\mathcal {G} \left(I _ {i}\right), D _ {i} ^ {\prime}\right). \tag {1} +$$ + +The training loss is defined as the $L_{1}$ distance between predicted depths and ground truth depths. All components are trained jointly in an end-to-end manner. + +# 3.2. Multi-View Reflectance Prediction + +Estimating surface reflectance from sparse images is a highly under-constrained problem. Previous methods either assume geometry is known [2, 3, 31, 10] or can be reconstructed with specific devices [17] or MVS [34]. In our case, accurate geometry cannot be reconstructed from sparse inputs with traditional MVS methods. While our learning-based MVS method produces reasonable depth maps, they too have errors, making it challenging to use them to align the images and estimate per-vertex SVBRDF. Instead, for each input image $I_{i}$ , we first estimate its corresponding normals, $I_{i}$ , and SVBRDF, represented by diffuse albedo $A_{i}$ , specular roughness $R_{i}$ and specular albedo $S_{i}$ . + +To estimate the SVBRDF at view $i$ , we warp all input images to this view using predicted depths $D_{i}$ . One approach for multi-view SVBRDF estimation could be to feed + +this stack of warped images to a convolutional neural network like the commonly used U-Net [31, 38]. However, the inaccuracies in the depth maps lead to misalignments in the warped images, especially in occluded regions, and this architecture is not robust to these issues. + +We propose a novel architecture that is robust to depth inaccuracies and occlusions. As shown in Fig. 3, our network comprises a Siamese encoder [8], $\mathcal{E}$ , and a decoder, $\mathcal{D}$ , with four branches for the four SVBRDF components. To estimate the SVBRDF at a reference view $i$ , the encoder processes $n$ pairs of inputs, each pair including image $I_{i}$ as well as the warped image $I_{i\leftarrow j}$ , where we warp image $I_{j}$ at view $j$ to the reference view $i$ using the predicted depth $D_{i}$ . To handle potential occlusions, directly locating occluded regions in the warped images using predicted depths and masking them out is often not feasible due to inaccurate depths. Instead we keep the occluded regions in the warped images and include the depth information in the inputs, allowing the network to learn which parts are occluded. + +To include the depth information, we draw inspiration from the commonly used shadow mapping technique [44]. The depth input consists of two components: for each pixel in view $i$ , we calculate its depths $Z_{i \leftarrow j}$ in view $j$ ; we also sample its depth $Z_{i \leftarrow j}^{*}$ from the depth map $D_{j}$ by finding its projections on view $j$ . Intuitively if $Z_{i \leftarrow j}$ is larger than $Z_{i \leftarrow j}^{*}$ , then the pixel is occluded in view $j$ ; otherwise it is not occluded. In addition, for each pixel in the reference view $i$ , we also include the lighting directions $L_{i}$ of the light at view $i$ , as well as the lighting direction of the light at view $j$ , denoted as $L_{i \leftarrow j}$ . We assume a point light model here. Since the light is collocated with the camera, by including the lighting direction we are also including the viewing direction of each pixel in the inputs. All directions are in the coordinate system of the reference view. Such cues are critical for networks to infer surface normals using photometric information. Therefore, the input for a pair of views $i$ and $j$ is: + +$$ +H _ {i, j} = \left\{I _ {i}, I _ {i \leftarrow j}, Z _ {i \leftarrow j}, Z _ {i \leftarrow j} ^ {*}, L _ {i}, L _ {i \leftarrow j} \right\}. \tag {2} +$$ + +The input contains 14 channels in total, and there are a total of $n$ such inputs. We feed all the inputs to the encoder network $\mathcal{E}$ and get the intermediate features $f_{i,j}$ . All these intermediate features are aggregated with a max-pooling layer yielding a common feature representation for view $i$ , $f_{i}^{*}$ : + +$$ +f _ {i, j} = \mathcal {E} \left(H _ {i, j}\right) \tag {3} +$$ + +$$ +f _ {i} ^ {*} = \max - \operatorname {p o o l} \left(\left\{f _ {i, j} \right\} _ {j = 1} ^ {n}\right) \tag {4} +$$ + +$f_{i}^{*}$ is fed to the decoder to predict each SVBRDF component for view $i$ : + +$$ +A _ {i}, N _ {i}, R _ {i}, S _ {i} = \mathcal {D} \left(f _ {i} ^ {*}\right) \tag {5} +$$ + +![](images/3b816aee1deb905083e426a4c9c10d35269162a0daa35c1f801e2553d087ae21.jpg) +Figure 3: Our multi-view SVBRDF estimation network. An encoder extracts features from reference and warped image pairs. These features are max-pooled to get a single reference-view feature map, which is decoded to predict that view's SVBRDF. Note the errors in the warped images; max-pooling mitigates their effect on the output SVBRDF. + +Compared to directly stacking all warped images together, our proposed network architecture works on pairs of input images and aggregates features across views using a max-pooling layer. The use of max-pooling makes the network more robust to occlusions and misalignments caused by depth inaccuracies and produces more accurate results (see Tab. 1). It also makes the network invariant to the number and order of the input views, a fact that could be utilized for unstructured capture setups. The training loss $\mathcal{L}$ of the network is defined as: + +$$ +\mathcal {L} = \mathcal {L} _ {A} + \mathcal {L} _ {N} + \mathcal {L} _ {R} + \mathcal {L} _ {S} + \mathcal {L} _ {I} \tag {6} +$$ + +where the first four terms are the $L_{2}$ losses for each SVBRDF component, and $\mathcal{L}_I$ is the $L_{2}$ loss between input images and rendered images generated with our predictions. + +# 3.3. Geometry Reconstruction + +The previous multi-view depth and SVBRDF estimation networks give us per-view depth and normal maps at full-pixel resolution. We fuse these per-view estimates to reconstruct a single 3D geometry for the object. We first build a point cloud from the depth maps, by generating 3D points from each pixel in every per-view depth map. For each point, we also get its corresponding normal from the estimated normal maps. Given this set of 3D points with surface normals, we perform a Poisson reconstruction [26] to reconstruct the fused 3D geometry. The initial point clouds may contain outliers due to inaccuracies in the depth maps. To get rid of undesired structures in the output geometry, we generate a coarse initial geometry by setting the depth of the spatial octree in Poisson reconstruction to 7—corresponding to an effective voxel resolution of $128^{3}$ . We refine this initial geometry in the subsequent stage. Compared to learning-based 3D reconstruction methods that directly generate geometry (voxel grids [23, 37], implicit functions [35, 39] or triangle meshes [43]) from images, this approach generalizes to arbitrary shapes and produces more detailed reconstructions. + +# 3.4. SVBRDF and Geometry Refinement + +Given the initial coarse geometry as well as the per-view SVBRDF predictions, we aim to construct a detailed 3D mesh with per-vertex BRDFs. For each vertex, a trivial way to get its BRDF is to blend the predicted SVBRDFs across views using pre-defined weights such as the dot product of the viewing directions and surface normals. However, this leads to blurry results (Fig. 5), due to the inconsistencies in the estimated SVBRDFs and the geometry. Also note that our SVBRDF predictions are computed from a single feedforward network pass, and are not guaranteed to reproduce the captured input images exactly because the network has been trained to minimize the reconstruction loss on the entire training set and not this specific input sample. + +We address these two issues with a novel rendering-based optimization that estimates per-vertex BRDFs that minimize the error between rendering the predicted parameters and the captured images. Because of the sparse observations, independently optimizing per-vertex BRDFs leads to artifacts such as outliers and spatial discontinuities, as shown in Fig. 5. Classic inverse rendering methods address this using hand-crafted priors. Instead, we optimize the per-view feature maps $f_{i}^{*}$ that are initially predicted from our SVBRDF encoder (Eqn. 4). These latent features, by virtue of the training process, capture the manifold of object reflectances, and generate spatially coherent per-view SVBRDFs when passed through the decoder, $\mathcal{D}$ (Eqn. 5). Optimizing in this feature space allows us to adapt the reconstruction to the input images, while leveraging the priors learnt by our multiview SVBRDF estimation network. + +Per-vertex BRDF and color. For each vertex $v_{k}$ , we represent its BRDF $b_{k}$ as a weighted average of the BRDF predictions from multiple views: + +$$ +b _ {k} = \sum_ {i = 1} ^ {n} w _ {k, i} \mathcal {D} \left(p _ {k, i}; f _ {i} ^ {*}\right), \tag {7} +$$ + +where $p_{k,i}$ is the corresponding pixel position of $v_{k}$ at view $i$ , $\mathcal{D}(p_{k,i};f_i^*)$ represents the SVBRDF prediction at $p_{k,i}$ from view $i$ by processing $f_{i}^{*}$ via the decoder network $\mathcal{D}$ , and $w_{k,i}$ are the per-vertex view blending weights. The rendered color of $v_{k}$ at view $i$ is calculated as: + +$$ +I _ {i} ^ {*} \left(p _ {k, i}\right) = \Theta \left(b _ {k}, L _ {i} \left(p _ {k, i}\right)\right), \tag {8} +$$ + +where $L_{i}(p_{k,i})$ is the lighting direction and also the viewing direction of vertex $v_{k}$ at view $i$ , and $\Theta$ is the rendering equation. We assume a point light source collocated with the camera (which allows us to ignore shadows), and only consider direct illumination in the rendering equation. + +Per-view warping. Vertex $v_{k}$ can be projected onto view $i$ using the camera calibration; we refer to this projection + +as $u_{k,i}$ . However, the pixel projections onto multiple views might be inconsistent due to inaccuracies in the reconstructed geometry. Inspired by Zhou et al. [55], we apply a non-rigid warping to each view to better align the projections. In particular, for each input view, we use a $T \times T$ grid with $C = T^2$ control points ( $T = 11$ in our experiments) to construct a smooth warping field over the image plane. Let $t_{i,c}$ be the translation vectors of control points at view $i$ . The resulting pixel projection, $p_{k,i}$ , is given by: + +$$ +p _ {k, i} = u _ {k, i} + \sum_ {c = 1} ^ {C} \theta_ {c} \left(u _ {k, i}\right) t _ {i, c}, \tag {9} +$$ + +where $\theta_c$ returns the bilinear weight for a control point $t_{i,c}$ at pixel location $u_{k,i}$ . + +SVBRDF optimization. We optimize per-view latent features $f_{i}^{*}$ , per-vertex blending weights $w_{k,i}$ and per-view warping fields $t_{i,c}$ to reconstruct the final SVBRDFs. The photometric consistency loss between the rendered colors and ground truth colors for all $K$ vertices is given by: + +$$ +E _ {\mathrm {p h o t o}} \left(f _ {i} ^ {*}, w, t\right) = \frac {1}{n \cdot K} \sum_ {k = 1} ^ {K} \sum_ {i = 1} ^ {n} \left| \left| I _ {i} ^ {*} \left(p _ {k, i}\right) - I _ {i} \left(p _ {k, i}\right) \right| \right| _ {2} ^ {2}. +$$ + +We clamp the rendered colors to the range of $[0,1]$ before calculating the loss. To prevent the non-rigid warping from drifting, we also add an $L_{2}$ regularizer to penalize the norm of the translation vectors: + +$$ +E _ {\text {w a r p}} (t) = \frac {1}{n \cdot C} \sum_ {i = 1} ^ {n} \sum_ {c = 1} ^ {C} | | t _ {i, c} | | _ {2} ^ {2}. \tag {10} +$$ + +Therefore the final energy function for the optimization is: + +$$ +E = E _ {\text {p h o t o}} \left(f ^ {*}, w, t\right) + \lambda E _ {\text {w a r p}} (t). \tag {11} +$$ + +We set $\lambda$ to 100, and optimize the energy function with Adam optimizer [27] with a learning rate of 0.001. + +Geometry optimization. We use the optimized per-vertex normal, $n_k$ , to update the geometry of the object by resolving the Poisson equation (Sec. 3.3). Unlike the initial geometry reconstruction, we set the depth of the spatial octree to 9—corresponding to a voxel resolution of $512^3$ —to better capture fine-grained details of the object. We use this updated geometry in subsequent SVBRDF optimization iterations. We update the geometry once for every 50 iterations of SVBRDF optimization, and we perform $400 - 1000$ iterations for the SVBRDF optimization. + +Per-vertex refinement. The bottleneck in our multiview SVBRDF network—that we use as our reflectance representation—may cause a loss of high-frequency details in the predicted SVBRDFs. We retrieve these details back + +by directly optimizing the BRDF parameters $b_{k}$ of each vertex to minimizing the photometric loss in Eqn. (10). Note that after the previous optimization, the estimated BRDFs have already converged to good results and the rendered images are very close to the input images. Therefore, in this stage, we use a small learning rate (0.0005), and perform the optimization for a small number (40 - 100) of iterations. + +# 4. Implementation and Results + +Training data. We follow Xu et al. [50] and procedurally generate complex scenes by combining 1 to 5 primitive shapes such as cylinders and cubes displaced by random height maps. We generate 20,000 training and 400 testing scenes. We divide the high-quality materials from the Adobe Stock dataset into a training and testing set, and use them to texture the generated scenes separately. For each scene, following the setup discussed in Sec. 1, we render the 6 input view images with a resolution of $512 \times 512$ using a custom Optix-based global illumination renderer with 1000 samples per pixel. We also render the ground truth depth, normals, and SVBRDF components for each view. + +Network architecture. For depth estimation, we use a 2D U-Net architecture [38] for the feature extractor, $\mathcal{F}$ , and guidance map extractor, $\mathcal{G}$ . Both networks have 2 downsampling/upsampling blocks. The correspondence predictor $\mathcal{C}$ is a 3D U-Net with 4 downsampling/upsampling blocks. For multi-view SVBRDF estimation, both the encoder $\mathcal{E}$ and decoder $\mathcal{D}$ are 2D CNNs, with 3 downsampling layers in $\mathcal{E}$ and 3 upsampling layers in $\mathcal{D}$ . Note that we do not use skip connections in the SVBRDF network; this forces the latent feature to learn a meaningful reflectance space and allows us to optimize it in our refinement step. We use group normalization [48] in all networks. We use a differentiable rendering layer that computes local shading under point lighting without considering visibility or global illumination. This is a reasonable approximation in our collocated lighting setup. For more details, please refer to the supplementary document. + +Training details. All the networks are trained with the Adam optimizer [27] for 50 epochs with a learning rate of 0.0002. The depth estimation networks are trained on cropped patches of $64 \times 64$ with a batch size of 12, and the SVBRDF estimation networks are trained on cropped $320 \times 320$ patches with a batch size of 8. Training took around four days on 4 NVIDIA Titan 2080Ti GPUs. + +Run-time. Our implementation has not been optimized for the best timing efficiency. In practice, our method takes around 15 minutes for full reconstruction from images with a resolution of $512 \times 512$ , where most of the time is for geometry fusion and optimization. + +
DiffuseNormalRoughnessSpecular
Naive U-Net0.00600.03360.03590.0125
Ours0.00610.03040.02750.0086
Li et al. [32]0.02270.10750.0661—
Ours (256 × 256)0.00470.02260.02570.0083
+ +Table 1: Quantitative SVBRDF evaluation on a synthetic test set. We report the $L_{2}$ error. Since Li et al. [32] work on $256 \times 256$ images, we downsample and evaluate at that resolution. Also, they do not predict the specular albedo. + +# 4.1. Evaluation on Synthetic Data + +We evaluate our max-pooling-based multi-view SVBRDF estimation network on our synthetic test set. In particular, we compare it with a baseline U-Net (with 5 down-sampling/upsampling blocks) that takes a stack of all the coarsely aligned images $(H_{i,j} \forall j$ in Eqn. 2) as input for its encoder, and skip connections from the encoder to the four SVBRDF decoders. This architecture has been widely used for SVBRDF estimation [10, 31, 32]. As can be seen in Tab. 1, while our diffuse albedo prediction is slightly $(1.7\%)$ worse than the U-Net we significantly outperform it in specular albedo, roughness and normal predictions, with $31\%$ , $23\%$ and $9.5\%$ lower $L_{2}$ loss respectively. This is in spite of not using skip-connections in our network (to allow for optimization later in our pipeline). We also compare our results with the state-of-the-art single-image shape and SVBRDF estimation method of Li et al. [32]. Unsurprisingly, we outperform them significantly, demonstrating the usefulness of aggregating multi-view information. + +# 4.2. Evaluation on Real Captured Data + +We evaluate our method on real data captured using a gantry with a FLIR camera and a nearly collocated light to mimic our capture setup. Please refer to the supplementary material for additional results. + +Evaluation of geometry reconstruction. Our framework combines our predicted depths and normals to reconstruct the initial mesh. Figure 4 shows the comparison between our reconstructed mesh and the mesh from COLMAP, a state-of-the-art multi-view stereo framework [40]. From such sparse inputs and low-texture surfaces, COLMAP is not able to find reliable correspondence across views, which results in a noisy, incomplete 3D mesh. In contrast, our initial mesh is already more complete and detailed, as a result of our more accurate depths and normals. Our joint optimization further refines the per-vertex normals and extracts fine-scale detail in the object geometry. + +Evaluation of SVBRDF optimization. We compare our SVBRDF and geometry optimization scheme (Sec. 3.4) with averaging the per-view predictions using weights based on + +![](images/8cf85a3cb3cda94278994232f0d348a943d777b5019ba21fc18fdec849725b8c.jpg) +COLMAP + +![](images/b964b14be1c58df2197479237133b58dd1ca12e1d04861aa0c2f2e621b9d9a66.jpg) +Our initial geometry + +![](images/f08e82e35a334886ea9835c69e81cfc5ef03fc779ddcacd4e7498649ac05362f.jpg) +Our optimized geometry +Figure 4: Comparison on geometry reconstruction. COLMAP fails to reconstruct a complete mesh from the sparse inputs. In contrast, our initial mesh is of much higher quality, and our joint optimization recovers even more fine-grained details on the mesh. Input image in Fig. 8 (top). + +![](images/ab9cadd147ede49ce2e20aa53be9e9e2bc0a0b663e269c9679b22c640c0a4c1a.jpg) + +![](images/5f11fcda914680fc5565ed64248af5ae70332bb356904fc71a8a780286a613c5.jpg) + +![](images/b917f33f3f7bcc0cae2905aab402161e2e457dfcd9a4f1ad4de3030c5711d0e8.jpg) +No optimization Direct optimization Our optimization Ground truth + +![](images/39ff19b5de52e428519769663cc52bf71590a42b8eec5a48b50134e92a380acb.jpg) + +![](images/9058962e98affac843d8647bdf479260f680c8b13c663f69969d3d616a0c5778.jpg) + +![](images/787a9f126a3fa021f98dc9157a34749d2ea85bc237e4dbb02aecfc3420edc425.jpg) + +![](images/4205acbd24013cdb9adb136e726efeeba0e3cc40524e99c4a5c9439c6dd228a3.jpg) + +![](images/26ff5a1156423437c24d01b9e4c82edffad4cea52686741d8680efeaa45bcaa5.jpg) + +![](images/fdf3284ffe480aeb137978edf531b18d19699f4ea7de3b01fc30a9e085214716.jpg) + +![](images/ad3669bb918dbc90975efeb7e85846747e7f9e908c32e1b11815367517d6451e.jpg) + +![](images/d841060453883182e6e099b320993d9987bc45b4872fbc393fdc00dd9a4e42c6.jpg) + +![](images/6550985584457ad797bc979b490ee52cf0c8cbf7a12fc4c8d7c7f5098e90deb6.jpg) + +![](images/2c75f44ecca80129f7eb67b44e8af6779f262b21a2e123cedb16a651feea80c0.jpg) +Figure 5: Comparison on SVBRDF optimization. Simple averaging without optimization produces blurry results, and direct per-vertex optimization results in outliers and discontinuities. In comparison, our optimization generates more visually plausible results. +Our initial geometry +Figure 6: Comparison with Nam et al. [34]. While both have the same initialization, our learning-based refinement produces more accurate, detailed geometry. Input in Fig. 8. + +![](images/210bed721fbfc2e53a1b0fb66d60f659223a5f2ecbd44ce43111c8cb0f8615e3.jpg) +[ + +![](images/6f42f01d84cdd628c52b35da1fce33266741e59aaf68199c3f05130e9b3a5c04.jpg) + +![](images/9d599adc9d38aadfb3dce449ffee4856d42dc6b3f0ec9b9a8233e8734761d02e.jpg) + +the angle between the viewpoint and surface normal, as well as this averaging followed by per-vertex optimization. From Fig. 5 we can see that the weighted averaging produces blurry results. Optimizing the per-vertex BRDFs brings back detail but also has spurious discontinuities in appearance because of the lack of any regularization. In contrast, our latent-space optimization method recovers detailed appearance without these artifacts. + +Comparisons against Nam et al. [34] We also compare our work with the state-of-the-art geometry and reflectance reconstruction method of Nam et al. Their work captures $60+$ images of an object with a handheld camera under collocated lighting; they first use COLMAP [40] to reconstruct the coarse shape and use it to bootstrap a physics-based optimization process to recover per-vertex normals and BRDFs. COLMAP cannot generate complete meshes from our sparse inputs (see Fig. 4). Therefore, we provided our input images, camera calibration, and initial geometry to the authors who processed this data. As can be seen in Fig. 6, our final reconstructed geometry has significantly more details than their final optimized result in spite of starting from the same initialization. Since they use a different BRDF representation than ours, making direct SVBRDF comparisons difficult, in Fig. 7 we compare renderings of the reconstructed object under novel lighting and viewpoint. These results show that they cannot handle our sparse input and produce noise, erroneous reflectance (CAT scene) or are unable to recover the specular highlights of highly specular objects (CACTUS) scene. In comparison, our results have significantly higher visual fidelity. Please refer to the supplementary video for more renderings. + +More results on real data. Figure 8 shows results from our method on additional real scenes. We can see here that our method can reconstruct detailed geometry and appearance for objects with a wide variety of complex shapes and reflectance. Comparing renderings of our estimates under novel camera and collocated lighting against ground truth captured photographs demonstrates the accuracy of our reconstructions. We can also photorealistically render these objects under novel environment illumination. Please refer to the supplementary document and video for more results. + +Limitations. Our method might fail to handle highly nonconvex objects, where some parts are visible in as few as a single view and there are no correspondence cues to infer correct depth. In addition, we do not consider global illumination in SVBRDF optimization. While it is a reasonable approximation in most cases, it might fail in some particular scenes with strong inter-reflections. For future work, it would be interesting to combine our method with physics-based differentiable rendering [29, 54] to handle these complex light transport effects. + +# 5. Conclusion + +We have proposed a learning-based framework to reconstruct the geometry and appearance of an arbitrary object from a sparse set of just six images. We predict per-view depth using learning-based MVS, and design a novel multi-view reflectance estimation network that robustly aggregates information from our sparse views for accurate normal and SVBRDF estimation. We further propose a novel joint + +![](images/301fd95820158ac4bb2b421714d4c0dcafaafb8b6945702622ed0e609f6cb3f1.jpg) + +![](images/4d4217357fcb3106cb737763586b30fbd8ca3e24be691725f273bc64a8399c34.jpg) +Captured object + +![](images/a35cbd870d452731a1b61e20c07fc1b02c408aa44eb6e10abe0fe750ef0cf3b1.jpg) + +![](images/c7a5872e9018fb4e69b87e5b1ffd37588e8029db4c38834dbc067e2a41c8da34.jpg) +Ours + +![](images/d7adc781620a8b4fe5147b5b61d357580540a726d81f67747b9b10b3d7b79316.jpg) + +![](images/564d13e0ba674646058bcfae353ea4e280499dd28badec2d7ae975d8e8aa6919.jpg) +[Nam et al. 2018] +with our geometry +Ours + +![](images/5fd97a8debad4f1cf357a8f58d231240db6b8a054eab9163610b3e935acf25a3.jpg) +Figure 7: Comparison with Nam et al. [34]. We render two reconstructed objects under novel viewpoints and lighting. Nam et al. are not able to accurately reconstruct appearance from sparse views, and produce noisy edges and incorrect specular highlights (top) or miss the specular component completely (bottom). In contrast, our method produces photorealistic results. + +![](images/6e7eb159cc72cdba17825c0e6489b3b131b48e7faf4cd61acaea5f22ba95ba66.jpg) + +![](images/7597992bca2189a600930a9b2ef7498eedf01756bdbf63553fbdac39375f269c.jpg) + +![](images/71bea2be0fb916a9e7cbe11f851f8f6e2abc2970316f33b41601f074f83150ba.jpg) +Novel view ground truth +Figure 8: Results on real scenes. For each scene, we show our reconstructed geometry, normal map and SVBRDF components (please refer to supplementary materials for specular albedo). We compare our point-light rendering results (second column) under novel viewpoints and lighting with captured ground truth photographs (first column). We also show a rendering of the object with our reconstructed appearance under environment lighting (last column). + +![](images/f8a115560153eaf8f266e98e330c17dc61014502d9f72b22fa38d4c8f985eab8.jpg) + +![](images/a7498d16c54ba9c3636dfbef6db1d9714b36edcac0fb898a3b0339c89a364e9c.jpg) + +![](images/4ca53f916644df2826fe8373c6bb106220586e6e553243c674a8868864356396.jpg) + +![](images/86d30d4da8d6c63a0232aeef1a144357500b5ad876cb1d90c417fa23cfa781d7.jpg) +Point-light rendering +Diffuse albedo + +![](images/8fddf2df71d6091e7c262c5d30000388248e1717f20c92ad74dcecab217b2554.jpg) + +![](images/34546b889c52ce488476b06393e68c6fedf9662316de7f3fea336805cbe504db.jpg) + +![](images/6c07006272a5133612230359b6c8d89c328f967072a29863727e384f5b9d9813.jpg) + +![](images/4bc1d8edff10289ca529e6c1b2d36bd98844096cae1d483b8c8f2ba72fefd1db.jpg) +Normal + +![](images/97c1cecf3c58cb93daa26afc9b92aa34b2db977a1b44f87edef3dac3cc3f5971.jpg) + +![](images/807440f28a6d7c9375d069ec0e1a8e29dc912b61c2343e938e3b7c143768be78.jpg) + +![](images/2da0117472f0b74dda9a8bfd33869429beb4d394960c550ed6b70b10bcc3896b.jpg) + +![](images/f75c437652d14983998391fcd18bfbbe17eafe6eb268efc072fb10bedc69a8f3.jpg) +Geometry + +![](images/9742e7a002e3ecb0bdca9601ed288ab5d40aefc819f32a91a2b89acc6f5c93d2.jpg) + +![](images/57f05c9e06beb95b3e254d9fed1f8e3ba20d3cef31229cc096518e6ad51c1167.jpg) + +![](images/088efb0d2bda3eb6881e7bfd15bc87946f341474558ac4862ed0227d13a599d2.jpg) + +![](images/837082c8d4541e384e914a56cc8302ffa15d9a3764993a909b032ad36e2baf73.jpg) +Env-map rendering + +optimization in latent feature space to fuse and refine our multi-view predictions. Unlike previous methods that require densely sampled images, our method produces high-quality reconstructions from a sparse set of images, and presents a step towards practical appearance capture for 3D scanning + +and VR/AR applications. + +Acknowledgements This work was supported in part by NSF grant 1617234, ONR grants N000141712687, N000141912293, Adobe and the UC San Diego Center for Visual Computing. + +# References + +[1] Panos Achlioptas, Olga Diamanti, Ioannis Mitliagkas, and Leonidas Guibas. Learning representations and generative models for 3d point clouds. In ICML, pages 40-49, 2018. 2 +[2] Miika Aittala, Timo Aila, and Jaakko Lehtinen. Reflectance modeling by neural texture synthesis. ACM Trans. Graph., 35(4):65:1-65:13, July 2016. 3 +[3] Miika Aittala, Tim Weyrich, and Jaakko Lehtinen. Two-shot svbrdf capture for stationary materials. ACM Transactions on Graphics, 34(4):110:1-110:13, July 2015. 2, 3 +[4] Neil Alldrin, Todd Zickler, and David Kriegman. Photometric stereo with non-parametric and spatially-varying reflectance. In CVPR, pages 1-8. IEEE, 2008. 2 +[5] Seung-Hwan Baek, Daniel S Jeon, Xin Tong, and Min H Kim. Simultaneous acquisition of polarimetric SVBRDF and normals. ACM Transactions on Graphics, 37(6):268-1, 2018. 1 +[6] Guanying Chen, Kai Han, Boxin Shi, Yasuyuki Matsushita, and Kwan-Yee K Wong. Self-calibrating deep photometric stereo networks. In ECCV, 2018. 3 +[7] Guanying Chen, Kai Han, and Kwan-Yee K Wong. Ps-fcn: A flexible learning framework for photometric stereo. In ECCV, 2018. 3 +[8] Sumit Chopra, Raia Hadsell, Yann LeCun, et al. Learning a similarity metric discriminatively, with application to face verification. In CVPR, pages 539-546, 2005. 4 +[9] Robert T Collins. A space-sweep approach to true multi-image matching. In CVPR, pages 358-363. IEEE, 1996. 3 +[10] Valentin Deschaintre, Miika Aittala, Fredo Durand, George Drettakis, and Adrien Bousseau. Single-image SVBRDF capture with a rendering-aware deep network. ACM Transactions on Graphics, 37(4):128, 2018. 1, 3, 6 +[11] Valentin Deschaintre, Miika Aittala, Frédo Durand, George Drettakis, and Adrien Bousseau. Flexible svbrdf capture with a multi-image deep network. Computer Graphics Forum (Proceedings of the Eurographics Symposium on Rendering), 38(4), July 2019. 3 +[12] Yue Dong, Guojun Chen, Pieter Peers, Jiawan Zhang, and Xin Tong. Appearance-from-motion: Recovering spatially varying surface reflectance under unknown lighting. ACM Transactions on Graphics, 33(6):193, 2014. 2 +[13] 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. 1 +[14] Yasutaka Furukawa and Jean Ponce. Accurate, dense, and robust multiview stereopsis. IEEE transactions on pattern analysis and machine intelligence, 32(8):1362-1376, 2009. 2 +[15] Duan Gao, Xiao Li, Yue Dong, Pieter Peers, Kun Xu, and Xin Tong. Deep inverse rendering for high-resolution SVBRDF estimation from an arbitrary number of images. ACM Transactions on Graphics, 38(4):134, 2019. 1, 3 +[16] Dan B Goldman, Brian Curless, Aaron Hertzmann, and Steven M Seitz. Shape and spatially-varying brdfs from photometric stereo. IEEE Transactions on Pattern Analysis and Machine Intelligence, 32(6):1060-1071, 2009. 2 +[17] Michael Holroyd, Jason Lawrence, and Todd Zickler. A coaxial optical scanner for synchronous acquisition of 3D + +geometry and surface reflectance. ACM Transactions on Graphics, 29(4):99, 2010. 1, 2, 3 +[18] Po-Han Huang, Kevin Matzen, Johannes Kopf, Narendra Ahuja, and Jia-Bin Huang. DeepMVS: Learning multi-view stereopsis. In CVPR, pages 2821-2830, 2018. 2 +[19] Zhuo Hui, Kalyan Sunkavalli, Joon-Young Lee, Sunil Hadap, Jian Wang, and Aswin C Sankaranarayanan. Reflectance capture using univariate sampling of brdfs. In ICCV, pages 5362-5370, 2017. 3 +[20] Sunghoon Im, Hae-Gon Jeon, Stephen Lin, and In So Kweon. DPSNet: end-to-end deep plane sweep stereo. ICLR, 2019. 3 +[21] Mengqi Ji, Juergen Gall, Haitian Zheng, Yebin Liu, and Lu Fang. SurfaceNet: An end-to-end 3D neural network for multiview stereopsis. In ICCV, pages 2307-2315, 2017. 2 +[22] Kaizhang Kang, Zimin Chen, Jiaping Wang, Kun Zhou, and Hongzhi Wu. Efficient reflectance capture using an autoencoder. ACM Transactions on Graphics, 37(4):127-1, 2018. 2 +[23] Abhishek Kar, Christian Hane, and Jitendra Malik. Learning a multi-view stereo machine. In NIPS, pages 365-376, 2017. 4 +[24] Brian Karis and Epic Games. Real shading in unreal engine 4.1 +[25] Michael Kazhdan, Matthew Bolitho, and Hugues Hoppe. Poisson surface reconstruction. In Proceedings of the fourth Eurographics symposium on Geometry processing, volume 7, 2006. 2 +[26] Michael Kazhdan and Hugues Hoppe. Screened poisson surface reconstruction. ACM Transactions on Graphics, 32(3):29, 2013. 4 +[27] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. *ICLR*, 2014. 5, 6 +[28] F. Langguth, K. Sunkavalli, S. Hadap, and M. Goesele. Shading-aware multi-view stereo. In Proceedings of the European Conference on Computer Vision (ECCV), 2016. 2 +[29] Tzu-Mao Li, Miika Aittala, Frédo Durand, and Jaakko Lehtinen. Differentiable monte carlo ray tracing through edge sampling. ACM Trans. Graph. (Proc. SIGGRAPH Asia), 37(6):222:1-222:11, 2018. 7 +[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):45:1-45:11, July 2017. 3 +[31] Zhengqin Li, Kalyan Sunkavalli, and Manmohan Chandraker. Materials for masses: SVBRDF acquisition with a single mobile phone image. In ECCV, pages 72-87, 2018. 1, 2, 3, 4, 6 +[32] Zhengqin Li, Zexiang Xu, Ravi Ramamoorthi, Kalyan Sunkavalli, and Manmohan Chandraker. Learning to reconstruct shape and spatially-varying reflectance from a single image. In SIGGRAPH Asia 2018, page 269. ACM, 2018. 1, 3, 6 +[33] Wojciech Matusik, Hanspeter Pfister, Matt Brand, and Leonard McMillan. A data-driven reflectance model. ACM Transactions on Graphics, 22(3):759-769, July 2003. 2 +[34] Giljoo Nam, Joo Ho Lee, Diego Gutierrez, and Min H Kim. Practical SVBRDF acquisition of 3D objects with unstruc + +tured flash photography. In SIGGRAPH Asia 2018, page 267. ACM, 2018. 1, 2, 3, 7, 8 +[35] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. DeepSDF: Learning continuous signed distance functions for shape representation. In CVPR, pages 165-174, 2019. 4 +[36] Stephan R Richter and Stefan Roth. Matryoshka networks: Predicting 3d geometry via nested shape layers. In CVPR, pages 1936-1944, 2018. 2 +[37] Gernot Riegler, Ali Osman Ulusoy, Horst Bischof, and Andreas Geiger. OctnetFusion: Learning depth fusion from data. In 2017 International Conference on 3D Vision, pages 57-66. IEEE, 2017. 4 +[38] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pages 234-241. Springer, 2015. 2, 3, 4, 6 +[39] Shunsuke Saito, Zeng Huang, Ryota Natsume, Shigeo Morishima, Angjoo Kanazawa, and Hao Li. PIFu: Pixel-aligned implicit function for high-resolution clothed human digitization. In ICCV, October 2019. 4 +[40] Johannes Lutz Schonberger, Enliang Zheng, Marc Pollefeys, and Jan-Michael Frahm. Pixelwise view selection for unstructured multi-view stereo. In ECCV, 2016. 1, 2, 6, 7 +[41] Borom Tunwattanapong, Graham Fyffe, Paul Graham, Jay Busch, Xueming Yu, Abhijeet Ghosh, and Paul Debevec. Acquiring reflectance and shape from continuous spherical harmonic illumination. ACM Transactions on graphics, 32(4):109, 2013. 1, 2 +[42] Jinglu Wang, Bo Sun, and Yan Lu. Mvpnet: Multi-view point regression networks for 3d object reconstruction from a single image. arXiv preprint arXiv:1811.09410, 2018. 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 ECCV, pages 52-67, 2018. 4 +[44] Lance Williams. Casting curved shadows on curved surfaces. In SIGGRAPH, volume 12, pages 270-274. ACM, 1978. 4 +[45] Hongzhi Wu, Zhaotian Wang, and Kun Zhou. Simultaneous localization and appearance estimation with a consumer rgb-d camera. IEEE Transactions on visualization and computer graphics, 22(8):2012-2023, 2015. 1 +[46] Huikai Wu, Shuai Zheng, Junge Zhang, and Kaiqi Huang. Fast end-to-end trainable guided filter. In CVPR, pages 1838-1847, 2018. 3 +[47] Jiajun Wu, Yifan Wang, Tianfan Xue, Xingyuan Sun, Bill Freeman, and Josh Tenenbaum. Marrnet: 3d shape reconstruction via 2.5 d sketches. In NIPS, pages 540-550, 2017. 2 +[48] Yuxin Wu and Kaiming He. Group normalization. In Proceedings of the European Conference on Computer Vision (ECCV), pages 3-19, 2018. 6 +[49] Rui Xia, Yue Dong, Pieter Peers, and Xin Tong. Recovering shape and spatially-varying surface reflectance under unknown illumination. ACM Transactions on Graphics, 35(6):187, 2016. 1, 2 + +[50] Zexiang Xu, Sai Bi, Kalyan Sunkavalli, Sunil Hadap, Hao Su, and Ravi Ramamoorthi. Deep view synthesis from sparse photometric images. ACM Transactions on Graphics, 38(4):76, 2019. 1, 2, 3, 6 +[51] Zexiang Xu, Jannik Boll Nielsen, Jiyang Yu, Henrik Wann Jensen, and Ravi Ramamoorthi. Minimal brdf sampling for two-shot near-field reflectance acquisition. ACM Transactions on Graphics, 35(6):188, 2016. 2 +[52] Zexiang Xu, Kalyan Sunkavalli, Sunil Hadap, and Ravi Ramamoorthi. Deep image-based relighting from optimal sparse samples. ACM Transactions on Graphics, 37(4):126, 2018. 2 +[53] Yao Yao, Zixin Luo, Shiwei Li, Tian Fang, and Long Quan. MVSNet: Depth inference for unstructured multi-view stereo. In ECCV, pages 767-783, 2018. 1, 2, 3 +[54] Cheng Zhang, Lifan Wu, Changxi Zheng, Ioannis Gkioulekas, Ravi Ramamoorthi, and Shuang Zhao. A differential theory of radiative transfer. ACM Trans. Graph., 38(6), 2019. 7 +[55] Qian-Yi Zhou and Vladlen Koltun. Color map optimization for 3D reconstruction with consumer depth cameras. ACM Transactions on Graphics, 33(4):155, 2014. 5 +[56] Zhiming Zhou, Guojun Chen, Yue Dong, David Wipf, Yong Yu, John Snyder, and Xin Tong. Sparse-as-possible SVBRDF acquisition. ACM Transactions on Graphics, 35(6):189, 2016. 1, 2 \ No newline at end of file diff --git a/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/images.zip b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..219d28a26688c6f561bdeaefb60b826ae585178d --- /dev/null +++ b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04810c487ae940d6e91ba2f01660ce5f242b02de868af2a573f827092382e005 +size 508895 diff --git a/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/layout.json b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..f0857329cb4528fd36c404200ff04311c1ffc956 --- /dev/null +++ b/deep3dcapturegeometryandreflectancefromsparsemultiviewimages/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b550b4dbb133148fc571974a4dc59a43a201637c47fd89430d5f888591e8f3da +size 506656 diff --git a/deep3dportraitfromasingleimage/2cd3b0b0-164c-4284-ae72-7e10fef4d7d9_content_list.json b/deep3dportraitfromasingleimage/2cd3b0b0-164c-4284-ae72-7e10fef4d7d9_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..07e8c53310dd5d05194b4b5ffd26a4bdc5968074 --- /dev/null +++ b/deep3dportraitfromasingleimage/2cd3b0b0-164c-4284-ae72-7e10fef4d7d9_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:130d2f3b758ead84945e5ab03b0458904c39bab1e5445fd23343bf993bc91e7f +size 88218 diff --git a/deep3dportraitfromasingleimage/2cd3b0b0-164c-4284-ae72-7e10fef4d7d9_model.json b/deep3dportraitfromasingleimage/2cd3b0b0-164c-4284-ae72-7e10fef4d7d9_model.json new file mode 100644 index 0000000000000000000000000000000000000000..aac80c5ad3bfb8c0a0d039639287853db95e8607 --- /dev/null +++ b/deep3dportraitfromasingleimage/2cd3b0b0-164c-4284-ae72-7e10fef4d7d9_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b399a6f990aa69577479614948d553856eafc1ec6f88a2c7a801f8316ef5de80 +size 110418 diff --git a/deep3dportraitfromasingleimage/2cd3b0b0-164c-4284-ae72-7e10fef4d7d9_origin.pdf b/deep3dportraitfromasingleimage/2cd3b0b0-164c-4284-ae72-7e10fef4d7d9_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bf4fb64920f141566ed048923ff98bd2532472da --- /dev/null +++ b/deep3dportraitfromasingleimage/2cd3b0b0-164c-4284-ae72-7e10fef4d7d9_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b0d8aa9ce47dc43328b72e86246bc45d79343c5aea9c0de35ebedc47c0bd882 +size 2831452 diff --git a/deep3dportraitfromasingleimage/full.md b/deep3dportraitfromasingleimage/full.md new file mode 100644 index 0000000000000000000000000000000000000000..24204d0d56239a7f36c0dfda3491ff1d5055d0be --- /dev/null +++ b/deep3dportraitfromasingleimage/full.md @@ -0,0 +1,436 @@ +# Deep 3D Portrait from a Single Image + +Sicheng Xu $^{1*}$ Jiaolong Yang $^{2}$ Dong Chen $^{2}$ Fang Wen $^{2}$ Yu Deng $^{3}$ Yunde Jia $^{1}$ Xin Tong $^{2}$ $^{1}$ Beijing Institute of Technology $^{2}$ Microsoft Research Asia $^{3}$ Tsinghua University + +# Abstract + +In this paper, we present a learning-based approach for recovering the 3D geometry of human head from a single portrait image. Our method is learned in an unsupervised manner without any ground-truth 3D data. We represent the head geometry with a parametric 3D face model together with a depth map for other head regions including hair and ear. A two-step geometry learning scheme is proposed to learn 3D head reconstruction from in-the-wild face images, where we first learn face shape on single images using self-reconstruction and then learn hair and ear geometry using pairs of images in a stereo-matching fashion. The second step is based on the output of the first to not only improve the accuracy but also ensure the consistency of overall head geometry. We evaluate the accuracy of our method both in 3D and with pose manipulation tasks on 2D images. We alter pose based on the recovered geometry and apply a refinement network trained with adversarial learning to ameliorate the reprojected images and translate them to the real image domain. Extensive evaluations and comparison with previous methods show that our new method can produce high-fidelity 3D head geometry and head pose manipulation results. + +# 1. Introduction + +Reconstructing 3D face geometry from 2D images has been a longstanding problem in computer vision. Obtaining full head geometry will enable more applications in games and virtual reality as it provides not only a new way of 3D content creation but also image-based 3D head rotation (i.e., pose manipulation). Recently, single-image 3D face reconstruction has seen remarkable progress with the enormous growth of deep convolutional neutral networks (CNN) [47, 50, 22, 20, 16]. However, most existing techniques are limited to the facial region reconstruction without addressing other head regions such as hair and ear. + +Face image synthesis has also achieved rapid progress with deep learning. However, few methods can deal with head pose manipulation from a single image, which necessi + +tates substantial image content regeneration in the head region and beyond. Promising results have been shown for face rotation [56, 3, 26] with generative adversarial nets (GAN), but generating the whole head region with new poses is still far from being solved. One reason could be implicitly learning the complex 3D geometry of a large variety of hair styles and interpret them onto 2D pixel grid is still prohibitively challenging for GANs. + +In this paper, we investigate explicit 3D geometry recovery of portrait images for head regions including face, hair and ear. We model a 3D head with two components: a face mesh by the 3D Morphable Model (3DMM) [4], and a depth map for other head parts including hair, ear and other regions not covered by the 3DMM face mesh. The 3DMM face representation facilitates easy shape manipulation given its parametric nature, and depth map provides a convenient yet powerful representation to model the complex hair geometry. + +Learning single-image 3D head geometry reconstruction is a challenging task. At least two challenges need to be addressed here. First, portrait images come with ground-truth 3D geometry are too scarce for CNN training, especially for hair which can be problematic for 3D scanning. To tackle this issue, we propose an unsupervised learning pipeline for head geometry estimation. For face part, we simply follow recent 3D face reconstruction methods [47, 20, 21, 59] to learn to regress 3DMM parameters on a corpus of images via minimizing the rendering-raw input discrepancy. But for hair and ear, we propose to exploit view change and train on pairs of portrait images extracted from videos via minimizing appearance reprojection error. The second challenge is how to ensure a consistent head structure since it consists of two independent components. We propose a two-step shape learning scheme where we use the recovered face geometry as conditional input of the depth network, and the designed loss function considers the layer consistency between face and hair geometry. We show that our two-step unsupervised shape learning scheme leads to compelling 3D head reconstruction results. + +Our method can be applied for portrait image head pose manipulation, the quality of which will be contingent upon the 3D reconstruction accuracy thus could be used to evalu + +ate our method. Specifically, we change the pose of the reconstructed head in 3D and reproject it onto 2D image plane to obtain pose manipulation results. The reprojected images require further processing. Notably, the pose changes give rise to missing regions that need to be hallucinated. To this end, we train a refinement network using both real unpaired data and synthetic paired data generated via image corruption, together with a discriminator network imposing adversarial learning. Our task here appears similar to image inpainting. However, we found the popular output formation scheme (raw image merged with network-generated missing region) in deep generative image inpainting [57, 37] leads to inferior results with obvious artifacts. We instead opt for regenerating the whole image. + +Our contributions can be summarized as follows: + +- We propose a novel unsupervised head geometry learning pipeline without using any ground-truth 3D data. The proposed two-step learning scheme yields consistent face-hair geometry and compelling 3D head reconstruction results. +- We propose a novel single-image head pose manipulation method which seamlessly combines learned 3D head geometry and deep image synthesis. Our method is fully CNN-based, without need for any optimization or postprocessing. +- We systematically compare against different head geometry estimation and portrait manipulation approaches in the literature using 2D/3D warping and GANs, and demonstrate the superior performance of our method. + +# 2. Related Work + +Face and hair 3D reconstruction. 3D face reconstruction has been a longstanding task. Recently, deep 3D face reconstruction [47, 50, 22, 20] has attracted considerable attention. Our method follows the unsupervised learning schemes [47, 20] that train a network without groundtruth 3D data. For hair modeling, traditional methods perform orientation-map based optimization and sometimes require manual inputs [10] or a 3D hair exemplar repository [9]. Liang et al. [32] and Hu et al. [25] leverage hairstyle database for automatic hair reconstruction. A deep 3D hair reconstruction method was proposed in [60], but the reconstructed hair strand model are not aligned with the input image thus cannot be used for our purpose. + +CNN-based portrait editing and synthesis. Face image editing and synthesis have attracted considerable attention in the vision and graphics community and have seen fast growth with the deep learning technique. Most existing CNN-based methods are devoted to editing appearance attributes such as skin color [12], facial expres + +sion [12, 42, 45, 41, 18], makeup [11, 31], age [58, 12, 52], and some other local appearance attributes [41, 14, 43]. Few methods worked on head pose manipulation. Perhaps the most relevant works among them are those synthesizing novel views (e.g., frontal) from an input face image [28, 3, 56]. However, the goals of these methods are not portrait editing and they do not handle hair and background. + +2D warping based facial animation. Some approaches have been proposed to animate a face image with 2D warping [2, 18, 53]. Averbuch-Elor et al. [2] proposed to animate an image by the transferring the 2D facial deformations in a driving video using anchor points. A refinement process is applied to add fine-scale details and hallucinate missing regions. A similar pipeline is proposed by Geng et al. [18], which uses a GAN to refine the warped images. Wiles et al. [53] proposes to generate 2D warping fields using neural networks. Lacking guidance from 3D geometry, there is no guarantee the face structure can be persevered by these 2D warping methods especially when head pose changes. + +3D-guided view synthesis and facial animation. 3D-guided face image frontalization and profiling have been used in different domains such as face recognition [46, 62, 23] and face alignment [61]. These methods often only focus on facial region or handle hair and background naively. The most sophisticated face rotation method is perhaps due to Zhu et al. [61], which considers the geometry of the surrounding regions of a face. However, their heuristically-determined region and depth do not suffice for realistic synthesis, and the rotated results oftentimes exhibit obvious inconsistency with the raw portraits. Moreover, the background is warped in [61] to avoid hole filling. Several works [36, 19] have been presented to synthesize facial expression leveraging 3D models, but they do not consider hair geometry and cannot manipulate head pose. + +Video and RGBD based face reenactment. Several works have been presented for face reenactment with video or RGBD inputs [48, 30, 49]. Thies et al. [48] transfer facial expression in a source actor video to a target actor video with the aid of 3D face reconstruction. Kim et al. [30] train a deep network on each given video to fit the portrait appearances therein, such that high-quality generation can be obtained. An RGBD reenactment system is presented by Thies et al. [49]. + +# 3. Overview and Preprocessing + +The frameworks of our methods are depicted in Fig. 1. After image preprocessing (to be described below), we run two-step 3D reconstruction with two CNNs to estimate 3D head pose and shape. For head pose manipulation, we first adjust the pose of the reconstructed shape in 3D and reproject it onto image plane, and then apply a refinement CNN to obtain the final result. + +![](images/a6056d216045d843d476523d67f45194cce491f6a025a93470dff7436aaaa58e.jpg) +(a) 3D Head Reconstruction + +![](images/a29c1ec87b9d73058fe9391ef661aa8c1a9f80925ed6a174cc0095a66c7a0484.jpg) +(b) Head Pose Manipulation +Figure 1: Overview of our single-image 3D head reconstruction and head pose manipulation methods. + +Preprocessing. Given a portrait image, we perform rough alignment to centralize and rescale the detected face region (the image will be re-aligned later to accurately centralize the 3D head center after the 3D face reconstruction step). We then run a state-of-the-art face segmentation method of [33] to segment out the head region, denoted as $S$ , which includes face, hair and ear regions. + +# 4. Single-Image 3D Head Reconstruction + +In this work, we use the perspective camera model with an empirically-selected focal length. Head pose is determined by rotation $\mathbf{R} \in \mathrm{SO}(3)$ and translation $\mathbf{t} \in \mathbb{R}^3$ and is parameterized by $\mathbf{p} \in \mathbb{R}^7$ with rotation represented by quaternion. We now present our method which reconstructs a 3DMM face as well as a depth map for other head regions. + +# 4.1. Face Reconstruction and Pose Estimation + +With a 3DMM, the face shape $\mathbf{F}$ and texture $\mathbf{T}$ can be represented by an affine model: + +$$ +\begin{array}{l} \mathbf {F} = \mathbf {F} (\boldsymbol {\alpha}, \boldsymbol {\beta}) = \bar {\mathbf {F}} + \mathbf {B} _ {i d} \boldsymbol {\alpha} + \mathbf {B} _ {e x p} \boldsymbol {\beta} \\ \mathbf {T} = \mathbf {T} (\boldsymbol {\delta}) = \bar {\mathbf {T}} + \mathbf {B} _ {t} \boldsymbol {\delta} \end{array} \tag {1} +$$ + +where $\bar{\mathbf{F}}$ and $\bar{\mathbf{T}}$ are the average face shape and texture; $\mathbf{B}_{id}$ , $\mathbf{B}_{exp}$ , and $\mathbf{B}_t$ are the PCA bases of identity, expression, and texture respectively; $\alpha$ , $\beta$ , and $\delta$ are the corresponding coefficient vectors. We adopt the Basel Face Model [40] for $\bar{\mathbf{F}}$ , $\mathbf{B}_{id}$ , $\bar{\mathbf{T}}$ , and $\mathbf{B}_t$ , and use the expression bases $\mathbf{B}_{exp}$ of [22] which are built from FaceWarehouse [7]. After selection of basis subsets, we have $\alpha \in \mathbb{R}^{80}$ , $\beta \in \mathbb{R}^{64}$ and $\delta \in \mathbb{R}^{80}$ . + +Since ground-truth 3D face data are scarce, we follow recent methods [47, 20, 16] to learn reconstruction in an unsupervised fashion using a large corpus of face images. Our method is adapted from [16] which uses hybrid-level supervision for training. Concretely, the unknowns to be predicted can be represented by a vector $(\alpha, \beta, \delta, \mathbf{p}, \gamma) \in \mathbb{R}^{239}$ , where $\gamma \in \mathbb{R}^9$ is the Spherical Harmonics coefficient vector for scene illumination. Let $I$ be a training image and $I'$ its reconstructed counterpart rendered with the network prediction, we minimize the photometric error via: + +$$ +l _ {\text {p h o t o}} = \int_ {\mathcal {F}} \| I - I ^ {\prime} (\boldsymbol {\alpha}, \boldsymbol {\beta}, \boldsymbol {\delta}, \boldsymbol {\gamma}, \mathbf {p}) \| _ {2} \tag {2} +$$ + +where $\mathcal{F}$ denotes the rendered face region we consider here, and $\| \cdot \|_2$ denotes the $\ell_2$ norm for residuals on $\mathbf{r}$ , $\mathbf{g}$ , $\mathbf{b}$ channels. We also minimize the perceptual discrepancy between the rendered and real faces via: + +$$ +l _ {p e r} = 1 - \frac {< f (I) , f \left(I ^ {\prime}\right) >}{\| f (I) \| \cdot \| f \left(I ^ {\prime}\right) \|} \tag {3} +$$ + +where $f(\cdot)$ denotes a face recognition network for identity feature extraction where the model from [55] is used here. Other commonly-used losses such as the 2D facial landmark loss and coefficient regularization loss are also applied, and we refer the readers to [16] for more details. + +# 4.2. Hair&Ear Depth Estimation + +Our next step is to estimate a depth map for other head region, defined as $\mathcal{H} = \mathcal{S} - (\mathcal{S}^f \cap \mathcal{F})$ where $\mathcal{S}^f$ denotes the face region defined by segmentation. $\mathcal{H}$ includes hair and ear as well as a small portion of segmented face region that is not covered by the projected 3DMM face. Due to lack of ground-truth depth data, we train a network using a collection of image pairs in a stereo matching setup. Note we use image pairs only for training purpose. The network always runs on a single image at test time. + +Let $I_{1}$ , $I_{2}$ be a training image pair of one subject (e.g., two frames from a video) with different head poses $(\mathbf{R}_1, \mathbf{t}_1)$ , $(\mathbf{R}_2, \mathbf{t}_2)$ recovered by our face reconstruction network. Our goal is to train a single network to predict both of their depth maps $d_{1}$ and $d_{2}$ in a siamese network scheme [13]. Before training, we first run naive triangulation on regular pixel grids of $\mathcal{H}_1$ and $\mathcal{H}_2$ to build two 2D meshes. Given depth map estimate $d_{1}$ , a 3D mesh $\mathbf{H}_1$ can be constructed via inverse-projection. We can transform $\mathbf{H}_1$ to $I_{2}$ 's camera system via $(\mathbf{R}_2\mathbf{R}_1^{-1}, -\mathbf{R}_2\mathbf{R}_1^{-1}\mathbf{t}_1 + \mathbf{t}_2)$ , and project it onto image plane to get a synthesized image $I_2'$ . Similar process can be done for generating $I_1'$ from $I_{2}$ and $d_{2}$ . The whole process is differentiable and we use it to train our depth prediction network with the following losses. + +As in stereo matching, we first enforce color constancy + +constraint by minimizing the brightness error + +$$ +l _ {c o l o r} = \int_ {\mathcal {H} _ {2} ^ {\prime}} \| I _ {2} ^ {\prime} (d _ {1}) - I _ {2} \| _ {1} + \int_ {\mathcal {H} _ {1} ^ {\prime}} \| I _ {1} ^ {\prime} (d _ {2}) - I _ {1} \| _ {1} \tag {4} +$$ + +where $\mathcal{H}_2' = \mathcal{H}_2'(\mathcal{H}_1, d_1)$ is the warped region from $\mathcal{H}_1$ computed by head poses and $d_1$ in the transformation process described above; similarly for $\mathcal{H}_1' = \mathcal{H}_1'(\mathcal{H}_2, d_2)$ . We also apply a gradient discrepancy loss which is robust to illumination change thus widely adopted in stereo and optical flow estimation [6, 5, 54]: + +$$ +l _ {g r a d} = \int_ {\mathcal {H} _ {2} ^ {\prime}} \| \nabla I _ {2} ^ {\prime} (d _ {1}) - \nabla I _ {2} \| _ {1} + \int_ {\mathcal {H} _ {1} ^ {\prime}} \| \nabla I _ {1} ^ {\prime} (d _ {2}) - \nabla I _ {1} \| _ {1} \tag {5} +$$ + +where $\nabla$ denotes the gradient operator. To impose a spatial smoothness prior, we add a second-order smoothness loss + +$$ +l _ {s m o o t h} = \int_ {\mathcal {H} _ {1}} | \Delta d _ {1} | + \int_ {\mathcal {H} _ {2}} | \Delta d _ {2} | \tag {6} +$$ + +where $\Delta$ denotes the Laplace operator. + +Face depth as condition and output. Instead of directly estimating hair and ear depth from the input image $I$ , we project the reconstructed face shape $\mathbf{F}$ onto image plane to get a face depth map $d^{f}$ . We make $d^{f}$ an extra conditional input concatenated with $I$ . Note $d^{f}$ provides beneficial information (e.g., head pose, camera distance) for hair and ear depth estimation. In addition, it allows the known face depth around the contour to be easily propagated to the adjacent regions with unknown depth. + +More importantly, we train the network to also predict the depth of the facial region using $d^{f}$ as target: + +$$ +l _ {f a c e} = \int_ {\mathcal {F} _ {1} - \mathcal {S} _ {1} ^ {h} \cap \mathcal {F} _ {1}} | d _ {1} - d _ {1} ^ {f} | + \int_ {\mathcal {F} _ {2} - \mathcal {S} _ {2} ^ {h} \cap \mathcal {F} _ {2}} | d _ {2} - d _ {2} ^ {f} | \tag {7} +$$ + +where $S^h$ denotes the hair region defined by segmentation. Note learning face depth via $l_{face}$ should not introduce much extra burden for the network since $d^{f}$ is provided as input. But crucially, we can now easily enforce the consistency between the reconstructed 3D face and the estimated 3D geometry in other regions, as in this case we calculate the smoothness loss across whole head regions $S_{1}, S_{2}$ : + +$$ +l _ {\text {s m o o t h}} = \int_ {\mathcal {S} _ {1}} | \Delta d _ {1} | + \int_ {\mathcal {S} _ {2}} | \Delta d _ {2} | \tag {8} +$$ + +Figure 2 (2nd and 3rd columns) compares the results with and without face depth. We also show quantitative comparisons in Table 1 (2nd and 3rd columns). As can be observed, using face depth significantly improves head geometry consistency and reconstruction accuracy. + +Layer-order loss. Hair can often occlude a part of facial region, leading to two depth layers. To ensure correct relative position between the hair and occluded face region (i.e., + +![](images/ea93330b9c8b4042ef0ddeff23bf73208e411fa1812c18819640bd7e18fdc8e5.jpg) +Figure 2: 3D head reconstruction result of our method with different settings. + +the former should be in front of the latter), we introduced a layer-order loss defined as: + +$$ +l _ {\text {l a y e r}} = \int_ {\mathcal {S} _ {1} ^ {h} \cap \mathcal {F} _ {1}} \max \left(0, d _ {1} - d _ {1} ^ {f}\right) + \int_ {\mathcal {S} _ {2} ^ {h} \cap \mathcal {F} _ {2}} \max \left(0, d _ {2} - d _ {2} ^ {f}\right) \tag {9} +$$ + +which penalizes incorrect layer order. As shown in Fig. 2, the reconstructed shapes are more accurate with $l_{layer}$ . + +Network structure. We apply a simple encoder-decoder structure using a ResNet-18 [24] as backbone. We discard its global average pooling and the last fc layers, and append several transposed convolutional layers to upsample the feature maps to the full resolution. Skip connections are added at $64 \times 64$ , $32 \times 32$ and $16 \times 16$ resolutions. The input image size is $256 \times 256$ . More details of the network structure can be found in the suppl. material. + +# 5. Single-Image Head Pose Manipulation + +Given the 3D head model reconstructed from the input portrait image, we modify its pose and synthesize new portrait images, described as follows. + +# 5.1.3D Pose Manipulation and Projection + +To change the head pose, one simply needs to apply a rigid transformation in 3D for the 3DMM face $\mathbf{F}$ and hairear mesh $\mathbf{H}$ given the target pose $\bar{\mathbf{p}}$ or displacement $\delta \mathbf{p}$ . After the pose is changed, we reproject the 3D model onto 2D image plane to get coarse synthesis results. Two examples are shown in Fig. 3. + +# 5.2. Image Refinement with Adversarial Learning + +The reprojected images suffer from several issues. Notably, due to pose and expression change, some holes may appear, where the missing background and/or head region should be hallucinated akin to an image inpainting process. Besides, the reprojection procedure may also induce certain artifacts due to imperfect rendering. + +![](images/007f08c77fcf3e1e757d6eb6b3222eca550bf184593dfc0ee0ded4d07fec8c54.jpg) +Figure 3: Results of the image refinement network trained with different settings. + +To address these issues, we apply a deep network $G$ to process these images. For stronger supervision, we leverage both paired (i.e., images with ground truth label) and unpaired data (i.e., our coarse results) to train such a network. To obtain paired data, we take some real images with various head poses, and synthetically masked out some regions along the head segmentation boundaries. Let $J$ be an unpaired coarse result, and $(R, \hat{R})$ be the paired data where $R$ denotes the corrupted image and $\hat{R}$ its corresponding real image, we apply the $\ell_1$ color loss via + +$$ +l _ {c o l o r} (G) = \mathbb {E} _ {J} \left[ \int_ {\mathcal {B}} \| G (J) - J \| _ {1} \right] + \mathbb {E} _ {R} \left[ \int \| G (R) - \hat {R} \| _ {1} \right] \tag {10} +$$ + +where $\mathcal{B}$ denotes the background and the warped head regions of $J$ . + +We apply adversarial learning to improve the realism of the generated images. We introduce a discriminator $D$ to distinguish the outputs of $G$ from real images, and train $G$ to fool $D$ . The LS-GAN [35] framework is used, and our adversarial loss functions for $G$ and $D$ can be written as + +$$ +l _ {a d v} (G) = \frac {1}{2} \mathbb {E} _ {J} \left[ \left(D (G (J)) - 1\right) ^ {2} \right] + \frac {1}{2} \mathbb {E} _ {R} \left[ \left(D (G (R)) - 1\right) ^ {2} \right], \tag {11} +$$ + +$$ +\begin{array}{l} l _ {a d v} (D) = \frac {1}{2} \mathbb {E} _ {J} \left[ \left(D (G (J)) - 0\right) ^ {2} \right] + \frac {1}{2} \mathbb {E} _ {R} \left[ \left(D (G (R)) - 0\right) ^ {2} \right] \tag {12} \\ + \mathbb {E} _ {R} \left[ (D (\hat {R}) - 1) ^ {2} \right], \\ \end{array} +$$ + +respectively. As shown in Fig. 3, with the aid of the adversarial loss, our model generates much sharper results. However, some unwanted artifacts are introduced, possibly due to unstable GAN training. + +To remove these artifacts, we further apply a deep feature loss, also known as perceptual loss [29], for paired data via + +$$ +l _ {\text {f e a t}} (G) = \sum_ {i} \frac {1}{N _ {i}} \| \phi_ {i} (G (R)) - \phi_ {i} (\hat {R}) \| _ {1} \tag {13} +$$ + +where $\phi_{i}$ is the $i$ -th activation layer of the VGG-19 network [44] pretrained on ImageNet [15]. We use the first layers in all blocks. Figure 3 shows that our final results appear quite realistic. They are sharp and artifact-free. + +Difference with image inpainting. In our task, the reprojected head portrait, though visually quite realistic to human observer, may contain some unique characteristics that can + +Table 1: Average 3D reconstruction error evaluated on RGBD images from the Biwi dataset [17]. + +
Error (mm)Zhu [61]Oursw/o dfOurs
Face5.054.313.88
Non-face8.567.396.78
+ +be detected by the discriminator. We tried generating refined results to be fed into $D$ by mixing $G$ 's partial output and the raw input - a popular formulation in deep image inpainting [57] - via $J' = M \odot G(J) + (1 - M) \odot J$ where $M$ is the missing region mask. However, the results are consistently worse than our full image output strategy (see Fig. 3 for a comparison). + +Network structure. Our network structures for $G$ and $D$ are adapted from [51]. The input and output image size is $256 \times 256$ . More details can be found in the suppl. material. + +# 6. Experiments + +Implementation Details. Our method is implemented with TensorFlow [1]. The face reconstruction network is trained with 180K in-the-wild face images from multiple sources such as CelebA [34], 300W-LP [61] and LFW [27]. To train the head depth network, we collected 11K image pairs from 316 videos of 316 subjects that contain human head movements. The relative rotations are mostly within 5 to 15 degrees. The training took 15 hours on 1 NVIDIA M40 GPU card. To train the image refinement network, we collected 37K paired data and 30K unpaired data, and the training took 40 hours on 4 M40 GPU cards. Due to space limitation, more implementation details and results are shown in the suppl. material. + +# 6.1. Results + +The results from our method will be presented as follows. Note all the results here are from our test set where the images were not used for training. + +3D head reconstruction. Figure 4 shows some typical samples of our single-image 3D head reconstruction results. As can be observed, our reconstruction networks can produce quality face and hair geometry given a single portrait image, despite we did not use any ground-truth 3D data for training. Various hair styles can be well handled as shown in the figure. Although the face region and the hair-ear part have different, disjoint representations (3DMM vs. depth map) and are reconstructed in two steps, they appear highly consistent with each other and the resultant head models are visually pleasing. + +For quantitative evaluation and ablation study, we use the RGBD images from Biwi Kinect Head Pose Database [17] + +![](images/3948b26d64d199de8b760c7c9a147fb4125b534f4dc816d0c99da19e519bd420.jpg) +Figure 4: Typical single-image head reconstruction results. Our method can deal with a large variety of face shapes and hair styles, generating high-quality 3D head models. Note our method is trained without any ground-truth 3D data. + +![](images/9e7c06e74a1b66eb8023638edac90d038c14ac186562bc9f6a6c7aa5ef98f1ae.jpg) + +![](images/2ccd60e53832e8f013ac97e2b415bc9e27cbb62825062d553a07df8a97214a8b.jpg) + +![](images/ffa6b87586a141f2c1a9a254afe9aa71881517c3a7f58e866dd3a800794369a1.jpg) + +![](images/41fc88c4ed865d0dc522333ebe221e85175d05134513151cc49be1ec0d33c245.jpg) + +![](images/a6f9013c67816d6c7acbbcaffd73d084388c5c29d45fe0945705176594ffe4e8.jpg) + +which contains 20 subjects with various hair styles. We compute the head reconstruction errors of our method using the depth images as ground-truth geometry. The error is computed as the average point distances in 3D between the outputs and ground-truth shapes after 3D alignment. The results are presented in Table 1, which shows the decent 3D reconstruction accuracy of our method. It also shows that the accuracy decreases if face depth is not used as the input for the depth estimation network, demonstrating the efficacy of our algorithm design. + +Pose Manipulation. Figure 5 presents some pose manipulation results from our method. It can be seen that our method can generate realistic images with new head poses. Not only the face identity is well preserved, but also the hair shapes are highly consistent across different poses. The background is not disrupted by pose change. + +# 6.2. Comparison with Prior Art + +Comparison with Zhu et al. [61]. Zhu et al. [61] proposed a CNN-based 3D face reconstruction and alignment + +![](images/28532fef6c7fd9af0d3ece97b739063df6554d3319af2e765f03cf8701d18030.jpg) + +![](images/d72cfd8704a7b238d939f5e0f9b64605513232eb4b179773b5fa6ee789e8f055.jpg) + +![](images/903cbc8fe20e09d63a0d7fcd35cf1f97a8f72913a85fc1ab1c3f66bcc1fe99c3.jpg) + +![](images/8e5204aef385fc061a61cc3568a7d677939e3f2041beeae6b601524b7410c5b5.jpg) + +![](images/cd2d36ab6a5ec0fd477256649ddcda33ff11ee8fd603d535097c3656b64ebb25.jpg) + +![](images/76750c13b77887570a7641b04a49ceed3c16d9a20867e753c246d99c0c76315d.jpg) + +![](images/dc98c83407a58596e38e3b6d23734d13e752b34f2229dad6a5f7da703ce475f6.jpg) +Figure 5: Typical pose manipulation results. The left column shows the input images to our method, and the other columns show our synthesized images with altered head poses. + +![](images/e088124b18ce48a013b1a6fbdf57c7cf8bf68e556e01c23f6c8caa873d52e67e.jpg) + +![](images/14fa78a2eb3d9fcbcf45a8b31613edb84acffdac39ea1f3a0556c3e6b46ef567.jpg) + +![](images/c3d6521f0b66b56c7fc7f9f730e5f033026ae79aa20b592a5729de2b13209619.jpg) + +![](images/d18befa91bf2767d9664a74fa3d77cf186528948fb418a2119989719a23c44fe.jpg) + +![](images/ca7f3bb6a3353438bb326a79c4b5b9030f44818b649db8cd6eab396ce4d823bd.jpg) + +![](images/b3dc77d2182f59ff5a71574f6e97677aa25384016e42b6001f050842be3c7136.jpg) + +![](images/5ac9460490adb51c6f0594a00638757e252c6ea1977c2f7b8b16ad39433fcb42.jpg) + +![](images/ae0435cc24f5ac61b8fcea100645313e6e920eeace7ba8804cd569e971edbd28.jpg) +Figure 6: Comparison with the methods of Zhu et al. [61], Chai et al. [8], and Wiles et al. [53]. + +![](images/1c2eaebccf1385d907f6a9a4ef4252037b4d1033d349a51015b162d2ce133c04.jpg) +[61] + +![](images/21381e8093de273803d9f32978ee3b8b009f91f77e7f54319383fe507ca1f634.jpg) +[8] + +![](images/e3aaa9d5fb4f669b5de2c32060e8ed3e02eec930a4b5c474782ac09d0660dea3.jpg) +[53] + +![](images/24dc93babf92d19fdb946774f524d4b54b12ba1a0764c2254016159986868802.jpg) +Ours + +approach for single images. It also provides a warping-based portrait rotation method, originally developed for training data generation, based on 3D face geometry. To obtain reasonable warping for hair and ear regions, it defines a surrounding region of the face and heuristically determines its depth based on face depth. Figure 6 compares the face + +Table 2: Average perceptual similarity (deep feature cosine similarity) between the input and rotated face images. + +
Chai et al. [8]Ours
Cosine distance0.8290.856
+ +rotation results of [61] and ours. It can be seen that [61]'s results may suffer from obvious distortions. In contrast, our method can generate new views that are not only more realistic but also more consistent with the input images. + +Also note that [61] simply warps the whole image including the background region. Background change is undesired for portrait manipulation but is commonly seen in previous 2D/3D warping based methods [8, 62, 61, 2]. In contrast, our method can well preserve the background. + +Table 1 compares the 3D reconstruction error of [61] and our method using images from the Biwi dataset [17]. It shows that our method outperforms [61] by an appreciable margin: our errors are $23.17\%$ and $20.79\%$ lower in face and non-face regions, respectively. + +Comparison with Chai et al. [8]. We then compare with Chai et al. [8], which is a traditional optimization-based method developed for hair modeling. It also estimates face + +![](images/9a8addc6e1a6ea63482335056393b7b4e31c7a2341dad0045b902f5dd0c91d8b.jpg) +Input + +![](images/f466ed33b4424a16ccdbd9e62757ccd89607a8ab3aed9c61b287140de6d67aff.jpg) +[2] + +![](images/5cfea49888eb914d22a0a8e51a159426d43b1d077ae8adbbc67fc86a6f17ccc8.jpg) +Ours + +![](images/9ee77401a0baf8752e1b62ca063f907e02e5030ea383dd407e44219b9a5846c6.jpg) +[49] + +![](images/1a527880d5606b973b581265b9bf4bf5c6c3eca8a747458adbaed87db8b7c711.jpg) +Figure 7: Comparison with Averbuch-Elor et al. [2]. The input image and result of [2] are from [49]. + +![](images/0756a9ded0214de2fdc715992fb5c22d1451d99a2551011397bcb49445b4e5e4.jpg) + +![](images/2f5e905fdc77198f2cf868af283837ee28079ee9206ad8469bd217c893a1ea3c.jpg) + +![](images/4f1198a091eb575dd428742a0d58c617a4dde656f11c61aec67f130c1be1d6e9.jpg) +Figure 9: Failure cases due to (a) wrong segmentation, (b) obstruction, (c) inaccurate rotation center estimate, and (d) extreme pose. + +![](images/6e7c68ef20ff6eb17d52b58f6f46d80d7188f5cf4d34f6a29c46b47c0eadf302.jpg) +Source + +![](images/69b5ad1c3035c87842abe19c37f72d3704706c7205625969eeb0e521912e24ae.jpg) +Target + +![](images/7bdcf44ac66d9cc9d17d28972feacaed59ad6630d67447a9bb645964a5f95d83.jpg) +FSGAN [38] + +![](images/2cc9414c4b2548f3873e64655e6ed69007551e5056815b20c665b467a7d768a1.jpg) +Ours +Figure 8: Comparison with the FSGAN method of Nirkin et al. [38]. Images are from [38]. + +shape by facial landmark fitting. We run the program released by [8], which requires a few user-provided strokes before reconstruction and provides 3D view of the input image after running reconstruction. As shown in Fig. 6, the method of [8] also leads to some distortions, while our results are more consistent with the input faces. The differences in background regions are also prominent. + +For quantitative comparison, we consider a face recognition setup and compute the perceptual similarity between the original images and the warped ones. For fair comparison, we use the 10 images shown in [8] (Figure 13) and the corresponding results therein. For our method, we rotate the raw faces to same poses as theirs. We use VGG-Face [39] for deep face feature extraction, and Table 2 shows the higher perceptual similarity of our results. + +Comparison with Averbuch-Elor et al. [2]. In Fig. 7, we qualitatively compare with a 2D-warping based face reenactment method of Averbuch-Elor et al. [2], which drives a face image with a reference face video for animation. As can be seen, pose change is problematic for 2D warping and the result exhibits obvious distortions. Ours contains much less distortion and appears more realistic. For reference, we also present in Fig. 7 the result of Thies et al. [49], which works on RGBD images and builds a target actor 3D model offline for high-quality reenactment. + +Comparison with X2Face [53]. We also compare with another 2D warping-based face manipulation method, X2Face [53], where the warping fields are generated by neural networks. As shown in Fig. 6, the results of [53] suffer from obvious distortions and cannot handle missing + +![](images/9ed63dbdbb5d18fb1c8b980472fda0900668a8b72739e3c820adee524d81f9d8.jpg) +(a) + +![](images/c05252508146dc6e555ad9a08911592204ee2af5358fe3a127407e4585939b18.jpg) + +![](images/a34b7021cd6adb78be6a0fd9ed40ae8608aabed6f560d66c9d89e1bec9251908.jpg) +(b) + +![](images/a0e7decd0bcbb924fd9c01399110d51459ae20d018377c7bf4b10f0ad32f363b.jpg) + +![](images/d87ee7eba5d0ebd989b05e25d9fe0e0c85daad7b1e5aa8a5ae825247b0aae713.jpg) + +![](images/ae812963717fdb08e63d6c7a77c396b0414fd2210fc49cc96c91c86af5b29281.jpg) + +![](images/dc04bc8ffd0e15532e704153d7f984d8345af58e3894264a86a227d48d4ebdad.jpg) +(d) + +![](images/22bda25364302c16de878a670b8dfa7ee363e97feae338cd8abcdfec776b5c1a.jpg) + +regions, whereas ours appear much more natural. + +Comparison with FSGAN [38]. Finally, we compare with a recent GAN-based face swapping and reenactment method, FSGAN [38]. As shown in Fig. 8, the results of [38] tend to be over-smoothed. We believe there's a still great hurdle for GANs to directly generate fine details that are geometrically correct, given the complex geometry of hairs. However, the expression of [38]'s results appears more vivid than ours especially for the first example. One of our future works would be integrating fine-grained expression manipulation into our pipeline. + +Failure cases. Our method may fail under several situations, as illustrated in Fig. 9. For example, erroneous segmentation and obstructions may lead to apparent artifacts. Our head center is estimated in the face reconstruction step, and artifacts may appear for a few cases with inaccurate head center estimates. Our current method can not handle extreme poses, which we leave as our further work. + +Running time. Tested on an NVIDIA M40 GPU, our face reconstruction, depth estimation and image refinement networks take $13ms$ , $9.5ms$ , and $11ms$ respectively to run on one single image. Segmentation takes $15ms$ . Interactive portrait manipulation can be easily achieved by our method. + +# 7. Conclusion + +We presented a novel approach for single-image 3D portrait modeling, a challenging task that is not properly addressed by existing methods. A new CNN-based 3D head reconstruction pipeline is proposed to learn 3D head geometry effectively without any ground-truth 3D data. Extensive experiments and comparisons collectively demonstrated the efficacy of our proposed method for both 3D head reconstruction and single-image pose manipulation. + +Acknowledgment. This work was partially supported by the National Natural Science Foundation of China under Grants No. 61773062. + +# References + +[1] Martí Abadi et al. TensorFlow: Large-scale machine learning on heterogeneous systems. https://www.tensorflow.org/, 2015. 5 +[2] Hadar Averbuch-Elor, Daniel Cohen-Or, Johannes Kopf, and Michael F Cohen. Bringing portraits to life. ACM Transactions on Graphics (TOG), 36(6):196, 2017. 2, 7, 8 +[3] Jianmin Bao, Dong Chen, Fang Wen, Houqiang Li, and Gang Hua. Towards open-set identity preserving face synthesis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 6713-6722, 2018. 1, 2 +[4] Volker Blanz and Thomas Vetter. A morphable model for the synthesis of 3d faces. In Annual Conference on Computer Graphics and Interactive Techniques (SIGGRAPH), pages 187-194, 1999. 1 +[5] Michael Bleyer, Christoph Rhemann, and Carsten Rother. Patchmatch stereo-stereo matching with slanted support windows. In British Conference on Computer Vision (BMVC), volume 11, pages 1-11, 2011. 4 +[6] Thomas Brox, Andres Bruhn, Nils Papenberg, and Joachim Weickert. High accuracy optical flow estimation based on a theory for warping. In European Conference on Computer Vision (ECCV), pages 25-36, 2004. 4 +[7] Chen Cao, Yanlin Weng, Shun Zhou, Yiying Tong, and Kun Zhou. FaceWarehouse: A 3d facial expression database for visual computing. IEEE Transactions on Visualization and Computer Graphics, 20(3):413-425, 2014. 3 +[8] Mengei Chai, Linjie Luo, Kalyan Sunkavalli, Nathan Carr, Sunil Hadap, and Kun Zhou. High-quality hair modeling from a single portrait photo. ACM Transactions on Graphics (TOG), 34(6):204, 2015. 7, 8 +[9] Mengei Chai, Tianjia Shao, Hongzhi Wu, Yanlin Weng, and Kun Zhou. Autohair: Fully automatic hair modeling from a single image. ACM Transactions on Graphics (TOG), 35(4), 2016. 2 +[10] Mengelei Chai, Lvdi Wang, Yanlin Weng, Xiaogang Jin, and Kun Zhou. Dynamic hair manipulation in images and videos. ACM Transactions on Graphics (TOG), 32(4):75, 2013. 2 +[11] Huiwen Chang, Jingwan Lu, Fisher Yu, and Adam Finkelstein. PairedCycleGAN: Asymmetric style transfer for applying and removing makeup. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 40-48, 2018. 2 +[12] Yunjey Choi, Minje Choi, Munyoung Kim, Jung-Woo Ha, Sunghun Kim, and Jaegul Choo. StarGAN: Unified generative adversarial networks for multi-domain image-to-image translation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8789-8797, 2018. 2 +[13] Sumit Chopra, Raia Hadsell, Yann LeCun, et al. Learning a similarity metric discriminatively, with application to face verification. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 539-546, 2005. 3 +[14] Tali Dekel, Chuang Gan, Dilip Krishnan, Ce Liu, and William T Freeman. Sparse, smart contours to represent and edit images. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3511-3520, 2018. 2 + +[15] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 248–255. IEEE, 2009. 5 +[16] Yu Deng, Jiaolong Yang, Sicheng Xu, Dong Chen, Yunde Jia, and Xin Tong. Accurate 3d face reconstruction with weakly-supervised learning: From single image to image set. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2019. 1, 3 +[17] Gabriele Fanelli, Matthias Dantone, Juergen Gall, Andrea Fossati, and Luc Van Gool. Random forests for real time 3d face analysis. International Journal of Computer Vision (IJCV), 2013. 5, 7 +[18] Jiahao Geng, Tianjia Shao, Youyi Zheng, Yanlin Weng, and Kun Zhou. Warp-guided gans for single-photo facial animation. ACM Transactions on Graphics (TOG), 37(6), 2018. 2 +[19] Zhenglin Geng, Chen Cao, and Sergey Tulyakov. 3d guided fine-grained face manipulation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 9821-9830, 2019. 2 +[20] Kyle Genova, Forrester Cole, Aaron Maschinot, Aaron Sarna, Daniel Vlasic, and William T. Freeman. Unsupervised training for 3d morphable model regression. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4362-4371, 2018. 1, 2, 3 +[21] Clément Godard, Oisin Mac Aodha, and Gabriel J Brossow. Unsupervised monocular depth estimation with left-right consistency. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 270-279, 2017. 1 +[22] Yudong Guo, Juyong Zhang Zhang, Jianfei Cai, Boyi Jiang, and Jianmin Zheng. CNN-based real-time dense face reconstruction with inverse-rendered photo-realistic face images. IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI), 2018. 1, 2, 3 +[23] Tal Hassner, Shai Harel, Eran Paz, and Roee Enbar. Effective face frontalization in unconstrained images. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4295-4304, 2015. 2 +[24] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770-778, 2016. 4 +[25] Liwen Hu, Shunsuke Saito, Lingyu Wei, Koki Nagano, Jaewoo Seo, Jens Fursund, Iman Sadeghi, Carrie Sun, YenChun Chen, and Hao Li. Avatar digitization from a single image for real-time rendering. ACM Transactions on Graphics (TOG), 36(6):195, 2017. 2 +[26] Yibo Hu, Xiang Wu, Bing Yu, Ran He, and Zhenan Sun. Pose-guided photorealistic face rotation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8398-8406, 2018. 1 +[27] Gary B. Huang, Manu Ramesh, Tamara Berg, and Erik Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. Technical Report 07-49, University of Massachusetts, Amherst, 2007. 5 + +[28] Rui Huang, Shu Zhang, Tianyu Li, and Ran He. Beyond face rotation: Global and local perception gan for photorealistic and identity preserving frontal view synthesis. In IEEE International Conference on Computer Vision (ICCV), pages 2439-2448, 2017. 2 +[29] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European conference on computer vision, pages 694–711. Springer, 2016. 5 +[30] Hyeongwoo Kim, Pablo Carrido, Ayush Tewari, Weipeng Xu, Justus Thies, Matthias Niessner, Patrick Pérez, Christian Richardt, Michael Zollhöfer, and Christian Theobalt. Deep video portraits. ACM Transactions on Graphics (TOG), 37(4):163, 2018. 2 +[31] Tingting Li, Ruihe Qian, Chao Dong, Si Liu, Qiong Yan, Wenwu Zhu, and Liang Lin. Beautygan: Instance-level facial makeup transfer with deep generative adversarial network. In ACM International Conference on Multimedia, pages 645-653, 2018. 2 +[32] Shu Liang, Xiufeng Huang, Xianyu Meng, Kunyao Chen, Linda G Shapiro, and Ira Kemelmacher-Shlizerman. Video to fully automatic 3d hair model. In SIGGRAPH Asia, page 206, 2018. 2 +[33] Jinpeng Lin, Hao Yang, Dong Chen, Ming Zeng, Fang Wen, and Lu Yuan. Face parsing with roi tanh-warping. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 3 +[34] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaou Tang. Deep learning face attributes in the wild. In International Conference on Computer Vision (ICCV), pages 3730-3738, 2015. 5 +[35] Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In IEEE International Conference on Computer Vision (ICCV), pages 2794-2802, 2017. 5 +[36] Koki Nagano, Jaewoo Seo, Jun Xing, Lingyu Wei, Zimo Li, Shunsuke Saito, Aviral Agarwal, Jens Fursund, and Hao Li. paGAN: real-time avatars using dynamic textures. In SIGGRAPH Asia, page 258, 2018. 2 +[37] 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. 2 +[38] Yuval Nirkin, Yosi Keller, and Tal Hassner. Fsgan: Subject agnostic face swapping and reenactment. In Proceedings of the IEEE International Conference on Computer Vision, pages 7184-7193, 2019. 8 +[39] Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, et al. Deep face recognition. In *British Conference on Computer Vision (BMVC)*, page 6, 2015. 8 +[40] Pascal Paysan, Reinhard Knothe, Brian Amberg, Sami Romdhani, and Thomas Vetter. A 3d face model for pose and illumination invariant face recognition. In IEEE International Conference on Advanced Video and Signal Based Surveillance, pages 296-301, 2009. 3 +[41] Tiziano Portenier, Qiyang Hu, Attila Szabo, Siavash Arjomand Bigdeli, Paolo Favaro, and Matthias Zwicker. + +Faceshop: Deep sketch-based face image editing. ACM Transactions on Graphics (TOG), 37(4):99, 2018. 2 +[42] Albert Pumarola, Antonio Agudo, Aleix M Martinez, Alberto Sanfeliu, and Francesc Moreno-Noguer. GANimation: Anatomically-aware facial animation from a single image. In European Conference on Computer Vision (ECCV), pages 818-833, 2018. 2 +[43] Zhixin Shu, Ersin Yumer, Sunil Hadap, Kalyan Sunkavalli, Eli Shechtman, and Dimitris Samaras. Neural face editing with intrinsic image disentangling. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5541-5550, 2017. 2 +[44] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations (ICLR), 2015. 5 +[45] Lingxiao Song, Zhihe Lu, Ran He, Zhenan Sun, and Tieniu Tan. Geometry guided adversarial facial expression synthesis. In ACM International Conference on Multimedia, pages 627-635, 2018. 2 +[46] Yaniv Taigman, Ming Yang, Marc'Aurelio Ranzato, and Lior Wolf. Deepface: Closing the gap to human-level performance in face verification. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1701-1708, 2014. 2 +[47] Ayush Tewari, Michael Zollhöfer, Hyeongwoo Kim, Pablo Garrido, Florian Bernard, Patrick Pérez, and Christian Theobalt. MoFa: model-based deep convolutional face autoencoder for unsupervised monocular reconstruction. In International Conference on Computer Vision (ICCV), pages 1274–1283, 2017. 1, 2, 3 +[48] Justus Thies, Michael Zollhofer, Marc Stamminger, Christian Theobalt, and Matthias Nießner. Face2face: Real-time face capture and reenactment of rgb videos. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2387-2395, 2016. 2 +[49] Justus Thies, Michael Zollhöfer, Christian Theobalt, Marc Stamminger, and Matthias Nießner. Headon: real-time reenactment of human portrait videos. ACM Transactions on Graphics (TOG), 37(4):164, 2018. 2, 8 +[50] Anh Tuan Tran, Tal Hassner, Iacopo Masi, and Gerard Medioni. Regressing robust and discriminative 3d morphable models with a very deep neural network. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1493-1502, 2017. 1, 2 +[51] 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 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8798-8807, 2018. 5 +[52] Zongwei Wang, Xu Tang, Weixin Luo, and Shenghua Gao. Face aging with identity-preserved conditional generative adversarial networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 7939-7947, 2018. 2 +[53] Olivia Wiles, A Sophia Koepke, and Andrew Zisserman. X2face: A network for controlling face generation using im + +ages, audio, and pose codes. In Proceedings of the European Conference on Computer Vision (ECCV), pages 670-686, 2018. 2, 7, 8 +[54] Jiaolong Yang and Hongdong Li. Dense, accurate optical flow estimation with piecewise parametric model. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1019-1027, 2015. 4 +[55] Jiaolong Yang, Peiran Ren, Dongqing Zhang, Dong Chen, Fang Wen, Hongdong Li, and Gang Hua. Neural aggregation network for video face recognition. In IEEE Conference on Computer Vision and Pattern Recognition, pages 4362-4371, 2017. 3 +[56] Xi Yin, Xiang Yu, Kihyuk Sohn, Xiaoming Liu, and Manmohan Chandraker. Towards large-posed face frontalization in the wild. In International Conference on Computer Vision (ICCV), pages 3990–3999, 2017. 1, 2 +[57] Jiahui Yu, Zhe Lin, Jamei Yang, Xiaohui Shen, Xin Lu, and Thomas S Huang. Generative image inpainting with contextual attention. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5505-5514, 2018. 2, 5 +[58] Zhifei Zhang, Yang Song, and Hairong Qi. Age progres + +sion/regression by conditional adversarial autoencoder. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5810-5818, 2017. 2 +[59] Tinghui Zhou, Matthew Brown, Noah Snavely, and David G Lowe. Unsupervised learning of depth and ego-motion from video. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1851-1858, 2017. 1 +[60] Yi Zhou, Liwen Hu, Jun Xing, Weikai Chen, Han-Wei Kung, Xin Tong, and Hao Li. Hairnet: Single-view hair reconstruction using convolutional neural networks. In European Conference on Computer Vision (ECCV), pages 235–251, 2018. 2 +[61] Xiangyu Zhu, Zhen Lei, Xiaoming Liu, Hailin Shi, and Stan Z Li. Face alignment across large poses: A 3d solution. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 146-155, 2016. 2, 5, 6, 7 +[62] Xiangyu Zhu, Zhen Lei, Junjie Yan, Dong Yi, and Stan Z Li. High-fidelity pose and expression normalization for face recognition in the wild. In Conference on Computer Vision and Pattern Recognition (CVPR), pages 787-796, 2015. 2, 7 \ No newline at end of file diff --git a/deep3dportraitfromasingleimage/images.zip b/deep3dportraitfromasingleimage/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..534b102e5d7d4342c2a5198c4735c0039421a776 --- /dev/null +++ b/deep3dportraitfromasingleimage/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b9d1f6e76b4c89febf329934097b40f4f0875de349b39e5b627f2d0bb2306962 +size 775998 diff --git a/deep3dportraitfromasingleimage/layout.json b/deep3dportraitfromasingleimage/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..3a6fe3dc8b56fbc24c045e86ca01dea239ee3d80 --- /dev/null +++ b/deep3dportraitfromasingleimage/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aed8f4998bedaa1e4e422fea60123d0908b7501ed9089dc95ac0a4fd592a1a6d +size 520454 diff --git a/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/9b12ca21-2b8e-422a-a22e-806bea51d1d2_content_list.json b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/9b12ca21-2b8e-422a-a22e-806bea51d1d2_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..7c0d16b3875c188bc1f3c64ca741bdd0e351c7d2 --- /dev/null +++ b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/9b12ca21-2b8e-422a-a22e-806bea51d1d2_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7d746ddc65bcba1eb1863e454b4d9da961017d9773b8329e2ecdc0790d574c5 +size 78017 diff --git a/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/9b12ca21-2b8e-422a-a22e-806bea51d1d2_model.json b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/9b12ca21-2b8e-422a-a22e-806bea51d1d2_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ad3e36137edff19014bf21379988f519b9da54b9 --- /dev/null +++ b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/9b12ca21-2b8e-422a-a22e-806bea51d1d2_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53eec5748ab199e720726577cee26709e37ee1030058ff208c1ba8723b50e4ee +size 92919 diff --git a/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/9b12ca21-2b8e-422a-a22e-806bea51d1d2_origin.pdf b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/9b12ca21-2b8e-422a-a22e-806bea51d1d2_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..86d9abbc560ea0298f6967d344abef506bca679f --- /dev/null +++ b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/9b12ca21-2b8e-422a-a22e-806bea51d1d2_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:353e5353635cd1007cc2251d090b1f93a4bf33929a032e68cf1bdba5b7511720 +size 16754133 diff --git a/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/full.md b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9b6538d4e7cd0d173601fe1ca0701e6a9e3fc597 --- /dev/null +++ b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/full.md @@ -0,0 +1,339 @@ +# Deep Active Learning for Biased Datasets via Fisher Kernel Self-Supervision + +Denis Gudovskiy + +Panasonic $\beta$ AI Lab + +denis.gudovskiy@us.panasonic.com + +Takuya Yamaguchi + +Panasonic AI Solutions Center + +yamaguchi.takuya2015@jp.panasonic.com + +Alec Hodgkinson + +Panasonic $\beta$ AI Lab + +alec.hodgkinson@us.panasonic.com + +Sotaro Tsukizawa + +Panasonic AI Solutions Center + +tsukizawa.sotaro@jp.panasonic.com + +# Abstract + +Active learning (AL) aims to minimize labeling efforts for data-demanding deep neural networks (DNNs) by selecting the most representative data points for annotation. However, currently used methods are ill-equipped to deal with biased data. The main motivation of this paper is to consider a realistic setting for pool-based semi-supervised AL, where the unlabeled collection of train data is biased. We theoretically derive an optimal acquisition function for AL in this setting. It can be formulated as distribution shift minimization between unlabeled train data and weakly-labeled validation dataset. To implement such acquisition function, we propose a low-complexity method for feature density matching using self-supervised Fisher kernel (FK) as well as several novel pseudo-label estimators. Our FK-based method outperforms state-of-the-art methods on MNIST, SVHN, and ImageNet classification while requiring only 1/10th of processing. The conducted experiments show at least $40\%$ drop in labeling efforts for the biased class-imbalanced data compared to existing methods1. + +# 1. Introduction + +Active learning (AL) algorithms aim to minimize the number of expensive labels for supervised training of deep neural networks (DNNs) by selecting a subset of relevant examples from a large unlabeled collection of data [20] as sketched in Figure 2. The subset is annotated by an oracle in semi-supervised setting and added to the training dataset in a single pool or, more often, in an iterative fashion. The goal is to maximize prediction accuracy while minimizing the pool size and number of iterations. + +The existing AL methods assume that distribution of collected train examples is somewhat similar to test cases and, + +![](images/c4806b659d083810830a86bbd5f4e174878dfab835b081d43f6f3d7bdfbd959c.jpg) +Figure 1. Problem statement for AL with biased data: distribution of unlabeled train data is not aligned with the test data. As a result, prior methods select examples from another distribution and the learned classifier $f(\pmb{x}, \pmb{\theta})$ misses on underrepresented instances. + +hence, relevant data points can be found only by accessing train data. This assumption rarely holds for the unlabeled data where very rare examples have to be identified as illustrated in Figure 1. The classifier learned on train data selected by the existing AL methods can have high error rate on underrepresented instances. For example, distribution of digits "1" prevails over rare digits "9" in train data and, as a result, test digits "9" are misclassified. Moreover, consider an autonomous vehicle only trained to perform well in the most frequent conditions rather than in a rare critical situations such as car crashes. To overcome this limitation, we propose a new acquisition function for AL. It is based on distribution matching between the validation dataset and the AL-selected training data. Validation dataset in such setting covers important cases from the long-tail of distribution that can be continuously identified and added after field trials. + +We achieve distribution matching by pooling multi-scale low-dimensional discriminative features from the task classifier model. Our key contribution is the usage of Fisher kernel (FK) to find the most important examples with the improved pseudo-label estimators using several novel metrics. Finally, we incorporate recent unsupervised pretraining method [8] to speed up representation learning by the task model. Our framework is well-suited for large-scale data because its complexity is only a single forward and + +backward pass per data point. We show the effectiveness of our method on MNIST, SVHN, and ImageNet classification including biased training data with long-tailed distribution, where the proposed method is able to decrease labeling efforts by at least $40\%$ compared to prior methods. + +# 2. Related work + +AL is a well-studied approach to decrease annotation efforts in traditional machine learning pipelines [27]. Recently, AL has been applied to DNN-based models in semi-supervised setting with oracle labeling or weakly-supervised setting with pseudo-labeling. While our method can be applied to both types, we mainly focus on prior work of a more robust semi-supervised pool-based AL. + +Gal et al. [7] introduced a measure of uncertainty for approximate Bayesian inference that can be estimated using stochastic forward passes through a DNN with dropout layers. Their AL acquisition function selects data points with the highest uncertainty which is measured at the output of classifier's softmax layer using several metrics. Recent work by Beluch et al. [5] improved this method by using an ensemble of networks for uncertainty estimation. + +Sener and Savarese [26] formulated training dataset selection for AL as a geometric core-set clustering approach which outperforms greedy $k$ -center clustering. Though their core-set clustering can complement our approach, we are focusing on a discriminative low-dimensional feature extraction followed by inexpensive clustering. Computational complexity of the core-set clustering is a potential bottleneck where two orders of magnitude more processing is needed compared to greedy clustering in our approach. + +Recently, Sinha et al. [28] proposed to use variational autoencoder (VAE) [18] to learn a latent space followed by an adversarial network [21] to discriminate between labeled and unlabeled data. Their AL acquisition function is the output of discriminator, which implicitly learns the most likely to be labeled examples. This variational adversarial active learning (VAAL) approach claims to achieve superior results compared to all previous works. However, VAAL has large number of hyperparameters and high complexity since VAE and discriminator have to be retrained on all unlabeled and labeled train data every AL iteration. + +The closest to our method, line of works [19, 17] employs influence functions and Fisher kernels as a measure of feature importance for dataset subsampling and analysis. Khanna et al. [17] showed equivalence of FK and influence functions for log-likelihood loss functions. Similar work on online importance sampling using Fisher score similarity [25] upweights samples within the mini-batch during fully-supervised training. However, these approaches require fully-labeled data to estimate FK. + +Another related area is unsupervised representation learning that, unfortunately, has not been used in AL lit + +erature. At the same time, recent approaches [8, 11, 13] significantly improved previous state-of-the-art. Hence, we incorporate unsupervised pretraining into our AL method to speed up latent representation learning. + +The existing methods struggle to deal with biased data as sketched in Figure 1. Motivated by this, we develop our framework with the following contributions: + +- We derive an optimal acquisition function $\mathcal{R}_{opt}(\cdot)$ for biased datasets, which is formulated as a task to minimize Kullback-Leibler (KL) divergence between distributions of training and validation datasets. +- We propose a low-complexity non-parametric AL method via self-supervised FK using a set of pseudolabel estimators and derive its connection to $\mathcal{R}_{opt}(\cdot)$ . +- We complement our method by the recent unsupervised pretraining method using image rotations [8]. +- Our method outperforms prior methods in image classification. In particular, datasets with long-tailed biased train data result in at least $40\%$ less labeling. + +# 3. Problem statement for biased datasets + +Let $(\pmb{x},\pmb{y})$ be an input-label pair where a label $\pmb{y} = \mathbf{1}_d\in$ $\mathbb{R}^D$ is one-hot vector with only $d$ th class not equal to zero for a classification task. There is a relatively small validation dataset $\mathcal{D}_{\mathrm{v}} = \{(x_i^{\mathrm{v}},y_i^{\mathrm{v}})\}_{i\in \mathbb{M}}$ of size $M$ and a large collection of training pairs $\mathcal{D} = \{(x_i,y_i)\}_{i\in \mathbb{N}}$ of size $N$ for which, initially, all labels are unknown. The validation dataset can be weakly labeled as discussed below. At every $b$ th iteration AL acquisition function $\mathcal{R}(\cdot)$ selects a pool of $P$ new labels to be annotated and added to train data which creates a training dataset indexed by subset $\mathbb{N}^b$ + +A feed-forward DNN model $f(\pmb{x}, \pmb{\theta})$ is optimized with respect to parameter vector $\pmb{\theta}$ using supervised learning framework by minimizing objective function + +$$ +\mathcal {L} (\boldsymbol {\theta}) = \frac {1}{N ^ {b}} \sum_ {i \in \mathbb {N} ^ {b}} L \left(\boldsymbol {y} _ {i}, \hat {\boldsymbol {y}} _ {i}\right) = \frac {1}{N ^ {b}} \sum_ {i \in \mathbb {N} ^ {b}} L \left(\boldsymbol {y} _ {i}, f \left(\boldsymbol {x} _ {i}, \boldsymbol {\theta}\right)\right), \tag {1} +$$ + +where $L(\pmb{y}_i, \hat{\pmb{y}}_i)$ is a loss function and $\hat{\pmb{y}}_i$ is output prediction. The loss function is a negative log probability of discrete $\pmb{y}$ for classification task. This is equivalent to minimization of approximate KL divergence $D_{KL}$ between joint training data distribution $Q_{\pmb{x},\pmb{y}}$ with density $q(\pmb{x},\pmb{y})$ and the learned model distribution $P_{\pmb{x},\pmb{y}}(\pmb{\theta})$ with corresponding density $p(\pmb{x},\pmb{y}|\pmb{\theta})$ . Since $q(\pmb{x},\pmb{y}) = q(\pmb{y}|\pmb{x})q(\pmb{x})$ and $p(\pmb{x},\pmb{y}|\pmb{\theta}) = p(\pmb{y}|\pmb{x},\pmb{\theta})q(\pmb{x})$ , KL objective learns only conditional distribution of $\pmb{y}$ given $\pmb{x}$ as + +$$ +\begin{array}{l} D _ {K L} \left(Q _ {\boldsymbol {x}, \boldsymbol {y}} \| P _ {\boldsymbol {x}, \boldsymbol {y}} (\boldsymbol {\theta})\right) = \\ \int q (\boldsymbol {x}) \int q (\boldsymbol {y} | \boldsymbol {x}) \log \frac {q (\boldsymbol {y} | \boldsymbol {x}) q (\boldsymbol {x})}{p (\boldsymbol {y} | \boldsymbol {x} , \boldsymbol {\theta}) q (\boldsymbol {x})} d \boldsymbol {y} d \boldsymbol {x} = \tag {2} \\ \mathbb {E} _ {Q _ {x}} \left[ D _ {K L} \left(Q _ {\boldsymbol {y} | \boldsymbol {x}} \| P _ {\boldsymbol {y} | \boldsymbol {x}} (\boldsymbol {\theta})\right) \right]. \\ \end{array} +$$ + +![](images/55b4b2537fda85f136d8de2db859d5828e581886dcf020f5ce57d3d7952fd4d1.jpg) +Figure 2. General setup for our semi-supervised AL: validation dataset is selected to approximate test data and can be continuously updated by the newly discovered misclassified examples. Unlabeled collection of train data is subject to the specified distortions. AL algorithm finds relevant train examples for annotation by maximizing acquisition function $\mathcal{R}(\cdot)$ every $b$ th iteration. + +Due to unknown density $q(x)$ , the expectation over $Q_{x}$ in (2) is usually replaced by empirical distribution $\hat{Q}_{x}$ as + +$$ +\begin{array}{l} \mathbb {E} _ {\hat {Q} _ {\boldsymbol {x}}} \left[ D _ {K L} \left(Q _ {\boldsymbol {y} | \boldsymbol {x}} \| P _ {\boldsymbol {y} | \boldsymbol {x}} (\boldsymbol {\theta})\right) \right] = \\ \frac {1}{| \mathcal {D} |} \sum_ {(\boldsymbol {x}, \boldsymbol {y}) \in \mathcal {D}} \left[ D _ {K L} \left(Q _ {\boldsymbol {y} \mid \boldsymbol {x}} \| P _ {\boldsymbol {y} \mid \boldsymbol {x}} (\boldsymbol {\theta})\right) \right]. \tag {3} \\ \end{array} +$$ + +By rewriting loss $L(\cdot)$ in (1) using $D_{KL}$ from (3), objective function $\mathcal{L}(\pmb{\theta})$ can be rewritten as negative log of conditional probability + +$$ +\mathcal {L} (\boldsymbol {\theta}) = - \frac {1}{N ^ {b}} \sum_ {i \in \mathbb {N} ^ {b}} \log p \left(\boldsymbol {y} _ {i} \mid \boldsymbol {x} _ {i}, \boldsymbol {\theta}\right). \tag {4} +$$ + +However, the actual task is to minimize objective (2) for test data $\mathcal{D}_{\mathrm{test}}$ with expectation over $Q_{x}^{\mathrm{test}}$ distribution. This contradiction is usually resolved in AL literature by assuming $Q_{x}^{\mathrm{test}}$ and $Q_{x}$ equality. In practice, the deployed systems struggle to deal with underrepresented test cases in the train distribution $Q_{x}$ . The examples include autonomous vehicles in rare traffic situations or facial recognition systems with gender and race biases [6]. This is schematically illustrated in Figure 1. + +We argue that the key requirement for effective AL in the wild is to collect a validation dataset $\mathcal{D}_{\mathrm{v}}$ with distribution $Q_{x}^{\mathrm{v}}$ , which approximates $Q_{x}^{\mathrm{test}}$ . To be specific, we approximate distribution of a representative collection of test cases in $\mathcal{D}_{\mathrm{v}}$ and continuously update it by newly discovered misclassified data. This can be done iteratively after conducting field trials for deployed systems. The assumptions about $\mathcal{D}_{\mathrm{v}}$ and $\mathcal{D}$ are summarized in Figure 2. + +It follows from (2) that an optimal acquisition function $\mathcal{R}_{opt}(\cdot)$ for AL minimizes distribution shift between $\mathcal{D}_{\mathrm{test}}$ and $\mathcal{D}$ , where the former is approximated by empirical $\mathcal{D}_{\mathrm{v}}$ . This can be expressed using KL divergence as + +$$ +\begin{array}{l} \mathcal{R}_{opt}(b,P) = \operatorname *{arg min}_{\mathcal{R}(b,P)}D_{KL}(Q^{\text{test}}_{\boldsymbol{x}}\| Q_{\boldsymbol{x}})\approx \\ \underset {\mathcal {R} (b, P)} {\arg \min } D _ {K L} \left(\hat {Q} _ {\boldsymbol {x}} ^ {\mathrm {v}} \| \hat {Q} _ {\boldsymbol {x}}\right), \tag {5} \\ \end{array} +$$ + +where, in practice, (5) can be replaced by locally optimal steps for every iteration $b = 1 \dots B$ and pool size $P$ . + +![](images/0cd0ae85d8abf61b7c19f8056d8e7080e5ed649a0027db367a8848f19d836556.jpg) +Figure 3. Conventional multi-scale feature extraction and the proposed FK extension (dashed). Descriptors $\mathbf{z}_i$ and Fisher score vectors $\mathbf{g}_i$ are used for density matching by our AL method. + +# 4. The proposed method + +# 4.1. Conventional feature descriptors for AL + +High dimensionality of input $x$ causes computational difficulties in minimizing (5). Then, $x$ is usually replaced by a low-dimensional feature descriptor in image retrieval [30]. Such descriptors are pooled from DNN intermediate representations $z$ , which are found to be effective [3]. Then, (5) can be reformulated as empirical distribution matching between $\hat{P}_z^{\mathrm{v}}$ and $\hat{P}_z$ . This can be done using various methods [10], but, practically, a greedy $k$ -center clustering for density estimation with a similarity measure is the most used method for the large train dataset size $N$ . + +Let $\mathbf{Z}_i^j\in \mathbb{R}^{C\times H\times W}$ be the output of $j$ th layer of task DNN model for input image $\pmb{x}_i$ as shown in Figure 3 for image classification, where $C,H$ and $W$ are the number of channels, the height, and the width, respectively. Then, a feature vector or descriptor of length $L$ can be defined as $\pmb {z}_i = \phi (\pmb {\mathsf{Z}}_i)\in \mathbb{R}^L$ , where function $\phi (\cdot)$ is a conventional average pooling operation. In a multi-scale case, descriptor $\pmb {z}_i$ is a list of multiple feature vectors $\pmb {z}_i^j$ + +A descriptor matrix for the validation dataset $Z_{\mathrm{v}} \in \mathbb{R}^{L \times M}$ and training dataset $Z \in \mathbb{R}^{L \times N}$ can be efficiently calculated using DNN forward passes. Practically, descriptors can be further compressed for storage efficiency reasons using PCA, quantization, etc. Pearson correlation (PCC) is a common match kernel, which is an accurate measure of linear correlation. By preprocessing vectors $z_{i}$ + +to have zero mean and unit variance, the similarity (cross-covariance) matrix for multi-scale case is simply + +$$ +\boldsymbol {R} _ {\boldsymbol {z}} = \sum_ {j} \left(\boldsymbol {Z} _ {\mathrm {v}} ^ {j}\right) ^ {T} \boldsymbol {Z} ^ {j}. \tag {6} +$$ + +Using information theory [9], this framework assumes representation $\mathbf{z}$ to have the following properties about the task: minimality (min $I(\mathbf{z};\mathbf{x})$ ) and sufficiency ( $I(\mathbf{y};\mathbf{z}) = I(\mathbf{y};\mathbf{x})$ ), where $I()$ is mutual information quantity. Indeed, Achille et al. [1] analytically shows that a DNN trained by stochastic gradient descent (SGD) discards non-informative features and retains only the ones to minimize objective function (2). However, these properties are applicable only for a fully trained model without bias in train data. + +An alternative approach is to use an autoencoder [12] or, similarly to VAAL [28], probabilistic VAE [18] to compress $\pmb{x}$ to $\pmb{z}$ . Those alternatives require to train another model using a new set of hyperparameters and reconstruction loss rather than task-specific objective (2). However, the learned representation $\pmb{z}$ is subject to biased train data pitfall shown in Figure 1. Fortunately, this pitfall can be resolved for task model by AL itself, if it minimizes distribution shift in (5). Hence, we choose to pool features $\pmb{z}$ from the task model in our framework to avoid data bias, additional complexity, and hyperparameter search issues. We address the sufficiency property discussed above by using unsupervised pretraining followed by a more powerful match kernel. + +# 4.2. Self-supervised Fisher kernel + +Recent works [19, 17] revived interest in influence functions and Fisher kernels used in pre-DNN era [24]. They are able to identify the most influential training points for a given test data. Though attractive, these methods are computationally expensive for large-scale data and DNN models because FK is typically calculated with respect to high-dimensional parameter vector $\theta$ . + +Using the sufficiency property [1], we approximate our optimal acquisition function (5) using the distributions of learned representations $z$ as + +$$ +\mathcal {R} _ {\text {o p t}} (b, P) = \underset {\mathcal {R} (b, P)} {\arg \min } D _ {K L} \left(\hat {P} _ {\boldsymbol {z}} ^ {\mathrm {v}} \| \hat {P} _ {\boldsymbol {z}}\right), \tag {7} +$$ + +Then, a connection between the main task (2) and $D_{KL}(P_z^{\mathrm{v}}\| P_z)$ minimization in (7) via Fisher information can be derived with respect to small perturbations in $\theta$ . Assuming that the task model minimizes distribution shift in (2) every backward pass as + +$$ +p ^ {v} (\boldsymbol {z} | \boldsymbol {\theta}) = p (\boldsymbol {z} | \boldsymbol {\theta}) + \Delta p, \tag {8} +$$ + +where $\Delta p = \Delta \pmb{\theta} \partial p(\pmb{z}|\pmb{\theta}) / \partial \pmb{\theta}$ and $\Delta \rightarrow 0$ . + +By substituting (8), the expanded form of (7) can be simplified using Taylor series of natural logarithm as + +$$ +\mathcal {R} _ {\text {o p t}} (b, P) \approx \underset {\mathcal {R} (b, P)} {\arg \min } \Delta \boldsymbol {\theta} ^ {T} \mathcal {I} \Delta \boldsymbol {\theta}, \tag {9} +$$ + +where $\mathcal{I} = \mathbb{E}_{P_z}\left[\pmb {g}(\pmb {\theta})\pmb {g}(\pmb {\theta})^T\right]$ is a Fisher information matrix and $\pmb {g}(\pmb {\theta}) = \partial \log p(\pmb {z}|\pmb {\theta}) / \partial \pmb{\theta}$ is a Fisher score with respect to $\pmb{\theta}$ . The detailed derivation is given in Appendix. + +Using result in (9), Jaakkola and Hauusler [15] proposed the popular Fisher kernel expressed by + +$$ +R _ {z, g} \left(\boldsymbol {z} _ {m}, \boldsymbol {z} _ {n}\right) = \boldsymbol {g} _ {m} (\boldsymbol {\theta}) ^ {T} \mathcal {I} ^ {- 1} \boldsymbol {g} _ {n} (\boldsymbol {\theta}). \tag {10} +$$ + +To make (10) computationally tractable, we use practical FK (PFK) where $\mathcal{I}^{-1}$ is replaced by identity matrix. Such a common approach decreases quadratic storage requirements. Next, we rewrite Fisher scores $g_{i}(\pmb{\theta})$ using a more compact form $\pmb{g}_{i}(\pmb{\theta}) = \mathrm{vec}(\pmb{g}_{i}\pmb{z}_{i}^{T})$ , where $\pmb{g}_{i}$ is computed with respect to features as $\pmb{g}_{i} = \partial L(\pmb{y}_{i},\hat{\pmb{y}}_{i}) / \partial \tilde{\pmb{z}}_{i}$ , $L(\pmb{y}_i,\hat{\pmb{y}}_i)$ is log-likelihood loss function from (4), and $\tilde{\pmb{z}}_i$ is a vector before applying nonlinearity $\sigma (\cdot)$ . The latter follows from the chain rule when computing loss function for a DNN layers $(\tilde{z}_i^j = \pmb {\theta}^T\pmb {z}_i^j = \pmb {\theta}^T\sigma (\tilde{z}_i^{j - 1}))$ as derived in Appendix. Then, the tractable PFK can be rewritten for DNNs as + +$$ +R _ {z, g} \left(\boldsymbol {z} _ {m}, \boldsymbol {z} _ {n}\right) = \boldsymbol {g} _ {m} (\boldsymbol {\theta}) ^ {T} \boldsymbol {g} _ {n} (\boldsymbol {\theta}) = \boldsymbol {z} _ {m} ^ {T} \boldsymbol {z} _ {n} \boldsymbol {g} _ {m} ^ {T} \boldsymbol {g} _ {n}. \tag {11} +$$ + +Fisher scores in (11) are also related to visual explanation methods [22]. If replace $z$ by $\pmb{x}$ in $\pmb{g}(\pmb{\theta})$ calculation, the result estimates popular importance heatmaps in the input space. In our case, kernel (11) shows the model sensitivity to changes in parameters caused by distribution shift $D_{KL}(\hat{P}_z^{\mathrm{v}}\| \hat{P}_z)$ . Then, PFK matrix $\pmb{R}_{\pmb{z},\pmb{g}}\in \mathbb{R}^{M\times N}$ can be efficiently calculated using a series of forward-backward passes. By analogy to feature similarity (6), the Fisher scores $\pmb{g_i}$ for images are calculated with respect to tensors $\mathbf{Z}_i$ and pooled by the same $\phi (\cdot)$ such that $\pmb {g}_i = \phi (\partial L_i / \partial \mathbf{Z}_i)\in \mathbb{R}^L$ . Finally, we minimize the distribution shift in (7) by maximizing PFK as + +$$ +\mathcal {R} _ {\text {o p t}} (b, P) = \underset {\mathcal {R} (b, P)} {\arg \max } \boldsymbol {R} _ {\boldsymbol {z}, \boldsymbol {g}}, \tag {12} +$$ + +where $R_{z,g} = R_z\circ R_g = \sum_j(Z_\mathrm{v}^j)^T Z^j\circ (G_\mathrm{v}^j)^T G^j$ . Our PFK matrix $R_{z,g}$ is an element-wise multiplication of feature similarity from (6) and gradient similarity matrices. + +# 4.3. The proposed pseudo-label estimators + +The main drawback of (12) is lack of labels $\pmb{y}$ in the unlabeled collection of train data. The common pseudo-labeling $(\mathbf{1}_{\arg \max_d S})$ metric $S(\cdot)$ assigns hard-label to the $d$ th class with maximum predicted probability: $S = \hat{\pmb{y}}$ . That leads to incorrect estimates during first AL iterations, particularly, for rare examples. To overcome this limitation, we propose several novel metrics to estimate pseudo-labels. + +First, we introduce estimation metrics using Monte Carlo (MC) sampling. Consider a DNN input $\pmb{x}$ being sampled near its local neighborhood. That produces inputs $\pmb{x}_k$ , feature samples $\pmb{z}_k$ , and a corresponding per-class Fisher scores $g_k(d) = \partial L(\mathbf{1}_d, \hat{\pmb{y}}_k) / \partial \pmb{z}_k$ , where class $d = 1 \ldots D$ . + +The sampling can include small rotations, translations or color distortions for image inputs [4]. The simplest MC label estimation maximizes linear correlation between features and Fisher scores as $S = \operatorname{tr}(C_{z,g})$ , where $C_{z,g}$ is cross-covariance matrix between feature descriptors and Fisher scores. Theoretically, a better metric is maximization of mutual information $I(z;g)$ to capture nonlinear dependency. Classic result [9] shows that for random vectors $z$ and $g$ that follow Gaussian probability model, average mutual information can be estimated as $S = I(z;g) = 0.5\log(|C_{z,z}||C_{g,g}| / |C_{zg,zg}|)$ , where $|C|$ is the determinant of cross-covariance matrix. This can be efficiently calculated using LU or Cholesky decomposition implemented in modern ML frameworks [23]. + +The second proposed metric explicitly estimates $\hat{p}(\boldsymbol{y},\boldsymbol{z}) = \hat{p}(\boldsymbol{y}|\boldsymbol{z})p(\boldsymbol{z})$ , for which it is necessary to have a trusted annotated dataset to obtain $\hat{p}(\boldsymbol{y}|\boldsymbol{z})$ . In our case, it can be validation dataset $\mathcal{D}_{\mathrm{v}}$ or its subset. Since $p(\boldsymbol{y}|\boldsymbol{z}) = p^{\mathrm{v}}(\boldsymbol{y}|\boldsymbol{z})$ , the estimate $\hat{p}(\boldsymbol{y},\boldsymbol{z})$ can be found from trusted conditional density $p^{\mathrm{v}}(\boldsymbol{y}|\boldsymbol{z})$ and marginal $p(\boldsymbol{z})$ . We propose to reuse the described above framework to find the most similar data points in $\mathcal{D}_{\mathrm{v}}$ to examples in $\mathcal{D}$ using $\boldsymbol{R}_{\boldsymbol{z}}$ kernel. Then, we assign given trusted labels $\boldsymbol{y}^{\mathrm{v}}$ from $p^{\mathrm{v}}(\boldsymbol{z})$ to train labels from $p(\boldsymbol{z})$ for which $\boldsymbol{R}_{\boldsymbol{z}}$ is maximized. This results in a low-complexity non-parametric method. + +To summarize, we experiment with the following label estimation metrics: a) $S = \pmb{y}$ for ablation study with true labels, b) common $S = \hat{\pmb{y}}$ , as well as the proposed c) MC $S = \operatorname{tr}(C_{\pmb{z}, \pmb{g}})$ , d) MC $S = I(\pmb{z}; \pmb{g})$ and e) $S = \hat{p}(\pmb{y}, \pmb{z})$ . + +# 4.4. Complexity of weakly-supervised algorithm + +While FK finds the most similar data points using discriminative representation, our AL needs to identify validation points for distribution matching using (12). However, even inexpensive greedy $k$ -center clustering might be prohibitive $(\mathcal{O}(PM))$ for relatively small $\mathcal{D}_{\mathrm{v}}$ . To address this, we propose to use weak supervision (correct or incorrect prediction) to find subset of misclassified validation examples $\{\mathbf{1}_{\arg \max_d\hat{\mathbf{y}}_i^{\mathrm{v}}}\neq \mathbf{y}_i^{\mathrm{v}}\}_{i\in \hat{\mathbb{M}}}$ , where $\hat{M} < M$ . Then, this subset is clustered using $k$ -centers, and $P$ validation points are selected to maximize PFK in (12). Weak supervision assumption typically holds because, often, $\mathcal{D}_{\mathrm{v}}$ is already fully-labeled to know how model is performing. Variant of our weakly-supervised method is fully described in Alg. 1. + +Computational complexity of PFK is estimated in Table 1 in terms of forward and backward DNN passes. Note that the complexity of greedy clustering, finding cross-covariance matrices is not shown because it is negligible compared to DNN passes. For comparison with AL phase (lines 3-10 in Alg. 1), we report complexity of retraining phase (line 11) using $I$ epochs and $N^b$ labeled train data. + +Since the number of unlabeled data $\hat{N}^b$ ( $\hat{N}^b = N - N^{b-1}$ in line 8) is much bigger than validation data $M$ , our + +Algorithm 1 Variant with weakly-supervised $\mathcal{D}_{\mathrm{v}}$ +1: Initialize: $\mathbb{N}^0 = \{\}$ , $\pmb{\theta}^{0}$ random or pretrained by [8] +2: for $b = 1,2\ldots B$ do +3: find misclassified subset $\{\mathbf{1}_{\mathrm{arg~max}_d\hat{y}_i^{\mathrm{v}}}\neq \mathbf{y}_i^{\mathrm{v}}\}_{i\in \mathbb{M}}$ +4: pool matrices $(Z_{\mathrm{v}},G_{\mathrm{v}})\in \mathbb{R}^{L\times M}$ +5: if $\hat{M} >P$ then +6: find $P$ centers in $\hat{\mathbb{M}}$ using $k$ -center clustering +7: subsample matrices $(Z_{\mathrm{v}},G_{\mathrm{v}})\in \mathbb{R}^{L\times P}$ +8: pool matrices $(Z,G)\in \mathbb{R}^{L\times \hat{N}^b},\hat{N}^b = N - N^{b - 1}$ +9: calculate PFK matrix $\pmb {R_{z,g}} = \pmb {R_z}\circ \pmb {R_g}$ +10: add $P$ points to $\mathbb{N}^b$ as arg max $p\pmb {R_{z,g}}$ +11: update $\pmb {\theta}^b = \arg \min_\pmb {\theta}\sum_{i\in \mathbb{N}^b}L(\pmb {y}_i,\hat{\pmb{y}}_i) / N^b$ + +Table 1. Complexity estimates per AL iteration. Assuming $\hat{N}^b >> M$ , our method has the lowest complexity in terms of forward and backward DNN passes during AL phase. + +
MethodALTrain
Uncert. [7]KNb2INb
Ens. uncert. [5]EKNb2EINb
VAAL [28]Nb+2NIVAE,D2INb
PCC (6): RzM + Nb2INb
PFK (12): Rz,g (ours)2(M + Nb)2INb
PFKMc(12): Rz,g (ours)KD(M + Nb)2INb
+ +method is $EK / 2$ times less complex than uncertainty methods [7, 5] with $K$ stochastic passes and $E$ ensembles. + +VAAL [28] consists of sampling phase with $\hat{N}^b$ forward passes and retraining phase of VAE and discriminator models using $I_{\mathrm{VAE,D}}$ epochs. Assuming that VAE, discriminator and task model $f(\pmb {x},\pmb {\theta})$ have roughly the same complexity, our method is $I_{\mathrm{VAE,D}}$ times less complex than VAAL. + +The method with PCC kernel (6) is $2 \times$ less complex than ours with PFK. The variant of our method with MC pseudo-labeling ( $S = \operatorname{tr}(C_{z, g})$ or $I(z; g)$ ) is $KD/2$ times more complex than PFK with inexpensive metrics ( $S = \hat{y}$ or $\hat{p}(\boldsymbol{y}, \boldsymbol{z})$ ), where $D$ is the number of classes. MC metrics have potentially better accuracy compared to $S = \hat{y}$ without reliance on a trusted labeled dataset as in $S = \hat{p}(\boldsymbol{y}, \boldsymbol{z})$ . + +# 5. Experiments + +We apply our framework to MNIST, SVHN and ImageNet classification. We evaluate AL not only with the original training data, but also their biased versions. Hence, we introduce a class imbalance which scales down number of available train images for subset of classes. Class imbalance is defined as the ratio of $\{0\ldots 4\}$ digits to $\{5\ldots 9\}$ digits for MNIST and SVHN. We randomly select 500 out of 1,000 classes for ImageNet. Train examples for the selected 500 classes are decimated by the class imbalance ratio, while the other 500 classes keep the original train data. + +![](images/0be9ceff8d17dd7e36651399ebacdcd71976be42b7118c7dd8d038f5e08735c0.jpg) +Figure 4. MNIST test accuracy: (a) no class imbalance, (b) $100 \times$ class imbalance, and (c) ablation study of pseudo-labeling and unsupervised pretraining ( $100 \times$ class imbalance). Our method decreases labeling by $40\%$ compared to prior works for biased data. + +![](images/f4c68060f1e99cd19929227cc6700ca11580794466d76af76459c44f06403c6a.jpg) + +![](images/a86fe2faa27a4e78e31f59f8c9d6b185845edd5057e8a23a9b0d92c330a81222.jpg) + +The code is written in PyTorch [23] with reproducible experiments and is publicly available. + +The following experimental configurations are defined: baseline when all train data is used, random sampling, and methods from Table 1. We implemented all uncertainty methods [7, 5]: variation ratio (varR), maximum entropy and BALD. Only results of the best-performing varR method are reported. We use official code for VAAL [28] experiments. We use the following notation in figures: number of ensembles is specified by the $E$ , samples by $K$ , and descriptor size by $L$ . + +We run each experiment $10 \times$ for MNIST, $5 \times$ for SVHN and once for large-scale ImageNet on V100 GPUs. We report mean accuracy and standard deviation for MNIST and SVHN test dataset. Due to lack of test labels for ImageNet, we use validation dataset for testing. Each AL experiment consists of 10 iterations ( $B = 10$ ). With the exception of last fully-connected layer, initial network parameters are from unsupervised pretraining using rotation method [8] or, if specified, randomly initialized. Large batch sizes may underperform with class-imbalanced data and, therefore, we select mini-batch size by cross-validation. The used DNN models are LeNet, ResNet-10, and ResNet-18 for MNIST, SVHN, and ImageNet, respectively. The dropout configurations are the same or similar to [7, 5] setups. + +# 5.1. MNIST + +The dataset split $|\mathcal{D}|$ , $|\mathcal{D}_{\mathrm{v}}|$ and $|\mathcal{D}_{\mathrm{test}}|$ has 50, 10 and 10 thousand images, respectively. The following hyperparameters are used: SGD, epochs=50, batch-size=25, lr=0.05, lr-decay=0.1 every 15 epochs. Descriptor length $L$ is 20 for single-scale (after conv2 output) and 80 for three-scale descriptor (conv1,2 and fc1 outputs). The selected pool size $P$ is 125 images or $0.25\%$ of $|\mathcal{D}|$ . + +Figure 4(a) shows the case when the unlabeled train dataset approximates test distribution. In this setting, the uncertainty method varR performs relatively well with only $2.5\%$ decrease in accuracy compared to our best method $(R_{z,g}, S = \hat{p}(\boldsymbol{y}, \boldsymbol{z}), L_{80})$ at first iterations and almost on + +par when $b > 5$ . Random sampling accuracy is only $3\%$ lower due to nearly uniform train distribution. VAAL [28] results are similar to random sampling. + +A practical case with $100 \times$ class imbalance is illustrated in Figure 4(b). Our FK-based methods from (12) outperform PCC feature-only method from (6) with the increase of descriptors size $L$ and use of a better label estimation metric: $S = \hat{p}(\boldsymbol{y}, \boldsymbol{z})$ vs. common $S = \hat{\boldsymbol{y}}$ . The gap between the best FK and the best uncertainty method with ensembles reaches $14\%$ or, equivalently, $40\%$ less labels is needed for the same accuracy. Furthermore, our method requires $EK/2 = 64 \times$ less processing according to Table 1. + +As part of ablation study, we plot in Figure 4(a,b) a FK setup with all-true labels $(S = y)$ . It shows the theoretical limit of FK: no accuracy is gained without class-imbalance, while significant (3-10%) improvement is achieved with the data bias compared to pseudo-labeling using $S = \hat{p}(\boldsymbol{y}, \boldsymbol{z})$ . In fact, such setup exceeds performance of the full train dataset accuracy at the second AL iteration. Task model pretrained by rotation method is able to separate digits without supervision with exception of the last randomly initialized fully-connected layer. Hence, a single AL iteration is needed to achieve baseline result. + +A set of ablation studies is presented in Figure 4(c). First, unsupervised pretraining using rotations [8] adds $7\%$ in accuracy when $L = 20$ and $3.5\%$ when $L = 80$ compared to random-weight initialization $\left(\theta_{rnd}^{0}\right)$ . Second, we compare pseudo-label estimation metrics proposed in Section 4.3. The common $S = \hat{y}$ metric performs only $1\%$ inferior compared to MC metrics ( $S = \operatorname{tr}(C_{z,g})$ and $S = I(z;g)$ ) when $b > 4$ , while it requires $KD / 2 \times$ less processing. In our setup, MC metrics employ uniform $\pm 5^{\circ}$ image rotations and Gaussian additive noise for sampling. They may require larger $K$ , other sampling or go beyond the Gaussian assumption to achieve better results. For example, Kay et al. [16] show a tractable solution for elliptically symmetric probability model and Bachman et al. [4] propose to measure mutual information across multiple scales of features. Our best metric with $S = \hat{p}(\boldsymbol{y}, \boldsymbol{z})$ outperforms others by + +![](images/97c9fba4c4c0a1937d1f6ffb7b48c4fd4458431affc74498e55e29a53e1f0694.jpg) + +![](images/62504e48c0755646c192fed0fd5861a985de7207dcabf34bd0cc845afd9ba8b7.jpg) + +![](images/c8ed40a8e71ecd5ecc542156327435ff26a66e52046821ed81598fc169a17477.jpg) +Figure 5. SVHN test (top) and ImageNet val (bottom) accuracy: (a,c) no class imbalance and (b,d) with $100 \times$ class imbalance. + +![](images/ceb0ce15a583cee9cb83c06fc26e5ae50e96de7d50729d91b66f24a310ff6b4a.jpg) + +6-7%. Therefore, we conclude that $R_{\mathbf{z}, \mathbf{g}}$ with $S = \hat{p}(\mathbf{y}, \mathbf{z})$ is a preferable approach. + +# 5.2.SVHN + +The dataset split $|\mathcal{D}|$ , $|\mathcal{D}_{\mathrm{v}}|$ and $|\mathcal{D}_{\mathrm{test}}|$ contains 500, 104 and 26 thousand images, respectively. Training dataset is obtained from concatenation of the original train and extra train datasets with total of 604,388 images. The following hyperparameters are used: SGD, epochs=35, batch-size=128, lr=0.1, lr-decay=0.1 every 15 epochs. Descriptor length $L$ is 256 for single-scale (resblock3 output) and 768 for two-scale descriptor (resblock3,4 outputs). The selected pool size $P$ is 1,250 images or $0.25\%$ of $|\mathcal{D}|$ . + +The gap between random sampling and our method is $3.5\%$ for the original and $16\%$ for the biased SVHN with the same amount of training data in Figures 5(a,b). Uncertainty varR method lacks $1.5\%$ and $10\%$ in accuracy compared to ours during first AL iterations and perform on par when $b > 4$ . Hence, approximately $40\%$ of labeling can be avoided for the biased train data. Moreover, computational complexity of uncertainty methods is $32 \times$ higher. + +The method with PCC $(\pmb{R}_{z})$ in Figure 5(b) achieves $2\%$ and $4\%$ less accuracy compared to PFK $(\pmb{R}_{z,\pmb{g}})$ with the simplest pseudo-label estimation metric $(S = \hat{\pmb{y}})$ and our best metric $S = \hat{p}(\pmb{y}, \pmb{z})$ , respectively. + +The larger descriptor size $L$ does not significantly improve accuracy in this setup. This points to importance of multi-scale extraction when, for example, spatially + +localized features can be more relevant than global ones or vice versa. A parametric aggregation of feature hierarchy can lead to better results [2, 14]. The latter is not trivial without labeled data, unlike our non-parametric approach. + +# 5.3. ImageNet + +The original dataset split $|\mathcal{D}|$ and $|\mathcal{D}_{\mathrm{v}}|$ has 1,200 and 50 thousand images, respectively. The following hyperparameters are used: SGD, epochs=60, batch-size=128, lr=0.1, lr-decay=0.1 at [30, 50, 57] epoch. The descriptor configuration is the same as for SVHN. The selected pool size $P$ is 64,000 images or $5\%$ of $|\mathcal{D}|$ . + +Figures 5(c,d) show results for large-scale ImageNet. Uncertainty varR method underperforms without class imbalance and only a fraction of percent better than random sampling with $100 \times$ class imbalance. This could be related to lower number of samples $K$ compared to setup in [5], dropout setting heuristics or large number of classes. Unfortunately, it is almost infeasible to increase $K$ due to high complexity of varR, which is $16 \times$ more than for our method during AL phase and $E \times$ more during retraining. For instance, the ImageNet experiment took 2.5 days for our method and 12 days for varR on a single V100 GPU. + +Our best method $(\pmb{R}_{z,\pmb{g}}, S = \hat{p}(\pmb{y}, \pmb{z}), L_{768})$ increases accuracy compared to prior works by $1.5\%$ without class imbalance and by $2\%$ with $100 \times$ class imbalance. The configurations with the simplest pseudo-label estimation metric $(S = \hat{\pmb{y}})$ or the ones without FK supervision gain only $1\%$ + +![](images/988970ee7a8b198b1be64dfb657a5e8167856ad33eba26f14df91d169f7e33c2.jpg) +Figure 6. Confusion matrix (top) and t-SNE (bottom) of MNIST test data at AL iteration $b = 3$ with $100 \times$ class imbalance for: (a) varR with $E_{1}$ , $K_{128}$ , (b) $R_{\mathbf{z},g}$ , $S = \hat{p}(\mathbf{y},\mathbf{z})$ , $L_{80}$ (ours), and (c) $R_{\mathbf{z},g}$ , $S = y$ , $L_{80}$ . Dots and balls represent correspondingly correctly and incorrectly classified images for t-SNE visualizations. The underrepresented classes $\{5,8,9\}$ have on average $36\%$ accuracy for prior work (a), while our method (b) increases their accuracy to $75\%$ . The ablation configuration (c) shows $89\%$ theoretical limit of our method. + +in accuracy. The gap between theoretically possible ImageNet result with true labels $(S = y)$ and our method with the estimated pseudo-labels is increasing compared to relatively small-scale 10-class MNIST in Figures 4(a,b) and SVHN in Figures 5(a,b). It indicates that a more accurate pseudo-label metric may improve results even more. While our absolute accuracy improvement is $2\%$ , it leads to $42\%$ less annotations with the same accuracy. + +# 5.4. Qualitative visualizations + +To demonstrate improvement of AL behavior, we calculate confusion matrices and t-SNE [29] clusters. We use the same experimental setup as in Figure 4(b) with class imbalance ratio of 100 and analyze MNIST test dataset after the third AL iteration $(b = 3)$ . Figure 6 presents results for the following configurations: (a) varR $(E_{1}, K_{128})$ and the proposed $(\mathbf{R}_{z,g}, L_{80})$ with (b) pseudo-labels $(S = \hat{p}(\mathbf{y}, \mathbf{z}))$ and (c) true-labels $(S = \mathbf{y})$ for ablation study. + +The class-imbalanced digits $\{5\ldots 9\}$ are heavily misclassified in Figure 6(a). It visually confirms quantitative result from Section 5.1 that uncertainty methods fail to identify relevant training data clusters. Those methods can only capture so called epistemic uncertainty which is uncertainty over DNN parameters instead of uncertainty about data. + +Figures 6(b,c) show results of the FK-supervised methods with the estimated pseudo-labels and true-labels. Compared to Figure 6(a) the class-imbalanced digits are signif + +icantly better classified, specifically, the centers of clusters "5", "8" and "9", whose average accuracy increased from only $36\%$ to $75\%$ . This result indicates the ability of self-supervised FK to find long-tails of distribution using our acquisition function (12). + +The far edges of the imbalanced clusters that intersect with other digit clusters still experience some irregular densities of misclassified examples in Figure 6(b) due to imperfect pseudo-labeling. The t-SNE setup with all-true labels in Figure 6(c) improves on those edges and achieves $89\%$ accuracy. Clearly, it is the most difficult to separate very similar intersecting examples from different classes. As a potential future direction, this problem might be addressed by a better feature separation or using adversarial training. + +# 6. Conclusions + +We formulated the optimal acquisition function for AL with realistic assumptions about data biases and continuous updates after field trials. We introduced low-complexity non-parametric AL method that minimizes distribution shift between train and validation datasets using self-supervised FK and several novel pseudo-label estimators. According to ablation studies, unsupervised pretraining further improved our approach. The conducted image classification experiments showed that our method results in at least $40\%$ less labeling for biased data compared to prior works while requiring a factor of 10 less processing. + +# References + +[1] Alessandro Achille and Stefano Soatto. Emergence of invariance and disentanglement in deep representations. Journal of Machine Learning Research, pages 1947-1980, 2018. +[2] Relja Arandjelović, Petr Gronát, Akihiko Torii, Tomás Pájdla, and Josef Sivic. NetVLAD: CNN architecture for weakly supervised place recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5297-5307, 2016. +[3] Artem Babenko and Victor Lempitsky. Aggregating local deep features for image retrieval. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 1269-1277, 2015. +[4] Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In Proceedings of the 33rd Conference on Neural Information Processing Systems, 2019. +[5] William H. Beluch, Tim Genewein, Andreas Nurnberger, and Jan M. Kohler. The power of ensembles for active learning in image classification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 9368-9377, 2018. +[6] Joy Buolamwini and Timnit Gebru. Gender shades: Intersectional accuracy disparities in commercial gender classification. In Proceedings of the Conference on Fairness, Accountability and Transparency, pages 77-91, 2018. +[7] Yarin Gal, Riashat Islam, and Zoubin Ghahramani. Deep Bayesian active learning with image data. In Proceedings of the International Conference on Machine Learning (ICML), pages 1183-1192, 2017. +[8] Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. In Proceedings of the International Conference on Learning Representations (ICLR), 2018. +[9] Robert M. Gray. Entropy and Information Theory. Springer-Verlag, 1990. +[10] A. Gretton, K. Borgwardt, M. Rasch, B. Scholkopf, and A. Smola. A kernel two-sample test. Journal of Machine Learning Research, pages 723-773, 2012. +[11] Olivier J. Henaff, Ali Razavi, Carl Doersch, S. M. Ali Eslami, and Aaron van den Oord. Data-efficient image recognition with contrastive predictive coding. arXiv:1905.09272, 2019. +[12] Geoffrey E Hinton and Richard S. Zemel. Autoencoders, minimum description length and Helmholtz free energy. In Proceedings of the 6th Conference on Neural Information Processing Systems, pages 3-10, 1994. +[13] R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In Proceedings of the International Conference on Learning Representations (ICLR), 2019. +[14] Syed Husain and Miroslaw Bober. Remap: Multi-layer entropy-guided pooling of dense CNN features for image retrieval. IEEE Transactions on Image Processing, pages 5201-5213, 2019. + +[15] Tommi Jaakkola and David Haussler. Exploiting generative models in discriminative classifiers. In M. J. Kearns, S. A. Solla, and D. A. Cohn, editors, Proceedings of the 11th Conference on Neural Information Processing Systems, pages 487-493, 1999. +[16] Jim Kay. Feature discovery under contextual supervision using mutual information. In Proceedings of the International Joint Conference on Neural Networks, 1992. +[17] Rajiv Khanna, Been Kim, Joydeep Ghosh, and Oluwasanmi Koyejo. Interpreting black box predictions using Fisher kernels. In Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS), pages 3382-3390, 2019. +[18] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. arXiv:1312.6114, 2013. +[19] Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. In Proceedings of the International Conference on Machine Learning (ICML), pages 1885-1894, 2017. +[20] David D. Lewis and William A. Gale. A sequential algorithm for training text classifiers. In Proceedings of the International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 3-12, 1994. +[21] Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, and Ian Goodfellow. Adversarial autoencoders. arXiv:1511.05644, 2016. +[22] Grégoire Montavon, Sebastian Lapuschkin, Alexander Binder, Wojciech Samek, and Klaus-Robert Müller. Explaining nonlinear classification decisions with deep taylor decomposition. Pattern Recognition, pages 211-222, 2017. +[23] 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 at Advances in Neural Information Processing Systems, 2017. +[24] F. Perronnin and C. Dance. Fisher kernels on visual vocabularies for image categorization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2007. +[25] Mengye Ren, Wenyuan Zeng, Bin Yang, and Raquel Urtasun. Learning to reweight examples for robust deep learning. In Proceedings of the International Conference on Machine Learning (ICML), pages 4334-4343, 2018. +[26] Ozan Sener and Silvio Savarese. Active learning for convolutional neural networks: A core-set approach. In Proceedings of the International Conference on Learning Representations (ICLR), 2018. +[27] Burr Settles. Active learning literature survey. Technical report, University of Wisconsin-Madison, 2010. +[28] Samarth Sinha, Sayna Ebrahimi, and Trevor Darrell. Variational adversarial active learning. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), 2019. +[29] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-SNE. Journal of Machine Learning Research, pages 2579-2605, 2008. +[30] Wengang Zhou, Houqiang Li, and Qi Tian. Recent advances in content-based image retrieval: A literature survey. arXiv:1706.06064, 2017. \ No newline at end of file diff --git a/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/images.zip b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..bb6842eb5a44cf67cf6b5eff486f70baa4539b25 --- /dev/null +++ b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:264aee695ce090dc39368953c333c47c0aa15281b6549aea19b02b47a4f88012 +size 628941 diff --git a/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/layout.json b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6de7a0f1c7a870f774eedcd2343fe51d5c998969 --- /dev/null +++ b/deepactivelearningforbiaseddatasetsviafisherkernelselfsupervision/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a49bcf2cd413286bb3d07aa696d216496b181f6c1fd102183652118103369155 +size 562450 diff --git a/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/a8b50f1c-025b-4b32-ad49-672ffb5abdcb_content_list.json b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/a8b50f1c-025b-4b32-ad49-672ffb5abdcb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..953a85e333d04674059cc63aad24a16f2446bc46 --- /dev/null +++ b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/a8b50f1c-025b-4b32-ad49-672ffb5abdcb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:482234db44a9995da04bc23796428d2b10588752a96a173d95c87bb8c6d5cd2a +size 89764 diff --git a/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/a8b50f1c-025b-4b32-ad49-672ffb5abdcb_model.json b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/a8b50f1c-025b-4b32-ad49-672ffb5abdcb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..3681009f1756aea30334a1fd620c65615badcefe --- /dev/null +++ b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/a8b50f1c-025b-4b32-ad49-672ffb5abdcb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8d7e6d1a2e9c8b3ad80bc6f416669e5edc082d84a8e970095529df27b892a97 +size 115082 diff --git a/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/a8b50f1c-025b-4b32-ad49-672ffb5abdcb_origin.pdf b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/a8b50f1c-025b-4b32-ad49-672ffb5abdcb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fe51d121eaa55204106ede56a232abab4733d3ed --- /dev/null +++ b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/a8b50f1c-025b-4b32-ad49-672ffb5abdcb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:74acb109443d2e01b9bcd8cba2639240f01b808be202b4de59baee6e969e0e25 +size 4890498 diff --git a/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/full.md b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..c5710929fa87661b8b276c4f706c5a2ba661c71e --- /dev/null +++ b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/full.md @@ -0,0 +1,421 @@ +# DeFeat-Net: General Monocular Depth via Simultaneous Unsupervised Representation Learning + +Jaime Spencer, Richard Bowden, Simon Hadfield Centre for Vision, Speech and Signal Processing (CVSSP) University of Surrey + +{jaime.spencer, r.bowden, s.hadfield}@surrey.ac.uk + +# Abstract + +In the current monocular depth research, the dominant approach is to employ unsupervised training on large datasets, driven by warped photometric consistency. Such approaches lack robustness and are unable to generalize to challenging domains such as nighttime scenes or adverse weather conditions where assumptions about photometric consistency break down. + +We propose DeFeat-Net (Depth & Feature network), an approach to simultaneously learn a cross-domain dense feature representation, alongside a robust depth-estimation framework based on warped feature consistency. The resulting feature representation is learned in an unsupervised manner with no explicit ground-truth correspondences required. + +We show that within a single domain, our technique is comparable to both the current state of the art in monocular depth estimation and supervised feature representation learning. However, by simultaneously learning features, depth and motion, our technique is able to generalize to challenging domains, allowing DeFeat-Net to outperform the current state-of-the-art with around $10\%$ reduction in all error measures on more challenging sequences such as nighttime driving. + +# 1. Introduction + +Recently there have been many advances in computer vision tasks related to autonomous vehicles, including monocular depth estimation [22, 83, 73] and feature learning [13, 61, 65]. However, as shown in Figure 1, these approaches tend to fail in the most complex scenarios, namely adverse weather and nighttime conditions. + +In the case of depth estimation, this is usually due to the assumption of photometric consistency, which starts to break down in dimly-lit environments. Feature learning can overcome such strong photometric assumptions, but + +![](images/2906665813e592be3d412abf0f8937f1790265d7ebb5724dbd53e5978bf2a3d5.jpg) +Figure 1. Left: Challenging lighting conditions during nighttime driving. Right: A catastrophic failure during depth map estimation for a current state-of-the-art monocular depth estimation framework, after being trained specifically for this scenario. + +![](images/21ca6821320fbe6d42fa572286920fa3566367c77037fee1215932a6a7a5bf41.jpg) + +these approaches tend to require ground truth pixel-wise correspondences and obtaining this ground truth in cross-seasonal situations is non-trivial. Inconsistencies between GPS measurements and drift from Visual Odometry (VO) makes automatic pointcloud alignment highly inaccurate and manual annotation is costly and time-consuming. + +We make the observation that depth estimation and feature representation are inherently complementary. The process of estimating the depth for a scene also allows for the computation of ground-truth feature matches between any views of the scene. Meanwhile robust feature spaces are necessary in order to create reliable depth-estimation systems with invariance to lighting and appearance change. + +Despite this relationship, all existing approaches tackle these challenges independently. Instead, we propose DeFeat-Net, a system that is capable of jointly learning depth from a single image in addition to a dense feature representation of the world and ego-motion between consecutive frames. What's more, this is achieved in an entirely self-supervised fashion, requiring no ground truth other than a monocular stream of images. + +We show how the proposed framework can use the existing relationships between these tasks to complement each other and boost performance in complex environments. As has become commonplace [23], the predicted depth and ego-motion can be used to generate a correspondence map + +between consecutive images, allowing for the use of photometric error based losses. However, these correspondences can also be used as positive examples in relative metric learning losses [65]. In turn, the learnt features can provide a more robust loss in cases where photometric errors fail, i.e. nighttime conditions. + +The remainder of the paper provides a more detailed description of the proposed DeFeat-Net framework in the context of previous work. We extensively show the benefits of our joint optimization approach, evaluating on a wide variety of datasets. Finally, we discuss the current state-of-the-art and opportunities for future work. The contributions of this paper can be summarized as: + +1. We introduce a framework capable of jointly and simultaneously learning monocular depth, dense feature representations and vehicle ego-motion. +2. This is achieved entirely self-supervised, eliminating the need for costly and unreliable ground truth data collection. +3. We show how the system provides robust depth and invariant features in all weather and lighting conditions, establishing new state-of-the-art performance. + +# 2. Related Work + +Here we review some of the most relevant previous work, namely in depth estimation and feature learning. + +# 2.1. Depth Estimation. + +Traditionally, depth estimation relied on finding correspondences between every pixel in pairs of images. However, if the images have been stereo rectified, the problem can be reduced to a search for the best match along a single row in the target image, known as disparity estimation. Initial methods for disparity estimation relied on hand-crafted matching techniques based on the Sum of Squared Differences (SSD), smoothness and energy minimization. + +Supervised. Ladický [33] and Zbontar [79] showed how learning the matching function can drastically improve the performance of these systems. Mayer et al. [46] instead proposed DispNet, a Fully Convolutional Network (FCN) [40] capable of directly predicting the disparity map between two images, which was further extended by [50]. Kendall et al. [30] introduced GC-Net, where the disparity is processed as a matching cost-volume in a 3D convolutional network. PSMNet [9] and GA-Net [81] extended these cost-volume networks by introducing Spatial Pooling Pyramid (SPP) features and Local/Semi-Global aggregation layers, respectively. + +Estimating depth from a single image seemed like an impossible task without these disparity and perspective cues. + +However, Saxena [58] showed how it is possible to approximate the geometry of the world based on superpixel segmentation. Each superpixel's 3D position and orientation is estimated using a trained linear model and an MRF. Liu et al. [38, 39] improve on this method by instead learning these models using a CNN, while Ladický et al. [34] incorporate semantic information as an alternative cue. + +Eigen et al. [14, 15] introduced the first methods for monocular depth regression using end-to-end deep learning by using a scale-invariant loss. Laina [35] and Cao [7] instead treated the task of monocular estimation as a classification problem and introduced a more robust loss function. Meanwhile, Ummenhofer et al. [66] introduced DeMoN, jointly training monocular depth and egomotion in order to perform Structure-from-Motion (SfM). In this paper we go one step further, jointly learning depth, egomotion and the feature space used to support them. + +Unsupervised - Stereo Training. In order to circumvent the need for costly ground truth training data, an increasing number of approaches have been proposed using photometric warp errors as a substitute. For instance, DeepStereo [17] synthesizes novel views using raw pixels from arbitrary nearby views. Deep3D [74] also performs novel view synthesis, but restricts this to stereo pairs and introduces a novel image reconstruction loss. Garg [18] and Godard [23] greatly improved the performance of these methods by introducing an additional autoencoder and left-right consistency losses, respectively. UnDeepVO [37] additionally learns monocular VO between consecutive frames by aligning the predicted depth pointclouds and enforcing consistency between both stereo streams. More recently, there have been several approaches making use of GANs [1, 53]. Most notably, [62] uses GANs to perform day-night translation and provide an additional consistency to improve performance in nighttime conditions. However, the lack of any explicit feature learning makes it challenging to generalize across domains. + +Unsupervised - Monocular Training. In order to learn unsupervised monocular depth without stereo information, it is necessary to learn a surrogate task that allows for the use of photometric warp losses. Zhou et al. [82, 83] introduced some of the first methods to make use of VO estimation to warp the previous and next frames to reconstruct the target view. Zhan [80] later extended this by additionally incorporating a feature based warp loss. Babu et al. [3, 44] proposed an unsupervised version of DeMoN [66]. Other published methods are based upon video processing with RNNs [69] and LSTMs [51] or additionally predicting scene motion [67] or optical flow [29, 70, 78]. + +The current state-of-the-art has been pushed by methods that incorporate additional constraints [68] such as temporal [45], semantic [10], edge & normal [75, 76], cross-task [84] and cycle [52, 73] consistencies. Godard et al. [22] + +expanded on these methods by incorporating information from the previous frame and using the minimum reprojection error in order to deal with occlusions. They also introduce an automasking process which removes stationary pixels in the target frame. However, they still compute photometric losses in the original RGB colourspace, making it challenging to learn across domains. + +# 2.2. Feature Learning + +Hand-Crafted. Initial approaches to feature description typically relied on heuristics based on intensity gradients in the image. Since these were computationally expensive, it became necessary to introduce methods capable of finding interesting points in the image, i.e. keypoints. Some of the most well-know methods include SIFT [41] and its variant RootSIFT [2], based on a Difference of Gaussians and Non-Maxima Suppression (NMS) for keypoint detection and HOG descriptors. + +Research then focused on improving the speed of these systems. Such is the case with SURF [5], BRIEF [6] and BRISK [36]. ORB features [56] improved the accuracy, robustness and speed of BRIEF [6] and are still widely used. + +Sparse Learning. Initial feature learning methods made use of decision trees [55], convex optimization [63] and evolutionary algorithms [31, 32] in order to improve detection reliability and discriminative power. Intelligent Cost functions [24] took this a step further, by using Gaussian Processes to learn appropriate cost functions for optical/scene flow. + +Since the widespread use of deep learning, several methods have been proposed to learn feature detection and/or description. Balntas et al. [4] introduced a method for learning feature descriptors using in-triplet hard negative mining. LIFT [77] proposes a sequential pipeline consisting of keypoint detection, orientation estimation and feature description, each performed by a separate network. LF-Net [49] builds on this idea, jointly generating dense score and orientation maps without requiring human supervision. + +On the other hand, several approaches make use of networks with shared encoder parameters in order to simultaneously learn feature detection and description. Georgakis et al. [20] learn 3D interest points using a shared Fast R-CNN [21] encoder. Meanwhile, DeTone introduced SuperPoint [12] where neither decoder has trainable parameters, improving the overall speed and computational cost. More recently, D2-Net [13] proposed a describe-then-detect approach where the network produces a dense feature map, from which keypoints are detected using NMS. + +Dense Learning. Even though SuperPoint [12] and D2-Net [13] produce dense feature maps, they still focus on the detection of interest points and don't use their features in a dense manner. Weerasekera et al. [72] learn dense features in the context of SLAM by minimizing multi-view match + +ing cost-volumes, whereas [60] use generative feature learning with scene completion as an auxiliary task to perform visual localisation. + +The Universal Correspondence Network [11] uses optical correspondences to create a pixel-wise version of the contrastive loss. Schmidt [59] instead propose semisupervised training with correspondences obtained from KinectFusion [47] and DynamicFusion [48] models. Fathy [16] and Spencer [65] extended the pixel-wise contrastive loss to multiple scale features through a coarse-to-fine network and spatial negative mining, respectively. On the other hand, SDC-Net [61] focuses on the design of the network architecture, increasing the receptive field through stacked dilated convolution, and apply the learnt features to optical flow estimation. + +In this work we attempt to unify state-of-the-art feature learning with monocular depth and odometry estimation. This is done in such a way that the pixel-wise correspondences from monocular depth estimation can support dense feature learning in the absence of ground-truth labels. Meanwhile, computing match-costs in the learned feature space greatly improves the robustness of the depth estimation in challenging cross-domain scenarios. + +# 3. Methodology + +The main objective of DeFeat-Net is to jointly learn monocular depth and dense features in order to provide more robust estimates in adverse weather conditions. By leveraging the synergy between both tasks we are able to do this in a fully self-supervised manner, requiring only a monocular stream of images. Furthermore, as a byproduct of the training losses, the system additionally learns to predict VO between consecutive frames. + +Figure 2 shows an overview of DeFeat-Net. Each training sample is composed of a target frame $I_{t}$ and a set of support frames $I_{t + k}$ , where $k \in \{-1,1\}$ . Using the predicted depth for $I_{t}$ and the predicted transforms to $I_{t + k}$ we can obtain a series of correspondences between these images, which in turn can be used in the photometric warp and pixel-wise contrastive losses. The code and pre-trained models for this technique will be available at https://github.com/jspenmar/DeFeat-Net. + +# 3.1. Networks + +DispNet. Given a single input image, $I_{t}$ , its corresponding depth map is obtained through + +$$ +D _ {t} = \frac {1}{a \Phi_ {D} (I _ {t}) + b}, \tag {1} +$$ + +where $a$ and $b$ scale the final depth to the range [0.1, 100]. $\Phi_D$ represents the disparity estimation network, formed by a ResNet [25] encoder and decoder with skip connections. + +![](images/c6a3b6bb5d9b987cadfdda04cdcae78e5c70f4925019f37394c4377e1421a872.jpg) +Figure 2. Overview of DeFeat-Net which combines complementary networks to simultaneously solve for feature representation, depth and ego-motion. The introduction of feature warping improves the robustness in complex scenarios. + +This decoder also produces intermediate disparity maps at each stage, resulting in four different scales. + +PoseNet. Similarly, the pose prediction network $\Phi_P$ consists of a multi-image ResNet encoder, followed by a 4-layer convolutional decoder. Formally, + +$$ +P _ {t \rightarrow t + k} = \Phi_ {P} \left(I _ {t}, I _ {t + k}\right), \tag {2} +$$ + +where $P_{t \to t + k}$ is the predicted transform between the cameras at times $t$ and $t + k$ . As in [22, 68] the predicted pose is composed of a rotation in axis-angle representation and a translation vector, scaled by a factor of 0.001. + +FeatNet. The final network produces a dense $n$ -dimensional feature map of the given input image, $\Phi_F: \mathbb{N}^{H \times W \times 3} \mapsto \mathbb{R}^{H \times W \times n}$ . As such, we define the corresponding L2-normalized feature map as + +$$ +F = \left\| \Phi_ {F} (I) \right\|. \tag {3} +$$ + +In this case, $\Phi_F$ is composed of a residual block encoder-decoder with skip connections, where the final encoder stage is made up of an SPP [9] with four scales. + +# 3.2. Correspondence Module + +Using the predicted $D_{t}$ and $P_{t\rightarrow t + k}$ we can obtain a set of pixel-wise correspondences between the target frame and each of the support frames. Given a 2D point in the image $p$ and its homogeneous coordinates $\dot{p}$ we can obtain its corresponding location $q$ in the 3D world through + +$$ +q = \pi^ {- 1} (\dot {p}) = K _ {t} ^ {- 1} \dot {p} D _ {t} (p), \tag {4} +$$ + +where $\pi^{-1}$ is the backprojection function, $K_{t}$ is the camera's intrinsic and $D_{t}(p)$ the depth value at the 2D pixel location estimated using (1). + +We can then compute the corresponding point $c_{t \to t + k}$ by projecting the resulting 3D point onto a new image with + +$$ +c _ {t \rightarrow t + k} (p) = \pi (\dot {q}) = K _ {t} P _ {t \rightarrow t + k} \dot {q}, \tag {5} +$$ + +where $P_{t\rightarrow t + k}$ is the transform to the new coordinate frame, i.e. the next or previous camera position from (2). Therefore, the final correspondences map is defined as + +$$ +C _ {t \rightarrow t + k} = \left\{c _ {t \rightarrow t + k} (p): \forall p \right\}. \tag {6} +$$ + +These correspondences can now be used in order to determine the sampling locations for the photometric warp loss and the positive matches in a pixel-wise contrastive loss to learn an appropriate feature space. + +# 3.3. Losses + +Once again, it is worth noting that DeFeat-Net is entirely self-supervised. As such, the only ground truth inputs required are the original images and the camera's intrinsics. + +Pixel-wise Contrastive. In order to train $\Phi_F$ , we make use of the well established pixel-wise contrastive loss [11, 59, 65]. Given two feature vectors from the dense feature maps, $f_{1} = F_{1}(p_{1})$ and $f_{2} = F_{2}(p_{2})$ , the contrastive loss is defined as + +$$ +l \left(y, f _ {1}, f _ {2}\right) = \left\{ \begin{array}{l l} \frac {1}{2} (d) ^ {2} & \text {i f} y = 1 \\ \frac {1}{2} \left\{\max (0, m - d) \right\} ^ {2} & \text {i f} y = 0 \\ 0 & \text {o t h e r w i s e} \end{array} \right. \tag {7} +$$ + +with $y$ as the label indicating if the pair is a correspondence, $d = ||f_1 - f_2||$ and $m$ the target margin between negative pairs. In this case, the set of positive correspondences is + +given by $C_{t \to t + k}$ . Meanwhile, the negative examples are generated using one of the spatial negative mining techniques from [65]. + +From both sets, a label mask $Y$ is created indicating if each possible pair of pixels is a positive, negative or should be ignored. As such, the final loss is defined as + +$$ +L _ {C} = \sum_ {p _ {1}} \sum_ {p _ {2}} l \left(Y \left(p _ {1}, p _ {2}\right), F _ {t} \left(p _ {1}\right), F _ {t + k} \left(p _ {2}\right)\right). \tag {8} +$$ + +This loss serves to drive the learning of a dense feature space which enables matching regardless of weather and seasonal appearance variations. + +Photometric and Feature Warp. We also use the correspondences in a differentiable bilinear sampler [28] in order to generate the warped support frames and feature maps + +$$ +I _ {t + k \rightarrow t} = I _ {t + k} \left\langle C _ {t \rightarrow t + k} \right\rangle \tag {9} +$$ + +$$ +F _ {t + k \rightarrow t} = F _ {t + k} \left\langle C _ {t \rightarrow t + k} \right\rangle \tag {10} +$$ + +where $\langle \rangle$ is the sampling operator. The final warp losses are a weighted combination of SSIM [71] and L1, defined by + +$$ +\Psi \left(I _ {1}, I _ {2}\right) = \alpha \frac {1 - S S I M \left(I _ {1} , I _ {2}\right)}{2} + (1 - \alpha) | | I _ {1} - I _ {2} | | \tag {11} +$$ + +$$ +L _ {P} = \Psi \left(I _ {t}, I _ {t + k \rightarrow t}\right), \tag {12} +$$ + +$$ +L _ {F} = \Psi \left(F _ {t}, F _ {t + k \rightarrow t}\right), \tag {13} +$$ + +The photometric loss $L_{P}$ serves primarily to support the early stages of training when the feature space is still being learned. + +Smoothness. As an additional regularizing constraint, we incorporate a smoothness loss [27]. This enforces local smoothness in the predicted depths proportional to the strength of the edge in the original image, $\partial I_t$ . This is defined as + +$$ +L _ {S} = \frac {\lambda}{N} \sum_ {p} | \partial D _ {t} (p) | e ^ {- | | \partial I _ {t} (p) | |}, \tag {14} +$$ + +where $\lambda$ is a scaling factor typically set to 0.001. This loss is designed to avoid smoothing over edges by reducing the weighting in areas of strong intensity gradients. + +# 3.4. Masking & Filtering + +Some of the more recent improvements in monocular depth estimation have arisen from explicit edge-case handling [22]. This includes occlusion filtering and the masking of stationary pixels. We apply these automatic procedures to the correspondences used to train both the depth and dense features. + +Minimum Reprojection. As the camera capturing the monocular stream moves throughout the scene, various elements will become occluded and disoccluded. In terms of + +a photometric error based loss, this means that some of the correspondences generated by the system will be invalid. However, when multiple consecutive frames are being used, i.e. $k \in \{-1, 1\}$ , different occlusions occur in each image. + +By making the assumption that the photometric error will be greater in the case where an occlusion is present, we can filter these out by simply propagating the correspondence with the minimum error. This is defined as + +$$ +C _ {t \rightarrow t + k} = \left\{\begin{array}{l l}c _ {t \rightarrow t - 1}&\text {w h e r e} \Psi \left(I _ {t}, I _ {t \rightarrow t - 1}\right) < \Psi \left(I _ {t}, I _ {t \rightarrow t + 1}\right)\\c _ {t \rightarrow t + 1}&\text {o t h e r w i s e}\end{array}\right. \tag {15} +$$ + +Automasking. Due to the nature of the training method and implicit depth priors (i.e. regions further away change less) stationary frames or moving objects can cause holes of infinite depth in the predicted depth maps. An automasking procedure is used to remove these stationary pixels from contributing to the loss, + +$$ +\mu = \left[ \min _ {k} \Psi \left(I _ {t}, I _ {t + k}\right) < \min _ {k} \Psi \left(I _ {t}, I _ {t + k \rightarrow t}\right)\right], \tag {16} +$$ + +where $\mu$ is the resulting mask indicating if a correspondence is valid or not and [] is the Iverson bracket. In other words, pixels that exhibit lower photometric error to the unwarped frame than to the warped frame are masked from the cost function. + +# 4. Results + +Each subsystem in DeFeat-Net follows a U-Net structure with a ResNet18 encoder pretrained on ImageNet, followed by a 7 layer convolutional decoder similar to [23]. The code and pre-trained models will be available at https://github.com/jspenmar/DeFeat-Net. In all our experiments, the warp loss parameter is set to $\alpha = 0.85$ as per [28]. + +On the KITTI dataset [19] we follow the Eigen-Zhou evaluation protocol of [23, 83]. This dataset split provides 39,810 training images and 4,424 validation images. These images are all from a single domain (sunny daytime driving). + +We also make use of the RobotCar Seasons dataset [57]. This is a curated subset of the larger RobotCar dataset [43], containing 49 sequences. The dataset was specifically chosen to cover a wide variety of seasons and weather conditions, leading to greater diversity in appearance than KITTI. + +Unlike the KITTI dataset, which provides sparse ground-truth depth from LiDAR, RobotCar Seasons does not include any depth ground truth. Our proposed technique is unsupervised, and can still be trained on this varied dataset, but the lack of ground truth makes quantitative evaluation on RobotCar Seasons impossible. To resolve this, we returned to the original RobotCar dataset and manually created a validation dataset comprising of 12,000 images with + +
MethodAbs-RelSq-RelRMSERMSE-logA1A2A3
LEGO [75]0.1621.3526.2760.252---
Ranjan [54]0.1481.1495.4640.2260.8150.9350.973
EPC++ [42]0.1411.0295.3500.2160.8160.9410.976
Struct2depth (M) [8]0.1411.0265.2910.2150.8160.9450.979
Monodepth V2 [22]0.1230.9445.0610.1970.8660.9570.980
DeFeat0.1260.9255.0350.2000.8620.9540.980
+ +Table 1. Monocular depth evaluation on the KITTI dataset + +
Methodμ+Global μ-Global AUCLocal μ-Local AUC
ORB [56]N/AN/A85.83N/A84.06
ResNet [26]8.511725.987294.7711.133568.26
ResNet-L20.3411.039199.250.437171.80
VGG [64]4.007712.654392.945.908870.03
VGG-L20.39051.223599.570.56577.06
SAND-G [65]0.0930.74699.730.26687.06
SAND-L0.1560.59298.880.50594.34
SAND-GL0.1830.99699.280.64293.34
DeFeat0.1051.11399.100.29483.64
+ +Table 2. Learned feature evaluation on the KITTI dataset + +their corresponding ground-truth LiDAR depth maps, split evenly across day and night driving scenarios. + +# 4.1. Single Domain Evaluation + +We first evaluate our approach on the KITTI dataset, which covers only a single domain. For evaluation of depth accuracy, we use the standard KITTI evaluation metrics, namely the absolute relative depth error (ABS_REL), the relative square error (SQ_REL) and the root mean square error (RMSE). For these measures, a lower number is better. We also include the inlier ratio measures (A1, A2 and A3) of [23] which measure the fraction of relative depth errors within $25\%$ , $25^{2}\%$ and $25^{3}\%$ of the ground truth. For these measures, a larger fraction is better. + +To evaluate the quality of the learned feature representations, we follow the protocol of [65]. We compute the average distance in the feature space for the positive pairs from the ground-truth $(\mu_{+})$ , and the negative pairs $(\mu_{-})$ . Naturally a smaller distance between positive pairs, and a larger distance between negative pairs, is best. We also compute the Area Under the Curve (AUC) which can be interpreted as the probability that a randomly chosen negative sample will have a larger distance than the corresponding positive ground truth match. Therefore, higher numbers are better. Following [65] all three errors are split into both local (within 25 pixels) and global measurements. + +The results of the depth evaluation are shown in Table 1 and the feature evaluation is shown in Table 2. We can see that in this single-domain scenario, the performance of our technique is competitive with MonodepthV2 and clearly outperforms most other state-of-the-art techniques for monocular depth estimation. The results for [22] were obtained by training a network using the code provided by the authors. + +Regarding the features, L2 denotes the L2-normalized versions, whereas G, L & GL represent the different negative mining variants from [65]. We can also see that despite being unsupervised, our learned feature space is competitive with contemporary supervised feature learning techniques and greatly outperforms pretrained features when evaluating locally. It is interesting, however, to note that the simple act of L2-normalizing can improve the global performance of the pretrained features. + +Our feature space tends to perform better in the Global evaluation metrics than the local ones. This is unsurprising as the negative samples for the contrastive loss in (7) are obtained globally across the entire image. + +# 4.2. Multi-Domain Evaluation + +However, performance in the more challenging RobotCar Seasons dataset demonstrates the real strength of jointly learning both depth and feature representations. RobotCar Seasons covers multiple domains, where traditional photometric based monocular depth algorithms struggle and where a lack of cross-domain ground-truth has historically made feature learning a challenge. For this evaluation, we select the best competing approach from Table 1 (MonodepthV2) and retrain both it and DeFeat-Net on the RobotCar Seasons dataset. All techniques are trained from scratch. + +The results are shown in Table 3 and example depth map comparisons are shown in Figure 3. We can see that in this more challenging task, the proposed approach outperforms the previous state of the art technique across all error measures. While for the daytime scenario, the improvements are modest, on the nighttime data there is a significant improvement with around $10\%$ reduction in all error measures. + +We believe that the main reason behind this difference is + +
Test domainMethodAbs-RelSq-RelRMSERMSE-logA1A2A3
DayMonodepth V2 [22]0.2713.4389.2680.3290.6000.8400.932
DayDeFeat0.2653.1298.9540.3230.5970.8430.935
NightMonodepth V2 [22]0.3674.5129.2700.4120.5610.7900.888
NightDeFeat0.3354.3399.1110.3890.6030.8280.914
+ +Table 3. Monocular depth evaluation on the RobotCar dataset + +![](images/f4b3f9cdd6b7240c2cb7c99509ca792bfce0b232ff420c0dcb22d9a4d7f10915.jpg) +Figure 3. Top: input images from the RobotCar dataset. Middle: estimated depth maps from Monodepth V2 [22]. Bottom: estimated depth maps from DeFeat-Net. + +that in well-lit conditions, the photometric loss is already a good supervision signal. In this case, incorporating the feature learning adds to the complexity of the task. However, nighttime scenarios make photometric matching less discriminative, leading to weaker supervision. Feature learning provides the much needed invariance and robustness to the loss, leading to the significant increase in performance. + +It is interesting to note that the proposed approach is especially robust with regards to the number of estimated outliers. The A1, A2 and A3 error measures are fairly consistent between the day and night scenarios for the proposed technique. This indicates that even in areas of uncertain depth (due to under-exposure and over-saturation), the proposed technique fails gracefully rather than producing catastrophically incorrect estimates. + +Since previous state-of-the-art representations cannot be trained unsupervised, and RobotCar Seasons does not provide any ground-truth depth, it is not possible to repeat the feature comparison from Table 2 in the multi-domain scenario. Instead Figure 4 compares qualitative examples of the learned feature spaces. For these visualizations, we find the linear projection that best shows the correlation between the feature map and the images and map it to the RGB color cube. This dimensionality reduction removes a significant + +amount of discriminative power from the descriptors, but allows for some form of visualization. + +In all cases, the feature descriptors can clearly distinguish scene structures such as the road. It is interesting to note that a significant degree of context has been encoded in the features, and they are capable of easily distinguishing a patch in the middle of the road, from one on the left or right, and from a patch of similarly colored pavement. The feature maps trained on the single domain KITTI dataset can sometimes display more contrast than those trained on RobotCar Seasons. Although this implies a greater degree of discrimination between different image regions, this is likely because the latter representation can cover a much broader range of appearances from other domains. Regarding, the nighttime features, it is interesting that those trained on a single domain seem to exhibit strange behaviour around external light sources such as the lampposts, traffic lights and headlights. This is likely due to the bias in the training data, with overall brighter image content. + +# 4.3. Ablation + +Finally, for each dataset we explore the benefits of concurrent feature learning, by re-training with the FeatNet subsystem disabled. As shown in Table 4, the removal of + +![](images/944067759ca584ce00f3cf02a51856aa73c6ececf7c6912cfd27c3bbd6bfcc17.jpg) + +![](images/3c3cb7506781e3a5f32ccde6b96f4f67022575933a12e4ebaab1f2cbda9cda40.jpg) + +![](images/3ee43ccbb6e2e9a6ae3bf3b489865d10e3df1fdce359bad1939507dba76f574c.jpg) + +![](images/dae7d81c50ccca4920d3a51210655e5fcdb96ad4f888b824f8ea496a78f6802f.jpg) +Figure 4. Feature space visualizations for DeFeat-Net trained on the single-domain KITTI dataset (centre) and multi-domain RobotCar Seasons dataset (right). + +![](images/ca5520f7b98b7776e1422c80fefe58d66dbe878c2d4d02ef3ef8f4d124f1da21.jpg) + +![](images/3f7de0f6de754adf4b439698bd5288fba7fd6cecccc282c67f517904f83f7ecf.jpg) + +![](images/6e43b2598b90867fb441855034e40a044bfdd897dfcc50e34505c4dd55f6e14d.jpg) + +![](images/69762c7a29bdb4022174660dbea8b0e037a719f25a181f8b6d9ef4044cc1f4f5.jpg) + +![](images/13402ffd6b24f83aeb7d58a78e8d392eaf5883aafff85c2854db89a78f223cf0.jpg) + +![](images/191ddaaedfb6f3c6efe2e833d610587e5c33d5617616b578586e408f5c9c673c.jpg) + +
DatasetMethodAbs-RelSq-RelRMSERMSE-logA1A2A3
KITTIDeFeat (no feat)0.1230.9485.1300.1970.8630.9560.980
KITTIDeFeat0.1260.9255.0350.2000.8620.9540.980
RobotCar DayDeFeat (no feat)0.2743.8858.9530.3350.6400.8530.934
RobotCar DayDeFeat0.2653.1298.9540.3230.5970.8430.935
RobotCar NightDeFeat (no feat)0.74813.5028.9560.6570.3930.6240.759
RobotCar NightDeFeat0.3354.3399.1110.3890.6030.8280.914
+ +Table 4. Performance with and without concurrent feature learning, on each dataset + +the concurrent feature learning from our technique causes a small and inconsistent change on the KITTI and RobotCar Day data. However, on the RobotCar Night data, our full approach drastically outperforms the version which does not learn a specialist matching representation. For many error measures, the performance doubles in these challenging scenarios, and the reduction in outliers causes a three-fold reduction in the Sq-Rel error. + +These findings reinforce the observation that the frequently used photometric warping loss is insufficient for estimating depth in challenging real-world domains. + +# 5. Conclusions & Future Work + +This paper proposed DeFeat-Net, a unified framework for learning robust monocular depth estimation and dense feature representations. Unlike previous techniques, the system is able to function over a wide range of appearance domains, and can perform feature representation learning + +with no explicit ground truth. This idea of co-training an unsupervised feature representations has potential applications in many areas of computer vision beyond monocular depth estimation. + +The main limitation of the current approach is that there is no way to enforce feature consistency across seasons. Although depth estimation and feature matching work robustly within any given season, it is currently unclear weather feature matching between different seasons is possible. It would be interesting in the future to explore cross-domain consistency as an additional training constraint. However, this will necessitate the collection of new datasets with cross seasonal alignments. + +# Acknowledgements + +This work was partially funded by the EPSRC under grant agreements (EP/R512217/1, EP/S016317/1 and EP/S035761/1). We would also like to thank NVIDIA Corporation for their Titan Xp GPU grant. + +# References + +[1] Filippo Aleotti, Fabio Tosi, Matteo Poggi, and Stefano Mattoccia. Generative adversarial networks for unsupervised monocular depth prediction. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 11129 LNCS, pages 337-354, 2019. +[2] Relja Arandjelovic. Three Things Everyone Should Know to Improve Object Retrieval. In Proceedings of the 2012 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2911-2918, 2012. +[3] Madhu Babu, Swagat Kumar, Anima Majumder, and Kaushik Das. UnDEMoN 2.0: Improved Depth and Ego Motion Estimation through Deep Image Sampling. arXiv preprint, nov 2018. +[4] Vassileios Balntas, Edgar Riba, Daniel Ponsa, and Krystian Mikolajczyk. Learning local feature descriptors with triplets and shallow convolutional neural networks. In British Machine Vision Conference 2016, BMVC 2016, volume 2016-Septe, pages 119.1-119.11, 2016. +[5] Herbert Bay, Tinne Tuytelaars, and Luc Van Gool. SURF: Speeded up robust features. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 3951 LNCS, pages 404-417, 2006. +[6] Michael Calonder, Vincent Lepetit, Christoph Strecha, and Pascal Fua. BRIEF: Binary robust independent elementary features. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 6314 LNCS, pages 778-792, 2010. +[7] Yuanzhouhan Cao, Zifeng Wu, and Chunhua Shen. Estimating Depth from Monocular Images as Classification Using Deep Fully Convolutional Residual Networks. IEEE Transactions on Circuits and Systems for Video Technology, 28(11):3174-3182, nov 2016. +[8] Vincent Casser, Soeren Pirk, Reza Mahjourian, and Anelia Angelova. Depth Prediction without the Sensors: Leveraging Structure for Unsupervised Learning from Monocular Videos. Proceedings of the AAAI Conference on Artificial Intelligence, 33:8001-8008, jul 2019. +[9] Jia-Ren Chang and Yong-Sheng Chen. Pyramid Stereo Matching Network. CVPR, 2018. +[10] Po-Yi Chen, Alexander H. Liu, Yen-Cheng Liu, and Yu-Chiang Frank Wang. Towards Scene Understanding: Unsupervised Monocular Depth Estimation With Semantic-Aware Representation. In CVPR, pages 2619-2627, 2019. +[11] Christopher B. Choy, Jun Young Gwak, Silvio Savarese, and Manmohan Chandraker. Universal correspondence network. In Advances in Neural Information Processing Systems, pages 2414-2422. Neural information processing systems foundation, 2016. +[12] Daniel Detone, Tomasz Malisiewicz, and Andrew Rabinovich. SuperPoint: Self-supervised interest point detection and description. In IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops, volume 2018-June, pages 337-349, dec 2018. + +[13] Mihai Dusmanu, Ignacio Rocco, Tomas Pajdla, Marc Pollefeys, Josef Sivic, Akihiko Torii, and Torsten Sattler. D2-Net: A Trainable CNN for Joint Detection and Description of Local Features. CVPR, may 2019. +[14] David Eigen and Rob Fergus. Predicting depth, surface normals and semantic labels with a common multi-scale convolutional architecture. In Proceedings of the IEEE International Conference on Computer Vision, volume 2015 Inter, pages 2650-2658, nov 2015. +[15] 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, volume 3, pages 2366-2374, 2014. +[16] Mohammed E Fathy, Quoc-Huy Tran, M. Zeeshan Zia, Paul Vernaza, and Manmohan Chandraker. Hierarchical Metric Learning and Matching for 2D and 3D Geometric Correspondences. ECCV, 2018. +[17] John Flynn, Ivan Neulander, James Philbin, and Noah Snavely. Deep stereo: Learning to predict new views from the world's imagery. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2016-Decem, pages 5515-5524, jun 2016. +[18] Ravi Garg, B. G. Vijay Kumar, Gustavo Carneiro, and Ian Reid. Unsupervised CNN for single view depth estimation: Geometry to the rescue. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 9912 LNCS, pages 740-756, mar 2016. +[19] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for Autonomous Driving? The KITTI Vision Benchmark Suite. Conference on Computer Vision and Pattern Recognition (CVPR), 2012. +[20] Georgios Georgakis, Srikrishna Karanam, Ziyan Wu, Jan Ernst, and Jana Kosecka. End-to-End Learning of Keypoint Detector and Descriptor for Pose Invariant 3D Matching. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 1965–1973, 2018. +[21] Ross Girshick. Fast R-CNN. In Proceedings of the IEEE International Conference on Computer Vision, volume 2015 Inter, pages 1440-1448, 2015. +[22] Clément Godard, Oisin Mac Aodha, and Gabriel Brostow. Digging Into Self-Supervised Monocular Depth Estimation. ICCV, jun 2019. +[23] Clément Godard, Oisin Mac Aodha, and Gabriel J. Brostow. Unsupervised monocular depth estimation with left-right consistency. In Proceedings - 30th IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, volume 2017-Janua, pages 6602-6611, sep 2017. +[24] Simon Hadfield and Richard Bowden. Scene flow estimation using intelligent cost functions. In BMVC 2014 - Proceedings of the British Machine Vision Conference 2014, 2014. +[25] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2016-Decem, pages 770-778. IEEE Computer Society, dec 2016. + +[26] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2016-Decem, pages 770-778, 2016. +[27] Philipp Heise, Sebastian Klose, Brian Jensen, and Alois Knoll. PM-Huber: PatchMatch with Huber Regularization for Stereo Matching. ICCV, 2013. +[28] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and Koray Kavukcuoglu. Spatial Transformer Networks. NIPS, jun 2015. +[29] Joel Janai, Fatma Güney, Anurag Ranjan, Michael Black, and Andreas Geiger. Unsupervised Learning of Multi-Frame Optical Flow with Occlusions. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 11220 LNCS, pages 713–731, 2018. +[30] Alex Kendall, Hayk Martirosyan, Saumitro Dasgupta, Peter Henry, Ryan Kennedy, Abraham Bachrach, and Adam Bry. End-to-End Learning of Geometry and Context for Deep Stereo Regression. In Proceedings of the IEEE International Conference on Computer Vision, volume 2017-Octob, pages 66–75, mar 2017. +[31] Tomáš Krajnik, Pablo Cristóforis, Keerthy Kusumam, Peer Neubert, and Tom Duckett. Image features for visual teach-and-repeat navigation in changing environments. Robotics and Autonomous Systems, 88:127-141, feb 2017. +[32] Tomás Krajnik, Pablo Cristóforis, Matías Nitsche, Keerthy Kusumam, and Tom Duckett. Image features and seasons revisited. In 2015 European Conference on Mobile Robots, ECMR 2015 - Proceedings, pages 1-7. IEEE, sep 2015. +[33] Lubor Ladický, Christian Hane, and Marc Pollefeys. Learning the Matching Function. arXiv preprint, feb 2015. +[34] Lubor Ladicky, Jianbo Shi, and Marc Pollefeys. Pulling things out of perspective. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 89-96, 2014. +[35] Iro Laina, Christian Rupprecht, Vasileios Belagiannis, Federico Tombari, and Nassir Navab. Deeper depth prediction with fully convolutional residual networks. In Proceedings - 2016 4th International Conference on 3D Vision, 3DV 2016, pages 239-248, jun 2016. +[36] Stefan Leutenegger, Margarita Chli, and Roland Y. Siegwart. BRISK: Binary Robust invariant scalable keypoints. In Proceedings of the IEEE International Conference on Computer Vision, pages 2548-2555, 2011. +[37] Ruihao Li, Sen Wang, Zhiqiang Long, and Dongbing Gu. UnDeepVO: Monocular Visual Odometry Through Unsupervised Deep Learning. In Proceedings - IEEE International Conference on Robotics and Automation, pages 7286-7291, sep 2018. +[38] Fayao Liu, Chunhua Shen, and Guosheng Lin. Deep convolutional neural fields for depth estimation from a single image. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 07-12-June, pages 5162-5170, nov 2015. +[39] Fayao Liu, Chunhua Shen, Guosheng Lin, and Ian Reid. Learning Depth from Single Monocular Images Using Deep + +Convolutional Neural Fields. IEEE Transactions on Pattern Analysis and Machine Intelligence, 38(10):2024-2039, feb 2016. +[40] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 07-12-June, pages 3431-3440, 2015. +[41] David G Lowe. Distinctive Image Features from Scale-Invariant Keypoints. International Journal of Computer Vision, 60(2):91-110, 2004. +[42] Chenxu Luo, Zhenheng Yang, Peng Wang, Yang Wang, Wei Xu, Ramkant Nevatia, and Alan Yuille. Every Pixel Counts ++: Joint Learning of Geometry and Motion with 3D Holistic Understanding. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1-1, jul 2019. +[43] Will Maddern, Geoffrey Pascoe, Chris Linegar, and Paul Newman. 1 Year, $1000\mathrm{km}$ : The Oxford RobotCar Dataset. *IJRR*, 3(December 2015), 2015. +[44] V. Madhu Babu, Kaushik Das, Anima Majumdar, and Swagat Kumar. UnDEMoN: Unsupervised Deep Network for Depth and Ego-Motion Estimation. In IEEE International Conference on Intelligent Robots and Systems, pages 1082-1088, aug 2018. +[45] Reza Mahjourian, Martin Wicke, and Anelia Angelova. Unsupervised Learning of Depth and Ego-Motion from Monocular Video Using 3D Geometric Constraints. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 5667-5675, feb 2018. +[46] Nikolaus Mayer, Eddy Ilg, Philip Hausser, Philipp Fischer, Daniel Cremers, Alexey Dosovitskiy, and Thomas Brox. A Large Dataset to Train Convolutional Networks for Disparity, Optical Flow, and Scene Flow Estimation. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2016-Decem, pages 4040-4048, 2016. +[47] Richard A Newcombe. KinectFusion: Real-Time Dense Surface Mapping and Tracking. Technical report, 2013. +[48] Richard A Newcombe, Dieter Fox, and Steven M Seitz. DynamicFusion: Reconstruction and Tracking of Non-rigid Scenes in Real-Time. Computer Vision and Pattern Recognition (CVPR), pages 343-352. +[49] Yuki Ono, Pascal Fua, Eduard Trulls, and Kwang Moo Yi. LF-Net: Learning local features from images. In Advances in Neural Information Processing Systems, volume 2018-Decem, pages 6234-6244, 2018. +[50] Jiahao Pang, Wenxiu Sun, Jimmy SJ. Ren, Chengxi Yang, and Qiong Yan. Cascade Residual Learning: A Two-Stage Convolutional Neural Network for Stereo Matching. In Proceedings - 2017 IEEE International Conference on Computer Vision Workshops, ICCVW 2017, volume 2018-Janua, pages 878-886, aug 2018. +[51] Viorica Patraucean, Ankur Handa, and Roberto Cipolla. Spatio-temporal video autoencoder with differentiable memory. ICLR, nov 2016. +[52] Andrea Pilzer, Stéphane Lathuilière, Nicu Sebe, and Elisa Ricci. Refine and Distill: Exploiting Cycle-Inconsistency + +and Knowledge Distillation for Unsupervised Monocular Depth Estimation. CVPR, pages 9768-9777, 2019. +[53] Andrea Pilzer, Dan Xu, Mihai Puscas, Elisa Ricci, and Nicu Sebe. Unsupervised adversarial depth estimation using cycled generative networks. In Proceedings - 2018 International Conference on 3D Vision, 3DV 2018, pages 587-595, jul 2018. +[54] Anurag Ranjan, Varun Jampani, Lukas Balles, Kihwan Kim, Deqing Sun, Jonas Wulff, and Michael J. Black. Competitive Collaboration: Joint Unsupervised Learning of Depth, Camera Motion, Optical Flow and Motion Segmentation. CVPR, pages 12240-12249, 2019. +[55] Edward Rosten and Tom Drummond. Machine learning for high-speed corner detection. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 3951 LNCS, pages 430-443, 2006. +[56] Ethan Rublee and Gary Bradski. ORB: an eficient alternative to SIFT or SURF. ICCV, 2011. +[57] Torsten Sattler, Will Maddern, Carl Toft, Akihiko Torii, Lars Hammarstrand, Erik Stenborg, Daniel Safari, Masatoshi Okutomi, Marc Pollefeys, Josef Sivic, Fredrik Kahl, and Tomas Pajdla. Benchmarking 6DOF Outdoor Visual Localization in Changing Conditions. CVPR, 2018. +[58] Ashutosh Saxena, Min Sun, and Andrew Y. Ng. Make3D: Learning 3D scene structure from a single still image. IEEE Transactions on Pattern Analysis and Machine Intelligence, 31(5):824-840, may 2009. +[59] Tanner Schmidt, Richard Newcombe, and Dieter Fox. Self-Supervised Visual Descriptor Learning for Dense Correspondence. IEEE Robotics and Automation Letters, 2(2):420-427, 2017. +[60] Johannes L. Schonberger, Marc Pollefeys, Andreas Geiger, and Torsten Sattler. Semantic Visual Localization. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 6896-6906, 2018. +[61] René Schuster, Oliver Wasenmüller, Christian Unger, and Didier Stricker. SDC - Stacked Dilated Convolution: A Unified Descriptor Network for Dense Matching Tasks. CVPR, 2019. +[62] Aashish Sharma, Robby T. Tan, and Loong-Fah Cheong. Depth Estimation in Nighttime using Stereo-Consistent Cyclic Translations. arXiv preprint, sep 2019. +[63] Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Describer learning using convex optimisation. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 7572 LNCS, pages 243-256, 2012. +[64] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In 3rd International Conference on Learning Representations, ICLR 2015 - Conference Track Proceedings, 2015. +[65] Jaime Spencer, Richard Bowden, and Simon Hadfield. Scale-Adaptive Neural Dense Features : Learning via Hierarchical Context Aggregation. CVPR, 2019. +[66] Benjamin Ummenhofer, Huizhong Zhou, Jonas Uhrig, Nikolaus Mayer, Eddy Ilg, Alexey Dosovitskiy, and Thomas + +Brox. DeMoN: Depth and motion network for learning monocular stereo. In Proceedings - 30th IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, volume 2017-Janua, pages 5622-5631, 2017. +[67] Sudheendra Vijayanarasimhan, Susanna Ricco, Cordelia Schmid, Rahul Sukthankar, and Katerina Fragkiadaki. SfM-Net: Learning of Structure and Motion from Video. arXiv preprint, apr 2017. +[68] Chaoyang Wang, Jose Miguel Buenaposada, Rui Zhu, and Simon Lucey. Learning Depth from Monocular Videos Using Direct Methods. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 2022-2030, nov 2018. +[69] Rui Wang, Stephen M. Pizer, and Jan-Michael Frahm. Recurrent Neural Network for (Un-)supervised Learning of Monocular VideoVisual Odometry and Depth. CVPR, pages 5555-5564, 2019. +[70] Yang Wang, Peng Wang, Zhenheng Yang, Chenxu Luo, Yi Yang, and Wei Xu. UnOS: Unified Unsupervised Opticalflow and Stereo-depth Estimation by Watching Videos. Technical report, 2019. +[71] Zhou Wang, Alan Conrad Bovik, Hamid Rahim Sheikh, and Eero P Simoncelli. Image quality assessment: From error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4):600-612, 2004. +[72] Chamara Saroj Weerasekera, Ravi Garg, Yasir Latif, and Ian Reid. Learning Deeply Supervised Good Features to Match for Dense Monocular Reconstruction. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 11365 LNCS, pages 609-624. Springer Verlag, 2019. +[73] Alex Wong, Byung-Woo Hong, and Stefano Soatto. Bilateral Cyclic Constraint and Adaptive Regularization for Unsupervised Monocular Depth Prediction. CVPR, pages 5644-5653, 2019. +[74] Junyuan Xie, Ross Girshick, and Ali Farhadi. Deep3D: Fully automatic 2D-to-3D video conversion with deep convolutional neural networks. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 9908 LNCS, pages 842–857, apr 2016. +[75] Zhenheng Yang, Peng Wang, Yang Wang, Wei Xu, and Ram Nevatia. LEGO: Learning Edge with Geometry all at Once by Watching Videos. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 225-234, mar 2018. +[76] Zhenheng Yang, Peng Wang, Wei Xu, Liang Zhao, and Ramakant Nevatia. Unsupervised learning of geometry from videos with edge-aware depth-normal consistency. In 32nd AAAI Conference on Artificial Intelligence, AAAI 2018, pages 7493-7500, nov 2018. +[77] Kwang Moo Yi, Eduard Trulls, Vincent Lepetit, and Pascal Fua. LIFT: Learned invariant feature transform. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 9910 LNCS, pages 467-483, 2016. + +[78] Zhichao Yin and Jianping Shi. GeoNet: Unsupervised Learning of Dense Depth, Optical Flow and Camera Pose. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 1983-1992. IEEE Computer Society, dec 2018. +[79] Jure Žbontar and Yann Lecun. Stereo matching by training a convolutional neural network to compare image patches. Journal of Machine Learning Research, 17, oct 2016. +[80] Huangying Zhan, Ravi Garg, Chamara Saroj Weerasekera, Kejie Li, Harsh Agarwal, and Ian Reid. Unsupervised Learning of Monocular Depth Estimation and Visual Odometry with Deep Feature Reconstruction. CVPR, 2018. +[81] Feihu Zhang, Victor Prisacariu, Ruigang Yang, and Philip H. S. Torr. GA-Net: Guided Aggregation Net for End-to-end Stereo Matching. CVPR, apr 2019. +[82] Tinghui Zhou, Matthew Brown, Noah Snavely, and David G. Lowe. Unsupervised learning of depth and ego-motion from video. In Proceedings - 30th IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, volume 2017-Janua, pages 6612-6621, 2017. +[83] Tinghui Zhou, Philipp Krahenbihl, Mathieu Aubry, Qixing Huang, and Alexei A. Efros. Learning dense correspondence via 3D-guided cycle consistency. In Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, volume 2016-Decem, pages 117-126, apr 2016. +[84] Yuliang Zou, Zelun Luo, and Jia Bin Huang. DF-Net: Unsupervised Joint Learning of Depth and Flow Using Cross-Task Consistency. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 11209 LNCS, pages 38-55, sep 2018. \ No newline at end of file diff --git a/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/images.zip b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..8be8c4353c97a28c3bb1270347aa14a9bed9b19f --- /dev/null +++ b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0271de567f80b1931f458d5bb356e3a6cecc016b5b885ef1081939b11a6f4420 +size 734759 diff --git a/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/layout.json b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c5566bbbb124c70666bc00dd9e1ef56854aad492 --- /dev/null +++ b/defeatnetgeneralmonoculardepthviasimultaneousunsupervisedrepresentationlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62904817cea03c9e2bc7d6e3d397ac3510a5c37d08e540d8af7ee8a548a7fe2f +size 428570 diff --git a/deparadeepattributiongraphfordeepknowledgetransferability/dbe6b1a4-4e34-4108-b1ee-f4a88a49178e_content_list.json b/deparadeepattributiongraphfordeepknowledgetransferability/dbe6b1a4-4e34-4108-b1ee-f4a88a49178e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a16d448ec87c7d321f365099bfdb6c2b224e06ef --- /dev/null +++ b/deparadeepattributiongraphfordeepknowledgetransferability/dbe6b1a4-4e34-4108-b1ee-f4a88a49178e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a76fa3e7152b99f8fa9f9ccfa0b48e04c5ca07f311327bdae79b78c66757a03 +size 74611 diff --git a/deparadeepattributiongraphfordeepknowledgetransferability/dbe6b1a4-4e34-4108-b1ee-f4a88a49178e_model.json b/deparadeepattributiongraphfordeepknowledgetransferability/dbe6b1a4-4e34-4108-b1ee-f4a88a49178e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..98986d5b0fc1e70ff4ca1fd5ae7c84a05c30744c --- /dev/null +++ b/deparadeepattributiongraphfordeepknowledgetransferability/dbe6b1a4-4e34-4108-b1ee-f4a88a49178e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a19e4cf03015c4639b138aa05892d6167665d0c66a80b92c77d167fff2c595db +size 89489 diff --git a/deparadeepattributiongraphfordeepknowledgetransferability/dbe6b1a4-4e34-4108-b1ee-f4a88a49178e_origin.pdf b/deparadeepattributiongraphfordeepknowledgetransferability/dbe6b1a4-4e34-4108-b1ee-f4a88a49178e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a40bd461d1ded9e93e7c611b5abf63fb202a52f7 --- /dev/null +++ b/deparadeepattributiongraphfordeepknowledgetransferability/dbe6b1a4-4e34-4108-b1ee-f4a88a49178e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:11ebfdf9ea865809344f5cfc77a19f4bdb4f9c137719ec964de9dfcb7327ee10 +size 750860 diff --git a/deparadeepattributiongraphfordeepknowledgetransferability/full.md b/deparadeepattributiongraphfordeepknowledgetransferability/full.md new file mode 100644 index 0000000000000000000000000000000000000000..9093267f50087bd2a9dd0dc8d66179568a5ed90d --- /dev/null +++ b/deparadeepattributiongraphfordeepknowledgetransferability/full.md @@ -0,0 +1,266 @@ +# DEPARA: Deep Attribution Graph for Deep Knowledge Transferability + +Jie Song $^{1*}$ , Yixin Chen $^{1*}$ , Jingwen Ye $^{1}$ , Xinchao Wang $^{2}$ , Chengchao Shen $^{1}$ , Feng Mao $^{3}$ , and Mingli Song $^{1}$ + +1Zhejiang University, 2Stevens Institute of Technology + +3Alibaba Group + +# Abstract + +Exploring the intrinsic interconnections between the knowledge encoded in PRe-trained Deep Neural Networks (PR-DNNs) of heterogeneous tasks sheds light on their mutual transferability, and consequently enables knowledge transfer from one task to another so as to reduce the training effort of the latter. In this paper, we propose the DEeP Attribution gRAph (DEPARA) to investigate the transferability of knowledge learned from PR-DNNs. In DEPARA, nodes correspond to the inputs and are represented by their vectorized attribution maps with regards to the outputs of the PR-DNN. Edges denote the relatedness between inputs and are measured by the similarity of their features extracted from the PR-DNN. The knowledge transferability of two PR-DNNs is measured by the similarity of their corresponding DEPARAs. We apply DEPARA to two important yet understudied problems in transfer learning: pre-trained model selection and layer selection. Extensive experiments are conducted to demonstrate the effectiveness and superiority of the proposed method in solving both these problems. Code, data and models reproducing the results in this paper are available at https://github.com/zju-vipa/ DEPARA. + +# 1. Introduction + +Driven by massive labeled data [5] and the developing advanced deep models [9], the field of artificial intelligence has made remarkable progress in recent years. However, in real-world scenarios we often encounter the dilemma where limited labeled training data are available for addressing our problems at hand. The common practice in this situation is transferring the pre-trained models, which are open sourced by dedicated researchers or industries, to solve our own problems. Yet, along this road comes up another problem: faced with countless PR-DNNs of various layers, which model and which layer of it should be transferred to ben- + +eft the target task most? Currently the model selection is usually done blindly by adopting the ImageNet pre-trained models [21, 15] and the layer selection is usually conducted heuristically. However, the ImageNet pre-trained models will not always produce satisfactory performances for all the tasks, especially when the task is significantly different from the one defined by ImageNet [2, 28]. Likewise, the heuristically selected layer may also perform sub-optimally, as the optimal layer for being transferred depends on various factors such as task relatedness and the amount of the target data. + +To tackle the aforementioned problems, we need to explore and reveal the underlying transferability among deep knowledge from PR-DNNs of heterogeneous tasks. Recently, Zamir et al. [33] did the pioneering work towards this direction. They proposed a fully computational approach, termed taskonomy, to measure the task transferability. However, there are three unneglected limitations in taskonomy tremendously hampering its real-world application. The first is its prohibitively expensive cost in computation. For computing the pairwise relatedness for a given task dictionary, the computation cost will grow quadratically with the number of the tasks, which will be excessively expensive when the number of tasks becomes large. The second limitation is that it adopts transfer learning to model the relatedness between tasks, which still requires a moderately large amount of labeled data to train the transfer models. Lastly, taskonomy only considers the transferability across different models or tasks while ignoring the transferability across different layers, which we argue is also important for a transfer to be successful. + +The main obstacle standing in the way of measuring the transferability learned from different PR-DNNs is the "black-box" nature of deep models. As the knowledge (e.g., features) learned from different PR-DNNs is unexplainable and actually in different embedding space, it is very tricky to compute the transferability directly. In this paper, to derive the transferability of knowledge encoded in PR-DNNs, we propose the DEeP Attribution gRAph (DEPARA) to represent the knowledge learned in PR-DNNs. In DEPARA, + +nodes correspond to the inputs and are represented by their vectorized attribution maps [25, 3, 24] with regards to the outputs of the PR-DNN. Edges denote the relatedness between inputs and are measured by their similarity in the embedding space of the PR-DNN (as seen in Figure 1). As the DEPARAs of different PR-DNNs are defined on the same set of inputs, they are actually in the same embedding space and thus the knowledge transferability of two PR-DNNs is directly measured by the similarity of their corresponding DEPARAs. More similar DEPARAs indicate that more correlated knowledge is learned from different PR-DNNs, thus the knowledge transferability to each other is higher. + +The proposed method requires no human annotations, imposes no constraints on architectures and is several-magnitude times faster than taskonomy. Meanwhile, beyond model selection, it can also be easily adopted to the layer selection problem in transfer learning. Extensive experiments conducted demonstrate the effectiveness of DE-PARA for quantifying the deep knowledge transferability. + +To sum up, we made the following three main contributions: (1) We introduce the challenging, important yet under-studied deep knowledge transferability problem where only PR-DNNs are provided without any labeled data. (2) We propose the DEPARA, an efficient and effective method for deriving the transferability of the knowledge learned from PR-DNNs. To our knowledge, this is the first work to address the pre-trained model selection and the layer selection problems simultaneously. (3) Extensive experiments are conducted to demonstrate the effectiveness of DEPARA in solving both the model and the layer selection problems in transfer learning. + +# 2. Related Work + +# 2.1. Knowledge Transferability + +Transferring PR-DNNs to new tasks is an active research topic. Razavian et al. [20] demonstrated that features extracted from deep neural networks could be used as generic image representations to tackle the diverse range of visual tasks. Yosinski et al. [31] investigated the transferability of deep features extracted from every layer of deep neural networks. Azizpour et al. [2] studied several factors affecting the transferability of deep features. Recently, the effects of pre-training datasets for transfer learning are also studied [12, 8, 11, 28]. Albeit many heuristics are found by these works, none of them explicitly quantify the transferability among different tasks and layers to provide a principled way for model and layer selection. Zamir et al. [33] proposed a fully computational approach to measure the task relatedness. Dwivedi and Roig [6] adopted representation similarity analysis for efficient task taxonomy. Song et al. [26] utilized the similarity of attribution maps to quantify the model transferability. However, the layer selection + +problem is still omitted in these works. In this paper, we propose DEPARA to address both the model and the layer selection problems in transfer learning. + +# 2.2. Deep Model Attribution + +Attribution refers to assigning importance scores to the inputs for a specified output. Existing attribution methods can be mainly divided into two groups, including perturbation- [34, 35, 36] and gradient-based methods [25, 3, 24, 27, 23, 1]. Perturbation-based methods compute the attribution of an input feature by making perturbations, e.g., removing, masking or altering, to individual inputs or neurons and observe the impact on later neurons. In contrast, backpropagation-based methods calculate the attributions for all input features in one or few forward and backward pass through the network, which renders them more efficient. In this paper, we directly adopt existing attribution methods for transferability. Devising more advanced attribution method for our problem is left to future work. + +# 2.3. Deep Knowledge Representation + +How to represent the knowledge encoded in PR-DNNs is vital for knowledge reusing. Hinton et al. [10] viewed the soft predictions of a trained teacher model as the knowledge for knowledge distillation. Following their work, some other forms of knowledge are proposed to facilitate student learning. For example, Romero et al. [22] proposed to adopt intermediate representations learned by the teacher as hints to improve the final performance of the student. Zagoruyko and Komodakis [32] utilized the attention of the teacher model to guide the learning of the student. Recently, the relation of input instances learned from the trained deep models is also found a kind of useful knowledge [4, 16, 14, 29, 17]. For example, Chen et al. [4] utilized cross sample similarities to accelerate deep metric learning. Park et al. [16] leveraged mutual relations of data examples for knowledge distillation. In this paper, we propose DEPARA to represent the deep knowledge, which enables us easily quantify the knowledge transferability. + +# 3. Deep Knowledge Transferability + +# 3.1. Notation and Problem Setup + +Assume there are $N$ PR-DNNs available, denoted by $M = \{m_{1}, m_{2}, \dots, m_{N}\}$ . Each model in $M$ can be viewed to be composed of a number of nonlinear functions: $m_{i} := f_{L_{i}}^{i} \circ \dots \circ (f_{2}^{i} \circ f_{1}^{i})$ , where $f$ denotes the basic nonlinear function, $L_{i}$ denotes the number of nonlinear functions in $m_{i}$ , and the symbol $\circ$ denotes the function composition operation. Note that no constraints are imposed on the architectures of models in $M$ , so the number of nonlinear functions in these PR-DNNs may be different. The task handled by $m_{i}$ is denoted by $t_{i}$ , and all the tasks in + +volved in $M$ are collectively denoted by the task dictionary $T, T = \{t_1, t_2, \dots, t_N\}$ . For task $t_i$ , we adopt $P_i(x,y)$ to denote the joint data distribution of the corresponding data domain. In this paper, the term deep knowledge refers to the embedding space learned by PR-DNNs. The embedding space produced after $f_k^i$ in $m_i$ is denoted by $\mathcal{F}_k^i$ . Given $M$ without any labeled data, we investigate the transferability, which is defined in the next section, between different $\mathcal{F}$ s for facilitating task selection and layer selection in transfer learning. + +# 3.2. Definition of Transferability + +An intuitive description of transferability is "how well a deep ConvNet representation can be transferred to the target task" [31, 2]. Here we introduce a more rigorous definition to facilitate addressing the model and the layer selection problems in transfer learning. Assume there is a deep knowledge pool denoted by $\Omega = \{\mathcal{F}^{(1)},\mathcal{F}^{(2)},\ldots \} ^1$ Note that in this pool any two knowledge items $\mathcal{F}^{(i)}$ and $\mathcal{F}^{(j)}$ may be produced from different models or layers. The transferability of $\mathcal{F}^{(i)}$ to task $t_j$ , denoted by $\mathcal{T}_{\mathcal{F}^{(i)}\to t_j}$ , is defined as the ascending rank of $\mathcal{F}^{(i)}$ among $\Omega$ for solving the target task. Here the rank is computed based on the standard empirical risk. Formally, let $D$ be the target data randomly sampled from $P_{j}$ , i.e., $D = \{(x_{1},y_{1}),(x_{2},y_{2}),\dots \}$ $\mathcal{F}^{(i)}(D)$ denotes the embeddings of $D$ in $\mathcal{F}^{(i)}$ , then + +$$ +\mathcal {T} _ {\mathcal {F} ^ {(i)} \rightarrow t _ {j}} (\Omega , D) := \text {a s c e n d i n g} _ {-} \operatorname {r a n k} \left(\mathcal {R} _ {P _ {j}} \left(h _ {\mathcal {F} ^ {(i)} (D)}\right); \Omega\right). \tag {1} +$$ + +$h_{\mathcal{F}^{(i)}(D)}$ is the hypothesis produced on $\mathcal{F}^{(i)}(D)$ . $\mathcal{R}$ denotes the standard expected risk: + +$$ +\mathcal {R} _ {P _ {j}} (h) := \mathbb {E} _ {x, y \sim P _ {j}} [ \ell_ {j} (h (x), y) ], \tag {2} +$$ + +where $\ell_{j}$ is the objective function of task $t_j$ . Detailed descriptions of ascending_rank is provided in the supplementary material. If the transferability of every $\mathcal{F}$ in $\Omega$ to task $t_j$ is known, we can directly select the $\mathcal{F}$ which ranks first for solving the target task $t_j$ . Note that when every $\mathcal{F}$ in $\Omega$ comes from a different PR-DNN, the definition of transferability can be used for model selection. If all $\mathcal{F}$ s in $\Omega$ come from different layers of the same PR-DNN, the definition can be used for layer selection in transfer learning. + +The transferability defined above is intuitively straightforward. However, the computation is expensive for measuring the transferability between every pair of tasks in the task dictionary. What is worse, it needs labeled data for all the tasks involved. To bypass these problems, We propose DEPARA to approximate the defined transferability without any labeled data. We argue two factors must be considered simultaneously for computing the transferability: + +1. Inclusiveness: for a transfer to be successful, $\mathcal{F}$ produced by the PR-DNN of the source task should be inclusive of sufficient information for solving the target task. Inclusiveness is an intuitively straightforward and fundamental ingredient of transferability. However, since $\mathcal{F}$ is highly nonlinear and unexplainable, it is very challenging to directly measure the inclusiveness of $\mathcal{F}$ for solving the target task. +2. Accessibility: $\mathcal{F}$ should be sufficiently abstracted and easily re-purposed to the target task so that the target task can be well solved with limited human supervision. Without the requirement of accessibility, $\mathcal{F}$ produced by shallower layers will be more likely of higher transferability as $\mathcal{F}$ from shallower layers tend to be of higher inclusiveness than that from higher layers. Measuring the accessibility of $\mathcal{F}$ is also a challenging problem due to the black-box nature of deep models. + +# 3.3. Deep Attribution Graph + +An illustrative diagram of the DEPARA is depicted in Figure 1. Formally, assume there is a set of randomly sampled unlabeled data points $D_{p} = \{x_{1}, x_{2}, \dots, x_{n}\}$ . $D_{p}$ is called probe data in this paper. The probe data are first fed to the PR-DNN to obtain their features, i.e., the outputs of the specific layer, after a forward pass. Then the attribution maps are produced by a backward pass. The backpropagation rule depends on the adopted attribution methods [1]. In DEPARA, each node corresponds to a data point in probe data and its feature is the vectorized attribution map of this data point. The edge between two nodes denotes the relatedness of the two data points and are measured by their similarity in the embedding space of the PR-DNN. For $\mathcal{F}_{k}^{i}$ from $m_{i}$ , a DEPARA symbolized by $\mathcal{G}_{k}^{i}(D_{p}) = (\mathcal{V}_{k}^{i}, \mathcal{E}_{k}^{i})$ can be obtained, where $\mathcal{V}$ and $\mathcal{E}$ denote the nodes and the edges, respectively. $\mathcal{G}_{k}^{i}(D_{p})$ indicates the DEPARA is defined on $D_{p}$ . More detailed descriptions of the nodes and the edges are provided as follows. + +# 3.3.1 Nodes + +The nodes in $\mathcal{G}_k^i$ are collectively denoted by $\nu_{k}^{i} = \{v_{k,1}^{i}, v_{k,2}^{i}, \dots, v_{k,n}^{i}\}$ , where $v_{k,m}^{i}$ is the attribution of $x_{m}$ with regards to $\mathcal{F}_k^i(x_m)$ . In this paper, we adopt Gradient*Input [24] for attribution. Gradient*Input refers to a first-order Taylor approximation of how the output would change if the input was set to zero, which implies the importance of the input w.r.t the output. Mathematically, for the $i$ -th element $x_{(i)}$ in $x$ , its attribution score $v_{(i)}$ with respect to $\mathcal{F}$ is computed as: + +$$ +v _ {(i)} := x _ {(i)} * \frac {\partial \| \mathcal {F} (x) \| ^ {2}}{\partial x _ {(i)}}, \tag {3} +$$ + +where $\| \cdot \|$ denotes $\ell_2$ norm. + +![](images/d1817ff5f1fe7c4621307cb82ad669914dd354db7f847dcb24ff913368aa749c.jpg) +Figure 1. The illustrative diagram of the procedure for constructing the deep attribution graph. + +The nodes are devised for measuring the inclusiveness of $\mathcal{F}$ . The intuition is that for $\mathcal{F}^i(x_m)$ and $\mathcal{F}^j(x_m)$ of the same input $x_m$ but produced by two PR-DNNs $m_i$ and $m_j$ , if they produce more similar attributions (i.e., they focus on the more similar regions on the input), they are more likely to contain correlated information and be transformed to each other. Otherwise, they focus on different input dimensions so that being less correlated to each other. + +# 3.3.2 Edges + +The edges in $\mathcal{G}_k^i$ are collectively denoted by $\mathcal{E}_k^i = \{e_{k,11}^i,e_{k,12}^i,\dots,e_{k,nn}^i\}$ , where $e_{k,pq}^{i}$ is the edge of the $p$ -th node and the $q$ -th node and denotes the similarity of corresponding inputs in the embedding space $\mathcal{F}_k^i$ . Formally, + +$$ +e _ {k, p q} ^ {i} := \operatorname {c o s i n e \_ s i m} (\mathcal {F} _ {k} ^ {i} (x _ {p}), \mathcal {F} _ {k} ^ {i} (x _ {q})). \tag {4} +$$ + +We adopt cosine similarity to define the edge because it is insensitive to the length of $\mathcal{F}(\cdot)$ . Note that we assume there exists an edge between every pair of nodes in $\nu_{k}^{i}$ , so that $\mathcal{G}_k^i$ is actually a fully connected graph. Furthermore, as $\mathcal{G}_k^i$ is devised to be undirected, $e_{k,pq}^{i} = e_{k,qp}^{i}$ for any $p$ and $q$ . + +The edges are devised to uncover the accessibility of transferability. If the embedding space $\mathcal{F}_k^i$ produced after $f_{k}^{i}$ of $m_{i}$ can be easily transferred (i.e., of high accessibility) to another embedding space $\mathcal{F}_l^j$ produced after $f_{l}^{j}$ of $m_j$ , $\mathcal{F}_k^i$ and $\mathcal{F}_l^j$ should be similar in topological structure. Otherwise, it will consume a large amount of labeled data and training time to rebuild the embedding space $\mathcal{F}_l^j$ on top of $\mathcal{F}_k^i$ , which violates the definition of high accessibility. The edges in $\mathcal{G}$ can be viewed as a representation of the topological structure in the embedding space. Two embedding spaces of the similar topological structure should produce similar edges in $\mathcal{G}$ for the same set of probe data. + +# 3.4. Task Transferability + +Here we adopt DEPARAs to quantify the transferability among different tasks in $T$ , a goal similar to taskonomy [33]. However, in our problem only PR-DNNs of cor + +responding tasks are provided. We assume no labeled data are available for any task. + +Before constructing DEPARAs for the tasks in $T$ , two issues must be resolved. The first is that for task $t_i$ , which embedding space $\mathcal{F}$ (i.e., layer) of $m_i$ should we choose to best represent the knowledge needed for task $t_i$ . In this paper, we viewed all PR-DNNs in an encoder-decoder architecture. The encoder extracts compact features and the decoder makes predictions using the features from the decoder. We adopt the embedding space learned by the encoder, denoted as $\mathcal{F}_e^i$ , to represent the knowledge of $t_i$ . Thus the knowledge pool can be denoted by $\Omega = \{\mathcal{F}_e^1, \mathcal{F}_e^2, \dots, \mathcal{F}_e^N\}$ . The second is that we need a set of probe data which are shared among all the tasks for probing the topological structure of $\mathcal{F}$ and constructing the DEPARAs. In this paper, the probe data are randomly sampled. More details about how the probe data are obtained are provided in the experiment section and the supplementary material. + +According to Eq. (3) and (4), for each task $t$ in $T$ , a DE-PARA $\mathcal{G}_e$ is obtained on the probe data $D_p$ . The transferability of $\mathcal{F}_e^i$ to task $t_j$ is approximated by the descending rank of $\mathcal{F}_e^i$ in $\Omega$ based on the graph similarity: + +$$ +\mathcal {T} _ {\mathcal {F} _ {e} ^ {i} \rightarrow t _ {j}} (\Omega , D _ {p}) \approx \text {d e s c e n d i n g} _ {-} \operatorname {r a n k} \left(s \left(\mathcal {G} _ {e} ^ {i}, \mathcal {G} _ {e} ^ {j}\right); \Omega , D _ {p}\right), \tag {5} +$$ + +where $s(\cdot)$ is the similarity function. $s(\mathcal{G}_e^i,\mathcal{G}_e^j) = s(\mathcal{V}_e^i,\mathcal{V}_e^j) + \lambda s(\mathcal{E}_e^i,\mathcal{E}_e^j)$ . For nodes, we adopt the cosine similarity function: $s(\mathcal{V}_e^i,\mathcal{V}_e^j) = \frac{1}{n}\sum_{k = 1}^{n}\frac{v_{e,k}^i\cdot v_{e,k}^j}{\|v_{e,k}^i\|\cdot\|v_{e,k}^j\|}$ . For edges, the similarity is defined to be Spearman correlation coefficient: $s(\mathcal{E}_e^i,\mathcal{E}_e^j) = 1 - \frac{6\sum d_k^2}{n^3 - n}$ , where $d_{k}$ is the difference between the ranks of the $k$ -th elements of $\mathcal{E}_e^i$ and $\mathcal{E}_e^j$ . $\lambda$ is the trade-off hyper-parameter. Detailed descriptions of descending_rank are given in the supplementary material. + +# 3.5. Layer Transferability + +As aforementioned, deep models are usually composed of many nonlinear functions or layers. For a PR-DNN $m_{i} = f_{L_{i}}^{i}\circ \dots \circ (f_{2}^{i}\circ f_{1}^{i})$ , actually $L_{i}$ different embedding spaces can be obtained, which can be denoted by + +$\Omega_{i} = \{\mathcal{F}_{1}^{i},\mathcal{F}_{2}^{i},\dots,\mathcal{F}_{L_{i}}^{i}\}$ . However, in task transferability described above as well as taskonomy [33], only one embedding space $\mathcal{F}_e^i$ from the encoder is considered and all other learned knowledge is ignored. It may lead to suboptimal performance as reusing $\mathcal{F}_e^i$ can not guarantee to be optimal for different target tasks. + +Here we consider the layer selection problem which is also important in transfer learning: for a source task $t_i$ , which layer of its PR-DNN should be chosen to benefit the target task $t_j$ most? The layer selection problem can be viewed as selecting $\mathcal{F}^i$ from $\Omega_i$ which benefits the target task $t_j$ most. We adopt $\mathcal{F}_e^j$ produced by the encoder of $m_j$ to denote the knowledge essential to task $t_j$ , as $\mathcal{F}_e^j$ is usually the most compact. The layer selection is conducted by + +$$ +k = \arg \max _ {k} s \left(\mathcal {G} _ {k} ^ {i}, \mathcal {G} _ {e} ^ {j}\right). \tag {6} +$$ + +With $k$ computed from Eq. (6), we adopt $\mathcal{F}_k^i$ for transferring the PR-DNN $m_i$ to the target task $t_j$ . + +# 4. Experiments + +We first validate the proposed method for task transferability, then show its effectiveness for layer selection. + +# 4.1. Task Transferability on Taskonomy Models + +# 4.1.1 Pre-trained Models + +Here we adopt PR-DNNs released by taskonomy [33] to validate the effectiveness of DEPARA for task transferability. Twenty PR-DNNs are selected in this experiment, each of which is for a single-image task. As all taskonomy models naturally follow an encoder-decoder architecture, we directly use the output of the encoder for constructing the DEPARA. Taskonomy measures the task transferability by the performance of transfer learning. We adopt its results to evaluate our method. + +# 4.1.2 Probe Data + +Following [26], we construct the probe data by randomly sampling 1,000 images in the validation set of taskonomy data. We try using more data, but no obvious improvement in performance is observed in our experiment. Additionally, we also adopt Indoor Scene [19] and COCO [13], which are very different from taskonomy data, as the probe data for computing the transferability of taskonomy tasks. For more details, please refer to the supplementary material. + +# 4.1.3 Evaluation Metric + +We adopt two evaluation metrics, $\mathrm{P}@\mathrm{K}$ and $\mathrm{R}@\mathrm{K}$ , which are widely used in information retrieval, to compare the task transferability constructed from our method with that from taskonomy. Each target task is viewed as a query, and + +its top-5 source tasks which produce the best transferring performances in taskonomy are regarded as relevant to the query. We adopt the Precision-Recall (PR) curve to demonstrate the overall performance of the proposed method. + +# 4.1.4 Visualization Results across Tasks + +Here we visualize some nodes in $\mathcal{V}$ and edges in $\mathcal{E}$ of DEPARA to provide a better perceptual understanding of the proposed method. Results are shown in Figure 2. It can be seen that some tasks produce similar attribution maps and instance relationships, while some others not. For example, RGB2depth produces highly similar attribution maps and relational graph with RGB2mist. However, their results are dissimilar with that of Autoencoder. Actually, RGB2depth and RGB2mist are proved in taskonomy of high transferability to each other, while their transferability to Autoencoder is relatively low. Furthermore, taskonomy adopts agglomerative clustering to categorize the tasks into four groups: 3D, 2D, geometric, and semantic tasks. From Figure 2, we can see that our method tends to produce relatively similar nodes and edges within each group of tasks. Although some exceptions may occur, the results become more credible as we aggregate results of more nodes and edges. + +# 4.1.5 Task Transferability Results + +In this section, we evaluate the proposed method by the task transferability obtained from taskonomy. To better understand the results, we introduce a baseline using Random Ranking, which indicates the task transferability is randomly determined. To make ablation study of the proposed method, we introduce three variants of our method. DEPARA- $\mathcal{V}$ : only the nodes in DEPARA are utilized for task transferability; DEPARA- $\mathcal{E}$ : only the edges are used; DEPARA: the full version of our method using both nodes and edges, where $\lambda$ is tuned by randomly sampling a small subset of all the PR-DNNs. Additionally, we also introduce another competitor: Representation Similarity Analysis (RSA) proposed by [7]. Here we adopt PR curve to compare the performance of all the aforementioned methods. To further demonstrate the similarity between the task transferability obtained by our method and that from taskonomy, the task similarity tree produced by DEPARA is also depicted in Figure 3. The task similarity tree from taskonomy and some other more results are provided in the supplementary material. From these results, we can conclude that: (1) The proposed method produces task transferability highly similar to that of taskonomy. As our method is much more efficient $^2$ than taskonomy, it is an effectual substitute for taskonomy when human annotations are unavailable or the + +![](images/5302eeca13da184d07a8a43c63350a56bee95707f22cbcefbf1d730c1171e377.jpg) +Figure 2. Visualization of some examples of the nodes and the edges of DEPARA. For the nodes, we visualize three examples from taskonomy data, Indoor Scene and COCO, respectively. For the edges, we randomly sample 30 nodes from taskonomy data and show their interconnections. Note that some weak connections are omitted for better visualization. Here we select two 3D tasks, three 2D tasks, two geometric tasks, and two semantic tasks for visualization. The task similarity tree derived from taskonomy is depicted above task names. + +![](images/8fe2b6e28cb85066a3a1bbecf1dcd5fc189e2adeb440aa6b5a8b014a9239741a.jpg) +(a) PR curve. + +![](images/c6b39250355eb1c512e24e763cd5d1a32a78a5aaa52dc49eb82ad3f4a926a3dc.jpg) +(b) Task similarity tree. +Figure 3. PR curve and the task similarity tree obtained on probe data randomly sampled from taskonomy data. + +task library $T$ is large in size. (2) DEPARA outperforms RSA [7], which demonstrates its superiority over the state-of-the-art. Actually, DEPARA- $\mathcal{E}$ and RSA yield comparable performance, as they are quite similar in method. (3) DEPARA outperforms DEPARA- $\mathcal{V}$ and DEPARA- $\mathcal{E}$ by a considerable margin, which implies the essentiality of both the nodes and the edges in DEPARA for measuring the knowledge transferability. For more results and interesting observations, please refer to the supplementary material. + +To investigate the effects of different types of probe data, we also evaluate the proposed method with probe data from Indoor Scene and COCO. The task-wise $\mathrm{P@K}$ and $\mathrm{R@K}$ results, as well as the average results of the proposed method and some competitors, are provided in Table 1. It can be seen that although the data from Indoor Scene and COCO are quite different from taskonomy data, the proposed method still produces the task transferability of which the task-wise topological structure is highly similar to the one obtained by taskonomy. It indicates that the proposed method is insensitive to the randomly sampled probe data. Furthermore, the proposed method consistently + +outperforms DEPARA- $\mathcal{V}$ , DEPARA- $\mathcal{E}$ and RSA on all the datasets, which again verifies the effectiveness and superiority of the proposed method. + +# 4.2. Layer Selection in Transfer Learning + +# 4.2.1 Experimental Settings + +We adopt Syn2Real-C [18] dataset to validate the effectiveness of DEPARA for layer selection. In Syn2Real-C, the source and the target data are from different domains, but of the same 12 object categories. The source domain contains 152, 397 synthetic images and the target domain consists of 55, 388 images cropped from the Microsoft COCO dataset. In this paper, we use the data from the source and the target domain to train two domain-specific models. The ultimate goal is improving the performance on the target domain. + +We consider two pre-trained models for being transferred to the target: (1) the model trained on the source domain (DNN-Source); (2) the deep model pre-trained on ImageNet (DNN-ImageNet). We adopt the architecture of VGG-19 for both models. DNN-Source is trained from scratch. The initial learning rate is set to be 0.01 and decayed to 0.001 after 50 epochs. We set weight decay to be 0.0005 and momentum to be 0.9. DNN-Source is trained for 80 epochs totally. For DNN-ImageNet, we directly adopt the pretrained weights provided by TORCHVISION. To compute the transferability of DNN-Source and DNN-ImageNet to classification task on the target domain, we also trained the DNN-Target from scratch on the target data alone. + +# 4.2.2 Performance of DEPARA for Layer Selection + +Here we show that DEPARA can pick out the layers which yield near the highest performance when transferred to the + +Table 1. Task-wise similarity between the result from the DEPARA and that from taskonomy. The average results are shown on the right. For a better comparison, average results of DEPARA- $\nu$ , DEPARA- $\mathcal{E}$ and RSA are also provided. + +
AutoEncoCurvatureDenoiseEdge 2DEdge 3DKeypts 2DKeypts 3DReshadeRGB2DepthRGB2MistRGB2NormRoomLaytSegmt 25DSegmt 2DVanishPtsSegmtSmtClass1000DEPARADEPARA-VDEPARA-ERSA
TaskmnyP@11.00.01.01.00.01.01.01.01.01.01.01.01.01.01.01.01.00.880.710.820.82
P@51.00.61.00.40.80.80.80.80.80.80.60.80.80.80.80.40.80.750.680.750.73
R@51.00.61.00.40.80.80.80.80.80.80.60.80.80.80.80.40.80.750.680.750.73
IndoorScnP@11.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.01.000.821.001.00
P@51.00.61.00.60.61.01.01.00.80.80.80.80.81.00.80.60.60.810.720.780.79
R@51.00.61.00.60.61.01.01.00.80.80.80.80.81.00.80.60.60.810.720.780.79
COCOIP@11.00.01.01.01.01.01.01.01.01.01.01.01.01.00.00.01.00.820.820.760.82
P@51.00.60.80.80.61.01.00.80.81.01.00.81.00.80.40.60.60.800.780.650.69
R@51.00.60.80.80.61.01.00.80.81.01.00.81.00.80.40.60.60.800.780.650.69
+ +target task. To this end, we exhaustively conduct the transfer learning for every layer in the pre-trained VGG-19. For each layer transferred to the target task, the current layer and all the layers previous to this layer are fixed and all the layers following the current layer are fine-tuned. As transfer learning usually happens when the target data is scarce, we conduct the experiments in two modes: (1) 0.1-T: $10\%$ of the target data are used; (2) 0.01-T: only $1\%$ of the target data are used. In both modes, the pre-trained VGG-19 is further trained for 50 epochs on target data. To select the transferred layer, we simply set $\lambda$ to be 1 for both DNN-ImageNet and DNN-Source in 0.1-T mode. In 0.01-T mode, as the target data becomes scarcer, the accessibility becomes more important in transferability. Thus we set $\lambda$ to be 10 in 0.01-T mode. + +Results are listed in Table 2. We can see that: (1) The proposed method can successfully pick out the layers which yield the highest performance when transferred to the target. For example, for DNN-ImageNet in 0.01-T mode, #15, #16, #17 and #18 layers yield the highest transferring performance among all the layers. Our method successfully picks out these layers as they produce the highest DEPARA similarity. Actually, the average Spearman's correlation between the similarity and the accuracy is 0.913 for all the results shown in Table 2, implying that the similarity of DEPARA is a good indicator for layer selection in transfer learning. (2) For different trained models, the layers which yield the highest transferring performance differ. Furthermore, as the size of the target data varies, the best-performing layer may also change. For example, in 0.1-T mode for DNN-Source, #3, #5 and #7 layers yield the highest performance. However, in 0.01-T mode the highest-performing layers are #11, #12 and #13. By appropriately setting $\lambda$ , the proposed method can still pick out the best layers for different amounts of target data. (3) Surprisingly, DNN-ImageNet yields much higher transferring performance than DNN-Source. The similarity of $\mathcal{E}$ in some layers of DNN-ImageNet is significantly higher than that + +![](images/d45470e26ada8f2e1c4dc3ca8fcd539cdb448f4cd6aad5bcdc0805157f2582ce.jpg) +(a) DNN-ImageNet. + +![](images/2ec3e96c2ff699512b0bd6acc9cbe22837528fabd1ea812a7c2965741392d9f1.jpg) +(b) DNN-Source. +Figure 4. The test accuracy curves of different layers during the fine-tuning period in 0.01-T mode. + +of DNN-Source, which implies that the embedding space learned on ImageNet is more suitable for solving the target task. The DNN-Source, albeit trained on the same task as the target, learned quite a different embedding space due to the large difference between the source and the target domain. Thus it produces relatively worse performance when transferred to the target data. (4) Trained from scratch on the target data, VGG-19 achieves $61.74\%$ and $32.27\%$ accuracy in 0.1-T and 0.01-T mode, respectively. Comparing these figures to the results in Table 2, we can see that some layers produce worse performance when transferred to the target data than they are trained from scratch. This phenomenon is known as negative transfer [30]. Negative transfer occurs especially when the PR-DNN is trained on a quite different domain (like DNN-Source) or for an unrelated task to the target task. For DNN-Source, most layers produce negative transfer when transferred to the target data. All these results imply the importance of both the model selection and the layer selection in transfer learning. Some other interesting observations from Table 2 are provided in the supplementary material. + +In Figure 4, we depict the test accuracy curves of different layers when transferred to the target data. The results further demonstrate the layers selected by the proposed method are more suitable for being transferred to the tar + +Table 2. Layer-wise transferring performance of DNN-ImageNet and DNN-Source transferred to the target domain. SIM denotes the similarity between the DEPARAs of the specific layer and the target task. ACC denotes the accuracy on target test data. For space consideration, we omit the 2-nd, 4-th, 6-th and 8-th layers of VGG-19. Darker color indicates higher values. + +
CONVOLUTIONAL LAYERSFC LAYERS
#1#3#5#7#9#10#11#12#13#14#15#16#17#18
DNN-ImageNetV0.450.450.480.520.550.550.550.550.540.540.540.540.530.52
ε0.160.010.200.030.350.320.140.150.500.430.770.780.810.81
λ = 10.610.460.680.550.900.870.690.701.040.971.311.321.341.33
λ = 102.050.552.480.824.053.751.952.055.544.848.248.348.638.62
ACC (%)0.1-T60.7463.7869.2369.7773.3674.8976.8677.1179.5076.8981.1580.8180.7179.21
0.01-T34.0337.7140.1644.6753.0658.1159.3563.0867.2468.5071.7272.8574.3373.54
DNN-SourceV0.600.600.550.530.500.500.500.490.480.480.480.470.460.45
ε0.060.110.150.170.180.180.190.190.200.170.150.110.100.09
λ = 10.660.710.700.700.680.680.690.670.680.650.630.580.560.54
λ = 101.201.702.052.232.302.302.402.392.482.181.981.571.461.35
ACC (%)0.1-T49.8461.9262.7262.2859.8160.2458.4954.0354.2152.6752.1548.5441.5036.10
0.01-T30.5835.4937.2039.4739.6439.6340.0740.1140.3739.0436.8834.1331.4029.13
+ +get than other layers. From Figure 4, it can be seen that the selected layers converge much faster than other layers when re-trained for the target task. For example, for the PR-DNN DNN-ImageNet, the proposed method picks out the #15, #16, #17, #18 layers for being transferred. The final accuracy also tends to be higher than that of other layers. Furthermore, layers in DNN-ImageNet produce more smooth test accuracy curves than DNN-Source, which indicates that the embedding space learned by DNN-ImageNet are more easily adapted to the target task. The embedding space learned by DNN-Source, however, is quite different in topological structure (as indicated by the low similarity of edges in DEPARA) from the one learned on the target data. When adapted to the target data, it will be largely destroyed and rebuilt for the target, thus the test accuracy curves oscillate and the transferring performance is poor. + +# 5. Discussions and Conclusions + +In this paper, we propose the DEPARA to investigate the transferability of knowledge encoded in PR-DNNs. We adopt DEPARA to handle two important yet under-studied problems in transfer learning: measuring the transferability across tasks for pre-trained model selection, and measuring the transferability across layers for layer selection. Extensive experiments are conducted to show its effectiveness in solving both these two problems in transfer learning. We summarize the advantages and the limitations of the proposed method. We hope it could make the contributions of this paper clearer and inspire us to study further. + +Advantages. (1) Unlike taskonomy [33] which requires a large amount of labeled data, the proposed method quantifies the task transferability with only pre-trained models available. (2) As no training is involved, the computation cost of the proposed method grows nearly linearly with the size of the task dictionary, which is significantly more efficient than taskonomy. (3) The proposed method solves + +not only the model selection, but also the layer selection problem. As far as we know, we are the first to simultaneously tackle the model and the layer selection problems in transfer learning. (4) The proposed method imposes no constraints on the model architectures and are insensitive to the probe data. (5) This paper introduces a rigorous definition of knowledge transferability. Meanwhile, two vital ingredients, including inclusiveness and accessibility, are introduced for better approximating the transferability. + +Limitations. (1) This paper directly adopts the existing attribution method, Gradient*Input [24], for quantifying transferability. However, different attribution methods may affect the proposed method in some way. In future work, more studies are needed to investigate the effects of different attribution methods on the proposed method. (2) The optimal trade-off between the nodes and the edges of DEPARA for knowledge transferability is proved to be dependent on the probe data and the amount of the target data. In this paper, the trade-off hyper-parameter $\lambda$ is set via cross-validation or empirically. However, more study is needed to uncover the relationship between $\lambda$ and its influencing factors. (3) The probe data used in the proposed method is randomly sampled. Although different probe data are shown to produce effective task-wise topological structures, they still affect the final performance to some degree. More investigation is needed to study how to construct the probe data for better measuring the transferability across different tasks, models and layers. + +Acknowledgments. This work is supported by National Key Research and Development Program (2018AAA0101503), National Natural Science Foundation of China (61976186), Key Research and Development Program of Zhejiang Province (2018C01004), and the Major Scientific Research Project of Zhejiang Lab (No. 2019KD0AC01). + +# References + +[1] Marco B Ancona, Enea Ceolini, Cengiz Oztireli, and Markus H. Gross. Towards better understanding of gradient-based attribution methods for deep neural networks. In ICLR, 2018. +[2] Hossein Azizpour, Ali Sharif Razavian, Josephine Sullivan, Atsuto Maki, and Stefan Carlsson. Factors of transferability for a generic convnet representation. TPAMI, 38:1790-1802, 2014. +[3] Sebastian Bach, Alexander Binder, Grégoire Montavon, Frederick Klauschen, Klaus-Robert Müller, Wojciech Samek, and Oscar Deniz Suarez. On pixel-wise explanations for non-linear classifier decisions by layer-wise relevance propagation. In PloS one, 2015. +[4] Yuntao Chen, Naiyan Wang, and Zhaoxiang Zhang. Dark-rank: Accelerating deep metric learning via cross sample similarities transfer. In AAAI, 2017. +[5] Jia Deng, Wei ping Dong, Richard Socher, Li-Jia Li, Kehui Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009. +[6] Kshitij Dwivedi and Gemma Roig. Representation similarity analysis for efficient task taxonomy & transfer learning. In CVPR, 2019. +[7] Kshitij Dwivedi and Gemma Roig. Representation similarity analysis for efficient task taxonomy & transfer learning. In CVPR, June 2019. +[8] Kaiming He, Ross B. Girshick, and Piotr Dólár. Rethinking imagenet pre-training. In ICCV, 2019. +[9] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CVPR, pages 770-778, 2015. +[10] Geoffrey E. Hinton, Oriol Vinyals, and Jeffrey Dean. Distilling the knowledge in a neural network. ArXiv, abs/1503.02531, 2015. +[11] Mi-Young Huh, Pulkit Agrawal, and Alexei A. Efros. What makes imagenet good for transfer learning? ArXiv, abs/1608.08614, 2016. +[12] Simon Kornblith, Jonathon Shlens, and Quoc V. Le. Do better imagenet models transfer better? ArXiv, abs/1805.08974, 2018. +[13] 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. +[14] Yufan Liu, Jiajiong Cao, Bing Li, Chunfeng Yuan, Weiming Hu, Yangxi Li, and Yunqiang Duan. Knowledge distillation via instance relationship graph. In CVPR, June 2019. +[15] Jonathan Long, Evan Shelhamer, and Trevor Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. +[16] Wonpyo Park, Dongju Kim, Yan Lu, and Minsu Cho. Relational knowledge distillation. In CVPR, June 2019. +[17] Baoyun Peng, Xiao Jin, Jiaheng Liu, Shunfeng Zhou, Yichao Wu, Yu Liu, Dongsheng Li, and Zhaoning Zhang. Correlation congruence for knowledge distillation. In ICCV, 2019. + +[18] Xingchao Peng, Ben Usman, Kuniaki Saito, Neela Kaushik, Judy Hoffman, and Kate Saenko. Syn2real: A new benchmark for synthetic-to-real visual domain adaptation. CoRR, abs/1806.09755, 2018. +[19] Ariadna Quattoni and Antonio Torralba. Recognizing indoor scenes. In CVPR, 2009. +[20] Ali Sharif Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-the-shelf: An astounding baseline for recognition. CVPR Workshops, pages 512-519, 2014. +[21] Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. TPAMI, 39:1137-1149, 2015. +[22] Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. CoRR, abs/1412.6550, 2014. +[23] Avanti Shrikumar, Peyton Greenside, and Anshul Kundaje. Learning important features through propagating activation differences. In ICML, 2017. +[24] Avanti Shrikumar, Peyton Greenside, Anna Shcherbina, and Anshul Kundaje. Not just a black box: Learning important features through propagating activation differences. CoRR, abs/1605.01713, 2016. +[25] Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman. Deep inside convolutional networks: Visualising image classification models and saliency maps. CoRR, abs/1312.6034, 2013. +[26] Jie Song, Yixin Chen, Xinchao Wang, Chengchao Shen, and Mingli Song. Deep model transferability from attribution maps. In NeurIPS, pages 6179-6189. Curran Associates, Inc., 2019. +[27] Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In ICML, 2017. +[28] Antonio Torralba and Alexei A. Efros. Unbiased look at dataset bias. CVPR, pages 1521-1528, 2011. +[29] Frederick Tung and Greg Mori. Similarity-preserving knowledge distillation. In ICCV, 2019. +[30] Zirui Wang, Zihang Dai, Barnabas Poczos, and Jaime Carbonell. Characterizing and avoiding negative transfer. In CVPR, June 2019. +[31] Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? In NIPS, 2014. +[32] Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. In ICLR, 2016. +[33] Amir R. Zamir, Alexander Sax, William Shen, Leonidas J. Guibas, Jitendra Malik, and Silvio Savarese. Taskonomy: Disentangling task transfer learning. In CVPR, June 2018. +[34] Matthew D. Zeiler and Rob Fergus. Visualizing and understanding convolutional networks. In ECCV, 2014. +[35] Jian Zhou and Olga G. Troyanskaya. Predicting effects of noncoding variants with deep learning-based sequence model. Nature Methods, 12:931-934, 2015. +[36] Luisa M. Zintgraf, Taco Cohen, Tameem Adel, and Max Welling. Visualizing deep neural network decisions: Prediction difference analysis. In ICLR, 2017. \ No newline at end of file diff --git a/deparadeepattributiongraphfordeepknowledgetransferability/images.zip b/deparadeepattributiongraphfordeepknowledgetransferability/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..09f525cb99ab5828f7ecc87d9e32ef5e34c0f737 --- /dev/null +++ b/deparadeepattributiongraphfordeepknowledgetransferability/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca4058b71afc6348628eb3c4a08e11df2d17af20d1904ce860180d26da2ad8c0 +size 417125 diff --git a/deparadeepattributiongraphfordeepknowledgetransferability/layout.json b/deparadeepattributiongraphfordeepknowledgetransferability/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..5e931ef96d8c6e20183f8629b574999a3e227f8d --- /dev/null +++ b/deparadeepattributiongraphfordeepknowledgetransferability/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5dab1c1f25103d4a2624d20e42c0c96fb1800ddef2cfc2022a017cceb9819f4a +size 425120 diff --git a/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/1561c194-4f36-4d59-8313-b0705b1fc5a0_content_list.json b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/1561c194-4f36-4d59-8313-b0705b1fc5a0_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..043cac24fd6418bfee9aeefd4447f6fa4bfd6b54 --- /dev/null +++ b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/1561c194-4f36-4d59-8313-b0705b1fc5a0_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35f51679ba8bbd53c4a62f2ab4d30047feb573b4ed6f6ec666cf72604b886388 +size 87229 diff --git a/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/1561c194-4f36-4d59-8313-b0705b1fc5a0_model.json b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/1561c194-4f36-4d59-8313-b0705b1fc5a0_model.json new file mode 100644 index 0000000000000000000000000000000000000000..8535c1a0fa6b8c4390c75ad5fd9e0e806d989aea --- /dev/null +++ b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/1561c194-4f36-4d59-8313-b0705b1fc5a0_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a11bc725db30d6a4b1f6044033b12cd4727fd5fd6147ca94ea8f55695d86420 +size 107175 diff --git a/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/1561c194-4f36-4d59-8313-b0705b1fc5a0_origin.pdf b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/1561c194-4f36-4d59-8313-b0705b1fc5a0_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c5590444ba23c184a13d1f06da84c39a1f6650b3 --- /dev/null +++ b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/1561c194-4f36-4d59-8313-b0705b1fc5a0_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f718372757858ff30b3017d3ee046e9d35efb4405712f2125a66417590e6ddb +size 1542580 diff --git a/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/full.md b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/full.md new file mode 100644 index 0000000000000000000000000000000000000000..24c55b6ce15a8602a3d64106b59e3dbd705e88f6 --- /dev/null +++ b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/full.md @@ -0,0 +1,364 @@ +# DIST: Rendering Deep Implicit Signed Distance Function with Differentiable Sphere Tracing + +Shaohui Liu $^{1,3\dagger}$ Yinda Zhang $^{2}$ Songyou Peng $^{1,6}$ Boxin Shi $^{4,7}$ + +Marc Pollefeys1,5,6 Zhaopeng Cui1* + +$^{1}$ ETH Zurich $^{2}$ Google $^{3}$ Tsinghua University $^{4}$ Peking University $^{5}$ Microsoft + +6Max Planck ETH Center for Learning Systems 7Peng Cheng Laboratory + +# Abstract + +We propose a differentiable sphere tracing algorithm to bridge the gap between inverse graphics methods and the recently proposed deep learning based implicit signed distance function. Due to the nature of the implicit function, the rendering process requires tremendous function queries, which is particularly problematic when the function is represented as a neural network. We optimize both the forward and backward passes of our rendering layer to make it run efficiently with affordable memory consumption on a commodity graphics card. Our rendering method is fully differentiable such that losses can be directly computed on the rendered 2D observations, and the gradients can be propagated backwards to optimize the 3D geometry. We show that our rendering method can effectively reconstruct accurate 3D shapes from various inputs, such as sparse depth and multi-view images, through inverse optimization. With the geometry based reasoning, our 3D shape prediction methods show excellent generalization capability and robustness against various noises. + +# 1. Introduction + +Solving vision problem as an inverse graphics process is one of the most fundamental approaches, where the solution is the visual structure that best explains the given observations. In the realm of 3D geometry understanding, this approach has been used since the very early age [1, 35, 54]. As a critical component to the inverse graphics based 3D geometric reasoning process, an efficient renderer is required to accurately simulate the observations, e.g., depth maps, from an estimizable 3D structure, and also be differentiable to back-propagate the error from the partial observation. + +As a natural fit to the deep learning framework, differentiable rendering techniques have drawn great interests re + +![](images/0cee67f5191f6ded890282b38b9f8e2d012663548240ffffa601ac706fd5b5c5.jpg) +Figure 1. Illustration of our proposed differentiable renderer for continuous signed distance function. Our method enables geometric reasoning with strong generalization capability. With a random shape code $z_0$ initialized in the learned shape space, we can acquire high-quality 3D shape prediction by performing iterative optimization with various 2D supervisions. + +cently. Various solutions for different 3D representations, e.g., voxels, point clouds, meshes, have been proposed. However, these 3D representations are all discretized up to a certain resolution, leading to the loss of geometric details and breaking the differentiable properties [23]. Recently, the continuous implicit function has been used to represent the signed distance field [34], which has premium capacity to encode accurate geometry when combined with the deep learning techniques. Given a latent code as the shape representation, the function can produce a signed distance value for any arbitrary point, and thus enable unlimited resolution and better preserved geometric details for rendering purpose. However, a differentiable rendering solution for learning-based continuous signed distance function does not exist yet. + +In this paper, we propose a differentiable renderer for continuous implicit signed distance functions (SDF) to facilitate the 3D shape understanding via geometric reasoning in a deep learning framework (Fig. 1). Our method can render an implicit SDF represented by a neural network from a latent code into various 2D observations, e.g., depth images, surface normals, silhouettes, and other properties encoded, from arbitrary camera viewpoints. The rendering process is fully differentiable, such that loss functions + +can be conveniently defined on the rendered images and the observations, and the gradients can be propagated back to the shape generator. As major applications, our differentiable renderer can be applied to infer the 3D shape from various inputs, e.g., multi-view images and single depth image, through an inverse graphics process. Specifically, given a pre-trained generative model, e.g., DeepSDF [34], we search within the latent code space for the 3D shape that produces the rendered images mostly consistent with the observation. Extensive experiments show that our geometric reasoning based approach exhibits significantly better generalization capability than previous purely learning based approaches, and consistently produce accurate 3D shapes across datasets without finetuning. + +Nevertheless, it is challenging to make differentiable rendering work on a learning-based implicit SDF with computationally affordable resources. The main obstacle is that an implicit function provides neither the exact location nor any bound of the surface geometry as in other representations like meshes, voxels, and point clouds. + +Inspired by traditional ray-tracing based approaches, we adopt the sphere tracing algorithm [13], which marches along each pixel's ray direction with the queried signed distance until the ray hits the surface, i.e., the signed distance equals to zero (Fig. 2). However, this is not feasible in the neural network based scenario where each query on the ray would require a forward pass and recursive computational graph for back-propagation, which is prohibitive in terms of computation and memory. + +To make it work efficiently on a commodity level GPU, we optimize the full life-time of the rendering process for both forward and backward propagations. In the forward pass, i.e., the rendering process, we adopt a coarse-to-fine approach to save computation at initial steps, an aggressive strategy to speed up the ray marching, and a safe convergence criteria to prevent unnecessary queries and maintain resolution. In the backward propagation, we propose a gradient approximation which empirically has negligible impact on the training performance but dramatically reduces the computation and memory consumption. By making the rendering tractable, we show how producing 2D observations with the sphere tracing and interacting with camera extrinsics can be done in differentiable ways. + +To sum up, our major contribution is to enable efficient differentiable rendering on the implicit signed distance function represented as a neural network. It enables accurate 3D shape prediction via geometric reasoning in deep learning frameworks and exhibits promising generalization capability. The differentiable renderer could also potentially benefit various vision problems thanks to the marriage of implicit SDF and inverse graphics techniques. The code and data are available at https://github.com/B1ueber2y/DIST-Renderer. + +# 2. Related Work + +3D Representation for Shape Learning. The study of 3D representations for shape learning is one of the main focuses in 3D deep learning community. Early work quantizes shapes into 3D voxels, where each voxel contains either a binary occupancy status (occupied / not occupied) [52, 6, 46, 39, 12] or a signed distance value [55, 9, 45]. While voxels are the most straightforward extension from the 2D image domain into the 3D geometry domain for neural network operations, they normally require huge memory overhead and result in relatively low resolutions. Meshes are also proposed as a more memory efficient representation for 3D shape learning [47, 11, 22, 20], but the topology of meshes is normally fixed and simple. Many deep learning methods also utilize point clouds as the 3D representation [37, 38]; however, the point-based representation lacks the topology information and thus makes it non-trivial to generate 3D meshes. Very recently, the implicit functions, e.g., continuous SDF and occupancy function, are exploited as 3D representations and show much promising performance in terms of the high-frequency detail modeling and the high resolution [34, 29, 30, 4]. Similar idea has also been used to encode other information such as textures [33, 40] and 4D dynamics [32]. Our work aims to design an efficient and differentiable renderer for the implicit SDF-based representation. + +Differentiable Rendering. With the success of deep learning, the differentiable rendering starts to draw more attention as it is essential for end-to-end training, and solutions have been proposed for various 3D representations. Early works focus on 3D triangulated meshes and leverage standard rasterization [28]. Various approaches try to solve the discontinuity issue near triangle boundaries by smoothing the loss function or approximating the gradient [21, 36, 25, 3]. Solutions for point clouds and 3D voxels are also introduced [48, 17, 31] to work jointly with PointNet [37] and 3D convolutional architectures. However, the differentiable rendering for the implicit continuous function representation does not exist yet. Some ray tracing based approaches are related, while they are mostly proposed for explicit representation, such as 3D voxels [27, 31, 43, 18] or meshes [23], but not implicit functions. Liu et al. [26] firstly propose to learn from 2D observations over occupancy networks [29]. However, their methods make several approximations and do not benefit from the efficiency of rendering implicit SDF. Most related to our work, Sitzmann et al. [44] propose a LSTM-based renderer for an implicit scene representation to generate color images, while their model focuses on simulating the rendering process with an LSTM without clear geometric meaning. This method can only generate low-resolution images due to the expensive memory consumption. Alternatively, our method can directly render 3D geometry represented by an implicit SDF + +![](images/9747ddc2d5e57bdb9aa4196a3ac9fc337f88ea2ae4d5f04def0d52663d62a6fc.jpg) +Figure 2. Illustration on the sphere tracing algorithm [13]. A ray is initiated at each pixel and marching along the viewing direction. The front end moves with a step size equals to the signed distance value of the current location. The algorithm converges when the current absolute SDF is smaller than a threshold, which indicates that the surface has been found. + +to produce high-resolution images. It can also be applied without training to existing deep learning models. + +3D Shape Prediction. 3D shape prediction from 2D observations is one of the fundamental vision problems. Early works mainly focus on multi-view reconstruction using multi-view stereo methods [41, 14, 42]. These purely geometry-based methods suffer from degraded performance on texture-less regions without prior knowledge [7]. With progress of deep learning, 3D shapes can be recovered under different settings. The simplest setting is to recover 3D shape from a single image [6, 10, 51, 19]. These systems rely heavily on priors, and are prone to weak generalization. Deep learning based multi-view shape prediction methods [53, 15, 16, 49, 50] further involve geometric constraints across views in the deep learning framework, which shows better generalization. Another thread of works [9, 8] take a single depth image as input, and the problem is usually referred as shape completion. Given the shape prior encoded in the neural network [34], our rendering method can effectively predict accurate 3D object shape from a random initial shape code with various inputs, such as depth and multi-view images, through geometric optimization. + +# 3. Differentiable Sphere Tracing + +In this section, we introduce our differentiable rendering method for the implicit signed distance function represented as a neural network, such as DeepSDF [34]. In DeepSDF, a network takes a latent code and a 3D location as input, and produces the corresponding signed distance value. Even though such a network can deliver high quality geometry, the explicit surface cannot be directly obtained and requires dense sampling in the 3D space. + +Our method is inspired by Sphere Tracing [13] designed for rendering SDF volumes, where rays are shot from the camera pinhole along the direction of each pixel to search for the surface level set according to the signed distance value. However, it is prohibitive to apply this method directly on the implicit signed distance function represented as a neural network, since each tracing step needs a feed + +Algorithm 1 Naive sphere tracing algorithm for a camera ray $L: \mathbf{c} + d\tilde{\mathbf{v}}$ over a signed distance fields $f: \mathbb{N}^3 \to \mathbb{R}$ . + +1: Initialize $n = 0$ , $d^{(0)} = 0$ , $\mathbf{p}^{(0)} = \mathbf{c}$ . +2: while not converged do: +3: Take the corresponding SDF value $b^{(n)} = f(\mathbf{p}^{(n)})$ of the location $\mathbf{p}^{(n)}$ and make update: $d^{(n + 1)} = d^{(n)} + b^{(n)}$ . +4: $\mathbf{p}^{(n + 1)} = \mathbf{c} + d^{(n + 1)}\tilde{\mathbf{v}}, n = n + 1.$ +5: Check convergence. +6: end while + +forward neural network and the whole algorithm requires unaffordable computational and memory resources. To make this idea work in deep learning framework for inverse graphics, we optimize both the forward and backward propagations for efficient training and test-time optimization. The sphere traced results, i.e., the distance along the ray, can be converted into many desired outputs, e.g., depth, surface normal, silhouette, and hence losses can be conveniently applied in an end-to-end manner. + +# 3.1. Preliminaries - Sphere Tracing + +To be self-contained, we first briefly introduce the traditional sphere tracing algorithm [13]. Sphere tracing is a conventional method specifically designed to render depth from volumetric signed distance fields. For each pixel on the image plane, as shown in Figure 2, a ray $(L)$ is shot from the camera center (c) and marches along the direction $(\tilde{\mathbf{v}})$ with a step size that is equal to the queried signed distance value $(b)$ . The ray marches iteratively until it hits or gets sufficiently close to the surface (i.e. abs(SDF) < threshold). A more detailed algorithm can be found in Algorithm 1. + +# 3.2. Efficient Forward Propagation + +Directly applying sphere tracing to an implicit SDF function represented by a neural network is prohibitively computational expensive, because each query of $f$ requires a forward pass of a neural network with considerable capacity. Naive parallelization is not sufficient since essentially millions of network queries are required for a single rendering with VGA resolution ( $640 \times 480$ ). Therefore, we need to cut off unnecessary marching steps and safely speed up the marching process. + +Initialization. Because all the 3D shapes represented by DeepSDF are bounded within the unit sphere, we initialize $\mathbf{p}^{(0)}$ to be the intersection between the camera ray and the unit sphere for each pixel. Pixels with the camera rays that do not intersect with the unit sphere are set as background (i.e., infinite depth). + +Coarse-to-fine Strategy. At the beginning of sphere tracing, rays for different pixels are fairly close to each other, which indicates that they will likely march in a similar way. To leverage this nice property, we propose a coarse-to-fine + +![](images/9924801db8138ede65d938c8ca1049f445ba8befd00ff9f4b62975479e56b88c.jpg) +(a) Coarse-to-fine Strategy + +![](images/6626d86fbb79ce759e6e55b8721bef2145d83e944f19549044b25bdad425d9a0.jpg) +(b) Aggressive Marching + +![](images/dd7ac25182d7e1c18ab7ec6a18b71219dea9836a385a2a26c459d3ae3b5765ae.jpg) +(c) Convergence Criteria +Figure 3. Strategies for our efficient forward propagation. (a) 1D illustration of our coarse-to-fine strategy, and for 2D cases, one ray will be spitted into 4 rays; (b) Comparison of standard marching and our aggressive marching; (c) We stop the marching once the SDF value is smaller than $\epsilon$ , where $2\epsilon$ is the estimated minimal distance between the corresponding 3D points of two neighboring pixels. + +sphere tracing strategy as shown in Fig. 3 (a). We start the sphere tracing from an image with $\frac{1}{4}$ of its original resolution, and split each ray into four after every three marching steps, which is equivalent to doubling the resolution. After six steps, each pixel in the full resolution has a corresponding ray, which keeps marching until convergence. + +Aggressive Marching. After the ray marching begins, we apply an aggressive strategy (Fig. 3 (b)) to speed up the marching process by updating the ray with $\alpha$ times of the queried signed distance value, where $\alpha = 1.5$ in our implementation. This aggressive sampling has several benefits. First, it makes the ray march faster towards the surface, especially when it is far from surface. Second, it accelerates the convergence for the ill-posed condition, where the angle between the surface normal and the ray direction is small. Third, the ray can pass through the surface such that space in the back (i.e., SDF $< 0$ ) could be sampled. This is crucially important to apply supervision on both sides of the surface during optimization. + +Dynamic Synchronized Inference. A naive parallelization for speeding up sphere tracing is to batch rays together and synchronously update the front end positions. However, depending on the 3D shape, some rays may converge earlier than others, thus leading to wasted computation. We maintain a dynamic unfinished mask indicating which rays require further marching to prevent unnecessary computation. + +Convergence Criteria. Even with aggressive marching, the ray movement can be extremely slow when close to the surface since $f$ is close to zero. We define a convergence criteria to stop the marching when the accuracy is sufficiently good and the gain is marginal (Fig. 3(c)). To fully maintain details supported by the 2D rendering resolution, it is sufficiently safe to stop when the sampled signed distance value does not confuse one pixel with its neighbors. For an object with a smallest distance of $100mm$ captured by a camera with $60mm$ focal length, $32mm$ sensor width, and a resolution of $512 \times 512$ , the approximate minimal distance between the corresponding 3D points of two neighboring pixels is $10^{-4}m$ (0.1mm). In practice, we set the convergence threshold $\epsilon$ as $5 \times 10^{-5}$ for most of our experiments. + +# 3.3. Rendering 2D Observations + +After all rays converge, we can compute the distance along each ray as the following: + +$$ +d = \alpha \sum_ {n = 0} ^ {N - 1} f \left(\mathbf {p} ^ {(n)}\right) + (1 - \alpha) f \left(\mathbf {p} ^ {(N - 1)}\right) = d ^ {\prime} + e, \tag {1} +$$ + +where $e = (1 - \alpha)f(\mathbf{p}^{(N - 1)})$ is the residual term on the last query. In the following part we will show how this computed ray distance is converted into 2D observations. + +Depth and Surface Normal. Suppose that we find the 3D surface point $\mathbf{p} = \mathbf{c} + d\tilde{\mathbf{v}}$ for a pixel $(x,y)$ in the image, we can directly get the depth for each pixel as the following: + +$$ +z _ {c} = \frac {d}{\sqrt {\tilde {x} ^ {2} + \tilde {y} ^ {2} + 1}}, \tag {2} +$$ + +where $(\tilde{x},\tilde{y},1)^{\top} = K^{-1}(x,y,1)^{\top}$ is the normalized homogeneous coordinate. + +The surface normal of the point $\mathbf{p}(x,y,z)$ can be computed as the normalized gradient of the function $f$ . Since $f$ is an implicit signed distance function, we take the approximation of the gradient by sampling neighboring locations: + +$$ +\mathbf {n} = \frac {1}{2 \delta} \left[ \begin{array}{l} f (x + \delta , y, z) - f (x - \delta , y, z) \\ f (x, y + \delta , z) - f (x, y - \delta , z) \\ f (x, y, z + \delta) - f (x, y, z - \delta) \end{array} \right], \tilde {\mathbf {n}} = \frac {\mathbf {n}}{| \mathbf {n} |}. \tag {3} +$$ + +Silhouette. The silhouette is a commonly used supervision for 3D shape prediction. To make the rendering of silhouettes differentiable, we get the minimum absolute signed distance value for each pixel along its ray and subtract it by the convergence threshold $\epsilon$ . This produces a tight approximation of the silhouette, where pixels with positive values belong to the background, and vice versa. Note that directly checking if ray marching stops at infinity can also generate the silhouette but it is not differentiable. + +Color and Semantics. Recently, it has been shown that texture can also be represented as an implicit function parameterized with a neural network [33]. Not only color, other spatially varying properties, like semantics, material, etc, + +
Methodsize#step#querytime
Naive sphere tracing512250N/AN/A
+ practical grad.5122506.06M1.6h
+ parallel5122506.06M3.39s
+ dynamic5122501.99M1.23s
+ aggressive5122501.43M1.08s
+ coarse-to-fine512250887K0.99s
+ coarse-to-fine5122100898K1.24s
+ +Table 1. Ablation studies on the cost-efficient feedforward design of our method. The average time for each optimization step was tested on a single NVIDIA GTX-1080Ti over the architecture of DeepSDF [34]. Note that the number of initialized rays is quadratic to the image size, and the numbers are reported for the resolution of $512 \times 512$ . + +can all be potentially learned by implicit functions. These information can be rendered jointly with the implicit SDF to produce corresponding 2D observations, and some examples are depicted in Fig. 8. + +# 3.4. Approximated Gradient Back-Propagation + +DeepSDF [34] uses the conditional implicit function to represent a 3D shape as $f_{\theta}(\mathbf{p}, \mathbf{z})$ , where $\theta$ is the network parameters, and $\mathbf{z}$ is the latent code representing a certain shape. As a result, each queried point $\mathbf{p}$ in the sphere tracing process is determined by $\theta$ and the shape code $\mathbf{z}$ , which requires to unroll the network for multiple times and costs huge memory for back-propagation with respect to $\mathbf{z}$ : + +$$ +\begin{array}{l} \frac {\partial d ^ {\prime}}{\partial \mathbf {z}} | _ {\mathbf {z} _ {0}} = \alpha \sum_ {i = 0} ^ {N - 1} \frac {\partial f _ {\theta} (\mathbf {p} ^ {(i)} (\mathbf {z}) , \mathbf {z})}{\partial \mathbf {z}} | _ {\mathbf {z} _ {0}} \\ = \alpha \sum_ {i = 0} ^ {N - 1} \left(\frac {\partial f _ {\theta} \left(\mathbf {p} ^ {(i)} \left(\mathbf {z} _ {0}\right) , \mathbf {z}\right)}{\partial \mathbf {z}} + \frac {\partial f _ {\theta} \left(\mathbf {p} ^ {(i)} (\mathbf {z}) , \mathbf {z} _ {0}\right)}{\partial \mathbf {p} ^ {(i)} (\mathbf {z})} \frac {\partial \mathbf {p} ^ {(i)} \left(\mathbf {z} _ {0}\right)}{\partial \mathbf {z}}\right). \tag {4} \\ \end{array} +$$ + +Practically, we ignore the gradients from the residual term $e$ in Equation (1). In order to make back-propagation feasible, we define a loss for $K$ samples with the minimum absolute SDF value on the ray to encourage more signals near the surface. For each sample, we calculate the gradient with only the first term in Equation (4) as the high-order gradients empirically have less impact on the optimization process. In this way, our differentiable renderer is particularly useful to bridge the gap between this strong shape prior and some partial observations. Given a certain observation, we can search for the code that minimizes the difference between the rendering from our network and the observation. This allows a number of applications which will be introduced in the next section. + +# 4. Experiments and Results + +In this section, we first verify the efficacy of our differentiable sphere tracing algorithm, and then show that 3D shape understanding can be achieved through geometry based reasoning by our method. + +![](images/faa59f9f18a56da9fbb984ed832b7007caf8ce08c063f3d71c8ef46e404a156e.jpg) +Figure 4. The surface normal rendered with different speed up strategies turned on. Note that adding up these components does not deteriorate the rendering quality. + +![](images/fe130d72894a7f7c1bfcfd7e9fc4ec2ca16714abe3a749c89f3a0547d78c8693.jpg) + +![](images/755c2db73fa95665e618e18011dad0ede7351ee335d55e7c255abfa57a01550d.jpg) + +![](images/75cf1533615f038ac4cb131a6b7335bc7f34ba41ffda18c0bc87ffaa537284ce.jpg) + +![](images/84b238f36f72883de42f9a0ebaf98011e1d3531267143649395994f16a1ebff9.jpg) +Figure 5. Loss curves for 3D prediction from partial depth. Our accelerated rendering does not impair the back-propagation. The loss on the depth image is tightly correlated with the Chamfer distance on 3D shapes, which indicates effective back-propagation. + +![](images/34a455315b5400198edb6a10c077a970a6c48bbf8c12e60ed703019fdbf7aa58.jpg) + +# 4.1. Rendering Efficiency and Quality + +Run-time Efficiency. In this section, we evaluate the runtime efficiency promoted by each design in our differentiable sphere tracing algorithm. The number of queries and runtime for both forward and backward passes at a resolution of $512 \times 512$ on a single NVIDIA GTX-1080Ti are reported in Tab. 1, and the corresponding rendered surface normal are shown in Fig. 4. We can see that the proposed back-propagation prunes the graph and reduces the memory usage significantly, making the rendering tractable with a standard graphics card. The dynamic synchronized inference, aggressive marching and coarse-to-fine strategy all speed up rendering. With all these designs, we can render an image with only 887K query steps within 0.99s when the maximum tracing step is set to 50. The number of query steps only increases slightly when the maximum step is set to 100, indicating that most of the pixels converge safely within 50 steps. Note that related works usually render at a much lower resolution [44]. + +Back-Propagation Effectiveness. We conduct sanity checks to verify the effectiveness of the back-propagation with our approximated gradient. We take a pre-trained DeepSDF [34] model and run geometry based optimization to recover the 3D shape and camera extrinsics separately using our differentiable renderer. We first assume camera pose is known and optimize the latent code for 3D shape w.r.t the given ground truth depth map, surface normal and silhouette. As can be seen in Fig. 5 (left), the loss drops quickly, and using acceleration strategies does not hurt the optimization. Fig. 5 (right) shows the total loss on the 2D image plane is highly correlated with the Chamfer distance on the predicted 3D shape, indicating that the gradients originated from the 2D observation are successfully back-propagated to the shape. We then assume a known shape (fixed latent + +![](images/505e76d74394243c34505007499554f1e11e015382ac280f626c15e195a5bcb2.jpg) +Figure 6. Illustration of the optimization process over the camera extrinsic parameters. Our differentiable renderer is able to propagate the error from the image plane to the camera. Top row: rendered surface normal. Bottom row: error map on the silhouette. + +$$ +\epsilon = 5 \times 1 0 ^ {- 2} \epsilon = 5 \times 1 0 ^ {- 4} \epsilon = 5 \times 1 0 ^ {- 6} \epsilon = 5 \times 1 0 ^ {- 8} +$$ + +![](images/94b3ae3e8e97674852fdbe8f63b5eab8ac3f17e6b8a6d0c76fa75191aa862120.jpg) +Figure 7. Effects on choices of different convergence thresholds. Under the same marching step, a very large threshold can incur dilation around boundaries while a small threshold may lead to erosion. We pick $5 \times 10^{-5}$ for all of our experiments. + +code) and optimize the camera pose using a depth image and a binary silhouette. Fig. 6 shows that a random initial camera pose can be effectively optimized toward the ground truth pose by minimizing the gradients on 2D observations. + +Convergence Criteria. The convergence criteria, i.e., the threshold on signed distance to stop the ray tracing, has a direct impact on the rendering quality. Fig. 7 shows the rendering result under different thresholds. As can be seen, rendering with a large threshold will dilate the shape, which lost boundary details. Using a small threshold, on the other hand, may produces incomplete geometry. This parameter can be tuned according to applications, but in practice we found our threshold is effective in producing complete shape with details up to the image resolution. + +**Rendering Other Properties.** Not only the signed distance function for 3D shape, implicit functions can also encode other spatially variant information. As an example, we train a network to predict both signed distance and color for each 3D location, and this grants us the capability of rendering color images. In Fig. 8, we show that with a 512-dim latent code learned from textured meshes as the ground truth, color images can be rendered in arbitrary resolution, camera viewpoints, and illumination. Note that the latent code size is significantly smaller than the mesh (vertices+triangles+texture map), and thus can be potentially used for model compression. Other per-vertex properties, such as semantic segmentation and material, can also be rendered in the same differentiable way. + +# 4.2. 3D Shape Prediction + +Our differentiable implicit SDF renderer builds up the connection between 3D shape and 2D observations and en + +![](images/c56bb1cfc36f05604d3650968cceb59d18f8a0c30ec321767ee8028cb506bd06.jpg) +Figure 8. Our method can render information encoded in the implicit function other than depth. With a pre-trained network encoding textured meshes, we can render high resolution color images under various resolution, camera viewpoints, and illumination. + +ables geometry based reasoning. In this section, we show results of 3D shape prediction from a single depth image, or multi-view color images using DeepSDF as the shape generator. On a high-level, we take a pre-trained DeepSDF and fixed the decoder parameters. When given 2D observations, we define proper loss functions and propagate the gradient back to the latent code, as introduced in Section 3.4, to generate 3D shape. This method does not require any additional training and only need to run optimization at test time, which is intuitively less vulnerable to overfitting or domain gap issues in pure learning based approach. In this section, we specifically focus on evaluating the generalization capability while maintaining high shape quality. + +# 4.2.1 3D Shape Prediction from Single Depth Image + +With the development of commodity range sensors, the dense or sparse depth images can be easily acquired, and several methods have been proposed to solve the problem of 3D shape prediction from a single depth image. DeepSDF [34] has shown state-of-the-art performance for this task, however requires an offline pre-processing to lift the input 2D depth map into 3D space in order to sample the SDF values with the assistance of the surface normal. Our differentiable render makes 3D shape prediction from a depth image more convenient by directly rendering the depth image given a latent code and comparing it with the given depth. Moreover, with the silhouette calculated from the depth map or provided from the rendering, our renderer can also leverage it as an additional supervision. Formally, we obtain the complete 3D shape by solving the following optimization: + +$$ +\underset {\mathbf {z}} {\arg \min } \mathcal {L} _ {d} \left(\mathcal {R} _ {d} (f (\mathbf {z})), I _ {d}\right) + \mathcal {L} _ {s} \left(\mathcal {R} _ {s} (f (\mathbf {z})), I _ {s}\right), \tag {5} +$$ + +where $f(\mathbf{z})$ is the pre-trained neural network encoding shape priors, $\mathcal{R}_d$ and $\mathcal{R}_s$ represent the rendering function for the depth and silhouette respectively, $\mathcal{L}_d$ is the $L_1$ loss of depth observation, and $\mathcal{L}_s$ is the loss defined based on the differentiably rendered silhouette. In our experiment, the initial latent shape $\mathbf{z}_0$ is chosen as the mean shape. + +
dense50%10%100pts50pts20pts
sofa
DeepSDF5.375.565.505.936.037.63
Ours4.125.755.495.725.576.95
Ours (mask)4.123.984.313.984.304.94
plane
DeepSDF3.713.734.294.444.405.39
Ours2.184.084.814.444.515.30
Ours (mask)2.182.082.622.262.553.60
table
DeepSDF12.9312.7811.6712.8713.7615.77
Ours5.3712.0511.4211.7013.7615.83
Ours (mask)5.375.155.165.266.337.62
+ +Table 2. Quantitative comparison between our geometric optimization with DeepSDF [34] for shape completion over partial dense and sparse depth observation on ShapeNet dataset [2]. We report the median Chamfer Distance on the first 200 instances of the dataset of [6]. We give DeepSDF [34] the groundtruth normal otherwise they could not be applied on the sparse depth. + +We test our method and DeepSDF [34] on 200 models on plane, sofa and table category respectively from ShapeNet Core [2]. Specifically, for each model, we use the first camera in the dataset of Choy et al. [6] to generate dense depth images for testing. The comparison between DeepSDF and our method is listed in Tab. 2. We can see that our method with only depth supervision performs better than DeepSDF [34] when dense depth image is given. This is probably because that DeepSDF samples the 3D space with pre-defined rule (at fixed distances along the normal direction), which may not necessarily sample correct location especially near object boundary or thin structures. In contrast, our differentiable sphere tracing algorithm samples the space adaptively with the current estimation of shape. + +Robustness against sparsity. The depth from laser scanners can be very sparse, so we also study the robustness of our method and DeepSDF against sparse depth. The results are shown in Tab. 2. Specifically, we randomly sample different percentages or fixed numbers of points from the original dense depth for testing. To make a competitive baseline, we provide DeepSDF ground truth normals to sample SDF, since it cannot be reliably estimated from sparse depth. From the table, we can see that even with very sparse depth observations, our method still recovers accurate shapes and gets consistently better performance than DeepSDF with additional normal information. When the silhouette is available, our method achieves significantly better performance and robustness against the sparsity, indicating that our rendering method can back-propagate gradients effectively from the silhouette loss. + +# 4.2.2 3D Shape Prediction from Multiple Images + +Our differentiable renderer can also enable geometry based reasoning for shape prediction from multi-view color im + +Video sequence + +Optimization process + +![](images/e7c720aac818a7cb14ec6c6fc36123d25f889e72ed2cc26637a1fa40550f624d.jpg) +Figure 9. Illustration of the optimization process under multi-view setup. Our differentiable renderer is able to successfully recover 3D geometry from a random code with only the photometric loss. + +![](images/fd70f785d7e4cd7cc4373dc30856cf20188145f5a847e49ca3f44e0f29979c27.jpg) + +
Methodcarplane
PMO (original)0.6611.129
PMO (rand init)1.1876.124
Ours (rand init)0.9191.595
+ +Table 3. Quantitative results on 3D shape prediction from multiview images under the metric of Chamfer Distance (only in the direction of $\mathrm{gt} \rightarrow$ pred for fair comparison). We randomly picked 50 instances from the PMO test set to perform the evaluation. 10000 points are sampled from meshes for evaluation. + +ages by leveraging cross-view photometric consistency. + +Specifically, we first initialize the latent code with a random vector and render a depth image for each of the input views. We then warp each color image to other input views using the rendered depth image and the known camera pose. The difference between the warped and input images are then defined as the photometric loss, and the shape can be predicted by minimizing this loss. To sum up, the optimization problem is formulated as follows, + +$$ +\underset {\mathbf {z}} {\arg \min } \sum_ {i = 0} ^ {N - 1} \sum_ {j \in \mathcal {N} _ {i}} \| I _ {i} - I _ {j \rightarrow i} \left( \right.\mathcal {R} _ {d} ^ {i} (f (\mathbf {z})) \left. \right\|, \tag {6} +$$ + +where $\mathcal{R}_d^i$ represents the rendered depth image at view $i$ , $\mathcal{N}_i$ are the neighboring images of $I_i$ , and $I_{j\rightarrow i}$ is the warped image from view $j$ to view $i$ using the rendered depth. Note that no mask is required under the multi-view setup. Fig. 9 shows an example of the optimization process of our method. As can be seen, the shape is gradually improved while the loss is being optimized. + +We take PMO [24] as a competitive baseline, since they also perform deep learning based geometric reasoning via optimization over a pre-trained decoder, but use the triangular mesh representation. Their model first predicts an initial mesh from a selected input view and improve the quality via cross-view photo-consistency. Both the synthetic and real datasets provided in [24] are used for evaluation. + +In Tab. 3, we show quantitative comparison to PMO on their synthetic test set. It can be seen that our method achieves comparable results with PMO [24] from only random initializations. Note that while PMO uses both the encoder and decoder trained on the PMO training set, our DeepSDF decoder was neither trained nor finetuned on it. Besides, if the shape code for PMO, instead of being predicted from their trained image encoder, is also initialized randomly, their performance decreases dramatically, which indicates that with our rendering method, our geometric rea + +![](images/44c0bc1bdc6a2cbdd5a1ea62c41fad23667a78db17b812fb5a75010429fd297d.jpg) +Figure 10. Robustness of geometric reasoning via multi-view photometric optimization. (a) Performance w.r.t changes on camera focal length. (b) Performance w.r.t noise in the initialization code. Our model is robust against focal length change and not affected by noise in the latent code since we start from random initialization. In contrast, PMO is very sensitive to both factors, and the performance drops significantly when the testing images are different from the training set. + +![](images/93f5718984443c019ed21e78d35d5238be76ec99c18007c069c2678c5e83ede9.jpg) + +soning becomes more effective. Our method can be further improved with good initialization. + +Generalization Capability To further evaluate the generalization capability, we compare to PMO on some unseen data and initialization. We first evaluate both methods on a testing set generated using different camera focal lengths, and the quantitative comparison is in Fig. 10 (a). It clearly shows that our method generalizes well to the new images, while PMO suffers from overfitting or domain gap. To further test the effectiveness of the geometric reasoning, we also directly add random noise to the initial latent code. The performance of PMO again drops significantly, while our method is not affected since the initialization is randomized (Fig. 10 (b)). Some qualitative results are shown in Fig. 11. Our method produces accurate shapes with detailed surfaces. In contrast, PMO suffers from two main issues: 1) the low resolution mesh is not capable of maintaining geometric details; 2) their geometric reasoning struggles with the initialization from image encoder. + +We further show comparison on real data in Fig. 12. Following PMO, since the provided initial similarity transformation is not accurate in some cases, we also optimize over the similarity transformation in addition to the shape code. As can be seen, both methods perform worse on this challenging dataset. In comparison, our method produces shapes with higher quality and correct structures, while PMO only produce very rough shapes. Overall, our method shows better generalization capability and robustness against domain change. + +# 5. Conclusion + +We propose a differentiable sphere tracing algorithm to render 2D observations such as depth maps, normals, silhouettes, from implicit signed distance functions parameterized as a neural network. This enables geometric reasoning in 3D shape prediction from both single and multiple views + +![](images/44180c0551ce972c6172281365141e72f9ff613c8fa2afae169e17e1d9b36c14.jpg) + +![](images/b2512e7a8a926dd41e8db209b879a2ffc46849848c25a26e13a9c8251647e3ad.jpg) +PMO (rand init) +PMO (rand init) +PMO + +![](images/af0c3b59a4181d0e7fb9fc1029821bdfa88ccc5690d71170b5071faddcf5a19a.jpg) + +![](images/1e334fa639a379983fefd7b6149cc67e1dc57d70d9e0fb70b89858953a760432.jpg) + +![](images/56d7226ad1e534a57868aefd197f582bc6007f974031d5fcf7ceba425b52b765.jpg) +Ours + +![](images/349c4f31eea8e031796a5db2b2d541cc54056425d3e97ab91cda7f116d05d74c.jpg) + +![](images/59fa1a1b124f29293182b947e5c975d2e5880c0b22f4abde43bddaf6a362ef2b.jpg) + +![](images/88314fcb956bc619920e5abad36414fc9917ed980c3cf29fe337ea905aece966.jpg) +Figure 11. Comparison on 3D shape prediction from multi-view images on the PMO test set. Our method maintains good surface details, while PMO suffers from the mesh representation and may not effectively optimize the shape. + +![](images/ceea7c8d87d67d69ca03bf1fa09a92dc3fb8c30d6410546bfb6aa8866670ee43.jpg) + +![](images/ac724444f050282835dadea8b80aa6f7d96d1c3f5088ca79f2a218312adec88d.jpg) + +![](images/afe50a37cb871e5043e2fb245fbf746c7fdd914d8a49de4fb9bfb3d3e557257f.jpg) + +![](images/76e398046fe23da32074b97c28d7346834f30fca729993456c3546bd9a5c670a.jpg) + +![](images/a3fc799188df69f2060e9e9dc75759b6809dcc58ccb545758c49eddb9703caca.jpg) + +![](images/a1096f1ff5dbb3551f6468e44cc0e31f7e959ec730634e3c60bb1dc2a9c87bc0.jpg) + +![](images/eed937f8e052c9c098de631ec1ae74ad12641cb6680ae0cd55d59c43ff4b16d0.jpg) + +![](images/beec3b7998693c238064762d2f15ae2f40a31fde57c04fbd5d1c4543ae610793.jpg) +Figure 12. Comparison on 3D shape prediction from multi-view images on real-world dataset [5]. It is in general challenging for shape prediction on real image. Comparatively, our method produces more reasonable results with correct structure. + +![](images/689e918cdbfc9e8e57e3491ef640f9b2a8c1ddb0e413239efede9371d47857ce.jpg) + +![](images/19ca0519926055e17fc40f1de33608e197b6aab1867850f265dedacf07b7ae9a.jpg) + +in conjunction with the high capacity 3D neural representation. Extensive experiments show that our geometry based optimization algorithm produces 3D shapes that are more accurate than SOTA, generalizes well to new datasets, and is robust to imperfect or partial observations. Promising directions to explore using our renderer include self-supervised learning, recovering other properties jointly with geometry, and neural image rendering. + +# Acknowledgements + +This work is partly supported by National Natural Science Foundation of China under Grant No. 61872012, National Key R&D Program of China (2019YFF0302902), and Beijing Academy of Artificial Intelligence (BAAI). + +# References + +[1] Bruce Guenther Baumgart. Geometric modeling for computer vision. Technical report, STANFORD UNIV CA DEPT OF COMPUTER SCIENCE, 1974. 1 +[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. 7 +[3] Wenzheng Chen, Jun Gao, Huan Ling, Edward J Smith, Jaakko Lehtinen, Alec Jacobson, and Sanja Fidler. Learning to predict 3d objects with an interpolation-based differentiable renderer. In Proc. of Advances in Neural Information Processing Systems (NeurIPS), 2019. 2 +[4] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[5] Sungjoon Choi, Qian-Yi Zhou, Stephen Miller, and Vladlen Koltun. A large dataset of object scans. arXiv preprint arXiv:1602.02481, 2016. 8 +[6] Christopher B Choy, Danfei Xu, JunYoung Gwak, Kevin Chen, and Silvio Savarese. 3d-r2n2: A unified approach for single and multi-view 3d object reconstruction. In Proc. of European Conference on Computer Vision (ECCV). Springer, 2016. 2, 3, 7 +[7] Zhaopeng Cui, Jinwei Gu, Boxin Shi, Ping Tan, and Jan Kautz. Polarimetric multi-view stereo. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2017. 3 +[8] Angela Dai and Matthias Nießner. Scan2mesh: From unstructured range scans to 3d meshes. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 5574-5583, 2019. 3 +[9] Angela Dai, Charles Ruizhongtai Qi, and Matthias Nießner. Shape completion using 3d-encoder-predictor cnns and shape synthesis. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2017. 2, 3 +[10] Rohit Girdhar, David F Fouhey, Mikel Rodriguez, and Abhinav Gupta. Learning a predictable and generative vector representation for objects. In Proc. of European Conference on Computer Vision (ECCV). Springer, 2016. 3 +[11] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. Atlasnet: A papier-mâché approach to learning 3d surface generation. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[12] Christian Hane, Shubham Tulsiani, and Jitendra Malik. Hierarchical surface prediction for 3d object reconstruction. In Proc. of International Conference on 3D Vision (3DV). IEEE, 2017. 2 +[13] John C Hart. Sphere tracing: A geometric method for the antiaised ray tracing of implicit surfaces. The Visual Computer, 12(10), 1996. 2, 3 +[14] Carlos Hernandez, George Vogiatzis, and Roberto Cipolla. Multiview photometric stereo. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(3):548-554, 2008. 3 +[15] Po-Han Huang, Kevin Matzen, Johannes Kopf, Narendra Ahuja, and Jia-Bin Huang. Deepmvs: Learning multi-view + +stereopsis. In Proc. of Computer Vision and Pattern Recognition (CVPR), pages 2821-2830, 2018. 3 +[16] Sunghoon Im, Hae-Gon Jeon, Stephen Lin, and In So Kweon. Dpsnet: end-to-end deep plane sweep stereo. In Proc. of International Conference on Learning Representations (ICLR), 2019. 3 +[17] Eldar Insafutdinov and Alexey Dosovitskiy. Unsupervised learning of shape and pose with differentiable point clouds. In Proc. of Advances in Neural Information Processing Systems (NeurIPS), 2018. 2 +[18] Yue Jiang, Dantong Ji, Zhizhong Han, and Matthias Zwicker. Sdfdiff: Differentiable rendering of signed distance fields for 3d shape optimization. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2020. 2 +[19] Adrian Johnston, Ravi Garg, Gustavo Carneiro, Ian Reid, and Anton van den Hengel. Scaling cnns for high resolution volumetric reconstruction from a single image. In Proc. of International Conference on Computer Vision (ICCV), pages 939–948, 2017. 3 +[20] Angjoo Kanazawa, Michael J Black, David W Jacobs, and Jitendra Malik. End-to-end recovery of human shape and pose. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[21] Hiroharu Kato, Yoshitaka Ushiku, and Tatsuya Harada. Neural 3d mesh renderer. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2018. 2 +[22] Chen Kong, Chen-Hsuan Lin, and Simon Lucey. Using locally corresponding cad models for dense 3d reconstructions from a single image. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[23] Tzu-Mao Li, Miika Aittala, Frédo Durand, and Jaakko Lehtinen. Differentiable monte carlo ray tracing through edge sampling. In Proc. of ACM SIGGRAPH, page 222. ACM, 2018. 1, 2 +[24] Chen-Hsuan Lin, Oliver Wang, Bryan C Russell, Eli Shechtman, Vladimir G Kim, Matthew Fisher, and Simon Lucey. Photometric mesh optimization for video-aligned 3d object reconstruction. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2019. 7 +[25] Shichen Liu, Weikai Chen, Tianye Li, and Hao Li. Soft rasterizer: Differentiable rendering for unsupervised single-view mesh reconstruction. In Proc. of International Conference on Computer Vision (ICCV), 2019. 2 +[26] Shichen Liu, Shunsuke Saito, Weikai Chen, and Hao Li. Learning to infer implicit surfaces without 3d supervision. In Proc. of Advances in Neural Information Processing Systems (NeurIPS), 2019. 2 +[27] Stephen Lombardi, Tomas Simon, Jason Saragih, Gabriel Schwartz, Andreas Lehrmann, and Yaser Sheikh. Neural volumes: Learning dynamic renderable volumes from images. Proc. of ACM SIGGRAPH, 2019. 2 +[28] Matthew M Loper and Michael J Black. Opendr: An approximate differentiable renderer. In Proc. of European Conference on Computer Vision (ECCV), pages 154-169. Springer, 2014. 2 +[29] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: + +Learning 3d reconstruction in function space. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2019. 2 +[30] Mateusz Michalkiewicz, Jhony K Pontes, Dominic Jack, Mahsa Baktashmotlagh, and Anders Eriksson. Implicit surface representations as layers in neural networks. In Proc. of International Conference on Computer Vision (ICCV), 2019. +[31] Thu H Nguyen-Phuoc, Chuan Li, Stephen Balaban, and Yongliang Yang. Rendernet: A deep convolutional network for differentiable rendering from 3d shapes. In Proc. of Advances in Neural Information Processing Systems (NeurIPS), 2018. 2 +[32] Michael Niemeyer, Lars Mescheder, Michael Oechsle, and Andreas Geiger. Occupancy flow: 4d reconstruction by learning particle dynamics. In Proc. of International Conference on Computer Vision (ICCV), 2019. 2 +[33] Michael Oechsle, Lars Mescheder, Michael Niemeyer, Thilo Strauss, and Andreas Geiger. Texture fields: Learning texture representations in function space. In Proc. of International Conference on Computer Vision (ICCV), 2019. 2, 4 +[34] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2019. 1, 2, 3, 5, 6, 7 +[35] Gustavo Patow and Xavier Pueyo. A survey of inverse rendering problems. In Computer graphics forum, volume 22, pages 663-687. Wiley Online Library, 2003. 1 +[36] Felix Petersen, Amit H Bermano, Oliver Deussen, and Daniel Cohen-Or. Pix2vex: Image-to-geometry reconstruction using a smooth differentiable renderer. arXiv preprint arXiv:1903.11149, 2019. 2 +[37] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[38] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Proc. of Advances in Neural Information Processing Systems (NeurIPS), 2017. 2 +[39] Gernot Riegler, Ali Osman Ulusoy, and Andreas Geiger. Octnet: Learning deep 3d representations at high resolutions. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2017. 2 +[40] Shunsuke Saito, Zeng Huang, Ryota Natsume, Shigeo Morishima, Angjoo Kanazawa, and Hao Li. PIFu: Pixel-aligned implicit function for high-resolution clothed human digitization. In Proc. of International Conference on Computer Vision (ICCV), 2019. 2 +[41] Steven M Seitz, Brian Curless, James Diebel, Daniel Scharstein, and Richard Szeliski. A comparison and evaluation of multi-view stereo reconstruction algorithms. In Proc. of Computer Vision and Pattern Recognition (CVPR). IEEE, 2006. 3 +[42] Ben Semerjian. A new variational framework for multiview surface reconstruction. In Proc. of European Conference on Computer Vision (ECCV). Springer, 2014. 3 + +[43] Vincent Sitzmann, Justus Thies, Felix Heide, Matthias Nießner, Gordon Wetzstein, and Michael Zollhofer. Deepvoxels: Learning persistent 3d feature embeddings. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2019. +[44] Vincent Sitzmann, Michael Zollhöfer, and Gordon Wetzstein. Scene representation networks: Continuous 3d-structure-aware neural scene representations. In Proc. of Advances in Neural Information Processing Systems (NeurIPS), 2019. 2, 5 +[45] David Stutz and Andreas Geiger. Learning 3d shape completion under weak supervision. International Journal of Computer Vision (IJCV), pages 1-20, 2018. 2 +[46] Maxim Tatarchenko, Alexey Dosovitskiy, and Thomas Brox. Octree generating networks: Efficient convolutional architectures for high-resolution 3d outputs. In Proc. of International Conference on Computer Vision (ICCV), 2017. 2 +[47] Nanyang Wang, Yinda Zhang, Zhuwen Li, Yanwei Fu, Wei Liu, and Yu-Gang Jiang. Pixel2mesh: Generating 3d mesh models from single rgb images. In Proc. of European Conference on Computer Vision (ECCV), 2018. 2 +[48] Yifan Wang, Felice Serena, Shihao Wu, Cengiz Öztireli, and Olga Sorkine-Hornung. Differentiable surface splatting for point-based geometry processing. Proc. of ACM SIGGRAPH Asia, 2019. 2 +[49] Yi Wei, Shaohui Liu, Wang Zhao, and Jiwen Lu. Conditional single-view shape generation for multi-view stereo reconstruction. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. 3 +[50] Chao Wen, Yinda Zhang, Zhuwen Li, and Yanwei Fu. Pixel2mesh++: Multi-view 3d mesh generation via deformation. In Proc. of International Conference on Computer Vision (ICCV), 2019. 3 +[51] 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 Proc. of Advances in Neural Information Processing Systems (NeurIPS), 2016. 3 +[52] Zhirong Wu, Shuran Song, Aditya Khosla, Fisher Yu, Linguuang Zhang, Xiaou Tang, and Jianxiong Xiao. 3d shapenets: A deep representation for volumetric shapes. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2015. 2 +[53] Yao Yao, Zixin Luo, Shiwei Li, Tian Fang, and Long Quan. Mvsnet: Depth inference for unstructured multi-view stereo. In Proc. of European Conference on Computer Vision (ECCV), pages 767-783, 2018. 3 +[54] Yizhou Yu, Paul Debevec, Jitendra Malik, and Tim Hawkins. Inverse global illumination: Recovering reflectance models of real scenes from photographs. volume 99, pages 215-224, 1999. 1 +[55] Andy Zeng, Shuran Song, Matthias Nießner, Matthew Fisher, Jianxiong Xiao, and Thomas Funkhouser. 3dmatch: Learning local geometric descriptors from rgb-d reconstructions. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2017. 2 \ No newline at end of file diff --git a/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/images.zip b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..708a5192a2dc45c196e3c6e64dfc26edd1cce2a1 --- /dev/null +++ b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d886d706a7d7beead091301499266159de6ad604238e107ba8a6a5c58e44959 +size 432203 diff --git a/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/layout.json b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1e1c81e3746b2947313c2b01a86000a0887357fa --- /dev/null +++ b/distrenderingdeepimplicitsigneddistancefunctionwithdifferentiablespheretracing/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c5358654a9a2f434efda822d84550f21d781146966ee00501b2bcc97b0b4a031 +size 431573 diff --git a/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/3fe30f84-22a4-47a6-a3f5-ea510abb4f8d_content_list.json b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/3fe30f84-22a4-47a6-a3f5-ea510abb4f8d_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..14421070f20fe8833d2aa9424c045bac4512e059 --- /dev/null +++ b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/3fe30f84-22a4-47a6-a3f5-ea510abb4f8d_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:df1d4bf34bd911c3119e9e62aac6ba9777bcbf038b203ca121a473fcc3579be0 +size 81965 diff --git a/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/3fe30f84-22a4-47a6-a3f5-ea510abb4f8d_model.json b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/3fe30f84-22a4-47a6-a3f5-ea510abb4f8d_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a40df943ca217c452bb262be962eca44a91a512c --- /dev/null +++ b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/3fe30f84-22a4-47a6-a3f5-ea510abb4f8d_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b63b49f40b66510ebbc0536fe9323c63fcccc2c793209712f0131165c6ea61ee +size 103690 diff --git a/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/3fe30f84-22a4-47a6-a3f5-ea510abb4f8d_origin.pdf b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/3fe30f84-22a4-47a6-a3f5-ea510abb4f8d_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..aa764836af877c4f8a06ad7dce6868396d497680 --- /dev/null +++ b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/3fe30f84-22a4-47a6-a3f5-ea510abb4f8d_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49c71363c75597c31e5cb880a38ac6b17e9631e89b5733d692433d8a08589b39 +size 1711435 diff --git a/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/full.md b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/full.md new file mode 100644 index 0000000000000000000000000000000000000000..36d0935b9f502ed3cf35067125121696d5171482 --- /dev/null +++ b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/full.md @@ -0,0 +1,329 @@ +# DLWL: Improving Detection for Lowshot classes with Weakly Labelled data + +Vignesh Ramanathan Facebook + +vigneshr@fb.com + +Rui Wang +Facebook + +ruiw@fb.com + +Dhruv Mahajan Facebook + +dhruvm@fb.com + +# Abstract + +Large detection datasets have a long tail of lowshot classes with very few bounding box annotations. We wish to improve detection for lowshot classes with weakly labelled web-scale datasets only having image-level labels. This requires a detection framework that can be jointly trained with limited number of bounding box annotated images and large number of weakly labelled images. Towards this end, we propose a modification to the FRCNN [39] model to automatically infer label assignment for objects proposals from weakly labelled images during training. We pose this label assignment as a Linear Program with constraints on the number and overlap of object instances in an image. We show that this can be solved efficiently during training for weakly labelled images. Compared to just training with few annotated examples, augmenting with weakly labelled examples in our framework provides significant gains. We demonstrate this on the LVIS dataset (3.5% gain in AP) as well as different lowshot variants of the COCO dataset. We provide a thorough analysis of the effect of amount of weakly labelled and fully labelled data required to train the detection model. Our DLWL framework can also outperform self-supervised baselines like omni-supervision [37] for lowshot classes. + +# 1. Introduction + +Object detection models have made drastic progress on standard datasets like COCO [31] and PASCAL VOC [11] with thousands of object instances per class. However, as we move towards larger datasets like LVIS [18], we encounter lowshot classes with fewer than ten bounding boxes. On the other hand, there are huge web-scale datasets [50] with image-level labels for large number of classes, but without any bounding boxes. It is lucrative to leverage this information to improve detection for lowshot classes. + +Weakly supervised object detection (WSOD) [3, 62, 53] is a line of work that uses only image-level class labels to train detection models. However, the performance of these models are significantly lower than their fully supervised + +![](images/1e1b0a94dcbfc0b9b880b99474c63dd863b994c51b9674cd3aa814a4feeadee0.jpg) +Figure 1: Large-scale detection datasets have a long-tail distribution with many low-shot classes. We adopt FRCNN [39] to leverage additional weakly labelled images to improve detection for these classes. + +counterparts. In our work, we investigate a more practical middle-ground. We use the few bounding box annotations for lowshot classes in detection datasets in conjunction with a large number of weakly labelled images (Fig. 1). Intuitively, the bounding boxes from the fully supervised examples can lead to better localization compared to WSOD models. Similarly, the class supervision from weakly supervised examples could help in decreasing the classification error in object detection. + +We propose a framework to improve Detection for Low-shot classes with Weakly Labelled (DLWL) data. To achieve this, we would like to enable a standard detection model like FRCNN [39] to use both fully labelled and weakly labelled data. FRCNN has two stages: object proposal generation followed by the classification of proposals. For fully supervised images, FRCNN uses the overlap between annotated bounding boxes and the proposals at every iteration to identify proposal class labels used in the classification stage. The main challenge with weakly labelled examples is that the class labels for proposals are unknown during training. We tackle this problem by generalizing this label assignment method to work with image-level labels as well. This is in contrast to WSOD approaches [26, 53, 15, 1] that have specialized architectures and loss functions to learn exclusively from weakly labelled images. + +We formulate proposal label assignment as an optimization problem. In the spirit of classification expectation maximization (C-EM [5]) the maximum predicted score for + +each proposal during training can be used to identify its label. However, in the absence of additional constraints, this can lead to faulty label assignments. Hence, we introduce bounds on the spatial distribution and number of instances for an object in the image, and pose this as a Linear Program (LP). We also show, how this LP can be solved efficiently at every iteration. These estimated labels can then be used as psuedo ground-truth to train the model. With this simple modification to the label assignment process, the model can be trained with both forms of supervision without any other changes to the model architecture. + +The idea of using additional data to improve detection has also been explored in past works [37, 12]. These approaches mine additional bounding boxes from a larger dataset using the noisy estimates from the initial lowshot model. On the other hand, we train jointly with all the data. Further, we allow the model to use object-specific constraints and progressively better predictions during training to infer bounding boxes for the weakly labelled images. + +The main contributions of our work are two fold: (a) we enable FRCNN model to be trained with both forms of supervision by proposing a LP based framework that assigns labels to proposals in weakly labeled images, and (b) we present a thorough analysis of the effect of augmenting lowshot classes with weakly labelled examples. To this end, we present three sets of experiments. (a) We first demonstrate results on a simulated lowshot setup for COCO dataset. We observe a significant boost in mAP $(>5\%)$ by augmenting lowshot classes (10 images per class) with weakly labelled images. We also observe a gain compared to self-training baselines [37]. Additionally, we show the effect of the amount of lowshot data as well as weakly labelled data. (b) We augment a real world lowshot dataset LVIS [18] with noisy weakly labelled examples from web-scale dataset YFCC100M [50] and observe a $3.5\%$ gain for the rare classes without any additional annotations. (c) We also evaluate our model in an extreme setting without any bounding box labels and demonstrate comparable performance to the state-of-the-art WSOD models. + +# 2. Related work + +Augmenting with additional data: Semi-supervised approaches [28, 6, 40, 37] are widely used to train models with additional unlabelled data. Self-training methods use predictions from an initial model to annotate additional data and then retrain the model [40, 37]. In particular, omnisupervision [37] showed that self-training can lead to modest performance gains in the highshot regime. In lowshot regime, predictions from the initial model are noisy, and this could adversely affect self-training methods. We handle this noise through jointly training with weakly and fully labelled data with bounding box labels inferred during training, rather than only relying on initial predictions. + +More recently, NOTE-RCNN [12] iteratively mined high-confidence examples from a collection of weakly labelled data. While their setup is similar to ours, they require multiple rounds of training. Other recent works [58, 51] utilize correlation between highshot source classes and low-shot target classes to improve fine-grained detection. These approaches are geared towards selecting better examples and sharing information between classes. These ideas are complementary to our work and can be used in conjunction with our model. + +YOLO9000[38] also uses classification datasets by using the most confident prediction in each image as psuedo ground truth. We generalize this notion by allowing multiple object instances per image along with image-level constraints. Another related work [34] proposes a constrained convolutional network for weakly supervised segmentation with an alternative convex optimization based algorithm. Along similar lines, we present a simpler linear program with bounding box constraints for object detection. + +Learning with weak supervision: Weakly supervised object detection has been studied extensively to train detection models only with image-level labels [7, 27, 23, 35, 44, 57, 33, 48, 45, 65, 16, 61, 46, 64, 63, 9, 43, 62]. Notably C-MIL [53] and Gao et al.[15] obtain good results on PASCAL VOC [11], by jointly training with an image classification and object detection loss. Prednet [1] introduces a new dissimilarity based objective function. These methods are focused on learning a model under stringent conditions where bounding box labels are completely absent. Our work provides extensive results for a more practical setup where at least a few bounding box labels are available. It is comparatively simpler and only requires a small change to FRCNN, compared to WSOD methods with specialized architectures. + +Lowshot object localization: Many recent works [21, 32, 56, 55, 20, 24, 10, 41, 22] have also developed specialized techniques to improve lowshot object localization. For instance, [22] uses attention and context guided learning to improve lowshot semantic segmentation. Meta-learning with knowledge transfer has also been used to improve low-shot models [56]. Alternatively, we explore the addition of weakly labelled examples to improve lowshot detection. + +# 3. Approach + +FRCNN [39] is a widely used model for fully supervised object detection. It consists of a region proposal network (RPN) which generates object proposals for an image, followed by region of interest (ROI) components (ROI-align and ROI-head). ROI-align aggregates features from the proposals, while the ROI-head assigns class labels to the proposals and fine-tunes their co-ordinates. This is illustrated in Fig. 2 with solid lines. In this section, we generalize this FRCNN model to enable training with both fully la + +![](images/bc40152a235845ff4af7a8c0669e79546ee8b102ea51c467cf1b23f995600474.jpg) +Figure 2: Overview of our DLWL framework that uses both weakly labelled and strongly labelled examples to train the FRCNN model. If the provided example has bounding box labels, then the standard green module with IoU matching is used to assign labels to proposals, else a linear program with constraints is used to infer the proposal labels as shown in the yellow module with dotted lines. The linear program is explained in more detail in Sec. 3 + +belled and weakly labelled data. We refer to our framework as DLWL (Detection for Lowshot classes with Weakly Labelled data). + +We consider a large-scale dataset like LVIS [18] composed of both highshot classes (with large number of bounding box annotations) and lowshot classes (with very few bounding box annotations). An inherent advantage with such a mixture of classes is that the large number of bounding boxes in the highshot classes can help to learn the class-agnostic parts of the network like the RPN, leading to overall better object detection. We augment such a dataset with additional weakly labelled examples for the lowshot classes. + +More formally, let the training images be given by $\mathcal{X} = \mathcal{X}_f \bigcup \mathcal{X}_w$ with both fully supervised $(\mathcal{X}_f)$ and weakly supervised $(\mathcal{X}_w)$ examples. We initially consider the standard form of weak supervision that provides only image-level class labels without bounding boxes. Later, we also discuss the use of the actual number of bounding boxes per class in an image as additional weak supervision. + +# 3.1. Label assignment for weak examples + +The ROI head in the FRCNN assigns class scores to each proposal generated from the RPN. This is in turn used to compute a classification loss during training. The main challenge while training with a weakly labelled image is that the class labels for the proposals are unknown. For a fully labelled image, these are obtained by aligning the proposals with the labelled bounding boxes in the image. This is illustrated as the (Insection over Union) IoU matcher module in Fig. 2, where proposals having an IoU greater than a threshold with a labelled box are assigned the cor + +responding class-label. This alignment is not possible for weakly labelled images due to absence of bounding box labels. We solve this problem through an optimization based label assignment module (shown in yellow in Fig. 2). + +One simple approach is to select the proposal with the highest score for each weakly labelled class as the positive bounding box for that class. However, if multiple instances of the object are present in the image, we run the risk of not associating labels with all instances. Also this does not exploit some intrinsic constraints in the image such as different instances of an object should not overlap. We overcome this by including these constraints during label assignment. + +More formally, we consider an image $x \in \mathcal{X}_w$ , with $C$ weak labels. At any given iteration, let $\mathbf{S}$ be the matrix of all class scores assigned by the ROI-head to the $P$ proposals. We consider a $P \times (C + 1)$ sub-matrix $\mathbf{S}_C$ denoting the scores for $P$ proposals corresponding to the $C$ weak labels in the image and the background class $C + 1$ , such that $s_{pc}$ is the score of the $p^{th}$ proposal for $c^{th}$ weak class in the image. We wish to assign labels to each of the proposals. Let this label assignment be denoted by the binary matrix $\mathbf{Y} \in \{0,1\}^{P \times C + 1}$ . In C-EM [5], the label for each proposal would be inferred by solving the following optimization problem: + +$$ +\mathbf {Y} = \operatorname {a r g m a x} _ {\mathbf {Y}} \operatorname {T r} \left(\mathbf {S} _ {C} ^ {T} \mathbf {Y}\right), \tag {1} +$$ + +$$ +\begin{array}{l} \begin{array}{l} \text {s . t .} \quad \mathbf {Y} \mathbf {1} = \mathbf {1}, \end{array} \\ \sum_ {p} y _ {p c} \geq 1, \forall c \leq C, \\ \end{array} +$$ + +where $\operatorname{Tr}(.)$ represents the trace of a matrix. The first constraint ensures that every proposal is assigned a label and + +the second constraint ensures that every weak label in the image is assigned to at least one proposal. + +In order to improve the label assignment during training, we extend this optimization problem with additional constraints. In particular, we add constraints on the number of chosen boxes per class, as well as their spatial distribution. For every object class, we assume prior knowledge about the average number of boxes per image. This can often be obtained from the lowshot dataset or even set to a fixed number for all classes in a dataset as we show in the experiments section. For every class $c$ , let this number be denoted by $N_{c}$ . This leads to a stricter constraint in Eq. 1. + +$$ +\sum_ {p} y _ {p c} = N _ {c}, \forall c \leq C. \tag {2} +$$ + +Additionally, we want to ensure that for every class, we chose boxes that do not overlap significantly. This ensures that multiple instances of the object are well spread out. To achieve this, we first cluster all the proposals in the image based on their IoU. In practice, we use agglomerative clustering with a threshold resulting in $H$ clusters. The number of clusters are determined by the threshold and vary with the image. Let the clusters be denoted by $\{h_1,\dots ,h_H\}$ . We can now add an additional constraint to ensure that every cluster has only one instance of an object: + +$$ +\sum_ {p \in h _ {i}} y _ {p c} \leq 1, \forall c \leq C, \quad 1 \leq i \leq H \tag {3} +$$ + +The effect of label assignment with these constraints is shown in Fig. 3. As seen, the LP does not prohibit a cluster from containing instances of different objects. + +# 3.2. Bootstrapping with weaker model + +A common problem when training with weakly labelled examples is that the model can get stuck in a bad local minima in the initial stages of training [51], since the prediction of the model is initially unreliable. We get around this problem by first training a lowshot model $(M_{low})$ without any weakly labelled data and using the labels predicted from $(M_{low})$ to augment the predictions from the current model. In other words, we replace the score matrix $\mathbf{S}$ with a weighted combination $\lambda \mathbf{S} + (1 - \lambda)\mathbf{S}_{init}$ , where $\mathbf{S}_{init}$ is a matrix obtained from the predictions of the lowshot model $(M_{low})$ and $0\leq \lambda \leq 1$ . In the initial stage, the score for lowshot classes can be quite low and $\mathbf{S}_{init}$ helps in bootstrapping the training. We also anneal $\lambda$ to 0 as the model starts training, since the confidence of the model for lowshot classes increases over time. Please refer to supplementary material for the details on annealing. + +In order to compute $S_{init}$ , we use 100 detections per image from $(M_{low})$ . At a given iteration, for each proposal $p$ in the image, we find the detection bounding box from the lowshot model with the highest overlap. If the overlap is higher than 0.7, we assign the class scores of the detection box to the $p^{th}$ row in $S_{init}$ . If overlap is below this threshold, we set the value corresponding to background in the $p^{th}$ row to 1. + +![](images/7530760a935bbd9b435b0af3648aaead2d5eb397dfed4301050ba850b8159498.jpg) +high scoring proposals for car, motorcycle + +![](images/43fdbea0b682244ac56fde80a6e9762b7325d3343be2c5b11b0adaae32cf1a7e.jpg) +Linear Program solution for 1 car, 3 motorcycle + +![](images/1d7771d2141e61f399f089787a32d7a09e5d64a5f1844699e0ee37e426b53459.jpg) +Figure 3: An example illustrating label assignment with the linear program. The highest scoring proposals for two weak classes car and motorcycle are shown in red and blue respectively in the top-left image. The different clusters of proposals are show in the bottom-left image, where each color denotes a unique cluster. The final label assignment from the LP is shown in the right image. + +![](images/b88d94470d1eaccf71e39c87480c2fe0c4f2bc517c0619b4d684530cecd6c479.jpg) + +# 3.3. Count based supervision + +Weak supervision for detection typically refers to the setup, where we only know the set of object classes present in an image. Gao et al. [13] studied count based supervision as an alternative form of weak supervision, where the number of instances of each class in an image is annotated. This is cheaper to obtain compared to other forms of annotation like one-click [2] and can benefit weakly supervised detection. Interestingly, this weak supervision fits naturally into our framework. Instead of using a rough guess or prior from the dataset, if the exact count of an object is known, we could use this as a stricter constraint in Eq. 2. In other words, count supervision would provide us the true value of $N_{c}$ in each image. + +# 3.4. Training Details + +LP optimization: In order to solve the optimization problem in Eq. 1 with additional constraints in Eqs. 2 and 3, we first relax the binary constraint. However, the resulting LP is very expensive to solve with standard LP solvers. This has to be carried out at every iteration when we encounter a weakly labelled image. We get over this problem by observing that the optimization separates into separable constraints that can be solved efficiently using ADMM [4] (shown in supplementary). + +RPN and bounding box regression: We disable the RPN loss and bounding box regression losses for all weakly labelled examples. These losses are useful only for fully-supervised images, where the exact bounding box coordinates are known during training. + +# 4. Experiments + +The main contribution of our work is a simple but effective change to the FRCNN framework that enables training of an object detection model with a mixture of fully-supervised and weakly-supervised data. We show that this is particularly beneficial for datasets with lowshot classes. We first demonstrate this through controlled experiments on lowshot variants of the COCO [31] dataset. We use the 2017 version of the dataset unless otherwise specified. We also show the practical utility of our model by augmenting the rare classes of the LVIS [18] dataset with weakly labelled images mined from YFCC100M [50] without using any additional annotations. Finally, we show that even under the stricter weakly supervised regime (without any low-shot data), our model can achieve comparable performance to existing weakly supervised object detectors. + +# 4.1. Experimental Set-up + +Implementation details: We fix ImageNet [8] pre-trained ResNet-50 [19] with Feature Pyramid Network (FPN) [30] as the backbone for FRCNN model for all the lowshot experiments unless otherwise specified. We trained all the models for $90K$ iterations with a batch size of 16 and the standard learning rate schedule used in [18]. We resized images to have a minimum edge size of 800 and used horizontal flip for data augmentation, unless otherwise stated. Also, as recommended in [18], we use square-root upsampling in all our lowshot experiments to handle the data imbalance across classes. We use $\lambda = 0.5$ and exponentially decay it to 0 by the end of training. + +Evaluation: We report the standard COCO metrics like AP (averaged over IoU thresholds) and $\mathrm{AP}_{50}$ . + +Baselines: We refer to our model as DLWL and compare results with the following models: + +lowshot-only: We train a model on fully supervised data only with available bounding box annotations. + +omni-weak: We also compare our model with omnisupervision approach [37]. To enable fair comparison, we use a slight variant which makes use of the weak labels. In particular, for a given class, we first select the subset of images from the weakly labelled dataset associated with that class and only use this subset to generate additional bounding box annotations using the lowshot-only model. We use the same strategy as [37] to identify a per-class threshold that results in the same average number of bounding boxes per class in the weakly labelled dataset as the original low-shot dataset. If this threshold does not yield bounding boxes in a weakly labelled image, we use the highest scoring detection for that class in the image. We then train a FRCNN model with original plus new annotations. + +# 4.2. COCO lowshot experiments + +Dataset Construction: We split the 80 COCO classes into a set of 70 highshot classes and 10 lowshot classes (chosen randomly, list in supp. section). We create a variant of COCO-train dataset where we have large number of images for the highshot classes and only a few images from the lowshot classes. In particular, we create the following two subsets of COCO-train data: + +COCO-N-strong: In this subset, we retain only $N$ training images from each of the 10 lowshot classes, and all images from highshot classes that do not contain any instance of a lowshot class. Note that since both lowshot and highshot classes can co-occur together in an image, we might exclude some images having highshot objects too. We vary the value of $N$ to create different $N$ -shot subsets. + +COCO-N-weak: The remaining images from COCO-train that are excluded from COCO-N-strong are used to form a weakly labelled dataset. In this subset, we only retain image-level labels without bounding boxes for the images. Note that this subset is dominated by objects belonging to the 10 lowshot classes. We refer to this as COCO-N-weak. + +We evaluate on 5000 images in the COCO validation set. + +Varying amounts of full-supervision: We now explore the effect of varying the amount of lowshot data. For each value of $N$ , we use the corresponding N-shot split COCO-N-strong as the fully-supervised training dataset. We augment this data with weakly labelled examples from COCO-N-weak for the models that use weakly labelled data. We fix $N_{c}$ to be the average number of bounding boxes for class $c$ in the fully supervised lowshot dataset COCO-N-strong. Note that in practice, this does not correspond to an integer value for $N_{c}$ . We do stochastic rounding during training for each sample, so that across multiple iterations the average converges to the fractional value. For the specific case of $N = 0$ , which is the weakly supervised setup, we set $N_{c}$ to 3 by computing the mean of average number of bounding boxes for the 70 high shot classes. + +From Fig. 4, we immediately observe that addition of small number of fully labelled examples ( $N = 10$ ) leads to a huge improvement compared to using only weakly labelled data ( $N = 0$ ) for all the models. This shows the benefit of training with at least a handful of fully labelled examples. In Fig. 5 we see better localization as the amount of supervision increases. + +Compared to lowshot-only, we show significant gains for different $N$ values (8.8% for $N = 10$ ). Our model trained with only $N = 20$ surpasses the lowshot-only model trained using $N = 200$ examples. + +We also compare our approach with the strong omni-weak baseline which also leverages weakly labelled data. + +![](images/31967e5f956fdfc84b49640df43a2d1b10096600c9a2f4ddc096220381da2536.jpg) +Figure 4: Effect of varying the amount of full-supervision. lowshot-only model uses only COCO-N-strong at different values of $N$ , while the other models are trained with COCO-N-weak as well. + +
ModelN=10N=20N=100N=200
lowshot-only35.735.936.236.3
omni-weak35.836.236.436.6
DLWL35.736.036.136.4
+ +In the lowshot regime of $N < 50$ , our model outperforms omni-weak by large margins. For $N = 10$ , our approach achieves $17.1\%$ AP compared to $13.1\%$ achieved by omni-weak. The predictions from lowshot-only model used by omni-weak to get pseudo ground truth annotations are very noisy in the lowshot regime that impacts its performance. On the other hand, additional constraints used by our approach and dynamic label assignment during the training helps to rectify the faulty label assignments to proposals. In the highshot regime of $N >= 50$ , we observe diminishing returns from our model compared to omni-weak. The performance of lowshot-only model improves with higher values of $N$ , which in turn leads to better performance for the omni-weak model as well. + +We also report the performance for the 70 highshot classes at different values of $N$ in Tab. 1. We note that the AP for these classes doesn't change much with the addition of weakly labelled data for lowshot classes, compared to the fully-supervised lowshot-only model. + +Effect of amount of weakly labelled data: Since the main focus of the work is to leverage weakly labelled images, it is important to analyze the effect of number of such images required. To do so, we fix COCO-10-strong as the fully supervised dataset, augment it with different number of weakly labelled images from COCO-10-weak and then train our model. COCO-10-weak consists of $10k$ images not present in COCO-10-strong. + +Fig. 6 shows the results as we vary the number of weakly labelled examples in increments of 1000. We observe that the performance increases rapidly in the beginning and then + +Table 1: Performance of hisghshot classes with addition of weakly labelled data to lowshot classes. + +
NNc=1Nc=2Nc=3Nc=4Nc=avg.
09.811.212.110.3-
1013.215.816.514.117.1
+ +Table 2: Effect of varying the value of ${N}_{c}$ in training our DLWL model. + +
ModelN=0N=10N=20N=50
DLWL12.017.123.326.3
DLWL + count13.618.224.026.5
+ +Table 3: Effect of adding count based supervision to the weakly supervised dataset $COCO-N$ -weak at different values of $N$ when training our DLWL model. + +saturates around $8k$ images. Hence, adding up to two orders of magnitude more weakly labelled data still improves the detection performance for the lowshot classes. + +Effect of $N_{c}$ : We recommend setting $N_{c}$ to the average number of object instances per image for each lowshot class in the COCO-N-strong dataset. We use $N_{c} = avg$ to depict this setting. We now experiment with different strategies for deciding $N_{c}$ . The simplest approach is to fix it to the same integer value for all the classes. We use COCO-N-strong as fully-supervised dataset and augment it with COCO-N-weak. Tab. 2 shows results for $N = 0$ and 10. + +We observe that performance first increases and then decreases as we vary $N_{c}$ . Note that at $N_{c} = 1$ , the model is trained without the constraint in Eq. 2 since only one instance per class is chosen. This leads to a performance drop, showing the importance of constraints introduced in our framework. By increasing $N_{c}$ , there is a higher chance for one of the estimated bounding boxes to cover the true object instance in the image, leading to higher recall. However, at very high values this also leads to lower precision due to increase in false positives. Hence, the value of $N_{c}$ needs to be close to the true count of object instances for each class in an image. Our strategy ( $N_{c} = avg$ ) of estimating $N_{c}$ from the lowshot dataset itself works the best. + +Count supervision: The choice of $N_{c}$ can lead to a significant variation in model performance. Hence, we look into a form of weak supervision where $N_{c}$ is known for every image. We assume we know the count of each class for all the images in the weakly labelled datasets COCO-N-weak. This can directly be used to bound the label assignment to proposals in Eq. 2. We show results at different $N$ -shot values with this added supervision in Tab. 3. We observe a nominal gain of $0.7\% - 1.6\%$ at low values of $N$ . This is fairly cheap and can lead to good gains in the lowshot regime. + +# 4.3. Augmenting LVIS with weakly labelled data + +The recently released LVIS [18] dataset clearly highlights the need for better lowshot object detection models. The dataset has more than a 100 "rare" classes which have less than 10 bounding box annotations in the training dataset. We attempt to improve the performance of this model by augmenting the rare classes with additional weakly labelled images. Unlike the controlled settings for COCO in Sec. 4.2, we do not have a clean source of + +![](images/b69c3eeaba3ceacc55b617689d3c46e7fbbff6b442be8916669069471854faa7.jpg) +Figure 5: Sample images with detections from our model and omni-weak model at $N = 5$ and $N = 10$ . We see better localization as $N$ increases for both models. + +![](images/527bae651504546410c58b1dfec64042ac3562cd50f6aaa3cf8218365006b51f.jpg) + +![](images/9b457242e8affc2dd3856db0c6df89938e331b7c4fbd80915a191a6cafe65317.jpg) +Figure 6: Effect of varying the amount of weakly labelled data used in addition to the lowshot COCO-10-strong dataset to train our model. + +weakly labelled images for LVIS. Hence, we look to another dataset, YFCC100M [50] to augment the rare classes. + +YFCC100M as weakly labelled dataset: YFCC100M has $100M$ images along with the noisy hashtags which can be treated as weak image-level labels. For each rare class, we use the names associated with it to find the matching hashtags. We then use the images tagged with the matched hashtags to augment the rare class with weakly labelled data. However, a good fraction of classes have no corresponding tags. Hence, we also use the nearest neighbors to gather additional examples. Specifically, we use the cropped bounding boxes (expanded with additional context similar to [17]) from each rare class to retrieve at most 1000 nearest neighbors from YFCC100M. We then include these retrieved images in the weakly labelled set also. Please refer to supplementary material for details. + +However, this set of weakly labelled images can be very noisy due to erroneous tags and nearest neighbors returning + +![](images/c4b4f030f699ca3a194509a10f6476dfa5cc9f6339fbeee2c7f81a1d23647f9a.jpg) +Figure 7: Samples from YFCC100M for a few rare classes that are part of our weakly labelled dataset. For each image, we show the detections from the initial lowshot-only model in blue. The images that are noisy and do not have any instance of the corresponding object are highlighted in red. We notice a significant fraction of noisy images as well as missing or wrongly localized objects from the initial model. + +irrelevant images particularly for small objects. In order to reduce the noise, we use the original model trained on the LVIS dataset (lowshot-only) to filter out images that have no detections above a threshold of 0.001 for the rare classes. After this filtering, we retain a maximum of 500 images per class that have the highest detection scores. Note that this is a very low threshold and is aimed at getting a higher recall. The resulting images are used to build a weakly labelled dataset YFCC100M-weak. This dataset still has significant amount of noise (Fig. 7). + +Image dedduplication: We use nearest neighbors approach to remove all images from YFCC100M-weak, that were near duplicates of images from the LVIS validation set to avoid + +
BackboneMethodAP-rAP
ResNet-50lowshot-only10.84 ± 0.7621.88 ± 0.24
ResNet-50lowshot mask* [18]11.15 ± 0.7423.32 ± 0.21
ResNet-50omni-weak [37]12.88 ± 1.2321.85 ± 0.22
ResNet-50DLWL14.21 ± 1.0322.14 ± 0.16
ResNeXt-101-32x8dlowshot-only12.73 ± 1.1823.75 ± 0.41
ResNeXt-101-32x8domni-weak [37]16.03 ± 0.6624.74 ± 0.73
ResNeXt-101-32x8dDLWL17.36 ± 0.8025.07 ± 0.10
+ +Table 4: Performance of our model in comparison to different baselines on LVIS dataset after augmenting with weakly labelled data from YFCC-100M. AP-r is the average precision for rare classes and AP is the average precision for all classes. *Note that lowshot mask uses a mask-RCNN with segmentation masks as additional supervision unlike other methods in the table. + +corruption between train and test data. + +Evaluation: We report the average (and standard deviation) of AP-r and AP over 3 training runs. AP-r is the average precision for rare classes and AP is the average precision for all classes, following the convention from [18]. + +Results: From Tab. 4, we observe that adding additional weakly labelled examples provides a gain for both omni-weak and our model. Further, we see that our model which leverages image-level constraints to handle noise during training outperforms omni-weak. More interestingly the performance of our model on the rare classes surpasses that of mask-RCNN which uses additional supervision from segmentation masks, thus clearly demonstrating the power of leveraging weakly labelled data. Extending our approach to mask-RCNN is an interesting future direction. + +# 4.4. Additional weakly supervised experiments + +The main focus of our work is to provide a model that can be jointly trained with both weakly labelled and fully labelled examples, and is not specifically geared towards stand alone weakly supervised detection. However, we present results on weakly supervised benchmarks through some simple modifications to our setup. + +Bootstrapping: Unlike the lowshot case (Sec. 3.2), we do not have an initial fully supervised model for bootstrapping. Hence we first train another weakly supervised model WSDDN [3] augmented with contextual pooling [25], and use its predictions for bootstrapping. We chose WSDDN due to its simplicity; using more sophisticated models could lead to better performance. Refer to supplementary for details. + +Datasets: We report results for the PASCAL VOC07 as well as COCO14 (2014 version of COCO[31]) datasets. We train on the train-split and evaluate on the full val-split, when reporting results for COCO14. + +Training Details: We use VGG-16 backbone for all experiments. Following the settings in [47], the WSDDN model used for bootstrapping was trained with MCG [36] proposals for PASCAL VOC07 and selective search [52] proposals for COCO14. Once WSDDN is trained, we use the detections from this model for initializing $S_{init}$ and train a FR-CNN using our method. In line with previous works, as a + +
ModelAP50
OICR [48]47.0
PCL [47]48.8
MELM [54]47.3
Weak-RPN [49]50.4
Yang et al. [59]51.5
PGE [26]52.1
C-MIL [53]52.3
Gao et al. [15]52.6
Prednet [1]52.9
DLWL52.0
+ +(a) PASCAL VOC07 results + +
ModelAP50AP
MELM [54]18.87.8
Ge et al. [16]19.38.5
PCL [47]19.69.2
DLWL19.59.2
+ +(b) COCO14 results + +Table 5: Weakly supervised object detection results for PASCAL-VOC07 and COCO14 with VGG-16 backbone. + +last-step we also retrain a FRCNN using the predictions of our model as psuedo ground-truth. For PASCAL-VOC07, we trained all models for 20 epochs with an initial learning rate of $5e^{-3}$ which was dropped to $5e^{-4}$ after 10 epochs. We used the same learning rate schedule as described in Sec. 4 for COCO14. During training, we used scale jitter with 5 different scales and horizontal flip. + +Results: The results are shown in Tab. 5 for PASCAL VOC07 and COCO14. We see that the performance of our model is comparable to state-of-the-art weakly supervised methods. Dedicated weakly supervised models [26, 53, 15, 1] have specialized architectures and loss functions for fine tuning predictions on the weakly labelled examples. These methods are complimentary to the simpler change to FRCNN proposed in our work. We also note that more recent models [14, 60, 29, 42] have reported a considerable gain in detection performance by guiding the network with additional segmentation signals from weakly supervised segmentation or superpixel straddling. Since our aim is to provide a simple approach to leverage weakly labelled examples in a standard FRCNN model, the use of segmentation signals is beyond the scope of this work. + +# 5. Conclusion + +We introduced a framework to improve Detection for Lowshot classes with Weakly Labelled data (DLWL). We showed how this can be used to train FRCNN models with both weakly supervised and fully supervised images, by extending the proposal label assignment process in FRCNN to handle both forms of supervision. We formulated the label assignment for weakly labelled images as a Linear Program (LP). The LP imposed constraints on the number of instances of an object in an image and ensured non-overlap of multiple instances of the same object. We demonstrated the effectiveness of our approach on the LVIS dataset and lowshot variants of COCO dataset. For future work, we could extend to other forms of weak supervision such as one point annotation. Another interesting direction would be to train mask-RCNN in our framework as well. + +# References + +[1] Aditya Arun, CV Jawahar, and M Pawan Kumar. Dissimilarity coefficient based weakly supervised object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9432-9441, 2019. 1, 2, 8 +[2] Amy Bearman, Olga Russakovsky, Vittorio Ferrari, and Li Fei-Fei. What's the point: Semantic segmentation with point supervision. In European conference on computer vision, pages 549-565. Springer, 2016. 4 +[3] Hakan Bilen and Andrea Vedaldi. Weakly supervised deep detection networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2846-2854, 2016. 1, 8 +[4] Stephen Boyd, Neal Parikh, Eric Chu, Borja Peleato, and Jonathan Eckstein. Distributed optimization and statistical learning via the alternating direction method of multipliers. Found. Trends Mach. Learn., 3(1):1-122, 2011. 4 +[5] Gilles Celeux and Gérard Govaert. A classification em algo- rithm for clustering and two stochastic versions. Computationa!al statistics & Data analysis, 14(3):315-332, 1992. 1, 3 +[6] Xinlei Chen, Abhinav Shrivastava, and Abhinav Gupta. Neil: Extracting visual knowledge from web data. In Proceedings of the IEEE International Conference on Computer Vision, pages 1409-1416, 2013. 2 +[7] Ramazan Gokberk Cinbis, Jakob Verbeek, and Cordelia Schmid. Weakly supervised object localization with multifold multiple instance learning. IEEE transactions on pattern analysis and machine intelligence, 39(1):189-203, 2017. 2 +[8] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248-255. IEEE, 2009. 5 +[9] Ali Diba, Vivek Sharma, Ali Mohammad Pazandeh, Hamed Pirsiavash, and Luc Van Gool. Weakly supervised cascaded convolutional networks. In CVPR, volume 3, page 9, 2017. +[10] Xuanyi Dong, Liang Zheng, Fan Ma, Yi Yang, and Deyu Meng. Few-example object detection with model communication. IEEE transactions on pattern analysis and machine intelligence, 41(7):1641-1654, 2018. 2 +[11] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2007 (VOC2007) Results. http://www.pascalnetwork.org/challenges/VOC/voc2007/workshop/index.html. 1, 2 +[12] Jiyang Gao, Jiang Wang, Shengyang Dai, Li-Jia Li, and Ram Nevatia. Note-rcnn: noise tolerant ensemble rcnn for semi-supervised object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 9508–9517, 2019. 2 +[13] Mingfei Gao, Ang Li, Ruichi Yu, Vlad I Morariu, and Larry S Davis. C-wsl: Count-guided weakly supervised localization. In Proceedings of the European Conference on Computer Vision (ECCV), pages 152-168, 2018. 4 +[14] Yan Gao, Boxiao Liu, Nan Guo, Xiaochun Ye, Fang Wan, Haihang You, and Dongrui Fan. C-midn: Coupled multi- + +ple instance detection network with segmentation guidance for weakly supervised object detection. In The IEEE International Conference on Computer Vision (ICCV), October 2019. 8 +[15] Yan Gao, Boxiao Liu, Nan Guo, Xiaochun Ye, Fang Wan, Haihang You, and Dongrui Fan. Utilizing the instability in weakly supervised object detection. arXiv preprint arXiv:1906.06023, 2019. 1, 2, 8 +[16] 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 Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1277-1286, 2018. 2, 8 +[17] Ross Girshick. Fast r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 1440-1448, 2015. 7 +[18] Agrim Gupta, Piotr Dollar, and Ross Girshick. Lvis: A dataset for large vocabulary instance segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5356-5364, 2019. 1, 2, 3, 5, 6, 8 +[19] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015. 5 +[20] Ping Hu, Ximeng Sun, Kate Saenko, and Stan Sclaroff. Weakly-supervised compositional featureaggregation for few-shot recognition. arXiv preprint arXiv:1906.04833, 2019.2 +[21] Tao Hu, Pascal Mettes, Jia-Hong Huang, and Cees GM Snoek. Silco: Show a few images, localize the common object. In Proceedings of the IEEE International Conference on Computer Vision, pages 5067-5076, 2019. 2 +[22] Tao Hu, Pengwan Yang, Chiliang Zhang, Gang Yu, Yadong Mu, and Cees GM Snoek. Attention-based multi-context guiding for few-shot semantic segmentation. 2019. 2 +[23] Zequn Jie, Yunchao Wei, Xiaojie Jin, Jiashi Feng, and Wei Liu. Deep self-taught learning for weakly supervised object localization. In IEEE CVPR, volume 2, 2017. 2 +[24] Bingyi Kang, Zhuang Liu, Xin Wang, Fisher Yu, Jiashi Feng, and Trevor Darrell. Few-shot object detection via feature reweighting. In Proceedings of the IEEE International Conference on Computer Vision, pages 8420-8429, 2019. 2 +[25] Vadim Kantorov, Maxime Oquab, Minsu Cho, and Ivan Laptev. Contextlocnet: Context-aware deep network models for weakly supervised localization. In European Conference on Computer Vision, pages 350-365. Springer, 2016. 8 +[26] Satoshi Kosugi, Toshihiko Yamasaki, and Kiyoharu Aizawa. Object-aware instance labeling for weakly supervised object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 6064-6072, 2019. 1, 8 +[27] Dong Li, Jia-Bin Huang, Yali Li, Shengjin Wang, and Ming-Hsuan Yang. Weakly supervised object localization with progressive domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3512-3520, 2016. 2 +[28] Li-Jia Li and Li Fei-Fei. Optimol: automatic online picture collection via incremental model learning. International journal of computer vision, 88(2):147-168, 2010. 2 + +[29] Xiaoyan Li, Meina Kan, Shiguang Shan, and Xilin Chen. Weakly supervised object detection with segmentation collaboration. arXiv preprint arXiv:1904.00551, 2019. 8 +[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, pages 936-944, 2017. 5 +[31] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014. 1, 5, 8 +[32] Claudio Michaelis, Ivan Ustyuzhaninov, Matthias Bethge, and Alexander S Ecker. One-shot instance segmentation. arXiv preprint arXiv:1811.11507, 2018. 2 +[33] Seong Joon Oh, Rodrigo Benenson, Anna Khoreva, Zeynep Akata, Mario Fritz, Bernt Schiele, et al. Exploiting saliency for object segmentation from image level labels. In IEEE Conf. Computer Vision and Pattern Recognition, 2017. 2 +[34] Deepak Pathak, Philipp Krahenbuhl, and Trevor Darrell. Constrained convolutional neural networks for weakly supervised segmentation. In Proceedings of the IEEE international conference on computer vision, pages 1796-1804, 2015. 2 +[35] Julia Peyre, Ivan Laptev, Cordelia Schmid, and Josef Sivic. Weakly-supervised learning of visual relations. In ICCV 2017-International Conference on Computer Vision 2017, 2017. 2 +[36] Jordi Pont-Tuset, Pablo Arbelaez, Jonathan T Barron, Ferran Marques, and Jitendra Malik. Multiscale combinatorial grouping for image segmentation and object proposal generation. IEEE transactions on pattern analysis and machine intelligence, 39(1):128-140, 2016. 8 +[37] Ilija Radosavovic, Piotr Dollar, Ross Girshick, Georgia Gkioxari, and Kaiming He. Data distillation: Towards omnisupervised learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4119-4128, 2018. 1, 2, 5, 8 +[38] 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. 2 +[39] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91-99, 2015. 1, 2 +[40] Chuck Rosenberg, Martial Hebert, and Henry Schneiderman. Semi-supervised self-training of object detection models. WACV/MOTION, 2, 2005. 2 +[41] Amirreza Shaban, Shray Bansal, Zhen Liu, Irfan Essa, and Byron Boots. One-shot learning for semantic segmentation. arXiv preprint arXiv:1709.03410, 2017. 2 +[42] Liyue Shen, Serena Yeung, Judy Hoffman, Greg Mori, and Li Fei-Fei. Scaling human-object interaction recognition through zero-shot learning. In 2018 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 1568–1576. IEEE, 2018. 8 + +[43] Yunhang Shen, Rongrong Ji, Changhu Wang, Xi Li, and Xuelong Li. Weakly supervised object detection via object-specific pixel gradient. IEEE Transactions on Neural Networks and Learning Systems, (99):1-11, 2018. 2 +[44] Miaojing Shi, Holger Caesar, and Vittorio Ferrari. Weakly supervised object localization using things and stuff transfer. In Proc. IEEE Int. Conf. Comput. Vis.(ICCV), 2017. 2 +[45] Krishna Kumar Singh and Yong Jae Lee. Hide-and-seek: Forcing a network to be meticulous for weakly-supervised object and action localization. In The IEEE International Conference on Computer Vision (ICCV), 2017. 2 +[46] Abhilash Srikantha and Juergen Gall. Weak supervision for detecting object classes from activities. Computer Vision and Image Understanding, 156:138-150, 2017. 2 +[47] Peng Tang, Xinggang Wang, Song Bai, Wei Shen, Xiang Bai, Wenyu Liu, and Alan Loddon Yuille. Pcl: Proposal cluster learning for weakly supervised object detection. IEEE transactions on pattern analysis and machine intelligence, 2018. 8 +[48] Peng Tang, Xinggang Wang, Xiang Bai, and Wenyu Liu. Multiple instance detection network with online instance classifier refinement. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2843-2851, 2017. 2, 8 +[49] Peng Tang, Xinggang Wang, Angtian Wang, Yongliuan Yan, Wenyu Liu, Junzhou Huang, and Alan Yuille. Weakly supervised region proposal network and object detection. In Proceedings of the European Conference on Computer Vision (ECCV), pages 352-368, 2018. 8 +[50] Bart Thomee, David A Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. Yfcc100m: The new data in multimedia research. arXiv preprint arXiv:1503.01817, 2015. 1, 2, 5, 7 +[51] Jasper Uijlings, Stefan Popov, and Vittorio Ferrari. Revisiting knowledge transfer for training object class detectors. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1101-1110, 2018. 2, 4 +[52] Jasper RR Uijlings, Koen EA Van De Sande, Theo Gevers, and Arnold WM Smeulders. Selective search for object recognition. International journal of computer vision, 104(2):154-171, 2013. 8 +[53] Fang Wan, Chang Liu, Wei Ke, Xiangyang Ji, Jianbin Jiao, and Qixiang Ye. C-mil: Continuation multiple instance learning for weakly supervised object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2199-2208, 2019. 1, 2, 8 +[54] Fang Wan, Pengxu Wei, Jianbin Jiao, Zhenjun Han, and Qixiang Ye. Min-entropy latent model for weakly supervised object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1297–1306, 2018. 8 +[55] Tao Wang, Xiaopeng Zhang, Li Yuan, and Jiashi Feng. Few-shot adaptive faster r-cnn. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7173-7182, 2019. 2 +[56] Yu-Xiong Wang, Deva Ramanan, and Martial Hebert. Metalearning to detect rare objects. In Proceedings of the IEEE + +International Conference on Computer Vision, pages 9925-9934, 2019. 2 +[57] 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 European Conference on Computer Vision, pages 454-470. Springer, Cham, 2018. 2 +[58] Hao Yang, Hao Wu, and Hao Chen. Detecting 11k classes: Large scale object detection without fine-grained bounding boxes. In Proceedings of the IEEE International Conference on Computer Vision, pages 9805-9813, 2019. 2 +[59] Ke Yang, Dongsheng Li, and Yong Dou. Towards precise end-to-end weakly supervised object detection network. In Proceedings of the IEEE International Conference on Computer Vision, pages 8372-8381, 2019. 8 +[60] Zhaoyang Zeng, Bei Liu, Jianlong Fu, Hongyang Chao, and Lei Zhang. Wsod2: Learning bottom-up and top-down objectness distillation for weakly-supervised object detection. In Proceedings of the IEEE International Conference on Computer Vision, pages 8292-8300, 2019. 8 +[61] Xiaopeng Zhang, Jiashi Feng, Hongkai Xiong, and Qi Tian. Zigzag learning for weakly supervised object detection. arXiv preprint arXiv:1804.09466, 2018. 2 +[62] Xiaolin Zhang, Yunchao Wei, Jiashi Feng, Yi Yang, and Thomas Huang. Adversarial complementary learning for weakly supervised object localization. In IEEE CVPR, 2018. 1, 2 +[63] Yongqiang Zhang, Yancheng Bai, Mingli Ding, Yongqiang Li, and Bernard Ghanem. W2f: A weakly-supervised to fully-supervised framework for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 928-936, 2018. 2 +[64] Luowei Zhou, Nathan Louis, and Jason J Corso. Weakly-supervised video object grounding from text by loss weighting and object interaction. arXiv preprint arXiv:1805.02834, 2018. 2 +[65] Yi Zhu, Yanzhao Zhou, Qixiang Ye, Qiang Qiu, and Jianbin Jiao. Soft proposal networks for weakly supervised object localization. In Proc. IEEE Int. Conf. Comput. Vis.(ICCV), pages 1841-1850, 2017. 2 \ No newline at end of file diff --git a/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/images.zip b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9389b6b8d4d28175ac90c685d9635e700adb5a95 --- /dev/null +++ b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c63f4d94718c7a61fa9b8420f7f36e96b258dc5edb580e70eddade0900c3a553 +size 527251 diff --git a/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/layout.json b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..8bd4ae74545c670756852909037a3ba9a8b277de --- /dev/null +++ b/dlwlimprovingdetectionforlowshotclasseswithweaklylabelleddata/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e6080838716a8a048e32ef97b1e0f9c2b583d7c605e8bedd77f5fd87bcaea25 +size 415322 diff --git a/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/6f84c0d1-85f2-48f3-b580-ee64e1677feb_content_list.json b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/6f84c0d1-85f2-48f3-b580-ee64e1677feb_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4674df6e76a9a4e57ddc3b83c0b572948e37fd25 --- /dev/null +++ b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/6f84c0d1-85f2-48f3-b580-ee64e1677feb_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa6449c4cb6537dc0dcd7218fef14670229045e62ce4c2f92b4e88b6c00268bf +size 75026 diff --git a/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/6f84c0d1-85f2-48f3-b580-ee64e1677feb_model.json b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/6f84c0d1-85f2-48f3-b580-ee64e1677feb_model.json new file mode 100644 index 0000000000000000000000000000000000000000..b6781cdd0a1c1e31511639cd0f334e480ab2108d --- /dev/null +++ b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/6f84c0d1-85f2-48f3-b580-ee64e1677feb_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec847d9bd4950a97c75ebfc58f2e428c833f63de4a43d322e6e28b9122c255f7 +size 87944 diff --git a/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/6f84c0d1-85f2-48f3-b580-ee64e1677feb_origin.pdf b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/6f84c0d1-85f2-48f3-b580-ee64e1677feb_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b1e1133a461f0fe2d4f4b76b4f464f54e8b93c91 --- /dev/null +++ b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/6f84c0d1-85f2-48f3-b580-ee64e1677feb_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4a4308669e53e50a6932854e8f21384448c29cf2ab98e31ae67ea7efe867b91 +size 373984 diff --git a/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/full.md b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/full.md new file mode 100644 index 0000000000000000000000000000000000000000..df5160f8662755cd5fc08ddef6f26f2aadbd5f4c --- /dev/null +++ b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/full.md @@ -0,0 +1,336 @@ +# DMCP: Differentiable Markov Channel Pruning for Neural Networks + +Shaopeng Guo Yujie Wang Quanquan Li Junjie Yan SenseTime Research + +{guoshaopeng, wangyujie, liquanquan, yanjunjie}@sensetime.com + +# Abstract + +Recent works imply that the channel pruning can be regarded as searching optimal sub-structure from unpruned networks. However, existing works based on this observation require training and evaluating a large number of structures, which limits their application. In this paper, we propose a novel differentiable method for channel pruning, named Differentiable Markov Channel Pruning (DMCP), to efficiently search the optimal sub-structure. Our method is differentiable and can be directly optimized by gradient descent with respect to standard task loss and budget regularization (e.g. FLOPs constraint). In DMCP, we model the channel pruning as a Markov process, in which each state represents for retaining the corresponding channel during pruning, and transitions between states denote the pruning process. In the end, our method is able to implicitly select the proper number of channels in each layer by the Markov process with optimized transitions. To validate the effectiveness of our method, we perform extensive experiments on Imagenet with ResNet and MobilenetV2. Results show our method can achieve consistent improvement than state-of-the-art pruning methods in various FLOPs settings. + +# 1. Introduction + +Channel pruning [10, 2, 4] has been widely used for model acceleration and compression. The core idea behind is that large CNN models are regarded as overparameterized. By removing the large model's unnecessary or less important weights, we can obtain a more efficient and compact model with a marginal performance drop. Conventional channel pruning methods mainly rely on the human-designed paradigm. A typical pipeline of conventional pruning method can be summarized as three stages: pre-train a large model, prune "unimportant" weights of the large model according to the pre-defined criterion, fine-tune the pruned model [6, 15, 18, 11]. + +Recent work [17] showed a new perspective of channel pruning that the structure of the pruned model is the key of determining the performance of a pruned model, rather than + +![](images/d1319076d13c31b0006fd6bf89bd867b82c001907c12bfb5e1508daf4404d015.jpg) +Figure 1. MFLOPs vs. Accuracy on the ImageNet classification dataset. The original model is MobileNetV2 [21]. Our method outperforms existing pruning methods MetaPruning [16] and AMC [7] on mobile settings (<300MFLOPs) at all FLOPs. See Table 6 for more results. Best viewed in color. + +the inherited "important" weights. Based on this observation, some works try to design a pruning process to directly search optimal sub-structure from the unpruned structure. AMC [7] adopted reinforcement learning (RL) to train a controller to output the pruning ratio of each layer in the unpruned structure, while MetaPruning [16] used evolution algorithm to search structures. However, the optimization of these pruning process need to train and evaluate a large number of structures sampled from the unpruned network, thus the scalability of these methods is limited. Although AMC don't fine-tune the pruned structures and MetaPruning trained a meta-network to predict network's weights to avoid training the searched structures, the limitation of scalability still remains. + +A similar problem in neural architecture search (NAS) has been tackled by differentiable method DARTS [14]. However, the differentiable method proposed by DARTS cannot be directly applied to channel pruning. First, the definition of search space is different. The search space of DARTS is a category of pre-defined operations (convolution, max-pooing, etc), while in the channel pruning, the search space is the number of channels in each layer. Second, the operations in DARTS are independent with each + +other. But in the channel pruning, if a layer has $k + 1$ channels, it must have at least $k$ channels first, which has a logical implication relationship. + +In this paper, we propose a novel differentiable channel pruning method named Differentiable Markov Channel Pruning (DMCP) to perform efficient optimal sub-structure searching. Our method makes the channel pruning differentiable by modeling it as a Markov process. In the Markov process for each layer, the state $S_{k}$ represents the $k^{th}$ channel is retained, and the transition from $S_{k}$ to $S_{k + 1}$ represents the probability of retaining the $(k + 1)^{th}$ channel given that the $k^{th}$ channel is retained. Note that the start state is always $S_{1}$ in our method. Then the marginal probability for state $S_{k}$ , i.e. the probability of retaining $k^{th}$ channel, can be computed by the product of transition probabilities and can also be viewed as a scaling coefficient. Each scaling coefficient is multiplied to its corresponding channel's feature map during the network forwarding. So the transition probabilities parameterized by learnable parameters can be optimized in an end-to-end manner by gradient descent with respect to task loss together with budget regularization (e.g. FLOPs constraint). After the optimization, the model within desired budgets can be sampled by the Markov process with learned transition probabilities and will be trained from scratch to achieve high performance. The details of our design will be presented in Section 3. + +Finally, to demonstrate the effectiveness of our method, we conduct exhaustive classification experiments on ImageNet [19]. At the same FLOPs, our method outperforms all the other pruning methods both on MobileNetV2 and ResNet, as shown in Figure 1. With our method, MobileNetV2 has no accuracy drop with $30\%$ FLOPs reduction and the FLOPs of ResNet-50 is reduced by $44\%$ with only $0.4\%$ drop. + +# 2. Related Work + +In this section, we discuss related works from network architecture search (NAS) and channel pruning. + +Neural Architecture Search. [25] first proposed to search for neural architectures with reinforcement learning to achieve competitive accuracy with the given inference cost. But the searching cost is too expensive to be applied broadly. Recent works try to reduce the searching cost by gradient-based methods. DARTS [14] used a set of learnable weights to parameterize the probabilities of each candidate operation, the output of a layer is the linear combination of probabilities and feature maps of corresponding operation. After training, the operation with the highest probability is chosen to be the final architecture. However, DARTS is performed on a small proxy task (e.g. CIFAR10) and transfer the searched architecture to large scale target tasks (e.g. ImageNet). ProxylessNAS [1] avoided using proxy tasks by only sampling two paths to search for archi + +tecture on large scale target tasks. Different from searching architecture with different types of operations in the NAS methods mentioned above, our method focuses on searching structures with a different number of channels. + +Channel Pruning. Previous works on channel pruning can be roughly classified into two categories, i.e. hard pruning and soft pruning. Hard pruning removes channels during iterative pruning and fine-tuning process, while soft pruning only makes the pruned channels to be or approach to zero. Hard pruning methods mainly depend on different pruning criteria, for example, weight norm [10], the average percentage of zeros in the output [9] or the influence of each channel to the final loss [18]. Soft pruning methods mainly make the pruned channels to be or approach to zero so that those channels' influence is decreased. [6] first zero some filters by intra-layer criterion and a calculated layer-wise ratio. Then it increases the ratio of pruned filters gradually until reaching the given computation budget. [15] add L1 regularization on Batch Normalization's coefficients when training, and after training the channels with small coefficients will be pruned. [3] search for the least important filters in a binary search manner. [12] globally prune the unsalient filters, then dynamically update the saliency of all filters and recovers the mistakenly pruned filters. [13] use generative adversarial learning to learn a sparse soft mask to scaled the output of pruned filters toward zero. + +Our method can be seen as soft pruning. The major difference among DMCP and the above methods is the elimination of duplicated solutions by our Markov modeling. For example, given a layer with $C$ channels, the solution space of our method is $O(C)$ , but for methods mentioned above, the solution space is $O(2^{C})$ for different combinations even with the same number of channels. + +Based on recent work [17], some work designed a search process to directly search the optimal sub-structures from the unpruned net. AMC [7] used reinforcement learning to determinate the ratio of channels each layer should retain. MetaPruning [16] used an evolution algorithm to search network structures and a meta network is trained to predict weights for network structures during searching. These methods need to train or evaluate a large number structures, which makes them inefficient, while our method can be optimized by gradient descent and avoid the problem. + +# 3. Method + +In this section, we will give a detailed explanation of the proposed Differentiable Markov Channel Pruning (DMCP) method. As illustrated in Section 3.1, the channel pruning is first formulated as a Markov process parameterized by architecture parameters and can be optimized in an end-to-end manner. Then in Section 3.2, the training procedure of DMCP can be divided into two stages: in stage 1, the unpruned network is updated by our proposed variant + +![](images/30155b6a647fadccdca15f0a8aca63b99fbb69e88b7bb0698b7b3c3e046e3ca0.jpg) +Figure 2. The training pipeline of DMCP. Figure (a) demonstrates the two stages of DMCP. DMCP first run stage1 for several iterations to update weights of the unpruned network to warmup, then run stage1 and stage2 iteratively to update weights and architecture parameters. In figure (a), each rectangle represents a convolution block, e.g. Conv-BN-ReLU. Four sub-structures, represented by the blue parts of the rectangle, are sampled from the unpruned net: (1) the whole unpruned net (Max. Arch.), (2) structure with the minimum number of channels (Min. Arch.), (3) two structures randomly sampled by Markov process (Rand. Arch.). Each of these structures is forwarded independently, and the gradients in four sub-structure are accumulated to update the weights. Figure (b) is a detail illustration of the wrapped block in figure (a). The "Fuse" layer shows the incorporate details of architecture parameters $\alpha$ and outputs of unpruned networks $O$ . Notations in Figure (b) are explained in Section 3. Best viewed in color. + +![](images/c1523ca6a3cc11772af98458dbb8a2a95a53501ac7e14411cdfc1e063420278a.jpg) + +sandwich rule, while in stage 2, the architecture parameters are wrapped into the unpruned network and get updated, as shown in Figure 2 (a). After the optimization, we propose two ways to sample the pruned network in Section 3.3. + +# 3.1. Definition of Pruning Process + +Let $M(L^{(1)}, L^{(2)}, \dots, L^{(N)})$ denote the $N$ -layer unpruned network, where $L^{(i)}$ is the $i^{th}$ layer. In layer $L^{(i)}$ with $C_{out}^{(i)}$ convolutional filters (i.e. channels), given input $x$ , the output $O^{(i)}$ can by computed by: + +$$ +O _ {k} ^ {(i)} = w _ {k} ^ {(i)} \odot x, k = 1, 2, \dots , C _ {\text {o u t}} ^ {(i)} \tag {1} +$$ + +where $O_{k}^{(i)}$ is the $k^{th}$ channel of $O^{(i)}$ , $w_{k}^{(i)}$ is the $k^{th}$ filter in $L^{(i)}$ , and $\odot$ denote the convolution operation. If not explicitly stated, the superscript which represents the layer index will be omitted below for simplicity. + +As illustrated in Section 1, we perform the channel pruning in a reversed way, which can be represented by a directed ascyclic graph, as shown in Figure 3, where the state $S_{k}(1 \leq k \leq C_{out})$ represent $k^{th}$ channel is retained during the pruning process, and the transition $p_{k}$ from $S_{k}$ to $S_{k+1}$ means $(k+1)^{th}$ channel is retained if $k^{th}$ channel is retained. The pruning process can be ended by transferring to the terminal state $T$ from any other state. This process has the property that if $k$ out of $C_{out}$ channels are retained in layer $L$ , they must be first $k$ channels. In other words, given $k^{th}$ channel is retained, then first $(k-1)$ channels must be retained, and we can further conclude that retaining $(k+1)^{th}$ channel is conditional independent of first + +$(k - 1)$ channels give $k^{th}$ channel is retained, which follows the Markov property. + +# 3.1.1 Channel Pruning via Markov Process + +We model transition in aforementioned ascyclic graph as a stochastic process and parameterized the transition probabilities by a set of learnable parameters. We name the learnable parameters as architecture parameters for distinguishing them from network weights. Let $p(w_{1},w_{2},\dots,w_{k - 1})$ be the probability that first $k - 1$ channels are retained. The probability of retaining first $k$ channels can be represented as: + +$$ +p \left(w _ {1}, \dots , w _ {k}\right) = p \left(w _ {k} \mid w _ {1}, \dots , w _ {k - 1}\right) p \left(w _ {1}, \dots , w _ {k - 1}\right) \tag {2} +$$ + +where $p(w_{k}|w_{1},\dots,w_{k - 1})$ is the probability of retaining $k^{th}$ channel given first $(k - 1)$ channels are retained. Since retaining $w_{k}$ is conditionally independent of $\{w_{1},w_{2},\ldots w_{k - 2}\}$ given $w_{k - 1}$ is retained, hence we can rewrite Equation 2 as: + +$$ +p _ {k} = p \left(w _ {k} \mid w _ {1}, w _ {2}, \dots , w _ {k - 1}\right) = p \left(w _ {k} \mid w _ {k - 1}\right) \tag {3} +$$ + +$$ +p \left(w _ {k} \mid \neg w _ {k - 1}\right) = 0 \tag {4} +$$ + +in which $\neg w_{k - 1}$ means $(k - 1)^{th}$ channel is discarded. + +Therefore, in Figure 3, the transitions can be represented by a set of transition probabilities $P = \{p_1, p_2, \dots, p_{C_{out}}\}$ that defined by Equation 3. + +![](images/258e3aa6c2e2e7cfc586c5cc9e01414efec4e8798be22df0b33d335b319f95f3.jpg) +Figure 3. The Modeling of channel pruning as a Markov process. State $S_{k}(k = 1,2,\dots)$ means $k^{th}$ channel is retained, and transition $p_k$ is the probability of retaining $k^{th}$ channel given $(k - 1)^{th}$ channel is retained, while $1 - p_k$ is the probability of terminating the process. State $T$ means the terminal state and $C_{out}$ is the maximum number of channels in each layer. + +We use a set of architecture parameters $A = \{\alpha_{1},\alpha_{2},\dots,\alpha_{c_{out}}\}$ to parameterize $P$ , therefore $p_k$ can be computed as follows: + +$$ +p _ {k} = \left\{ \begin{array}{l l} 1 & k = 1 \\ \operatorname {s i g m o i d} \left(\alpha_ {k}\right) = \frac {1}{1 + e ^ {- \alpha_ {k}}} & k = 2, \dots , C _ {\text {o u t}}, \alpha_ {k} \in A \end{array} \right. \tag {5} +$$ + +Note that we leave at least one channel for each layer, so $p_1 = p(w_1) = 1$ . + +The marginal probability of sampling channel $w_{k}$ denoted by $p(w_{k})$ can be computed as: + +$$ +\begin{array}{l} p \left(w _ {k}\right) = p \left(w _ {k} \mid w _ {k - 1}\right) p \left(w _ {k - 1}\right) + p \left(w _ {k} \mid \neg w _ {k - 1}\right) p (\neg w _ {k - 1}) \\ = p \left(w _ {k} \mid w _ {k - 1}\right) p \left(w _ {k - 1}\right) + 0 \tag {6} \\ = p \left(w _ {1}\right) \prod_ {i = 2} ^ {k} p \left(w _ {i} \mid w _ {i - 1}\right) = \prod_ {i = 1} ^ {k} p _ {i} \\ \end{array} +$$ + +Then the architecture parameters are wrapped into the unpruned network by following equation: + +$$ +\hat {O} _ {k} = O _ {k} \times p \left(w _ {k}\right) \tag {7} +$$ + +where $\hat{O}_k$ is the actual output of $k^{th}$ channel. Therefore, pruning $w_{k}$ can be represented by setting $p(w_{k})$ to zero. + +However, we cannot directly implement Equation 7 right after the convolutional layer, because the batch normalization layer can scale up the value of $i^{th}$ channel such that the latter layer will not be affected. So the pruning process should be put after the batch normalization layer. An example of how to combine architecture parameters with an unpruned network is given in Figure 2 (b). + +By the above definition, the pruned model can be sampled by the Markov process, while the transitions can be optimized by gradient descent, which will be illustrated in Section 3.2. + +# 3.1.2 Solution to Shortcut Issue + +Note that both MobilenetV2 and ResNet have residual blocks with shortcut connections. For the residual blocks + +with identity shortcuts, the number of channels in the last convolutional layer must be the same as the one in previous blocks due to the element-wise summation. Many previous works [10, 9] don't prune the last convolutional layer of the residual block. In our method, we adopt a weight sharing strategy to solve this issue such that the layers, whose output channels must be equal, will share the same set of architecture parameters. + +# 3.1.3 Budget Regularization + +FLOPs and latency are commonly used in evaluating pruning methods. To perform an easy-to-implement and fair comparison, we use accuracy at certain FLOPs as budget regularization. However, budget regularization like FLOPs cannot be naturally optimized by gradient descent. In this section, we introduce our solution to handle the nondifferentiable budget regularization problem. + +In layer $L$ , the expected channel $E(\text{channel})$ can be computed as: + +$$ +E (\text {c h a n n e l}) = \sum_ {i = 1} ^ {C _ {\text {o u t}}} p \left(w _ {i}\right) \tag {8} +$$ + +where $C_{out}$ is the number of output channels in $L$ and $p(w_i)$ is the marginal probability defined in Equation 6. + +In layer $L$ , given expected input channels $E(in)$ and output channels $E(out)$ computed as Equation 8, the expected FLOPs $E(L_{FLOPs})$ can be computed by: + +$$ +E \left(L _ {F L O P s}\right) = E (o u t) \times E (k e r n e l \_ o p) \tag {9} +$$ + +$$ +E (\text {k e r n e l} _ {-} \text {o p}) = \quad \frac {E (i n)}{\text {g r o u p s}} \times \# \text {c h a n n e l} _ {-} \text {o p} \tag {10} +$$ + +$$ +\# \text {c h a n n e l} _ {-} \text {o p} = \left(\frac {S _ {I} + S _ {P} - S _ {K}}{\text {s t r i d e}} + 1\right) \times S _ {K} \times S _ {K} \tag {11} +$$ + +where groups $= 1$ for normal convolution and groups $= E(in)$ for depth-wise convolution. $S_{I}$ and $S_{K}$ indicate input width/height and kernel width/height respectively, while $S_{P}$ is padding size and stride is convolution stride. + +Then the expected flops of the model $E(N_{FLOPs})$ is: + +$$ +E \left(N _ {F L O P s}\right) = \sum_ {l = 1} ^ {N} E ^ {(l)} \left(L _ {F L O P s}\right) \tag {12} +$$ + +in which $\mathbf{N}$ is the number of convolutional layers. With Equation 12, we can optimize FLOPs by gradient descent. + +# 3.1.4 Loss Function + +Given target FLOPs $FLOPs_{target}$ , we formulated the differentiable budget regularization loss $loss_{reg}$ as follows: + +$$ +\left. l o s s _ {r e g} = \log \left(\left| E \left(N _ {F L O P s}\right) - F L O P s _ {t a r g e t} \right|\right) \right. \tag {13} +$$ + +To make $E(N_{FLOPs})$ strictly lower than $FLOPs_{target}$ but not too sensitive around the target, we add single side margin to the loss function, i.e. when $\gamma \times FLOPs_{target} \leq E(N_{FLOPs}) \leq FLOPs_{target}$ is satisfied, the loss will be zero. $\gamma < 1$ is the tolerance ratio that can be adjusted by users. + +When updating weights, the FLOPs loss has no effect on weights, so the loss function is: + +$$ +L o s s _ {w e i g h t} = l o s s _ {c l s} \tag {14} +$$ + +where $loss_{cls}$ is cross entropy loss for classification. When updating the architecture parameters, the loss function is formulated as below: + +$$ +L o s s _ {a r c h} = l o s s _ {c l s} + \lambda_ {r e g} l o s s _ {r e g} \tag {15} +$$ + +where $\lambda_{req}$ is hyper-parameters to balance two loss terms. + +Note that we don't add weight decay to architecture parameters. Because when the probability of keeping some channels approaching zero or one, the norm of learnable parameters $\alpha$ will become very large, which will make them move forward to zero and hinge the optimization. + +# 3.2. Training Pipeline + +As illustrated in Figure 2 (a), the training procedure of DMCP can be divided into two stages, i.e. weight updating of the unpruned network and architecture parameters updating. The stage 1 and stage 2 are called iteratively during the training. + +Stage 1: Weight updating of the unpruned network. In the first stage, we only update weights in the unpruned network. As defined in Equation 6, the probability of retaining the $k^{th}$ channel can also be regarded as the probability of retaining the first $k$ channels. Then our method can be seen as soft sampling all sub-structures in a single forwarding when updating architecture parameters. In general, all channels in a layer are equal and it is not intuitive to modeling the channel selection as Markov process. Inspired by previous work [24], which proposed a "sandwich rule" training method that the $0.75 \times$ parts of the trained MobileNetV2 $1.0 \times$ can get similar performance to it trained from scratch, we introduce a variant sandwich rule, into the training scheme to make the channel groups in the unpruned model more "important" than the channel groups right after it. So that channels in a layer are not equal. The best choice of a layer with $k$ channels will be the first $k$ channels instead of other possible combinations. Based on this channel importance ranking property in the unpruned model, when sampling a sub-network with $k(k < C)$ channels, selecting the first $k$ channels can better indicate the true performance of the sub-network (trained from scratch individually). Therefore, it is reasonable to introduce Markov modeling. + +There are two differences between our variation and the original "sandwich rule". First, the randomly sampled + +switch (the ratio of retained channels) in each layer is not the same. Because the pruned network may have different switches in different layers. Second, the random sampling of switches obeys distribution from architecture parameters with the Markov process, instead of uniform distribution. Because the possible number of architecture in our method is much more than [24]. And to make all architectures reflect their true performance will need too much costs. Thus we only focus on the frequently sampled architectures. + +Stage 2: Architecture parameter updating. In the second stage, we only update architecture parameters. For each convolutional layer in the unpruned net, an architecture parameter is incorporated with its original output tensors by Equation 7. So that gradients could be backpropagated to the architecture parameters. And the gradients will be backpropagated to $\alpha$ by following formulas: + +$$ +\frac {\partial \text {L o s s}}{\partial \alpha_ {j} ^ {(i)}} = \sum_ {k = 1} ^ {C _ {\text {o u t}}} \frac {\partial \text {L o s s}}{\partial O _ {k} ^ {(i)}} \times \frac {\partial O _ {k} ^ {(i)}}{\alpha_ {j} ^ {(i)}} \tag {16} +$$ + +$$ +\frac {\partial \hat {O _ {k} ^ {(i)}}}{\alpha_ {j} ^ {(i)}} = \left\{ \begin{array}{l l} 0 & , k < j \\ \frac {\partial p _ {k}}{\partial \alpha_ {j}} O _ {k} ^ {(i)} \prod_ {r \in \{r | r \neq j a n d r \leq k \}} p _ {r} & , k \geq j \end{array} \right. \tag {17} +$$ + +$$ +\frac {\partial p _ {k}}{\partial \alpha_ {j}} = (1 - p _ {k}) p _ {k} \tag {18} +$$ + +Such that all components of our method can be trained in an end-to-end manner. To further reduce the search space, we divide the channels into groups ( $\geq 10$ groups) uniformly and each architecture parameter $\alpha$ is responsible for one group instead of only one channel. Each layer has the same number of groups. + +Warmup process. Before iteratively called stage 1 and stage 2, DMCP first runs stage 1 for several epochs to warm up, in which the sub-networks are sampled by Markov process with randomly initialized architecture parameters. This process aims to avoid the network dropping into bad local minima when updating architecture parameters caused by weights' insufficient training. We also conduct ablation study in section 4.2 to show the effectiveness of using warmup. + +# 3.3. Pruned Model Sampling + +After DMCP training done, we then produce models that satisfy the given cost constrain from it. In this section, we will introduce two producing methods. The first method, named Direct Sampling (DS), is to sample in each layer independently by the Markov process with optimized transition probabilities. We sample several structures and only keep the structures that lie in the target FLOPs budget. + +The second method, named Expected Sampling (ES), is to set the number of channels in each layer to be the expected channels computed by Equation 8. In our experiment, $loss_{reg}$ is always optimized to zero, so the FLOPs of + +the expected network is equal or less than the given FLOPs constraint. Thus the expected network also satisfies the requirements. + +In Section 4, we perform plenty of experiments to compare these two methods. The best performance of the pruned model sampled from Direct Sampling is a little bit higher than the one produced by Expected Sampling method, but it takes a much longer time to find such a model. So in our experiments, we use the Expected Sampling method to produce the final pruned model. + +# 4. Experiments + +In this section, we perform a large number of experiments to validate and analyze our method. We first describe the implementation details of DMCP in Section 4.1. To study the effectiveness of each component in our method, we conduct ablation experiments in Section 4.2. Finally in Section 4.3, we compare our results with state-of-the-art channel pruning methods. More visualizations and experiments will be shown on Supplemental Materials. + +# 4.1. Implementation Details + +We demonstrate the effectiveness of our proposed differentiable pruning method on ImageNet classification [20], which contains 1000 classes. We perform experiments on both light (MobileNetV2 [22]) and heavy (ResNet [5]) models. For MobileNetV2, we use MobileNetV2 1.5x as the unpruned net, and the channels in each layer are divided into 15 groups (0.1x for each group). While for ResNet, we use standard ResNet50 (1.0x) and ResNet18 (1.0x) as unpruned structures, the channels in each layer are divided into 10 groups (0.1x for each group). + +DMCP training. As described in Section 3.2, the training pipeline of DMCP contains two phases: warmup and iterative training. The training is conducted on 8 Nvidia GTX 1080TI GPUs with a batch size of 512. Both MobileNetV2 and ResNet are trained for 40 epochs in total, the initial learning rate for both unpruned net and architecture parameters updating is 0.2 and reduced to 0.02 by cosine scheduler finally. + +In the warmup phase, only the network weights are trained for 20 epochs using a variant of "sandwich rule". In the iterative training phase, architecture parameters and unpruned net are both trained in a total of 20 epochs. The $\lambda_{reg}$ of budget regularization is set to 0.1 in all experiments. The tolerance ratio $\gamma$ is set to be 0.99 in all the experiments. To make the explanation brief in the following sections, we use the shortened form of experiment settings. For example, MBV2 1.0x-59M means the unpruned net is MobileNetV2 1.0x with target FLOPs equals to 59M. + +Pruned network training. The pruned networks are produced by Direct Sampling or Expected Sampling. The details of the pruned model producing methods are illustrated + +in Section 3.3. Note that all pruned models are trained from scratch. The training of pruned models is performed on 32 Nvidia GTX 1080TI GPUs with a batch size of 2048. The pruned MobileNetV2 is trained for 250 epochs and pruned ResNet is trained for 100 epochs. The initial learning rate for training all pruned models is first warming up from 0.2 to 0.8 within one epoch, then is reduced to 0 by cosine scheduler. Other settings are the same as those in the original paper. + +# 4.2. Ablation Study + +Recoverability verification. One property of our method should have is that it should retain nearly all channels when searching on a pre-trained model without FLOPs constraint. We use pre-trained MobileNetV2 1.0x and randomly initialize the architecture parameters. Note that only the iterative training phase is performed. We freeze the weight of MobileNetV2 1.0x and trained architecture parameters with only task loss. The result in Figure 4 shows that the FLOPs and top-1 training accuracy of our method can recover to those of the pre-trained model within 500 iterations. + +![](images/a27613db705a4966fbb6e1bb62c037a9edcf627a289926cd4d0630a7bbd42164.jpg) +Figure 4. The recoverability of DMCP with pre-trained MobileNetV2 1.0x and randomly initialized architecture parameters. + +Expected sampling and Direct Sampling. As described in Section 3.3, we can sample pruned models by Direct Sampling (DS) and Expected Sampling (ES). We verify the effectiveness of two model producing methods on MobileNetV2-210M and ResNet50-1.1G. We also train MobileNetV2 0.75x and ResNet50 0.5x, whose FLOPS is 210M and 1.1G respectively, as baselines for comparison. The performance of these two baselines are $70.4\%$ and $71.9\%$ separately. For DS, we sample five models and the results are reported in Table 1. The table shows that the performance of all models produced by DS is better than baseline models, which means the architecture parameters converge to a high-performance sub-space. And the performance of model produced by ES is very close to the best model produced by DS, which shows the effectiveness of ES. Besides, results from Table 2 and Table 3 also show the + +robustness of the ES. For saving the cost of fine-tuning, we use the ES to produce a model if not indicated. + +
DMCPESDS
HighestLowest
MBV2 1.5x-210M72.272.470.6
Res50 1.0x-1.1G74.174.072.3
+ +Table 1. Performance of pruned model produced by Direct Sampling (DS) and Expected Sampling (ES). "Highest" and "Lowest" means the best and worst performance among 5 models sampled by Direct Sampling. MBV2 is short for MobileNetV2 and Res50 is short for ResNet 50. + +The scale of the unpruned network. In this section, we evaluated the influence of scaling the unpruned network. We use two scales of MobileNetV2, i.e. MobileNetV2 1.0x and MobileNetV2 1.5x, as unpruned network, and prune them into 59M and 210M FLOPs. Note that in the experiments, the channels in each layer are divided into 10 groups to maintain the same group size. The results showed in Table 2 indicate that our method is not sensitive to the unpruned network scale. Using the larger unpruned network can lead to a little bit better performance. So we use MobileNetV2 1.5x and ResNet50 1.0x as our default unpruned network in the remaining paper. + +We also visualize the difference computed by subtracting the number of channels each layer in MBV2 1.0x-210M from that in MBV2 1.5x-210M in Figure 5. From the figure, we can observe that MBV2 1.0x-210M tends to retain more channels in shallow layers while MBV2 1.5x-210M retains more channels in deep layers, even they only have a tiny difference in accuracy. This indicates that there exist multiple local minima in the search space of channel pruning. + +
DMCPESDS
HighestLowest
MBV2 1.5x-59M62.762.960.8
MBV2 1.0x-59M62.662.660.6
MBV2 1.5x-210M72.272.471.4
MBV2 1.0x-210M71.872.070.4
+ +Table 2. The performance of pruned models in 59M and 210M FLOPs level on MobileNetV2 (MBV2) with different unpruned network scale. + +Influence of warmup phase. We train MobileNetV2-210M with and without the warmup phase and evaluate their performance of the corresponding pruned models. To keep other settings the same, we double the epochs of the iterative training phase for the experiment without warming up. In the setting without warming up, the models are trained for 100 epochs, the initial learning rate and the scheduler in the first 50 epochs are the same as the warmup phase. The results in Table 3 shows that using warmup leads to better performance. One possible reason is that using warmup makes the weights trained more sufficiently before updata + +ing architecture parameters, which makes weights more discriminable and prevents architecture parameters from trapping into bad local minima. + +
DMCPWarmupESDS
HighestLowest
MBV2-210M✓72.272.471.4
✗71.471.270.5
+ +Table 3. The influence of using warmup or not. MBV2 is short for MobileNetV2. + +![](images/5511795e74f97ddec570e41c0a1522969ba110c27fbe2619919a69d1b37a600d.jpg) +Figure 5. The difference between two pruned models from MBV2 1.5x-210M and MBV2 1.0x-210M. The x-axis indicates the layer index and the y-axis is the difference computed by subtracting the number of channels each layer in MBV2 1.0x-210M from that in MBV2 1.5x-210M. + +Impact of the variant sandwich rule. We ablate the impact of the sandwich rule in the MobileNetV2-210M setting. The original sandwich rule and our variant sandwich rule are adopted solely in DMCP for comparison. The results are tabulated in Table 4. We can see that using the variant sandwich rule leads to better performance. The possible reason is that the weights corresponding to higher probability will be optimized better by the variant sandwich rule. And in these weights, each of them will be optimized better to represent their true importance with less influence of other weights. Thus, when updating architecture parameters, the "competition" is mainly centered on them, which makes updating more accurate. + +
DMCPSandwich ruleTop-1
MBV2-210Moriginal71.5
our variant72.4
+ +Table 4. The influence of using the variant sandwich rule or not. + +Training scheme. We verify the effectiveness of the updating scheme. We conduct three experiments on MobileNetV2-59M. All experiments use the same setting in the warmup phase, while the settings in the iterative training phase are as follows: In the first experiment, we only update architecture parameters with respect to budget regularization (FLOPs loss); in the second experiment, we only update architecture parameters with respect to both budget regularization and task loss; and in the last experiment, we + +
Arch. Params. updatingWeight updatingTop-1
FLOPs lossTask loss
✓52.1
✓✓61.5
✓✓✓62.7
+ +Table 5. The influence of different components in iterative training phase. The experiments are conducted with MobileNetV2 and all the target FLOPs are 59M. The cell without check-mark means the corresponding component is not used during training. + +update both unpruned net and architecture parameters with respect to the full loss function. The results are shown in Table 5. The first experiment is a naive baseline of FLOPs guided pruning. The layers with the same FLOPs may be pruned to the same extent. The result is far worse than the other experiments. Comparing with the first experiment and the second experiment, we know that the task loss can help to discriminate the importance of different layer even they have same FLOPs. Finally, by comparing with the last two experiments, we can conclude that when architecture parameters changed, the weights should also be adapted. + +# 4.3. Comparison with state-of-the-art + +In this section, we compare our method with various pruning methods, including reinforcement learning method AMC [7], evolution method MetaPruning [16], one-shot method AutoSlim [23], and traditional channel pruning methods SFP [6] and FPGM [8]. The training settings of our method in all FLOPs settings are illustrated in Section 4.1, and our pruned models are sampled by Expected Sampling. + +All methods are evaluated on MobileNetV2, ResNet18, and ResNet50, in each type of model, we trained a set of baseline model with setting 4.1 for comparison. + +From the Table 6, we can see that our method outperforms all other methods under the same settings, which show the superiority of our method. Note that AMC, MetaPruning and our method train the pruned model from scratch by standard hard label loss. While AutoSlim adopts a slimmable training method in which the pruned network share weights with unpruned net and mimic the output of the unpruned net. To fairly compare with AutoSlim, we also train our pruned model with the slimmable training method. Results show that this training method can further boost the performance, and our method surpasses AutoSlim in different FLOPs models. + +# 5. Conclusion + +In this paper, we propose a novel differentiable method for channel pruning, named Differentiable Markov Channel Pruning (DMCP), to solve the defect of existing methods that they need to train and evaluate a large number of substructures. The proposed method is differentiable by model- + +
GroupModelFLOPsTop-1Δ Top-1
MBV2Uniform 1.0x300M72.3-
Uniform 0.75x210M70.3-2.0
Uniform 0.5x97M65.4-6.9
Uniform 0.35x59M60.1-12.2
217M71.2-0.8
MetaPruning[16]87M63.8-8.2
43M58.3-13.7
AMC[7]211M70.8-1.0
\( AutoSlim^1[23] \)*300M74.2+2.4
211M73.0+1.2
DMCP300M73.9+1.6
211M72.4+0.1
97M67.0-2.4
87M66.1-6.3
59M62.7-9.7
43M59.1-13.3
DMCP*300M74.6+2.3
211M73.5+1.2
Res18Uniform 1.0x1.8G70.1-
FPGM[8]1.04G68.4-1.9
DMCP1.04G69.2-0.9
Res50Uniform 1.0x4.1G76.6-
Uniform 0.85x3.0G75.3-1.3
Uniform 0.75x2.3G74.6-2.0
Uniform 0.5x1.1G71.9-4.7
Uniform 0.25x278M63.5-13.1
FPGM[8]2.4G75.6-0.6
SFP [6]2.4G74.6-2.0
MetaPruning[16]3.0G76.2-0.4
2.3G75.4-1.2
1.1G73.4-3.2
AutoSlim[23]3.0G76.0-0.6
2.0G75.6-1.0
1.1G74.0-2.6
DMCP2.8G77.0+0.4
2.2G76.2-0.4
1.1G74.4-2.2
278M66.4-10.0
+ +Table 6. Performance of different models on ImageNet dataset with different FLOPs settings. $\Delta$ Top-1 column list the accuracy improvement compared with unpruned baseline model $(1.0\times)$ reported in their original work, and our baseline is indicated by " -". " $\alpha \times$ " means each layer in baseline model is scaled by $\alpha$ . The groups marked by * indicate the pruned model is trained by slimmable method proposed in [23] + +ing the channel pruning as the Markov process, thus can be optimized with respect to task loss by gradient descent. After optimization, the required model can be sampled from the optimized transitions by a simple Expected Sampling and trained from scratch. Our method achieves state-of-the-art performance with ResNet and MobileNet V2 on ImageNet in various FLOPs settings. + +# 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] Yann Le Cun, John S. Denker, and Sara A. Solla. Optimal brain damage. In Advances in Neural Information Processing Systems, pages 598-605. Morgan Kaufmann, 1990. +[3] Xiaohan Ding, Guiguang Ding, Yuchen Guo, Jungong Han, and Chenggang Yan. Approximated oracle filter pruning for destructive CNN width optimization. CoRR, abs/1905.04748, 2019. +[4] Babak Hassibi, David G. Stork, Gregory Wolff, and Takahiro Watanabe. Optimal brain surgeon: Extensions and performance comparisons. In Proceedings of the 6th International Conference on Neural Information Processing Systems, NIPS'93, pages 263-270, San Francisco, CA, USA, 1993. Morgan Kaufmann Publishers Inc. +[5] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015. +[6] Yang He, Xuanyi Dong, Guoliang Kang, Yanwei Fu, and Yi Yang. Progressive deep neural networks acceleration via soft filter pruning. arXiv preprint arXiv:1808.07471, 2018. +[7] 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. +[8] Yang He, Ping Liu, Ziwei Wang, and Yi Yang. Pruning filter via geometric median for deep convolutional neural networks acceleration. CoRR, abs/1811.00250, 2018. +[9] Hengyuan Hu, Rui Peng, Yu-Wing Tai, and Chi-Keung Tang. Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. arXiv preprint arXiv:1607.03250, 2016. +[10] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016. +[11] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. CoRR, abs/1608.08710, 2016. +[12] Shaohui Lin, Rongrong Ji, Yuchao Li, Yongjian Wu, Feiyue Huang, and Baochang Zhang. Accelerating convolutional networks via global dynamic filter pruning. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI-18, pages 2425–2432. International Joint Conferences on Artificial Intelligence Organization, 7 2018. +[13] Shaohui Lin, Rongrong Ji, Chenqian Yan, Baochang Zhang, Liujuan Cao, Qixiang Ye, Feiyue Huang, and David S. Doermann. Towards optimal structured CNN pruning via generative adversarial learning. CoRR, abs/1903.09291, 2019. +[14] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018. +[15] Zhuang Liu, Jianguo Li, Zhiqiang Shen, Gao Huang, Shoumeng Yan, and Changshui Zhang. Learning efficient + +convolutional networks through network slimming. international conference on computer vision, pages 2755-2763, 2017. +[16] Zechun Liu, Haoyuan Mu, Xiangyu Zhang, Zichao Guo, Xin Yang, Tim Kwang-Ting Cheng, and Jian Sun. Metapruning: Meta learning for automatic neural network channel pruning. arXiv preprint arXiv:1903.10258, 2019. +[17] Zhuang Liu, Mingjie Sun, Tinghui Zhou, Gao Huang, and Trevor Darrell. Rethinking the value of network pruning. arXiv preprint arXiv:1810.05270, 2018. +[18] 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. +[19] 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 (IJCV), 115(3):211–252, 2015. +[20] 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. +[21] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. *Mobilenetv2: Inverted residuals and linear bottlenecks*. In *Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition*, pages 4510–4520, 2018. +[22] Mark Sandler, Andrew G. Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Inverted residuals and linear bottlenecks: Mobile networks for classification, detection and segmentation. CoRR, abs/1801.04381, 2018. +[23] Jiahui Yu and Thomas S Huang. Autoslim: Towards one-shot architecture search for channel numbers. arXiv: Computer Vision and Pattern Recognition, 2019. +[24] Jiahui Yu and Thomas S Huang. Universally slimmable networks and improved training techniques. arXiv: Computer Vision and Pattern Recognition, 2019. +[25] Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. \ No newline at end of file diff --git a/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/images.zip b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..a2556fab2a58166107f59660c9769ffb23ee3e9c --- /dev/null +++ b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b18b9acbee0f5a1e87dbbf5b1253a2452f9f222c4f950f479d8d3259952fbfa9 +size 412311 diff --git a/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/layout.json b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c29497c7aaeae6eabf4b56f111085d426dc90e0e --- /dev/null +++ b/dmcpdifferentiablemarkovchannelpruningforneuralnetworks/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18bd17ad3d1420acabef903dcbe4d41b12a40c32df8a95ba5173566074b44d43 +size 383309 diff --git a/dnudeepnonlocalunrollingforcomputationalspectralimaging/af9b62d7-a29a-4cb0-8e8c-dd3bd8ae8737_content_list.json b/dnudeepnonlocalunrollingforcomputationalspectralimaging/af9b62d7-a29a-4cb0-8e8c-dd3bd8ae8737_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..4d89145230fdc4fa91feffd2438a532dbcbd4be2 --- /dev/null +++ b/dnudeepnonlocalunrollingforcomputationalspectralimaging/af9b62d7-a29a-4cb0-8e8c-dd3bd8ae8737_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b22d2617f1d462d5b232e419def83241d273d4ea1a3fc7f6ee793a314196025c +size 86198 diff --git a/dnudeepnonlocalunrollingforcomputationalspectralimaging/af9b62d7-a29a-4cb0-8e8c-dd3bd8ae8737_model.json b/dnudeepnonlocalunrollingforcomputationalspectralimaging/af9b62d7-a29a-4cb0-8e8c-dd3bd8ae8737_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ef7763d3597b02a2efafac7a000518b69f476d17 --- /dev/null +++ b/dnudeepnonlocalunrollingforcomputationalspectralimaging/af9b62d7-a29a-4cb0-8e8c-dd3bd8ae8737_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cde8dd67b2a5f71e5dcd26c6a75d2bc30591de52d465af80671e123cdc984f82 +size 109921 diff --git a/dnudeepnonlocalunrollingforcomputationalspectralimaging/af9b62d7-a29a-4cb0-8e8c-dd3bd8ae8737_origin.pdf b/dnudeepnonlocalunrollingforcomputationalspectralimaging/af9b62d7-a29a-4cb0-8e8c-dd3bd8ae8737_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d98de297a54b90fb8b0eecb6e3c97cceeb9554e1 --- /dev/null +++ b/dnudeepnonlocalunrollingforcomputationalspectralimaging/af9b62d7-a29a-4cb0-8e8c-dd3bd8ae8737_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ed425c33e0470b7355dc27fdf76093e2279e857d992390c382c294b1aae0b5b +size 1546284 diff --git a/dnudeepnonlocalunrollingforcomputationalspectralimaging/full.md b/dnudeepnonlocalunrollingforcomputationalspectralimaging/full.md new file mode 100644 index 0000000000000000000000000000000000000000..46a2371cfb45d4be2e9229dc3c752b952019c054 --- /dev/null +++ b/dnudeepnonlocalunrollingforcomputationalspectralimaging/full.md @@ -0,0 +1,411 @@ +# DNU: Deep Non-local Unrolling for Computational Spectral Imaging + +Lizhi Wang Chen Sun Maoqing Zhang Ying Fu Hua Huang Beijing Institute of Technology + +{lzwang, sunchen, zmq, fuying, huahuang}@bit.edu.cn + +# Abstract + +Computational spectral imaging has been striving to capture the spectral information of the dynamic world in the last few decades. In this paper, we propose an interpretable neural network for computational spectral imaging. First, we introduce a novel data-driven prior that can adaptively exploit both the local and non-local correlations among the spectral image. Our data-driven prior is integrated as a regularizer into the reconstruction problem. Then, we propose to unroll the reconstruction problem into an optimization-inspired deep neural network. The architecture of the network has high interpretability by explicitly characterizing the image correlation and the system imaging model. Finally, we learn the complete parameters in the network through end-to-end training, enabling robust performance with high spatial-spectral fidelity. Extensive simulation and hardware experiments validate the superior performance of our method over state-of-the-art methods. + +# 1. Introduction + +The spectral image delineates a detailed scene representation about the scene, which is beneficial to a diverse range of field, from the fundamental research areas, e.g., medical diagnosis, health care, and remote sensing [4, 6, 32], to the computer vision applications, e.g., face recognition, appearance modeling and object tracking [40, 47, 23]. Conventional spectrometers generally scan the scene along either the spatial dimension or the spectral dimension, requiring multiple exposures to capture a full spectral image. Thus, these systems are unsuitable for measuring dynamic scenes. To this end, researchers have developed quite a few computational spectral imaging prototypes [9, 29, 18, 8, 58]. Based on the foundations of the compressive sensing (CS) theory [14], coded aperture snapshot spectral imaging (CASSI) stands out as a promising solution [3, 48, 50]. However, the bottleneck of CASSI lies in the limited reconstruction quality. The core problem of spectral image reconstruction is how to derive the underlying 3D spectral image from the under-sampled 2D + +![](images/64042a924b4ed75020e2596c832a5be976713d58872d55d4a37acca81470a4e6.jpg) +Figure 1. Development trends of the optimization method and the prior regularization. Our method integrates the power of deep unrolling method and non-local prior into an interpretable neural network, which is customized to solve the reconstruction problem of computational spectral imaging, achieving the best performance according to the PSNR. Note that HC and DL are abbreviations for hand-crafted and deep-learning, respectively. Our code is open sourced at [1] + +measurement. Theoretically, the reconstruction quality is affected by two aspects: prior regularization and optimization method. + +Since the reconstruction problem is under-determined, regularizations based on image priors are required to delineate the structure characteristic in spectral images. Previous approaches model image priors within a local window, like Total Variation (TV) [55], Markov Random Field (MRF) [46] and sparsity [15]. The recently proposed deep denoising prior [61] is also a local prior, as it gradually processes the information from a local neighborhood [54]. Complementary with the local prior, the non-local prior is an alternative in spectral image reconstruction to exploit the long-range dependence [52, 31]. However, existing non-local prior-based regularizations, like non-local mean [7], collaborative filtering [12] and joint sparsity [35], require manually tweaking parameters to handle the various characteristics of the scenes. + +Besides the prior regularization, the optimization method is also crucial for the reconstruction quality. Early development of CASSI employs model-based optimization techniques in general [5, 16]. Later, some works propose to learn a brute-force mapping between the compressive im + +ages and the underlying spectral images [53, 38]. However, these methods ignore the system imaging model. They thus lack flexibilities when being used in real systems, as the system imaging models among different hardware implementations differ from each other at a large extent. Recently, researchers have developed some deep unrolling-based optimization methods in the field of natural image CS [20, 45, 60]. These substitute the iterations in model-based optimization with a neural network. However, they still inherit the local prior by explicitly enforcing the feature maps to be sparse. + +In this paper, we propose the deep non-local unrolling, an interpretable neural network, for computational spectral imaging. First, we introduce a novel data-driven prior that regularizes the optimization problem to boost the spatial-spectral fidelity. Our data-driven prior explicitly learns both the local prior and the non-local prior. We further delve into the balance of the local prior and the non-local prior by adaptively learning the contribution weights. Then, we incorporate our regularizer into the reconstruction problem and unroll the reconstruction problem into an optimization-inspired deep neural network (DNN). The architecture of the network is intuitively interpretable by explicitly characterizing the image priors and the system imaging model. Finally, we learn the complete parameters in the reconstruction network through end-to-end training to achieve robust performance with high accuracy. Extensive simulation and hardware experiments validate the superior performance of our method over state-of-the-art methods. + +# 2. Related work + +# 2.1. Spectral Image Prior + +Regularization based on image priors is a fundamental technique to solve the under-determined optimization problem and is essential to computational spectral imaging. As it is hard to model the prior of a high-dimensional spectral image, most of the previous approaches focus on image local prior characterizing the spectral image structure within a local area. By regularizing the image gradients, the TV model imposes the first-order smoothness prior on the spectral image [55]. Sparse representation methods build a dictionary to model the sparsity prior for image patches [29]. However, the hand-crafted image priors are insufficient to capture the characteristics in various spectral images. Recently, by leveraging the large datasets, the concept of deep denoising prior has been proposed by learning an implicit but more accurate prior based on deep learning [61, 43, 37]. A similar idea has also been exploited in the autoencoder-based computational spectral imaging [11]. As the network extracts the information from local neighborhoods with convolutions, the deep denoising prior and autoencoder prior also belong to local priors [21]. + +Aiming to exploit the long-range dependence, NLS-based prior has been extensively studied in the literature. The off-the-shelf method to exploit the NLS is based on the Euclidean distance between similar patches. Under the frameworks of sparse representation and low-rank approximation, NLS-based prior has achieved impressive results in computational spectral imaging [52, 17, 31, 62], which demonstrates the effectiveness of NLS in spectral image reconstruction. NLS-based prior is further studied in the framework of deep learning where the block matching operation is treated as a pre-processing step before feeding the similar patches into a neural network [27]. To improve the accuracy of block matching, a non-local neural network is proposed for video classification by exploiting the NLS in an implicit transform domain [54]. Then the non-local neural network module is embedded into a recurrent neural network for image restoration [30]. This paper follows the development trend of the NLS exploitation method. We further propose an interpretable neural network specifically for computational spectral imaging. + +# 2.2. Spectral Image Reconstruction + +Besides the prior regularization, the computational optimization methods play an essential role in computational spectral imaging for a faithful reconstruction. Previously, model-based iterative optimization methods are used to incorporate with the hand-crafted priors [5, 16, 29]. However, these methods have to iteratively solve the optimization problems, and thus suffer from parameter tuning and high computational complexity. Later, learning-based methods have been developed for CS image reconstruction [39, 26, 33, 36]. The first category of the learning-based methods for computational spectral imaging is to fit a brute-force mapping from the compressive image to the desirable image [53, 38, 63]. Nevertheless, these methods can solely work on the specific system imaging model that is used during the training. Since the pixel-to-pixel correspondence between the coded aperture pixel and the sensor pixel is fragile to be changed, the system imaging model would vary and differ from the one used during the training. Thus these methods would lack flexibilities in real hardware systems. + +To this end, the deep unrolling-based optimization methods have been exploited for image CS [60, 45, 34, 49]. These methods unroll the iterations in the optimization into a DNN and learn the optimization parameters and network parameters simultaneously. Although the deep unrolling-based methods have achieved state-of-the-art results, they still inherit the local prior to regularize the optimization. As we discussed above, the local prior is less potent than the non-local prior. + +The motivation of this paper originates from the success of the NLS-based regularization with the model-based op- + +![](images/31566b486fd574d1bff757b9b0751ca0991e6d48c1fd31fb6d901bbda63fe72e.jpg) +Figure 2. The schematic of CASSI system. + +tization method. In this paper, we delve into an interpretable DNN to integrate the NLS prior and the mathematical optimization for compressive spectral imaging. + +# 3. Methodology + +# 3.1. System Imaging Model + +Computational spectral imaging is an increasing trend by optically encoding the spectral information and then recovering it through computational reconstruction. Let us start with an in-depth analysis about the CASSI imaging model. Figure 2 illustrates a schematic of CASSI. The spectral information is first spatially modulated by a coded aperture with a fixed pattern and then spectrally dispersed by the dispersive prism before being detected by the detector. Mathematically, considering that a spectral image patch with $\Lambda$ bands $\{F_{\lambda}\}_{1}^{\Lambda} \in \mathbb{R}^{M \times N}$ is modulated by a coded aperture with pattern $C \in \mathbb{R}^{M \times N}$ , the measurement $G \in \mathbb{R}^{M \times N}$ is formulated as + +$$ +\boldsymbol {G} = \sum_ {\lambda = 1} ^ {\Lambda} \boldsymbol {C} _ {\lambda} \circ \boldsymbol {F} _ {\lambda}, \tag {1} +$$ + +where $\circ$ means point-wise product. $C_{\lambda}$ represents the bandwise modulation which is derived by shifting the coded aperture according to the dispersive function $J(\lambda)$ as + +$$ +\boldsymbol {C} _ {\lambda} (m, n) = \boldsymbol {C} (m - J (\lambda), n), \tag {2} +$$ + +where $m$ and $n$ index the spatial coordinates. Note Eq. (2) assumes a dispersion along the vertical dimension, and the inference hereafter is also applicable for horizontal dispersion. The CASSI imaging model in Eq. (1) can be rewritten in the matrix-vector form as + +$$ +\boldsymbol {g} = \boldsymbol {\Phi} \boldsymbol {f}, \tag {3} +$$ + +where $\pmb{g} \in \mathbb{R}^{MN}$ and $\pmb{f} \in \mathbb{R}^{MNA}$ are the vectorized representation of the compressive image and the underlying spectral image, and $\Phi \in \mathbb{R}^{MN \times MNA}$ is the sensing matrix that describes the system imaging model. Our observation is that the sensing matrix $\Phi$ is a block diagonal matrix and can be written as + +$$ +\boldsymbol {\Phi} = [ d (\boldsymbol {C} _ {1}), \dots , d (\boldsymbol {C} _ {\lambda}), \dots , d (\boldsymbol {C} _ {\Lambda}) ], \tag {4} +$$ + +where $d(\cdot)$ means an operation that builds a diagonal matrix with the operator. Recall Eq. (2), we can see that the + +![](images/259bbc73ab4c42a1b3a480d067e718f1f20c4dce17a47199def50b49cd7d5e43.jpg) +Figure 3. The transition from the coded aperture to the sensing matrix. To synthesize the block diagonal sensing matrix, the coded aperture is first reshaped as a vector, then repeated in the horizontal direction, each time with a uniform shift in the vertical direction, as many times as the number of spectral band. + +sensing matrix $\Phi$ only depends on the coded aperture $C$ . Figure 3 shows the transition from the coded aperture to the sensing matrix, where a spectral image patch with a size of $4\times 4\times 3$ is assumed. The sensing matrix contains as many diagonal patterns as the spectral bands. Each diagonal pattern corresponds to the vectorized coded aperture, and adjacent diagonal patterns are with a uniform shift. It is worth noting that the special structure of the sensing matrix $\Phi$ will lead to $\Phi \Phi^{\mathrm{T}}$ being a diagonal matrix, which determines our development of the network architecture. + +# 3.2. Interpretable Unrolling-based Reconstruction + +Given the compressive image $\pmb{g}$ and the sensing matrix $\Phi$ , the subsequent task is to estimate the underlying spectral image. Since the reconstruction problem is severely under-determined, it need to solve the following minimization problem [44]: + +$$ +\hat {\boldsymbol {f}} = \arg \min _ {\boldsymbol {f}} | | \boldsymbol {g} - \boldsymbol {\Phi} \boldsymbol {f} | | ^ {2} + \tau R (\boldsymbol {f}), \tag {5} +$$ + +where $R(\cdot)$ is the regularization term that enforces some image prior on the solution, and $\tau$ is a parameter that weaks the weights of the data term and the regularization term. The optimization problem in Eq. (5) cannot be directly solved and a general strategy is to decouple it into two subproblems. By introducing an auxiliary valuable, Eq. (5) can be written as a constrained optimization problem: + +$$ +\hat {\boldsymbol {f}} = \underset {\boldsymbol {f}} {\arg \min } | | \boldsymbol {g} - \boldsymbol {\Phi} \boldsymbol {f} | | ^ {2} + \tau R (\boldsymbol {h}), \quad s. t. \quad \boldsymbol {h} = \boldsymbol {f}. \tag {6} +$$ + +Then, we adopt the half quadratic splitting (HQS) method to convert the above constrained optimization problem to a non-constrained optimization problem + +$$ +(\hat {\boldsymbol {f}}, \hat {\boldsymbol {h}}) = \arg \min _ {\boldsymbol {f}, \boldsymbol {h}} \| \boldsymbol {g} - \Phi \boldsymbol {f} \| ^ {2} + \eta \| \boldsymbol {h} - \boldsymbol {f} \| ^ {2} + \tau R (\boldsymbol {h}), \tag {7} +$$ + +where $\eta$ is a penalty parameter. Eq. (7) can be split into two subproblems: + +$$ +\hat {\boldsymbol {f}} ^ {(k + 1)} = \arg \min _ {\boldsymbol {f}} \| \boldsymbol {g} - \boldsymbol {\Phi} \boldsymbol {f} \| ^ {2} + \eta \| \boldsymbol {h} ^ {(k)} - \boldsymbol {f} \| ^ {2}, \tag {8} +$$ + +$$ +\hat {\boldsymbol {h}} ^ {(k + 1)} = \arg \min _ {\boldsymbol {h}} \eta | | \boldsymbol {h} - \boldsymbol {f} ^ {(k + 1)} | | ^ {2} + \tau R (\boldsymbol {h}). \tag {9} +$$ + +In this viewpoint, the HQS algorithm separates the sensing matrix $\Phi$ and the regularization $R(\cdot)$ , and these two subproblems can be solved alternatively. + +In this section, we focus on finding a plausible solution for the $f$ -subproblem in Eq. (8). Note we will depict that the $h$ -subproblem in Eq. (9) can be solved with a spectral image prior network in Sec. 3.3. Here we would like to skip the details about the $h$ -subproblem and just give a general solver to enable the subsequent deduction: + +$$ +\boldsymbol {h} ^ {(k + 1)} = S (\boldsymbol {f} ^ {(k + 1)}). \tag {10} +$$ + +The $f$ -subproblem in Eq. (8) is a quadratic regularized least-squares problem. A closed form is given as + +$$ +\boldsymbol {f} ^ {(k + 1)} = \left(\boldsymbol {\Phi} ^ {\intercal} \boldsymbol {\Phi} + \eta \boldsymbol {I}\right) ^ {- 1} \left(\boldsymbol {\Phi} ^ {\intercal} \boldsymbol {g} + \eta \boldsymbol {h} ^ {(k)}\right), \tag {11} +$$ + +where $\pmb{I}$ is an identity matrix with desired dimensions. Previous methods in the field of image restorations extensively admit that since the matrix $\Phi^{\mathsf{T}}\Phi +\eta I$ is very large, it is impossible to directly compute the inverse matrix [13, 42, 41]. Instead, iterative conjugate gradient (CG) algorithm is employed, which, however, requires many iterations and cannot guarantee find the exact solution. In this paper, owning to the specific structure of the sensing matrix $\Phi$ as shown in Figure 3, we instead adapts the recent advances [59, 31] on computing Eq. (11) to obtain the exact solution directly. Specifically, given a block diagonal sensing matrix $\Phi \in \mathbb{R}^{MN\times MN\Lambda}$ , we can simply calculate a diagonal matrix $\Phi_{i}\Phi_{i}^{\intercal}$ as + +$$ +\boldsymbol {\Phi} _ {i} \boldsymbol {\Phi} _ {i} ^ {\intercal} = \operatorname {d i a g} \left\{\phi_ {1}, \dots \phi_ {i}, \dots , \phi_ {M N} \right\}, \tag {12} +$$ + +where $\phi_{i}$ can be pre-calculated according to the coded aperture pattern $C$ . By following the matrix inverse lemma, the matrix inversion in Eq. (11) can be written as + +$$ +\left(\boldsymbol {\Phi} ^ {\intercal} \boldsymbol {\Phi} + \eta \boldsymbol {I}\right) ^ {- 1} = \eta^ {- 1} \boldsymbol {I} - \eta^ {- 1} \boldsymbol {\Phi} ^ {\intercal} \left(\boldsymbol {I} + \boldsymbol {\Phi} \eta^ {- 1} \boldsymbol {\Phi} ^ {\intercal}\right) ^ {- 1} \boldsymbol {\Phi} \eta^ {- 1}. \tag {13} +$$ + +According to Eq.(12), we know + +$$ +\left(\boldsymbol {I} + \boldsymbol {\Phi} \eta^ {- 1} \boldsymbol {\Phi} ^ {\intercal}\right) ^ {- 1} = \operatorname {d i a g} \left\{\frac {\eta}{\eta + \phi_ {1}}, \dots \frac {\eta}{\eta + \phi_ {i}}, \dots \frac {\eta}{\eta + \phi_ {n}} \right\} \tag {14} +$$ + +By plugging Eq. (12), Eq. (13) and Eq. (14) into Eq. (11) and simplifying the formula, we have + +$$ +\boldsymbol {f} ^ {(k + 1)} = \boldsymbol {h} ^ {(k)} + \boldsymbol {\Phi} ^ {\mathsf {T}} [ (\boldsymbol {g} - \boldsymbol {\Phi} \boldsymbol {h} ^ {(k)}) \cdot / (\eta + \boldsymbol {\Phi} \boldsymbol {\Phi} ^ {\mathsf {T}}) ]. \tag {15} +$$ + +In this manner, the $f$ -subproblem can be solved to obtain an accurate solution. Further, the calculation of Eq. (15) only needs linear operations with much fewer computational cost compared with the iterative CG-based method. + +We then unify the two subproblems as a whole by substituting Eq. (10) into Eq. (15) + +$$ +\boldsymbol {f} ^ {(k + 1)} = S \left(\boldsymbol {f} ^ {(k)}\right) + \boldsymbol {\Phi} ^ {\intercal} \left[ \left(\boldsymbol {g} - \boldsymbol {\Phi} S \left(\boldsymbol {f} ^ {(k)}\right)\right). / \left(\eta + \boldsymbol {\Phi} \boldsymbol {\Phi} ^ {\intercal}\right) \right]. \tag {16} +$$ + +![](images/e320b90bb59e70269d99c1861cdc63ac5a91ce4c0143fbd1d9fc356f55e1a040.jpg) +Figure 4. Illustration of the proposed neural network. The network integrates the insight of the optimization method and exploits the specific structure of the sensing matrix. It is composed of multiple recursion, and each recursion includes one spectral image prior network concatenated with some linear connections that accords with the imaging model. + +We would like to highlight that it is the first time to deduce the recursion formula in Eq. (16) for the regularization-based optimization, owing to the specific structure of the sensing matrix in computational spectral imaging. + +To faithfully solve Eq. (16), we propose to unroll the recursion via a DNN, as shown in Figure 4. The network is composed of multiple recursions, each of which includes one spectral image prior network (as introduced in Sec. 3.3.) concatenated with linear connections that accords with Eq. (16). In the proposed network, the recursions run in a feed-forward manner. The network is trained end-to-end to obey the imaging model and exploit the image priors simultaneously, which is advantageous over the separative solvers in previous methods. + +Specifically, the input compressive patch $\pmb{g}$ is first fed into a linear layer parameterized by the transpose of the sensing matrix $\Phi^{\mathsf{T}}$ . The output vector is treated as the initialization: $\pmb{f}^{(0)} = \Phi^{\mathsf{T}}\pmb{g}$ . For the $k_{th}$ recursion, the input $\pmb{f}^{(k - 1)}$ is successively fed into the spectral image prior network $S(\cdot)$ and a residual network block [22]. In the residual network block, the identical connection and the residual connection mimic the first part and second part in Eq. (16), respectively. In the residual connection, the input is fed into a linear layer parameterized by $\Phi$ , summed up with the compressive image $\pmb{g}$ and followed by linear connections parameterized by $\eta + \Phi \Phi^{\mathsf{T}}$ and $\Phi^{\mathsf{T}}$ , respectively. Such recursion is run $K$ times. According to the recent evidence in [60, 11], we set the recursion number $K = 11$ in the following simulations and experiments, to obtain a balance between accuracy and memory. + +![](images/231cf2419ca38285f4d3b369e5de9ff4c012a28a09404885d894822680beb606.jpg) +Figure 5. Architecture of the spectral image prior network. It contains a local prior branch and a NLS prior branch, which are adaptively integrated with a learnable weight. + +# 3.3. Neural Local and Non-local Priors + +Now we turn to discuss the $h$ -subproblem in Eq. (9), which is actually a proximal operator of $R(h)$ computed at point $\pmb{f}^{(k + 1)}$ . Moreover, it has been demonstrated that both local and NLS prior exist in spectral images [52, 62]. Thus, we propose to explicitly incorporate these two types of priors and rewrite the general form of the proximal operator in Eq. (9) as + +$$ +\hat {\boldsymbol {h}} ^ {(k + 1)} = \arg \min _ {\boldsymbol {h}} \eta | | \boldsymbol {h} - \boldsymbol {f} ^ {(k + 1)} | | ^ {2} + \tau_ {l} R _ {l} (\boldsymbol {h}) + \tau_ {n} R _ {n} (\boldsymbol {h}), \tag {17} +$$ + +where $R_{l}(\pmb{h})$ and $R_{l}(\pmb{h})$ represent regularizations based on local prior and non-local prior, respectively. $\tau_{l}$ and $\tau_{n}$ are regularization parameters. + +Instead of explicitly modeling the regularizations and solving the proximal operator, we propose to directly learn a solver $S(\cdot)$ for the proximal operator with a customized neural network. In this manner, the spectral image priors are not explicitly modeled but learned with the neural network, which introduces nonlinearity in prior modeling and improves the accuracy of the hand-crafted image priors. + +The spectral image prior network is illustrated in Figure 5. Two intuitions guide the design of the spectral image prior network. First, it should enable to exploit local prior and NLS prior simultaneously. Second, it should be as simple as possible to facilitate the training. Following these intuitions, we propose a spectral image prior network that consists of two branches: the local prior branch and the NLS prior branch. The local prior branch is simple and contains only two linear convolutional layers interleaved by one rectified linear unit (ReLU) layer. This design is motivated by the excellent work on image super-resolution that removes the unnecessary layers (such as batch normalization) in the neural networks [28]. In the local prior branch, the first convolutional layer uses $3 \times 3 \times \Lambda$ filters and produces $L = 64$ features, while the second convolutional layer uses $3 \times 3 \times L$ filters and produces $\Lambda$ features. + +The NLS prior branch is designed per the principle of non-local mean operation [7]. Specifically, the NLS prior + +![](images/14a84dee3701d663869293786a95ab0c19f00a5d608ba141237216b00475c787.jpg) +(a) + +![](images/7710c4753c4554f2b2373bef2b6d4a423cb40a0506224528a4f96017a8c4d82c.jpg) +(b) +Figure 6. The performance comparison between the method with (w/) and without (w/o) the NLS prior. (a) Training error. (b) PSNR. + +branch inputs an intermediate spectral image $\pmb{f}$ and generates a refined output $\hat{\pmb{f}}$ . A generic formula of the non-local operation is + +$$ +\hat {\boldsymbol {f}} _ {i} = \operatorname {R e L U} \left(\sum_ {j} d \left(\boldsymbol {f} _ {i}, \boldsymbol {f} _ {j}\right) \psi \left(\boldsymbol {f} _ {j}\right)\right) \tag {18} +$$ + +where $i$ and $j$ are the indexes of the spatial locations. A pairwise function $d(\cdot, \cdot)$ computes a scalar that represents the distance (i.e., similarity) between input at two locations. The function $\psi(\cdot)$ computes an embedding representation of the input. For simplicity, we set $\psi(\cdot)$ as a linear convolutional embedding and set $d(\cdot, \cdot)$ as a dot-product similarity: $d(\pmb{f}_i, \pmb{f}_j) = \pmb{f}_i^\top \pmb{f}_j$ . The NLS prior branch that accords with Eq. (18) is shown in Figure 5. The convolution in the embedding uses $1 \times 1 \times \Lambda$ kernels and generates $\Lambda$ filters. + +Finally, we propose to integrate the local prior branch and the NLS prior branch with a weight parameter $\omega$ . We further employ the residual network design [22] in the spectral image prior network, since residual learning enables fast and stable training and relieves the computational burden. Figure 6 shows the training loss and the final PSNR benefiting from the NLS prior branch, which validates the intuitions for the network design. + +# 3.4. Adaptive Parameters Learning + +Once the network is built, we train it by end-to-end training to learn the network parameters and the optimization parameters simultaneously. In our implementation, all the parameters are set to be different among each recursion, as with the recursion increasing, the reconstruction quality is improved; thus the network parameters and the optimization parameters should be changed accordingly. We would like to highlight that instead of manually setting the parameter $\omega$ , we propose to learn it to adaptively balance the contribution of the local prior and the NLS prior. + +Given a set of spectral image patches $\mathbf{F}^{(l)}$ and its corresponding compressive patch $\pmb{g}^{(l)}$ as the training samples, the network is trained according to the MSE-based lose func + +Table 1. Performance comparisons on ICVL and Harvard datasets (3% compressive ratio). The best performance is labeled in bold. + +
DatasetMetricTwISTGPSRBPDN3DNSRSSLRHSCNNISTA-NetAutoencoderHyperReconNetOurs
ICVLPSNR26.1524.5626.7727.9529.1629.4831.7330.4432.3634.27
SSIM0.9360.9090.9470.9580.9640.9730.9840.9700.9860.991
SAM0.0530.090.0520.0510.0460.0430.0420.0360.0370.034
HarvardPSNR27.1624.9626.6728.5129.6828.5531.1330.3030.3432.71
SSIM0.9240.9070.9350.940.9520.9440.9670.9520.9640.978
SAM0.1190.1960.1550.1320.1010.1180.1140.0980.1150.091
Time(s)555302705864869863.111.15521300.98
+ +tion, which can be expressed as + +$$ +\left(\ddot {\Theta}, \ddot {\eta}\right) = \arg \min _ {\Theta , \eta} \frac {1}{L} \sum_ {l = 1} ^ {L} \left| \left| \widetilde {\boldsymbol {F}} \left(\boldsymbol {g} ^ {(l)}; \Theta , \eta\right) - \boldsymbol {F} ^ {(l)} \right| \right| ^ {2}, \tag {19} +$$ + +where $\widetilde{F} (\cdot)$ denotes the output of the network given the input and the parameters. + +We employ TensorFlow to implement the network, minimize the loss function using a stochastic gradient descent method, and train it up to 150 epochs. Figure 6a plots the testing loss along with the training epochs, which verifies the convergence of the proposed method. The mini-batch size and momentum are set as 64 and 0.9, respectively. The learning rate is initially set as 0.001 and exponentially decays to $90\%$ for every ten epochs. The network parameters are initialized with the method in [19]. We use a machine equipped with an Intel Core i7-6800K CPU with 64GB memory and an NVIDIA Titan X PASCAL GPU. + +# 4. Simulations on Synthetic Data + +# 4.1. Configurations + +For a comprehensive evaluation, we conduct simulations on two public spectral datasets, i.e., the ICVL dataset [2] and the Harvard dataset [10]. The basic configurations of the spectral cameras for obtaining these datasets are different, so the property of the images from different datasets are diverse and heterogeneous. Specifically, the spectral images in the ICVL dataset are acquired using a Specim PS Kappa DX4 spectral camera and a rotary stage for spatial scanning. The spectral range is from $400\mathrm{nm}$ to $700\mathrm{nm}$ , which is divided into 31 spectral bands with approximate $10\mathrm{nm}$ bandwidth for each band. There are 201 spectral images in ICVL dataset. To avoid over-fitting, we exclude 31 spectral images with similar backgrounds and 20 spectral images with similar contents. Then we randomly select 100 spectral images for training and 50 spectral images for testing. The spectral images in the Harvard dataset are acquired using a CRI Nuance FX spectral camera with a liquid crystal tunable filter for spectral scanning. The spectral range is from $420\mathrm{nm}$ to $720\mathrm{nm}$ with 31 spectral bands. The Harvard dataset consists of 50 spectral images with distinct natural scenes. We remove 6 deteriorated spectral images with + +large-area saturated pixels, and randomly select 35 spectral images for training and 9 spectral images for testing. We set the patch size as $48 \times 48$ , and randomly select $80\%$ patches for training and the rest patches for validation. The coded aperture patterns are constructed by following random matrix in Bernoulli distributions with $p = 0.5$ . However, the coded aperture patterns in testing and training are totally different, as this configuration represents the real case in hardware systems where the system imaging model is fragile to varies. + +We compare our methods with nine main stream methods, including five hand-crafted prior based methods: TV based TwIST method [24], sparsity based GPSR method [48] and BPDN method [29], and NLS based 3DNSR method [52] and SSLR method [17], and four learning based methods: HSCNN [57], ISTA-Net [60], Autoencoder [11] and HyperReconNet [53]. All the codes for competitive methods are released publicly or provided privately to us by the authors, and we make great efforts to produce their best results. + +Three quantitative image quality metrics are employed to evaluate the performance of these methods, including peak signal-to-noise ratio (PSNR), structural similarity (SSIM) [56], and spectral angle mapping (SAM) [25]. PSNR and SSIM are calculated on each 2D spatial image and averaged over all spectral bands. A larger value of PSNR and SSIM indicates a higher accuracy in the spatial domain. SAM is calculated on each 1D spectral vector and averaged over all spatial points. A smaller value of SAM suggests a smaller error in the spectral domain. + +# 4.2. Evaluation + +Numerical Results. Table 1 summarizes the numerical results on ICVL and Harvard datasets where the compressive ratio is $3\%$ . The proposed method outperforms all the existing methods according to the metrics in both spatial and spectral domains, which demonstrates the superiority of the integration of NLS and deep unrolling. Specifically, our method exhibits remarkably higher accuracy compared with the methods based on hand-crafted priors. This indicates that our method manages to capture more accurate priors by the spectral image prior network. Further, the gains of our method over the brute-force learning methods, + +![](images/f8c9bf5fc6851d92dd961c0bd6d9bb573ffda7229ab9629a0cd6e97af98a666c.jpg) +Compressive image + +![](images/25db0cae33ac714cddd60a48ed5c32c1dc123137345bc38e9a31d24ef899c1aa.jpg) + +![](images/c9a3d21ea7a96eb18eff85ebb3c7e4c8244fae33fbce5f8db5d8f8fa10e65106.jpg) +GPSR (20.76 / 0.892) + +![](images/0938260e7a07325d54f16d3d7df1dd8d6198c5aa3b115e5c2a48d8e3e6c1ec5e.jpg) + +![](images/0f562296093efb1af7b93ec7f8942b30be480c8ed7febdda66bf7a72dba86a88.jpg) + +![](images/0ed837e0f5aee5a9d8a9263e56a37976c3dde52debb71cebfbe1fc7e66d5cad5.jpg) + +![](images/83113923990b5d3c36ee8958f23cf7461f35e3c0ac15a5c84211b0fa36b774bf.jpg) +HSCNN (27.30 / 0.979) + +![](images/c8903b9e70d3723c3e5f891b7de936a4b011ec0ab8198ee4b181f3b09e9e7930.jpg) +TwIST (21.57 / 0.904) +ISTA-Net (27.31/0.985) + +![](images/de0cff53c74caa049a29865d912e051ee9d27ac2e35b4470ba381cdd7b376e0e.jpg) +Autoencoder (28.22 / 0.984) + +![](images/57098c32bae0d5cbd8a402a9f6be48680e6f67b51855fc0f3c90ca86271a6b7c.jpg) +BPDN (23.59 / 0.944) +HyperReconNet (29.86 / 0.988) + +![](images/1d2702dffd9130d12eec7e003225f9160f3cb54dd8f083494f5a2ffba5c9145d.jpg) +3DNSR (24.84/0.957) +Ours (33.64/0.994) + +![](images/0d888dabbd9b570ebe66efabd08abaea006e985ab420ec6bece85b8c36f197b5.jpg) +SSLR (23.86/0.941) +Ground truth (PSNR / SSIM) + +![](images/45a2861d77b1fd41251f989177b797080f0615f7e5d712f05d0825f9a0b9fe27.jpg) +Figure 7. Visual quality comparison. The PSNR and SSIM for the result images are shown in the parenthesis. Our methods outperforms all the competitive methods in terms of both perceptual quality and quantitative metrics. +Figure 8. Comparison of spectral accuracy. The point is indicated in Figure 7. The spectra reconstructed by the our method is closer to the reference compared with the other methods. The RMSE and SAM numbers further demonstrate the superiority of our methods on spectral fidelity. + +i.e., HSCNN and HyperReconNet, demonstrate the effectiveness of our derivation of the specific architecture for deep unrolling. Last but not least, our method is considerably better than ISTA-Net and Autoencoder, which are learning-based methods but solely employ local priors. We attribute this to the exploitation of the NLS-based prior in our method. + +Perceptual Quality. We show the reconstruction results of one representative image from ICVL dataset in Figure 7. To simultaneously present the results of all spectral bands, we convert the spectral images to sRGB via the CIE color matching function. We also provide the PSNR and SSIM values for each result image. Clearly, the proposed method can produce visually pleasant results with less artifact and sharper edges compared with other methods, which is consistent with the numerical metrics. + +Table 2. Performance comparisons on natural image CS. + +
DatasetCS RatioSDAReconNetISTA-NetOurs
Set1110%22.6524.2825.8025.96
4%20.1220.6321.2322.11
BSD6810%23.1224.1525.0225.46
4%21.3221.6622.1222.94
+ +Spectral Fidelity. Figure 8 plots the recovered spectra of one point indicated in Figure 7. The spectrum reconstructed by the proposed method is closest to the reference. The RMSE and SAM further demonstrate the superior performance of the proposed method on spectral fidelity. + +Computational Complexity. Table 1 lists the running time for reconstructing one spectral image with size of $512 \times 512 \times 31$ . All the codes are implemented on an Intel Core i7-6800K CPU. As can be seen, the proposed method is comparable with ISTA-Net and HSCNN (in seconds), and much faster than the other methods. In our method, the total number of multiplication for spectral image prior network is approximately $M \times N \times 10^{5}$ . In contrast, for example, the GPSR method adopts the sparse coding technique to solve the proximal operation and its multiplication is approximately $M \times N \times 10^{7}$ when a $2 \times$ over-complete dictionary is used. + +Generality on Natural Image CS. The proposed deep nonlocal unrolling model is a general model for image restoration. To test its generality beyond spectral imaging, we conduct further simulations on natural image CS by following the configurations in [26, 60]. We compare our method with three state-of-the-art optimization-based methods: SDA [39], ReconNet [26] and ISTA-Net [60]. Ta + +![](images/1c685fab928331889c4f9719782309c5c3a5cd7565c7abcba43ee2203c30f225.jpg) +(a) Compressive image + +![](images/691ab3b4fda76eaffc922ac1406eba00cb40a426fd07bbb92039baf32a0600b4.jpg) +(b) Reference + +![](images/18540f09908ca2c57303e92478b590c2c67effce63d05ac02026c13311f5654c.jpg) +(c)TwIST + +![](images/b991aadc7677dc99c64892e69a7a948fb0379b2b2f058cc79a095d958beba78d.jpg) +(d) BPDN + +![](images/b67066347c84c19757870169069556e864bc1d7d7d10936004b758a112fa7470.jpg) +(e) 3DNSR + +![](images/2c7afc20fc3a839a8e2ad5365d9fc6024de1740c8f0994ddb347afbe7643424b.jpg) +(f) SSLR + +![](images/648f32f511621293332cb58964f2a88d19e5480f87bfead02154ddbaf44c8a4c.jpg) +(g) Autoencoder + +![](images/54f34f512e01f7524a741bd825461245be9c3ada71dab8765ff0bbe6f430da67.jpg) +(h) Ours +Figure 9. Comparison on real captured data. Together with the reconstruction results, we also show the compressive image and the panchromatic image of the target for reference. Our method can produce the results with clearer visual information compared with the other methods. The center wavelength for the selected band is $632\mathrm{nm}$ . + +ble 2 lists the average PSNR results on Set11 and BSD68 with two CS ratios. It can be observed that the proposed method outperforms all the competing methods, which further demonstrates the merits of deep non-local unrolling. + +# 5. Experiments on a hardware System + +We conduct experiments on a real hardware system to demonstrate the practicability of our method [48, 51]. To handle the real-world scenes, we retrain the network by combining the spectral images in two datasets. Figure 9 shows the reconstructed images by our method together with TwIST, BPDN, 3DNSR, SSLR, and Autoencoder. We also capture a panchromatic image of the target for reference. It can be seen that the proposed method can produce better results with fewer artifacts and clearer content com + +![](images/7ad5005ca74b2a3d1eea24a048da4436a5415d0b78aa2e340fdb929ecf3a8f08.jpg) +Figure 10. Comparison of spectral accuracy. The point is indicated in Figure 9. The spectrum reconstructed by the our method is closer to the reference compared with the other methods. The RMSE and SAM numbers further demonstrate the superiority of our methods on spectral fidelity. + +
RMSESAM
TwIST0.1090.563
BPDN0.0930.476
3DNSR0.0950.491
SSLR0.0900.461
Autoencoder0.0560.288
Ours0.0230.120
+ +pared with the other methods. The qualitative results with spectral plots are also provided in Figure 10. The reference spectrum is obtained with a commercial spectrometer (Ocean Optics). The spectrum reconstructed by our method is closer to the reference compared with the other methods. The RMSE and SAM numbers further show the superiority of our methods on spectral fidelity, which demonstrates the effectiveness of our method in the real hardware system. + +# 6. Conclusion + +In this paper, we have presented an interpretable neural network for computational spectral imaging. The proposed method integrates the merits of deep unrolling and NLS as follows: (1) By exploiting the block diagonal nature of the sensing matrix, we derive a novel recursion formula, based on which we develop an interpretable neural network for solving the reconstruction problem in computational spectral imaging. (2) By recognizing that previous deep learning methods solely consider local prior via local convolution, we propose a mechanism to adaptively incorporate the non-local prior into the spectral image prior network. Our method is free of optimization parameter tuning and reduces the computational complexity. We have also validated the effectiveness of the proposed method on real hardware prototype. One future direction of interest is to extend the proposed method for more spectral image processing problems, e.g., spectral interpolation, and demosaicing. The other direction is to accelerate the proposed method to reach a video-rate reconstruction, thus enabling the real-time acquisition of hyperspectral video. + +# Acknowledgments + +This work is supported in part by National Natural Science Foundation of China under Grant 61701025 and Grant 61672096, in part by Beijing Municipal Science and Technology Commission under Grant Z181100003018003 and in part by Beijing Institute of Technology Research Fund Program for Young Scholars. + +# References + +[1] https://github.com/wang-lizhi/DeepNonlocalUnrolling.1 +[2] B. Arad and O. Ben-Shahar. Sparse recovery of hyperspectral signal from natural rgb images. In European Conference on Computer Vision, pages 19-34, 2016. 6 +[3] G. Arce, D. Brady, L. Carin, H. Arguello, and D. Kittle. Compressive coded aperture spectral imaging: An introduction. IEEE Signal Processing Magazine, 31(1):105-115, 2014. 1 +[4] V. Backman, M. B. Wallace, L. Perelman, J. Arendt, R. Gurjar, M. Müller, Q. Zhang, G. Zonios, E. Kline, T. McGillican, et al. Detection of preinvasive cancer cells. Nature, 406(6791):35, 2000. 1 +[5] J. M. Bioucas-Dias and M. A. Figueiredo. A new twist: two-step iterative shrinkage/thresholding algorithms for image restoration. IEEE Transactions on Image Processing, 16(12):2992-3004, 2007. 1, 2 +[6] M. Borengasser, W. S. Hungate, and R. Watkins. Hyperspectral remote sensing: principles and applications. CRC press, 2007. 1 +[7] A. Buades, B. Coll, and J.-M. Morel. A non-local algorithm for image denoising. In IEEE Conference on Computer Vision and Pattern Recognition, volume 2, pages 60-65, 2005. 1, 5 +[8] X. Cao, H. Du, X. Tong, Q. Dai, and S. Lin. A prism-mask system for multispectral video acquisition. IEEE Transactions Pattern Analysis and Machine Intelligence, 33(12):2423-2435, 2011. 1 +[9] X. Cao, T. Yue, X. Lin, S. Lin, X. Yuan, Q. Dai, L. Carin, and D. J. Brady. Computational snapshot multispectral cameras: toward dynamic capture of the spectral world. IEEE Signal Processing Magazine, 33(5):95-108, 2016. 1 +[10] A. Chakrabarti and T. Zickler. Statistics of real-world hyperspectral images. In IEEE Conference on Computer Vision and Pattern Recognition, pages 193-200, 2011. 6 +[11] I. Choi, D. S. Jeon, G. Nam, D. Gutierrez, and M. H. Kim. High-quality hyperspectral reconstruction using a spectral prior. ACM Transactions on on Graphics (SIGGRAPH Asia), 36(6):218, 2017. 2, 4, 6 +[12] K. Dabov, A. Foi, V. Katkovnik, and K. Egiazarian. Image denoising by sparse 3-d transform-domain collaborative filtering. IEEE Transactions on Image Processing, 16(8):2080-2095, 2007. 1 +[13] W. Dong, P. Wang, W. Yin, G. Shi, F. Wu, and X. Lu. Denoising prior driven deep neural network for image restoration. IEEE Transactions Pattern Analysis and Machine Intelligence, 41(10):2305-2318, 2018. 4 +[14] D. L. Donoho. Compressed sensing. IEEE Transactions on Information Theory, 52(4):1289-1306, 2006. 1 +[15] M. Elad and M. Aharon. Image denoising via sparse and redundant representations over learned dictionaries. IEEE Transactions on Image Processing, 15(12):3736-3745, 2006. 1 +[16] M. A. Figueiredo, R. D. Nowak, and S. J. Wright. Gradient projection for sparse reconstruction: Application to compressed sensing and other inverse problems. IEEE Journal of + +Selected Topics in Signal Processing, 1(4):586-597, 2007. 1, 2 +[17] Y. Fu, Y. Zheng, I. Sato, and Y. Sato. Exploiting spectral-spatial correlation for coded hyperspectral image restoration. In IEEE Conference on Computer Vision and Pattern Recognition, pages 3727-3736, 2016. 2, 6 +[18] L. Gao, R. T. Kester, N. Hagen, and T. S. Tkaczyk. Snapshot image mapping spectrometer (ims) with high sampling density for hyperspectral microscopy. OSA Optics Express, 18(14):14330-14344, 2010. 1 +[19] X. Glorot and Y. Bengio. Understanding the difficulty of training deep feedforward neural networks. In International Conference on Artificial Intelligence and Statistics, pages 249–256, 2010. 6 +[20] K. Gregor and Y. LeCun. Learning fast approximations of sparse coding. In International Conference on Machine Learning, pages 399-406, 2010. 2 +[21] S. Gu, R. Timofte, and L. Van Gool. Integrating local and non-local denoiser priors for image restoration. In International Conference on Pattern Recognition. 2 +[22] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition, pages 770-778, 2016. 4, 5 +[23] M. H. Kim, T. A. Harvey, D. S. Kittle, H. Rushmeier, J. Dorsey, R. O. Prum, and D. J. Brady. 3d imaging spectroscopy for measuring hyperspectral patterns on solid objects. ACM Transactions on on Graphics, 31(4):38:1-38:11, 2012. 1 +[24] D. Kittle, K. Choi, A. Wagadarikar, and D. J. Brady. Multiframe image estimation for coded aperture snapshot spectral imagers. OSA Applied Optics, 49(36):6824-6833, 2010. 6 +[25] F. A. Kruse, A. B. Lefkoff, J. W. Boardman, K. B. Heidebrecht, A. T. Shapiro, P. J. Barloon, and A. F. H. Goetz. The spectral image processing system (SIPS)—interactive visualization and analysis of imaging spectrometer data. Remote Sensing of Environment, 44(2-3):145–163, 1993. 6 +[26] K. Kulkarni, S. Lohit, P. Turaga, R. Kerviche, and A. Ashok. Reconnet: Non-iterative reconstruction of images from compressively sensed measurements. In IEEE Conference on Computer Vision and Pattern Recognition, pages 449–458, 2016. 2, 7 +[27] S. Lefkimmiatis. Non-local color image denoising with convolutional neural networks. In IEEE Conference on Computer Vision and Pattern Recognition, pages 3587-3596, 2017. 2 +[28] B. Lim, S. Son, H. Kim, S. Nah, and K. M. Lee. Enhanced deep residual networks for single image super-resolution. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 1132-1140, 2017. 5 +[29] X. Lin, Y. Liu, J. Wu, and Q. Dai. Spatial-spectral encoded compressive hyperspectral imaging. ACM Transactions on on Graphics, 33(6):233, 2014. 1, 2, 6 +[30] D. Liu, B. Wen, Y. Fan, C. C. Loy, and T. S. Huang. Nonlocal recurrent network for image restoration. In Advances in Neural Information Processing Systems, pages 1680-1689, 2018. 2 + +[31] Y. Liu, X. Yuan, J. Suo, D. J. Brady, and Q. Dai. Rank minimization for snapshot compressive imaging. IEEE Transactions Pattern Analysis and Machine Intelligence, 41(12):2990-3006, 2018. 1, 2, 4 +[32] G. Lu and B. Fei. Medical hyperspectral imaging: a review. Journal of Biomedical Optics, 19(1):010901, 2014. 1 +[33] A. Lucas, M. Iliadis, R. Molina, and A. K. Katsaggelos. Using deep neural networks for inverse problems in imaging: beyond analytical methods. IEEE Signal Processing Magazine, 35(1):20-36, 2018. 2 +[34] J. Ma, X.-Y. Liu, Z. Shou, and X. Yuan. Deep tensor admmnet for snapshot compressive imaging. In International Conference on Computer Vision, pages 10223-10232, 2019. 2 +[35] J. Mairal, F. Bach, J. Ponce, G. Sapiro, and A. Zisserman. Non-local sparse models for image restoration. In IEEE Conference on Computer Vision and Pattern Recognition, pages 2272-2279, 2009. 1 +[36] M. T. McCann, K. H. Jin, and M. Unser. Convolutional neural networks for inverse problems in imaging: A review. IEEE Signal Processing Magazine, 34(6):85-95, 2017. 2 +[37] T. Meinhardt, M. Moller, C. Hazirbas, and D. Cremers. Learning proximal operators: Using denoising networks for regularizing inverse imaging problems. In International Conference on Computer Vision, pages 1781-1790, 2017. 2 +[38] X. Miao, X. Yuan, Y. Pu, and V. Athitsos. λ-net: Reconstruct hyperspectral images from a snapshot measurement. In International Conference on Computer Vision, pages 4059-4069, 2019. 2 +[39] A. Mousavi, A. B. Patel, and R. G. Baraniuk. A deep learning approach to structured signal recovery. In 2015 53rd Annual Allerton Conference on Communication, Control, and Computing, pages 1336-1343, 2015. 2, 7 +[40] Z. Pan, G. Healey, M. Prasad, and B. Tromberg. Face recognition in hyperspectral images. IEEE Transactions Pattern Analysis and Machine Intelligence, 25(12):1552-1560, 2003. 1 +[41] N. Qi, Y. Shi, X. Sun, J. Wang, B. Yin, and J. Gao. Multidimensional sparse models. IEEE Transactions Pattern Analysis and Machine Intelligence, 40(1):163-178, 2018. 4 +[42] J. Ren, J. Liu, and Z. Guo. Context-aware sparse decomposition for image denoising and super-resolution. IEEE Transactions on Image Processing, 22(4):1456-1469, 2013. 4 +[43] J. Rick Chang, C.-L. Li, B. Poczos, B. Vijaya Kumar, and A. C. Sankaranarayanan. One network to solve them all-solving linear inverse problems using deep projection models. In International Conference on Computer Vision, pages 5888-5897, 2017. 2 +[44] S. Roth and M. J. Black. Fields of experts: A framework for learning image priors. In IEEE Conference on Computer Vision and Pattern Recognition, pages 860-867, 2005. 3 +[45] J. Sun, H. Li, Z. Xu, et al. Deep admm-net for compressive sensing mri. In Advances in Neural Information Processing Systems, pages 10-18, 2016. 2 +[46] M. F. Tappen. Utilizing variational optimization to learn markov random fields. In IEEE Conference on Computer Vision and Pattern Recognition, pages 1-8, 2007. 1 + +[47] H. Van Nguyen, A. Banerjee, and R. Chellappa. Tracking via object reflectance using a hyperspectral video camera. In IEEE Computer Vision and Pattern Recognition Workshops, pages 44-51, 2010. 1 +[48] A. Wagadarikar, R. John, R. Willett, and D. Brady. Single disperser design for coded aperture snapshot spectral imaging. OSA Applied Optics, 47(10):B44-B51, 2008. 1, 6, 8 +[49] L. Wang, C. Sun, Y. Fu, M. H. Kim, and H. Huang. Hyperspectral image reconstruction using a deep spatial-spectral prior. In IEEE Conference on Computer Vision and Pattern Recognition, pages 8032-8041, 2019. 2 +[50] L. Wang, Z. Xiong, D. Gao, G. Shi, W. Zeng, and F. Wu. High-speed hyperspectral video acquisition with a dual-camera architecture. In IEEE Conference on Computer Vision and Pattern Recognition, pages 4942-4950, 2015. 1 +[51] L. Wang, Z. Xiong, H. Huang, G. Shi, F. Wu, and W. Zeng. High-speed hyperspectral video acquisition by combining nyquist and compressive sampling. IEEE Transactions Pattern Analysis and Machine Intelligence, 41(4):857-870, 2018. 8 +[52] L. Wang, Z. Xiong, G. Shi, F. Wu, and W. Zeng. Adaptive nonlocal sparse representation for dual-camera compressive hyperspectral imaging. IEEE Transactions Pattern Analysis and Machine Intelligence, 39(10):2104-2111, 2017. 1, 2, 5, 6 +[53] L. Wang, T. Zhang, Y. Fu, and H. Huang. Hyperreconnet: Joint coded aperture optimization and image reconstruction for compressive hyperspectral imaging. IEEE Transactions on Image Processing, 28(5):2257-2270, 2019. 2, 6 +[54] X. Wang, R. Girshick, A. Gupta, and K. He. Non-local neural networks. In IEEE Conference on Computer Vision and Pattern Recognition, pages 7794-7803, 2018. 1, 2 +[55] Y. Wang, J. Yang, W. Yin, and Y. Zhang. A new alternating minimization algorithm for total variation image reconstruction. SIAM Journal on Imaging Sciences, 1(3):248-272, 2008. 1, 2 +[56] Z. Wang, A. Bovik, H. Sheikh, and E. Simoncelli. Image quality assessment: from error visibility to structural similarity. IEEE Transactions on Image Processing, 13(4):600-612, 2004. 6 +[57] Z. Xiong, Z. Shi, H. Li, L. Wang, D. Liu, and F. Wu. Hscnn: Cnn-based hyperspectral image recovery from spectrally undersampled projections. In IEEE International Conference on Computer Vision Workshops, volume 2, 2017. 6 +[58] Z. Xiong, L. Wang, H. Li, D. Liu, and F. Wu. Snapshot hyperspectral light field imaging. In IEEE Conference on Computer Vision and Pattern Recognition, pages 3270-3278, 2017. 1 +[59] X. Yuan. Generalized alternating projection based total variation minimization for compressive sensing. In IEEE International Conference on Image Processing, pages 2539-2543. IEEE, 2016. 4 +[60] J. Zhang and B. Ghanem. Ista-net: Interpretable optimization-inspired deep network for image compressive sensing. In IEEE Conference on Computer Vision and Pattern Recognition, pages 1828-1837, 2018. 2, 4, 6, 7 +[61] K. Zhang, W. Zuo, S. Gu, and L. Zhang. Learning deep cnn denoiser prior for image restoration. In IEEE Conference + +on Computer Vision and Pattern Recognition, pages 2808-2817, 2017. 1, 2 +[62] S. Zhang, L. Wang, Y. Fu, X. Zhong, and H. Huang. Computational hyperspectral imaging based on dimension-discriminative low-rank tensor recovery. In International Conference on Computer Vision, pages 10183-10192, 2019, 2, 5 +[63] T. Zhang, Y. Fu, L. Wang, and H. Huang. Hyperspectral image reconstruction using deep external and internal learning. In International Conference on Computer Vision, pages 8559-8568, 2019. 2 \ No newline at end of file diff --git a/dnudeepnonlocalunrollingforcomputationalspectralimaging/images.zip b/dnudeepnonlocalunrollingforcomputationalspectralimaging/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..3d4ee22db34213030b01c052a6094e9c7277ba07 --- /dev/null +++ b/dnudeepnonlocalunrollingforcomputationalspectralimaging/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f074345ddc7a0d2deb4b21bfaf4b2ec14e6319615de36364a9a71d138d4e56c +size 583520 diff --git a/dnudeepnonlocalunrollingforcomputationalspectralimaging/layout.json b/dnudeepnonlocalunrollingforcomputationalspectralimaging/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6c313e8c825f5608b291ba6503e567f16e7dce0c --- /dev/null +++ b/dnudeepnonlocalunrollingforcomputationalspectralimaging/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:993d6976a65e7c8394032dd8f794435c4017c50fbfbf5bf00b8b6d0b44a9ab06 +size 466464 diff --git a/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/bf28e291-94a2-45eb-ae99-1fe2edd73c45_content_list.json b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/bf28e291-94a2-45eb-ae99-1fe2edd73c45_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..e6cc1759b183a00b3295c2c3269396408c275078 --- /dev/null +++ b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/bf28e291-94a2-45eb-ae99-1fe2edd73c45_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a34ea8907d6762110b6aba00480b4d1f42d89a9400006bba6167b21723a5abf4 +size 86785 diff --git a/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/bf28e291-94a2-45eb-ae99-1fe2edd73c45_model.json b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/bf28e291-94a2-45eb-ae99-1fe2edd73c45_model.json new file mode 100644 index 0000000000000000000000000000000000000000..f48b7a60912fe81f5e4ea58bff234d849b079ba3 --- /dev/null +++ b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/bf28e291-94a2-45eb-ae99-1fe2edd73c45_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8c16ab2d0e89d3669b48cbb7c93f516efe5bc3c655d616dd88dd4a800d9e37b +size 103359 diff --git a/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/bf28e291-94a2-45eb-ae99-1fe2edd73c45_origin.pdf b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/bf28e291-94a2-45eb-ae99-1fe2edd73c45_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9db750372567a99c67f95483aa5421512bc136d5 --- /dev/null +++ b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/bf28e291-94a2-45eb-ae99-1fe2edd73c45_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36d06419a11e7e0beef13f58fdbfd8ffb4953cacbff8c51b86ca6c143c641fcf +size 1100362 diff --git a/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/full.md b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/full.md new file mode 100644 index 0000000000000000000000000000000000000000..06ed063ca707a8b2536ea5fcc960403bf6e33d44 --- /dev/null +++ b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/full.md @@ -0,0 +1,407 @@ +# DOA-GAN: Dual-Order Attentive Generative Adversarial Network for Image Copy-move Forgery Detection and Localization + +Ashraful Islam1, Chengjiang Long2*, Arslan Basharat2, and Anthony Hoogs2 + +$^{1}$ Rensselaer Polytechnic Institute, Troy, NY + +$^{2}$ Kitware Inc., Clifton Park, NY + +islama6@rpi.edu, {chengjiang.long, arslan.basharat, anthony.hoogs}@kitware.com + +# Abstract + +Images can be manipulated for nefarious purposes to hide content or to duplicate certain objects through copy-move operations. Discovering a well-crafted copy-move forgery in images can be very challenging for both humans and machines; for example, an object on a uniform background can be replaced by an image patch of the same background. In this paper, we propose a Generative Adversarial Network with a dual-order attention model to detect and localize copy-move forgeries. In the generator, the first-order attention is designed to capture copy-move location information, and the second-order attention exploits more discriminative features for the patch co-occurrence. Both attention maps are extracted from the affinity matrix and are used to fuse location-aware and co-occurrence features for the final detection and localization branches of the network. The discriminator network is designed to further ensure more accurate localization results. To the best of our knowledge, we are the first to propose such a network architecture with the 1st-order attention mechanism from the affinity matrix. We have performed extensive experimental validation and our state-of-the-art results strongly demonstrate the efficacy of the proposed approach. + +# 1. Introduction + +The content of digital images can be easily manipulated or forged as there are many image editing tools like GIMP or Adobe Photoshop. Such manipulations can be done for nefarious purposes to either hide or duplicate an object or similar content in the original images. A copy-move image forgery refers to a type of image manipulation where a source region is copied to another location within the same image. As two real-world examples in Figure 1, copy-move image forgery could be used to add or hide some objects + +![](images/7a5ca5c8d16d6b670975f4710c811ff826a542093ca3d6c8e0eba3993a16111d.jpg) + +![](images/0724993e1e976f4bbd0149536a57caba97a38462c62b43f37b839d0d27ee0578.jpg) + +![](images/425764669ee2b80fe5bda8edc06c2ee509c4638e16ef92760a363a173cc2ad01.jpg) + +![](images/e1efc4d2f73ba56a5fee5743925d5decb279eae65a9ceb887b0ed8ef24bbee42.jpg) +Figure 1: Two examples of copy-move forgery with object cloning (top) and object removal (bottom). From left to right are original, forged, and ground-truth images. Our goal is to automatically detect and localize the source (green) and the target (red) regions in forged images. + +![](images/879c3b07ff60e10a1c9bb116696d865ad6cb0727b3b34fa58a19c488537fc3c2.jpg) + +![](images/8b9b106385ad50e6e3f5f40c7e245d06f0ce70eb87682e49ac2816ec6f3d3ccd.jpg) + +appearing a digital image, leading to a different interpretation. If such a manipulated image was part of a criminal investigation, without effective forensics tools the investigators could be misled. Therefore, it is crucial to develop a robust image forensic tool for copy-move detection and localization. + +A number of copy-move detection approaches are already available including various traditional patch/block-based methods [8, 32, 17], keypoint-based methods [49, 33], irregular region-based methods [19, 36], and a few recent deep learning approaches [44, 22, 46]. Although some copy-move detection methods have been able to generate reasonable localization result, but the results of these approaches are still far from perfect on some of the more challenging scenarios. As shown in Figure 1, it is very challenging to distinguish copy-moves from incidental similarities, which occur frequently. + +In this paper, we propose a dual-order attentive Generative Adversarial Network (DOA-GAN) for copy-move forgery detection and localization. As illustrated in Figure 2, the generator is an end-to-end unified framework based on a deep convolutional neural network. Given an input image, we calculate an affinity matrix based on the + +extracted feature vectors at every pixel. We design a dual-order attention module to produce the 1st-order attention map $A_{1}$ , which is able to explore the copy-move aware location information, and the 2nd-order attention map $A_{2}$ to capture more precise patch inter-dependency. The final feature representation is formulated with these two attention maps, and then fed into a detection branch to output a detection confidence score and a localization branch to produce a prediction mask in which the source region and target/forged region are distinguished. Meanwhile, the discriminator is designed to check whether the predicted mask is identical to ground-truth or not. + +Intuitively, the dual-order attention module is designed to first highlight all similar regions in the image, regardless of whether or not they are manipulated; and then differentiate non-manipulated, similar regions from copy-move (source and target) regions. Typically, source and target regions in copy-move forgeries are more pixel-wise similar than incidentally similar regions, even after transformations such as rotation and scaling. + +Our dual-order attention module is calculated based on the affinity matrix, which covers 2nd-order statistics of features and plays a critical role for more discriminative representation [20, 9]. This motivates us to exploit the second-order co-occurrence attention map $A_{2}$ for the fine-grained distinctions necessary to distinguish copy-move forgeries from incidental object and texture similarities. Also, we observed that the high values in off-diagonal elements indicate high likelihood for copy-move spatial relations between the patches. This observation inspired us to explore the 1st-order attention map $A_{1}$ to focus on the copy-move region aware feature representation. In this paper, we refine and normalize the affinity matrix, taking the top-k values for each column and reshape them to form a 3D tensor with k channels. The tensor is then fed into simple convolutions to formulate our final 1st-order attention map $A_{1}$ which is able to give more attention to the source and target region. To the best of our knowledge, we are the first to extract such a 1st-order attention map from the affinity matrix. + +We adopt the adversarial training process [13, 10, 43, 50] between the generator and the discriminator to generate a more accurate localization mask. As the number of epochs increases, both the generator and the discriminator improve their functionality so that the predicted mask iteratively becomes just like the ground-truth mask. Therefore, a sufficiently large number of epochs leads to convergence in training, and we use the learned parameters in the generator to output a detection confidence score and the predicted localization mask indicating source and target/forged regions. + +To summarize, our contributions are three-fold. (1) We propose a dual-order attentive Generative Adversarial Network for image copy-move forgery detection and localization. (2) Our 1st-order attention module is able to extract the + +copy-move location aware attention map and the 2nd-order attention module explores pixel-to-pixel inter-dependence. These two attention maps provide more discriminative feature representations for copy-move detection and localization. (3) Extensive experiments strongly demonstrate that the proposed DOA-GAN clearly outperforms state-of-the-art approaches in terms of both detection and localization quality on multiple benchmark datasets. + +# 2. Related work + +Copy-move forgery detection and localization. A typical copy-move forgery detection approach [8] is composed of three stages: feature vector extraction, correspondence matching from the feature representation, and post-processing to reduce false alarms and improve detection rates. Patch/block-based methods include chroma features [3, 8], PCA feature [17], Zernike moments [39], blur moments [31], DCT [32]; keypoint-based methods such as SIFT [1, 7, 49], ORB [51], triangles [2], SURF [33, 40], and irregular region-based methods [19, 36]. Many traditional copy-move detection algorithms rely on strong assumptions about specific image characteristics like edge sharpness and local features. However, such assumptions are not always satisfied in the forged images, since other transformations like compression, resampling, or geometric transformations may hide traces of the manipulation. + +Recently, deep neural networks (DNNs) have been applied to visual recognition [25, 16, 29, 28, 26, 27, 15], object detection and segmentation [14, 5, 30], as well as image and video forgery detection research [22, 14, 44, 29, 46, 24, 47, 4]. Especially, Wu et al. [46] introduced an end-to-end DNN solution to detect copy-move forged images with source/target localization with two separate branches. Unlike these DNN methods, our proposed DOA-GAN formulates both detection and localization as an end-to-end unified framework in the Generator network, where the 1st-order attention and the 2nd-order attention significantly improve the detection and localization performance. + +Attentive Generative Adversarial Networks. Attention mechanisms have been successfully used in Generative Adversarial Networks [10, 48, 37]. Unlike the existing attentive GANs, the dual-order attention module in our DOAGAN is dependent on the affinity matrix calculated from contextual feature representation. + +# 3. Method + +The framework of the proposed approach is illustrated in Figure 2. The generator is an end-to-end unified framework to conduct both copy-move manipulation detection and localization tasks. Given an input image $I$ , we first apply the first four blocks of a VGG-19 network to extract hierarchical features and resize them to the same size to form a + +![](images/a0bc8db73591e4fdfd91fd42360dac4e3ee8395fd191cbd252c5675e88f084bb.jpg) +Figure 2: The overview of DOA-GAN. The generator is an end-to-end unified framework to conduct both detection and localization tasks. The discriminator is designed to check whether the predicted mask is identical to ground-truth or not. + +concatenated feature $F_{cat}$ . Then an affinity matrix is calculated, and the 1st-order attention map $A_{1}$ and the 2nd-order attention map $A_{2}$ are obtained via a dual-order attention module. Two atrous spatial pyramid pooling (ASPP) operations, i.e., ASPP-1 and ASPP-2, with different parameters, are applied to extract contextual features $F_{aspp}^{1}$ and $F_{aspp}^{2}$ , which are multiplied element-wise with $A_{1}$ to get the possible copy-move regions attentive features $F_{attn}^{1}$ and $F_{attn}^{2}$ . $A_{2}$ is then used to obtain co-occurrence features $F_{cooc}^{1}$ and $F_{cooc}^{2}$ . Both region attentive features and co-occurrence features are fused for the detection branch to produce a detection output score and for the localization branch to generate a mask. The discriminator is designed to check whether the predicted mask is identical to the ground-truth or not. The alternative training between the generator and the discriminator is a key component of this approach and enables more accurate results. + +# 3.1. Generator Network + +Given an image $I \in \mathbb{R}^{H \times W \times 3}$ , we extract feature representations of the image by feeding it to the first three blocks of a VGG-19 as feature extractor and then resize the three hierarchical features to the same size to get the concatenated feature $F_{cat} \in \mathbb{R}^{h \times w \times d}$ . For time efficiency, we set $h = \frac{H}{8}$ , $w = \frac{W}{8}$ in this paper. After feature extraction, to explore the correlation between different parts of the image, we calculate the affinity matrix + +$$ +S = F _ {c a t} ^ {\prime} F _ {c a t} ^ {\prime T}, \tag {1} +$$ + +where $F_{cat}^{\prime}\in \mathbb{R}^{hw\times d}$ is a flattened matrix representation of $F_{cat}$ and represents $h\times w$ patches of the same size. + +The Dual-Order Attention Module is designed as shown in Figure 3 to extract the copy-move aware region attention map $A_{1}$ and the co-occurrence attention map $A_{2}$ . However, as we are calculating self-correlation of an image, $S$ will have higher values along the diagonal, as the diagonal values indicate the correlation of a part of the image with itself. To resolve this issue, we define an operation $G$ + +$$ +G (i, j, i ^ {\prime}, j ^ {\prime}) = 1 - \exp (\frac {(i - i ^ {\prime}) ^ {2} + (j - j ^ {\prime}) ^ {2}}{2 \sigma^ {2}}) \quad (2) +$$ + +![](images/f2c9a8b38438d76a027e0937a03106fb8a380904028478da1102712820ad74ec.jpg) +Figure 3: The dual-order attention module to obtain the copy-move region attention map $A_{1}$ and the co-occurrence attention map $A_{2}$ . + +and reshape it into $h w \times h w$ . $G$ reduces the correlation score between the same parts of the image using a Gaussian kernel. After that, we get the new affinity matrix $S' = S \odot G$ , where $\odot$ denotes the element-wise product. + +Leveraging the patch-matching strategy from [6], we calculate the likelihood that a patch in the $i$ -th row matches with a patch in the $j$ -th column in $S'$ by + +$$ +L ^ {r} (i, j) = \frac {\exp \left(\alpha S ^ {\prime} [ i , j ]\right)}{\sum_ {j ^ {\prime} = 1} ^ {h w} \exp \left(\alpha S ^ {\prime} [ i , j ^ {\prime} ]\right)}, \tag {3} +$$ + +$$ +L ^ {c} (i, j) = \frac {\exp \left(\alpha S ^ {\prime} [ i , j ]\right)}{\sum_ {i ^ {\prime} = 1} ^ {h w} \exp \left(\alpha S ^ {\prime} [ i ^ {\prime} , j ]\right)}, \tag {4} +$$ + +$$ +L (i, j) = L ^ {r} (i, j) L ^ {c} (i, j), \tag {5} +$$ + +where $\alpha$ is a trainable parameter that is initialized as 3. $L$ is the final affinity matrix. + +From $L \in \mathbb{R}^{hw \times hw}$ , we extract the top- $k$ values for each row, and reshape into $T \in \mathbb{R}^{h \times w \times k}$ . We feed $T$ into an attention module. The attention module consists of three convolution blocks. The first two blocks contain convolution layers with 16 output channels and kernel size 3, followed by BatchNorm and ReLU. The final block contains two consecutive convolution layers with 16 output channels and kernel size 3, and 1 output channel and kernel size 1, respectively. We finally apply a sigmoid function to obtain the spatial copy-move aware attention map $A_{1} \in \mathbb{R}^{h \times w}$ . As illustrated in Figure 4, the copy-move region attention map is generated by suppressing the background non-manipulated regions while highlighting the regions most likely involved in a copy-move manipulation. + +![](images/def06655f912a9a7fafa543fe03ace099b189cd9e0ac04fefb9e6fcc90468bd4.jpg) +Figure 4: Visualization of $A_{1}$ on two copy-move forgery images. + +![](images/5c479b3598dda326fca367e04c3d1395a7529a382521bdef5482d196f10e09da.jpg) + +![](images/76e15ce01ed7a6e4e2d38e93ce321796c5df978b882d0801777771c9d8a6faab.jpg) + +![](images/048144b222d2dd32c172c8da95f0dfe0e405a3e8c2d01fe7c65203a19bf8c23d.jpg) + +To make full use of the patch-to-patch inter-dependence, we normalize the affinity matrix in Equation 5 to obtain co-occurrence attention map $A_{2} \in \mathbb{R}^{hw \times hw}$ , + +$$ +A _ {2} (i, j) = \frac {L (i , j)}{\sum_ {j ^ {\prime} = 1} ^ {h w} L (i , j ^ {\prime})}. \tag {6} +$$ + +Atrous Spatial Pyramid Pooling (ASPP) Block is used to extract contextual feature from the extracted features $F_{cat}$ . ASPP block is utilized in DeepLab V3 [5] to capture context at several ranges for image segmentation. We found through experiments that two ASPP blocks are useful to learn two different tasks, namely source and target detection. The first ASPP block has atrous rates 12, 24 and 36, and the second block has atrous rates 6, 12 and 24. After the ASPP modules, we obtain two feature representations $F_{aspp}^{1} \in \mathbb{R}^{h \times w \times d_{s}}$ and $F_{aspp}^{2} \in \mathbb{R}^{h \times w \times d_{s}}$ . + +Feature Fusion is designed to merge both copy-move region aware attentive features and co-occurrence features for the detection and localization tasks. We multiply $F_{aspp}^{1}$ and $F_{aspp}^{2}$ with the spatial copy-move region aware attention map $A_{1}$ , and get + +$$ +F _ {a t t n} ^ {1} = F _ {a s s p} ^ {1} \odot A _ {1}, \tag {7} +$$ + +$$ +F _ {a t t n} ^ {2} = F _ {a s p p} ^ {2} \odot A _ {1}, \tag {8} +$$ + +where $\odot$ is the element-wise product operation. We also obtain the co-occurrence features + +$$ +F _ {c o o c} ^ {1} = A _ {2} \otimes F _ {a t t n} ^ {1}, \tag {9} +$$ + +$$ +F _ {c o o c} ^ {2} = A _ {2} \otimes F _ {a t t n} ^ {2}, \tag {10} +$$ + +where $\otimes$ is the matrix product operation. Such a treatment fully explores the inter-dependence between patches, and distant pixels are able to contribute to the feature response at a location based on similarity metrics. + +The final feature representation is merged based on the above four features and attention map $A_{1}$ , + +$$ +F _ {\text {f i n a l}} = \operatorname {M e r g e} \left(F _ {\text {a t t n}} ^ {1}, F _ {\text {a t t n}} ^ {2}, F _ {\text {c o o c}} ^ {1}, F _ {\text {c o o c}} ^ {2}, A _ {1}\right), \tag {11} +$$ + +where Merge is merge operation. In principle, any kind of merge operation can be used, we used concatenation in this paper. + +Detection Branch and Localization Branch. With the final representation $F_{final}$ , we design two convolution layers followed by two fully connected layers as the detection branch to output a detection score. At the same time, + +$F_{\text{final}}$ is fed into the localization branch, which consists of three convolution blocks, each followed by BatchNorm and ReLU, and a final convolution block of 3 channels to output the segmentation mask of pristine (background), source and target regions. + +# 3.2. Discriminator Network + +The structure of the discriminator is based on the PatchGAN discriminator [18]. Specifically, the discriminator is designed to predict whether each $N \times N$ patch in the image is real or fake. The discriminator is fully convolutional. It consists of five convolution blocks, each followed by BatchNorm and LeakyReLU, and a final convolution layer. The output channels of the consecutive convolution layers are 32, 64, 128, 256, 512, and 1, respectively, and the kernel size for all the convolution layers is $4 \times 4$ . The stride of the convolution layers is 2 except the last one, which has a stride of 1. Therefore, as the input image is passed through each convolution block, the spatial dimension is decreased by a factor of two, and finally we get an output feature of size $\frac{H}{2^5} \times \frac{W}{2^5} \times 1$ , where the spatial size of the input is $H \times W$ . The input to the discriminator network is the concatenation of the image $I \in \mathbb{R}^{H \times W \times 3}$ and mask $M \in \mathbb{R}^{H \times W \times 3}$ . The discriminator is trained to discern the ground-truth mask from the predicted mask, while the generator tries to fool the discriminator. + +# 3.3. Loss Functions + +The loss function is formulated with adversarial loss, cross-entropy loss, and detection loss as: + +$$ +\mathcal {L} = \mathcal {L} _ {\mathrm {a d v}} + \alpha \mathcal {L} _ {\mathrm {c e}} + \beta \mathcal {L} _ {\mathrm {d e t}}. \tag {12} +$$ + +Adversarial Loss $\mathcal{L}_{\mathrm{adv}}$ is defined as: + +$$ +\mathcal {L} _ {\mathrm {a d v}} (G, D) = E _ {(I, M)} \left[ \log (D (I, M)) + \log (1 - D (I, G (I)) \right], \tag {13} +$$ + +where the discriminator $D$ tries to maximize the objective, and the generator $G$ tries to minimize it, i.e., + +$$ +G ^ {*} = \arg \min _ {G} \max _ {D} \mathcal {L} _ {\mathrm {a d v}} (G, D). \tag {14} +$$ + +Cross-Entropy Loss $\mathcal{L}_{\mathrm{ce}}$ is expressed as: + +$$ +\mathcal {L} _ {\mathrm {c e}} = \frac {1}{H \times W \times 3} \sum_ {k = 1} ^ {3} \sum_ {i = 1} ^ {H} \sum_ {j = 1} ^ {W} M (i, j, k) \log \widehat {M} (i, j, k), \tag {15} +$$ + +where $\widehat{M} = G(I)$ is the predicted mask of the generator network, and $M$ is the ground-truth mask. + +Detection Loss $\mathcal{L}_{\mathrm{det}}$ is the binary cross-entropy loss between the image-level detection score from the detection branch and ground truth label, + +$$ +\mathcal {L} _ {\det } = y _ {\mathrm {i m}} \log \left(\hat {y} _ {\mathrm {i m}}\right) + \left(1 - y _ {\mathrm {i m}}\right) \log \left(1 - \hat {y} _ {\mathrm {i m}}\right), \tag {16} +$$ + +Table 1: The copy-move forgery localization results on the USC-ISI CMFD dataset using pixel-level precision, recall, and F1 score metrics for 3 classes: P, S, and T referring to Pristine, Source and Target, respectively. + +
MethodsPrecisionRecallF1
PSTPSTPST
BusterNet [46]93.7155.8553.8499.0138.2648.7396.1540.8448.33
ManTra-Net [47]93.508.6648.5399.222.2828.4396.082.9730.58
U-Net [38]91.6632.6747.1697.1619.0640.9094.8823.0944.15
NA-GAN95.8735.3059.3296.9141.6452.3295.4033.2555.94
FOA-GAN95.0652.8271.1797.2443.3262.0696.0443.4365.90
SOA-GAN95.5350.9470.2098.1740.8666.5897.8042.5067.19
DOA-GAN w/o ASPP-196.7161.0470.9498.8443.1366.6997.6745.0467.23
DOA-GAN w/o ASPP-296.0860.7065.2099.4339.1868.7697.6244.1365.41
DOA-GAN w/o Ladv95.8072.3083.6096.2760.3279.1096.0163.2580.45
DOA-GAN w/o Ldet97.3575.5883.9697.9864.1980.3197.5165.2181.08
DOA-GAN96.9976.3085.6098.8763.5780.4597.6966.5881.72
+ +where $y_{\mathrm{im}}$ is set to 1 if the image contains copy-move forgery, otherwise it is set to 0, and $\hat{y}_{\mathrm{im}}$ is the output from the detection branch. + +# 3.4. Implementation Details + +The feature extraction module is based on the first three blocks of the VGG-19 network pretrained on the ImageNet dataset. The ASPP blocks are based on those used in DeepLabV3+ [5]. We used $k = 20$ for the top-k value in the 1st attention block. + +We use two different learning rates for the generator and the discriminator networks, 0.001 and 0.0001, respectively, and the learning rate of the VGG-19 feature extractor is set to 0.0001. We decrease the learning rate by half when the training loss plateaus after 5 epochs. For training, we first optimize only the cross-entropy loss of the generator for 3 epochs, and then start optimizing all the losses. When the discriminator loss decreases to 0.3, we freeze the discriminator until the loss increases. This ensures that both the generator and the discriminator are learning at a similar pace, and the discriminator does not over-train. + +# 4. Experimental Results + +To study the effectiveness of the proposed DOA-GAN approach for copy-move forgery detection and localization, we conducted experiments on three benchmark datasets: the USC-ISI CMFD dataset [46], the CASIA CMFD dataset [46], and the CoMoFoD dataset [41]. + +The USC-ISI CMFD dataset has $80K$ , $10K$ , and $10K$ images for training, validation, and testing, respectively. The CASIA CMFD dataset contains 1,313 forged images and their authentic counterparts (in total 2,626 samples). The CoMoFoD dataset contains 5,000 forged images, with 200 base images and 25 manipulation categories covering 5 manipulations and 5 post-processing methods. + +For evaluation of detection and localization performance, we report image-level (for detection) and pixel-level + +(for localization) precision, recall, and F1 score metrics for 3 classes: Pristine (background), Source, and Target, by averaging the score of each image. The unit is $\%$ . + +# 4.1. Experiments on the USC-ISI CMFD dataset. + +We train DOA-GAN with 80,000 copy-move forged images from USC-ISI dataset and 80,000 pristine images, and evaluate on the 10,000 testing forged images and 10,000 pristine images. The pristine images are collected from COCO dataset [21]. We compare against BusterNet [46] as a baseline, because to the best of our knowledge, this is the only deep learning model that is able to distinguish between the copy-move source and target regions. To validate the effectiveness of the discriminator, we design several baselines, ManTra-Net [47], U-Net [38], DOA-GAN without any attention (denoted as NA-GAN), baselines using the 1st-order or 2nd-order attention only (denoted as FOA-GAN and SOA-GAN, respectively). We also created other baselines denoted as "DOA-GAN w/o $\mathcal{L}_{\mathrm{adv}}$ (equivalent to DOA-CNN), and "DOA-GAN w/o $\mathcal{L}_{\mathrm{det}}$ ", by removing the loss functions $\mathcal{L}_{\mathrm{adv}}$ , and $\mathcal{L}_{\mathrm{det}}$ in Equation 12, respectively. + +For pixel-level evaluation, we compute an average of precision, recall, and F1 score metrics for each image. As F1 score is ill-defined for pristine images, the testing images for pixel-level evaluation include only the forged images. For image-level evaluation, we use both forged images and non-forged images (total $20K$ images). We predict an image to be forged if the output score from detection branch is greater than 0.5, otherwise it is predicted to be non-forged. For BusterNet and DOA-GAN w/o $\mathcal{L}_{\mathrm{det}}$ , an image is considered forged if there are more than 200 pixels from the output mask predicted to be source or target regions. It is worth mentioning here that 200 pixels ( $< 0.2\%$ of the total pixels in an input image of the size $320 \times 320$ ) is found to be a reasonable trade-off between the false negatives and false positives. + +We have summarized the detection results in Table 2 and + +![](images/2eef6a5ae6ed145371dec3cd91de5bf3f84c2bafcd7f6b43b9b89e13bbc301f9.jpg) +Figure 5: Qualitative results on a sample from the USC-ISI CMFD dataset are shown. From left to right are input image; results of BusterNet [46], FOA-GAN, SOA-GAN, and DOA-GAN; and the ground truth mask, respectively. Note that the target region (as scaling transformation) is shown in red and the source region in green. + +![](images/8d5af4f78d0b5ffb560a001b87abe7aebc5e6bf834b39f01a2fb9918e0d5ff1f.jpg) + +![](images/0df5f5130fff58d6fc640b05592c326411ae3093c4f495d1f7c1425104bd24ff.jpg) + +![](images/2ed8ca17e09a2261df5721beca889c8326587c16222300340ffc9064a8a60046.jpg) + +![](images/a69cff6f427c3936a019a4e4bae43ac62f0b102d8f254b5dea5b6a71f2bb7c95.jpg) + +![](images/2f333e455fd6a4f9a80999e04e0e2f7785ee6e283ffb7518c8a0e37b6f4af614.jpg) + +the localization results in Table 1. A few interesting observations: (1) DOA-GAN w/o $\mathcal{L}_{\mathrm{adv}}$ performs better than BusterNet in terms of all the metrics, which clearly demonstrates promising performance for the generator in DOAGAN; (2) DOA-GAN works better than DOA-GAN w/o $\mathcal{L}_{\mathrm{adv}}$ overall in both detection and localization tasks, which demonstrates the efficacy of the discrimination ability from the discriminator in DOA-GAN, (3) The detection performance is worse in DOA-GAN w/o $\mathcal{L}_{\mathrm{det}}$ than that in DOAGAN, which demonstrates the efficacy of $\mathcal{L}_{\mathrm{det}}$ , (4) FOAGAN and SOA-GAN perform worse than the DOA-GAN in all metrics except F1 score of pristine pixels, which suggests the 1st-order and the 2nd-order attentions are complementary to each other to improve the performance on the copy-move forgery detection and localization, and (5) U-Net and NA-GAN baselines perform much worse than DOA-GAN, SOA-GAN, and FOA-GAN, especially in localization of source mask, which demonstrates the efficacy of affinity computation. This indirectly verifies the effectiveness of our dual-order attention module. To further un + +Table 2: Detection results on the USC-ISI CMFD dataset. + +
MethodsPrecisionRecallF1
BusterNet [46]89.2680.1484.45
ManTra-Net [47]68.7285.8276.32
U-Net [38]82.6166.1373.46
NA-GAN80.1985.6482.82
FOA-GAN94.1394.5494.33
SOA-GAN95.5092.3093.87
DOA-GAN w/o ASPP-195.1193.1394.10
DOA-GAN w/o ASPP-292.9791.7592.35
DOA-GNN w/o Ladv95.4593.0994.25
DOA-GAN w/o Ldet90.3194.7892.49
DOA-GAN96.8396.1496.48
+ +understand the advantage of the DOA-GAN approach, we also provide some visualization results in Figure 5. As we can see, our DOA-GAN is able to generate more accurate masks than BusterNet, our FOA-GAN, and our FOA-GAN. + +# 4.2. Experiments on the CASIA CMFD dataset. + +Unlike the USC-ISI CMFD data, the CASIA CMFD dataset does not provide both ground-truth masks distinguishing source and target. It is more challenging because some uniform background is copied and pasted to the other + +background. To evaluate the proposed DOA-GAN on this dataset, we modified our network by replacing the final convolution layer of our network to a convolution layer of 1 channel output to get the mask of both copy and source parts as a single channel output. We train our model on the USC-ISI CMFD dataset and MS COCO dataset. For fair comparison, we do the same operation on BusterNet. In addition, we compare with four traditional copy-move forgery detection methods1, i.e., a block-based CMFD with Zernike moment features (denoted as "Block-ZM") [39], an adaptive segmentation based CMFD (denoted as "AdaptiveSeg") [36], a discrete cosine transform (DCT) coefficients based CMFD (denoted as "DCT-Match") [12], and a dense field-based CMFD (denoted as "DenseField") [8]. We evaluate the pixel-level performance by computing precision, recall, and F1 score metrics for each positive image where there is copy-move forgery, and report the final average. For image-level detection, we predict an image to contain forgery whenever there are more than 200 forged pixels in the output mask. We use both positive images and their authentic counterparts for image-level detection. All the images are resized to $320 \times 320$ before feeding into the models. + +Table 3 shows performance comparisons with other baselines on CASIA CMFD dataset. As we can see, our proposed DOA-GAN performs the best in terms of all metrics except the precision in detection. This strongly demonstrates the promising advantages of our proposed method. Note that the result on BusterNet is different from the results reported in [46], as in the original BusterNet, the manipulation branch was trained on external image manipulation datasets, whereas, for fair comparison, we train both our model and BusterNet only on the above-mentioned copy-move datasets. + +Figure 6 provides a visualization result that shows the proposed DOA-GAN is able to detect more accurate masks than DenseField and BusterNet for the copy-move forgery manipulation. + +# 4.3. Experiments on the CoMoFoD dataset. + +We also evaluated the performance on the CoMoFoD dataset and report results in Table 4. Again, DOA-GAN + +![](images/6afcdc5facaf9d497e096ee943a57bc4c261d5c8c3cb9f2f097a2845c9fcfcdb.jpg) +Figure 6: Visualization examples on the CASIA CMFD dataset. From left to right are the input image; results of Adaptive-Seg [36], DenseField [8], BusterNet [46], and our DOA-GAN; and the ground truth mask. + +![](images/d33438bddccb00e657e083b9802caf7fdb406a8ff5d457f88ff505cd0c9bc237.jpg) + +![](images/ea383814a25622d0f543c61b195a87bf86dd40f03dfb08b9a799ba82bf74de61.jpg) + +![](images/30f0902c00c8672a9c2e55505c0059e392fdc4c74bbe74719fec9f60d3374727.jpg) + +![](images/bece9c8365a307365742f65d7154f5c9592be2f104aca92901dc569b88cb5a2f.jpg) + +![](images/d916a3c7cade2895ad89bd1683a096b07b4d12c9530f3edd781abdd39a88beae.jpg) + +![](images/63105abe22b772fa7bd4e781e6a8abc4b27e73f45da7f538c4cf29ae32bbc13c.jpg) +Figure 7: Visualization examples on the CoMoFoD dataset. From left to right are the input image; results of AdaptiveSeg [36], DenseField [8], BusterNet [46], and our DOA-GAN; and the ground truth mask. + +![](images/acead7a3deec7ad07f0d6c42cc0a87ec47a3152d05e743cd2ceecc7e8fe09931.jpg) + +![](images/779c8fde2ea562d4a88b4cdd89a1fd1677efc7ba79422a7e7247b842a348e259.jpg) + +![](images/299cca49323350acac8732daab43417e845fbdf39608f262f57bf5d07bc15c9a.jpg) + +![](images/938095d55eb442763dd4f977d0157a3de37e8a213fd896e93ad8ead2ac3bc902.jpg) + +![](images/d1b63b9cb296bbb7280fa204a864b87242cd41bfcf773cf25988a90d2ca13be3.jpg) + +Table 3: The performance on the CASIA CMFD dataset. + +
MethodsYearPrecisionRecallF1
DetBlock-ZM201068.9753.6960.38
DCT-Match201263.7446.3153.46
Adaptive-Seg201593.0725.5940.14
DenseFiled201599.5130.6146.82
BusterNet201848.3475.1258.82
DOA-GAN201963.3977.0069.53
LocBlock-ZM201010.093.013.30
DCT-Match20128.801.902.40
Adaptive-Seg201523.175.147.42
DenseField201520.5520.9120.36
BusterNet201842.1530.5433.72
DOA-GAN201954.7039.6741.44
+ +achieves the best performance except the precision in detection and localization. Note that different types of transformations are applied in this dataset to create copy-move manipulated images, e.g., translation, rotation, scaling, combination, and distortion. Various post-processing methods, such as JPEG compression, blurring, noise adding, and color reduction, are also applied to all forged and original images. + +Taking each post-processing method as a specific attack, we use this dataset to further analyze the effects of our proposed DOA-GAN under different attacks. + +We provide a visualization example in Figure 7. Figure 9 shows the number of correctly detected images on CoMo- FoD dataset under different types of attacks, where an image is correctly detected if its pixel-level F1 score is greater than $30\%$ . Figure 8 shows F1 scores for all attacks. From these two figures, we can see that DOA-GAN is robust and consistently performs the best under all types of attacks. + +Table 4: The performance on the CoMoFoD dataset. + +
MethodsYearPrecisionRecallF1
DetBlock-ZM201051.7220.8729.74
DCT-Match201250.4829.7737.46
Adaptive-Seg201565.6643.3752.24
DenseField201580.3420.1032.15
BusterNet201853.2057.4155.22
DOA-GAN201960.3865.9863.05
LocBlock-ZM20102.902.501.73
DCT-Match20123.533.412.03
Adaptive-Seg201523.0213.2713.46
DenseField201522.2323.6322.60
BusterNet201851.2528.2035.34
DOA-GAN201948.4237.8436.92
+ +# 4.4. Discussion + +DOA-GAN is able to use the copy-move region attention to extract manipulation attentive features, as well as the co-occurrence feature with patch-to-patch interdependence taken into consideration. However, when the copy region is just extracted from the uniform background and pasted on the same background, it may fail. It also might fail when the scale has been changed significantly. We provide two failure cases in Figure 10. As we see, the backgrounds for the first example are uniform, and the scale of the copy-move regions are very small in the second example. + +# 5. Extension to Other Manipulation Types + +Note that DOA-GAN is based on an affinity matrix calculated on the same image. It is easy to extend it to an affinity matrix calculated from two different images, i.e., donor image and probe image, and the corresponding manipulation types include image splicing and video copy-move. + +For image splicing manipulation, we train DOA-GAN, + +![](images/14b921c832146d2c0181ecaa1d12cb0e768a40e57da46a821211055df2ce35cf.jpg) + +![](images/b58e4de121d84171471788c59f97ae607753d7a845379b2d42969208e32c0f83.jpg) +Figure 8: F1 scores on the CoMoFoD dataset under attacks. + +![](images/36e1fbdd243660e6f060d85582e21564d571ecc7ca3a4c4d8aa5f8887377dc82.jpg) + +![](images/2d8da09742ff2f8fdf55e24527b3646298a17b0552d5cd202adba0711ba98758.jpg) + +![](images/cd8ee5797b2e3f42c4f7d560bc1f44c6385bb27f48216684187fb63b488fea6d.jpg) + +![](images/d71fdb08415fe412dc887c04db446f3a455b7d846310965b015e18d54df60d23.jpg) + +![](images/27db1052a31c4649f1bb1a4e51c268df8f847e9908698e72ee2a6f2d791dadaa.jpg) +Figure 9: Number of correctly detected images on the CoMoFoD dataset under attacks. The total number of images for each attack is mentioned beside the name of the attack. + +![](images/fe55b70adb29526abf70a8d7f6e243e3d23810777e864512a77edb0f3486e7ed.jpg) +Figure 10: Examples of failure cases. From left to right - input image, our result, and ground truth. + +and the two state-of-the-art approaches, DMVN [45] and DMAC [23], on the same synthetic image splicing dataset following the generation process in [23] and then evaluate on the generated dataset from MS-COCO consisting of 42,093 testing image pairs. The results in Table 5 demonstrate DOA-GAN's superiority in splicing localization. + +For video copy-move manipulation, which can be considered as a inter-frame splicing between two consecutive frame sequences in a video. We evaluate our DOAGAN's performance on the video copy-move datasets generated from video object segmentation datasets including DAVIS [34], SegTrackV2 [42] and Youtube-object [35], and summarize the results in Table 6. Again, the proposed DOA-GAN still works the best. + +Note that due to page limit, we cannot provide sufficient technical details about extending DOA-GAN for image splicing and video copy-move. For more details of technical details, please refer to the supplementary. + +Table 5: Performance comparison of image splicing localization on the generated dataset from MS-COCO. + +
MethodSourceTarget
IoUF1MCCIoUF1MCC
DMVN [45]37.248.432.342.053.536.7
DMAC [23]76.581.276.785.690.085.2
DOA-GAN86.491.086.292.495.491.8
+ +Table 6: Performance Comparison on the generated video CMFD dataset in terms of pixel-level F1 score and IoU. Here, S, and T, and A denote Source mask, Target mask, and source-target Agnostic mask, respectively. + +
MethodF1 ScoreIoU
STASTA
PatchMatch [11]--11.7--9.8
DMVN [45]27.233.837.220.525.7627.3
DMAC [23]39.539.045.231.130.535.3
DOA-GAN62.962.365.050.749.653.3
+ +# 6. Conclusion and Future Work + +In this paper, we propose a dual-order attentive Generative Adversarial Network (DOA-GAN) for copy-move forgery detection and localization. The dual-order attention module is designed in the generator to extract the manipulation location aware attention map and the underlying co-occurrence relations among patches. The discriminator is to further confirm the accuracy of the prediction masks. The proposed DOA-GAN has empirically shown to produce more accurate copy-move masks and better distinguish copy-move target regions from source regions, as compared to the previous state-of-the-art. Our future work includes extending the current work to identify image-level forgery in satellite images and solve other challenging vision tasks like co-saliency detection and localization. + +# Acknowledgement + +This research was developed with funding from the Defense Advanced Research Projects Agency (DARPA) under Contract No.FA875016-C-0166. The views, opinions and/or findings expressed are those of the authors and should not be interpreted as representing the official views or policies of the Department of Defense or the U.S. Government. + +# References + +[1] Irene Amerini, Lamberto Ballan, Roberto Caldelli, Alberto Del Bimbo, and Giuseppe Serra. A SIFT-based forensic method for copy-move attack detection and transformation recovery. TIFS, 6(3):1099-1110, 2011. +[2] Edoardo Ardizzone, Alessandro Bruno, and Giuseppe Mazzola. Copy-move forgery detection by matching triangles of keypoints. TIFS, 10(10):2084-2094, 2015. +[3] Sevinc Bayram, Husrev Taha Sencar, and Nasir Memon. An efficient and robust method for detecting copy-move forgery. In ICASSP, 2009. +[4] Xiuli Bi, Yang Wei, Bin Xiao, and Weisheng Li. RRU-Net: The ringed residual U-Net for image splicing forgery detection. In CVPRW, 2019. +[5] Liang-Chieh Chen, George Papandreou, Florian Schroff, and Hartwig Adam. Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587, 2017. +[6] Jiaxin Cheng, Yue Wu, Wael Abd-Almageed, and Premkumar Natarajan. QATM: Quality-aware template matching for deep learning. In CVPR, 2019. +[7] Andrea Costanzo, Irene Amerini, Roberto Caldelli, and Mauro Barni. Forensic analysis of SIFT keypoint removal and injection. TIFS, 9(9):1450-1464, 2014. +[8] Davide Cozzolino, Giovanni Poggi, and Luisa Verdoliva. Efficient dense-field copy-move forgery detection. TIFS, 10(11):2284-2297, 2015. +[9] Tao Dai, Jianrui Cai, Yongbing Zhang, Shu-Tao Xia, and Lei Zhang. Second-order attention network for single image super-resolution. In CVPR, 2019. +[10] Bin Ding, Chengjiang Long, Ling Zhang, and Chunxia Xiao. Argan: Attentive recurrent generative adversarial network for shadow detection and removal. In ICCV, 2019. +[11] Luca D'Amiano, Davide Cozzolino, Giovanni Poggi, and Luisa Verdoliva. A patchmatch-based dense-field algorithm for video copy-move detection and localization. TCSVT, 29(3):669-682, 2018. +[12] A Jessica Fridrich, B David Soukal, and A Jan Lukáš. Detection of copy-move forgery in digital images. In in Proceedings of Digital Forensic Research Workshop. Citeseer, 2003. +[13] 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. + +[14] Xintong Han, Vlad Morariu, Peng IS Larry Davis, et al. Two-stream neural networks for tampered face detection. In CVPRW, 2017. +[15] Gang Hua, Chengjiang Long, Ming Yang, and Yan Gao. Collaborative active learning of a kernel machine ensemble for recognition. In ICCV, 2013. +[16] Gang Hua, Chengjiang Long, Ming Yang, and Yan Gao. Collaborative active visual recognition from crowds: A distributed ensemble approach. T-PAMI, 40(3):582-594, 2018. +[17] Deng-Yuan Huang, Ching-Ning Huang, Wu-Chih Hu, and Chih-Hung Chou. Robustness of copy-move forgery detection under high JPEG compression artifacts. Multimedia Tools and Applications, 76(1):1509-1530, 2017. +[18] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017. +[19] Jian Li, Xiaolong Li, Bin Yang, and Xingming Sun. Segmentation-based image copy-move forgery detection scheme. TIFS, 10(3):507-518, 2014. +[20] Peihua Li, Jiangtao Xie, Qilong Wang, and Wangmeng Zuo. Is second-order information helpful for large-scale visual recognition? In ICCV, 2017. +[21] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dólár, and C Lawrence Zitnick. Microsoft COCO: Common objects in context. In ECCV, 2014. +[22] Yaqi Liu, Qingxiao Guan, and Xianfeng Zhao. Copymove forgery detection based on convolutional kernel network. Multimedia Tools and Applications, 77(14):18269-18293, 2018. +[23] Yaqi Liu, Xianfeng Zhao, Xiaobin Zhu, and Yun Cao. Adversarial learning for image forensics deep matching with atrous convolution. arXiv preprint arXiv:1809.02791, 2018. +[24] Chengjiang Long, Arslan Basharat, , and Anthony Hoogs. A coarse-to-fine deep convolutional neural network framework for frame duplication detection and localization in forged videos. In CVPRW, 2019. +[25] Chengjiang Long, Roddy Collins, Eran Swears, and Anthony Hoogs. Deep neural networks in fully connected crf for image labeling with social network metadata. In WACV, 2019. +[26] Chengjiang Long and Gang Hua. Multi-class multi-annotator active learning with robust gaussian process for visual recognition. In ICCV, 2015. +[27] Chengjiang Long, Gang Hua, and Ashish Kapoor. Active visual recognition with expertise estimation in crowdsourcing. In ICCV, 2013. + +[28] Chengjiang Long, Gang Hua, and Ashish Kapoor. A joint gaussian process model for active visual recognition with expertise estimation in crowdsourcing. IJCV, 116(2):136-160, 2016. +[29] Chengjiang Long, Eric Smith, Arslan Basharat, and Anthony Hoogs. A c3d-based convolutional neural network for frame dropping detection in a single video shot. In CVPRW, 2017. +[30] Chengjiang Long, Xiaoyu Wang, Gang Hua, Ming Yang, and Yuanqing Lin. Accurate object detection with location relaxation and regionlets re-localization. In ACCV, 2014. +[31] Babak Mahdian and Stanislav Saic. Detection of copy-move forgery using a method based on blur moment invariants. *Forensic science international*, 171(2-3):180-189, 2007. +[32] Toqueer Mahmood, Tabassam Nawaz, Ain Irtaza, Rehan Ashraf, Mohsin Shah, and Muhammad Tariq Mahmood. Copy-move forgery detection technique for forensic analysis in digital images. Mathematical Problems in Engineering, 2016, 2016. +[33] VT Manu and Babu M Mehre. Detection of copy-move forgery in images using segmentation and SURF. In NeurIPS. 2016. +[34] Federico Perazzi, Jordi Pont-Tuset, Brian McWilliams, Luc Van Gool, Markus Gross, and Alexander Sorkine-Hornung. A benchmark dataset and evaluation methodology for video object segmentation. In CVPR, 2016. +[35] Alessandro Prest, Christian Leistner, Javier Civera, Cordelia Schmid, and Vittorio Ferrari. Learning object class detectors from weakly annotated video. In CVPR, 2012. +[36] Chi-Man Pun, Xiao-Chen Yuan, and Xiu-Li Bi. Image forgery detection using adaptive oversegmentation and feature point matching. TIFS, 10(8):1705-1716, 2015. +[37] Rui Qian, Robby T Tan, Wenhan Yang, Jiajun Su, and Jiaying Liu. Attentive generative adversarial network for raindrop removal from a single image. In CVPR, 2018. +[38] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015. +[39] Seung-Jin Ryu, Min-Jeong Lee, and Heung-Kyu Lee. Detection of copy-rotate-move forgery using Zernike moments. In International workshop on information hiding, 2010. +[40] Ewerton Silva, Tiago Carvalho, Anselmo Ferreira, and Anderson Rocha. Going deeper into copy-move + +forgery detection: Exploring image telltales via multiscale analysis and voting processes. JVCIR, 29:16-32, 2015. +[41] Dijana Tralic, Ivan Zupancic, Sonja Grgic, and Mislav Grgic. CoMoFoD-new database for copy-move forgery detection. In ELMAR, 2013. +[42] David Tsai, Matthew Flagg, and James M.Rehg. Motion coherent tracking with multi-label mrf optimization. BMVC, 2010. +[43] Jinjiang Wei, Chengjiang Long, Hua Zou, and Chunxia Xiao. Shadow inpainting and removal using generative adversarial networks with slice convolutions. CGF, 38(7):381-392, 2019. +[44] Yue Wu, Wael Abd-Almageed, and Prem Natarajan. Deep matching and validation network: An end-to-end solution to constrained image splicing localization and detection. In ACM MM, 2017. +[45] Yue Wu, Wael Abd-Almageed, and Prem Natarajan. Deep matching and validation network: An end-to-end solution to constrained image splicing localization and detection. In ACM MM, 2017. +[46] Yue Wu, Wael Abd-Almageed, and Prem Natarajan. BusterNet: Detecting copy-move image forgery with source/target localization. In ECCV, 2018. +[47] Yue Wu, Wael Abd-Almageed, and Premkumar Natarajan. ManTra-Net: Manipulation tracing network for detection and localization of image forgeries with anomalous features. In CVPR, 2019. +[48] Tao Xu, Pengchuan Zhang, Qiuyuan Huang, Han Zhang, Zhe Gan, Xiaolei Huang, and Xiaodong He. AttnGAN: Fine-grained text to image generation with attentional generative adversarial networks. In CVPR, pages 1316-1324, 2018. +[49] Bin Yang, Xingming Sun, Honglei Guo, Zhihua Xia, and Xianyi Chen. A copy-move forgery detection method based on CMFD-SIFT. Multimedia Tools and Applications, 77(1):837-855, 2018. +[50] Ling Zhang, Chengjiang Long, Xiaolong Zhang, and Chunxia Xiao. Ris-gan: Explore residual and illumination with generative adversarial networks for shadow removal. In AAAI, 2020. +[51] Ye Zhu, Xuanjing Shen, and Haipeng Chen. Copy-move forgery detection based on scaled ORB. Multimedia Tools and Applications, 75(6):3221-3233, 2016. \ No newline at end of file diff --git a/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/images.zip b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..06a85dab0c1a9c825179f0f99643926896b23f33 --- /dev/null +++ b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06439c14737b2a34a670cacfdfe687f39ab753126135d768de2ef741afb7bed5 +size 815839 diff --git a/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/layout.json b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2cd938109fd1a56246fd5dd5b31fd1a5d08c3fbd --- /dev/null +++ b/doagandualorderattentivegenerativeadversarialnetworkforimagecopymoveforgerydetectionandlocalization/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:279e85fa11bbf7bb25d61736d57b8bf265b07f09481911b8577825e9ef3a3d66 +size 444809 diff --git a/dopslearningtodetect3dobjectsandpredicttheir3dshapes/c87b83d7-7019-4078-a795-d5ce62c4c35e_content_list.json b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/c87b83d7-7019-4078-a795-d5ce62c4c35e_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..a8a8c17e8d80892305078a1cda8fbc31b7a259ff --- /dev/null +++ b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/c87b83d7-7019-4078-a795-d5ce62c4c35e_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a5c560ff2b0960fb13999964d5fdc41277cedcf6a2892a70a816acebdb49b14 +size 70315 diff --git a/dopslearningtodetect3dobjectsandpredicttheir3dshapes/c87b83d7-7019-4078-a795-d5ce62c4c35e_model.json b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/c87b83d7-7019-4078-a795-d5ce62c4c35e_model.json new file mode 100644 index 0000000000000000000000000000000000000000..96b0a8b3e78d62462847157b3213e7c57f071637 --- /dev/null +++ b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/c87b83d7-7019-4078-a795-d5ce62c4c35e_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ecd99ba07da815d5b4b3d070afe41f8e1eb62a310df350c81749bfa20b48b95 +size 86130 diff --git a/dopslearningtodetect3dobjectsandpredicttheir3dshapes/c87b83d7-7019-4078-a795-d5ce62c4c35e_origin.pdf b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/c87b83d7-7019-4078-a795-d5ce62c4c35e_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d62cd24e6145968362c7d92ed8affe3bac35ba06 --- /dev/null +++ b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/c87b83d7-7019-4078-a795-d5ce62c4c35e_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d320e14d6e402eae830e541571a7776fb0b8901170c45216c3c4d7d6d6411b6 +size 1615464 diff --git a/dopslearningtodetect3dobjectsandpredicttheir3dshapes/full.md b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/full.md new file mode 100644 index 0000000000000000000000000000000000000000..114b896bd65ae9489aa29f4b03b77eac1119d942 --- /dev/null +++ b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/full.md @@ -0,0 +1,269 @@ +# DOPS: Learning to Detect 3D Objects and Predict their 3D Shapes + +Mahyar Najibi1 Guangda Lai2 Abhijit Kundu2 Zhichao Lu2 Vivek Rathod2 Thomas Funkhouser2 Caroline Pantofaru2 David Ross2 Larry S. Davis1 Alireza Fathi2 + +1University of Maryland 2Google + +# Abstract + +We propose DOPS, a fast single-stage 3D object detection method for LIDAR data. Previous methods often make domain-specific design decisions, for example projecting points into a bird-eye view image in autonomous driving scenarios. In contrast, we propose a general-purpose method that works on both indoor and outdoor scenes. The core novelty of our method is a fast, single-pass architecture that both detects objects in 3D and estimates their shapes. 3D bounding box parameters are estimated in one pass for every point, aggregated through graph convolutions, and fed into a branch of the network that predicts latent codes representing the shape of each detected object. The latent shape space and shape decoder are learned on a synthetic dataset and then used as supervision for the end-to-end training of the 3D object detection pipeline. Thus our model is able to extract shapes without access to ground-truth shape information in the target dataset. During experiments, we find that our proposed method achieves state-of-the-art results by $\sim 5\%$ on object detection in ScanNet scenes, and it gets top results by $3.4\%$ in the Waymo Open Dataset, while reproducing the shapes of detected cars. + +# 1. Introduction + +There has been great progress in recent years on 3D object detection for robotics and autonomous driving applications. Previous work on 3D object detection takes one of these following approaches: (a) projecting LIDAR points to 2D bird's-eye view and performing 2D detection on the projected image, (b) performing 2D detection on images and using a frustum to overlap that with the point cloud, or (c) using a two-stage approach where points are first grouped together and then an object is predicted for each group. + +Each of these approaches come with their own drawbacks. Projecting LIDAR to a bird's-eye view image sacrifices geometric details which may be critical in cluttered indoor environments. The frustum based approaches are strictly dependent on the 2D detector and will miss an ob + +![](images/ba2bf6e022662d5e916c07f01bad074c375cf190d71b407024bcb3ae289d2983.jpg) +Figure 1: A sample output of our object detection pipeline. + +ject entirely if it is not detected in 2D. Finally, the two-stage methods introduce additional hyperparameters and design choices which require tuning and adapting for each domain separately. Furthermore, we believe grouping the points is a harder task than predicting 3D objects. Solving the former to predict the latter will result in an unnecessary upper-bound that limits the accuracy of 3D object detection. + +In this paper, we propose a single-stage 3D object detection method that outperforms previous approaches. We predict 3D object properties for every point while allowing the information to flow in the 3D adjacency graph of predictions. This way, we do not make hard grouping decisions while at the same time let the information to propagate from each point to its neighborhood. + +In addition to predicting 3D bounding boxes, our pipeline can also output the reconstructed 3D object shapes as depicted in Figure 1. Even though there have been various approaches proposed for predicting 3D bounding boxes, predicting the 3D shapes and extents of objects remains largely under-explored. The main challenges in predicting the 3D shapes of objects are sparsity in LIDAR scans, predominant partial occlusion, and lack of ground-truth 3D shape annotations. In this work, we address these challenges by proposing a novel weakly-supervised approach. + +Our proposed solution for shape prediction consists of two steps. First, we learn 3D object shape priors using an external 3D CAD-model dataset by training an encoder that maps an object shape into an embedding representation and + +a decoder that recovers the 3D shape of an object given its embedding vector. Then, we augment our 3D object detection network to predict a shape embedding for each object such that its corresponding decoded shape best fits the points observed on the surface of that object. Using this as an additional constraint, we train a network that learns to detect objects, predict their semantic labels, and their 3D shapes. + +To summarize, our main contributions are as follows. First, we propose a single-stage 3D object detection method that achieves state-of-the-art results on both indoor and outdoor point cloud datasets. While previous methods often make certain design choices (e.g. projection to a bird-eye view image) based on the problem domain, we show the possibility of having a generic pipeline that aggregates per-point predictions with graph convolutions. By forming better consensus predictions in an end-to-end hybrid network, our approach outperforms previous works in both indoor and outdoor settings while running at a speed of $12\mathrm{ms}$ per frame. Second, in addition to 3D bounding boxes, our model is also able to jointly predict the 3D shapes of the objects efficiently. Third, we introduce a training approach that does not require ground-truth 3D shape annotations in the target dataset (which is not available in large-scale self-driving car datasets). Instead, our method learns a shape prior from a dataset of CAD models and transfers that knowledge to the real-world self-driving car setup. + +# 2. Related Works + +# 2.1. 3D Object Detection + +3D object detection has been studied extensively. In this paper, we focus on applications such as autonomous driving, where the input is a collection of 3D points captured by a LIDAR range sensor. Processing this type of data using neural networks introduces new challenges. Most notably, unlike images, the input is highly sparse, making it inefficient to uniformly process all locations in the 3D space. + +To deal with this problem, PointNet [30, 31] directly consumes the 3D coordinates of the sparse points and processes the point cloud as a set of unordered points. FoldingNet [40], AtlasNet [12], 3D Point Capsule Net [44], and PointWeb [43] improve the representation by incorporating the spatial relationships among the points into the encoding process. For the task of 3D object detection, various methods rely on PointNets for processing the point cloud data. To name a few, Frustum PointNets [29] uses these networks for the final refinement of the object proposals and PointR-CNN [33] employs PointNets for the task of proposal generation. VoteNet [28] deploys PointNet++ to directly predict bounding boxes from points in a two-stage voting scheme. + +Projecting the point cloud data to a 2D space and using 2D convolutions is an alternative approach for reducing + +the computation. Bird's-eye view (BEV), front view, native range view, and learned projections are among such 2D projections. FIXOR [39], Complex YOLO [35], and Com-plexer YOLO [34] generate 3D bounding boxes in a single stage based on the projected BEV representation. Chen et al. [3] and Liang et al. [20] use a BEV representation and fuse its extracted information with RGB images to improve the detection performance. VeloFCN [18] projects the points to the front view and uses 2D convolutions for 3D bounding box generation. Recently, LaserNet [25] shows that it is possible to achieve state-of-the-art results while processing the more compact native range view representation. PointPillars [17], on the other hand, learns this 2D projection by training a PointNet to summarize the information of points that lie inside vertical pillars in the 3D space. + +Voxelization followed by 3D convolutions is also applied to point cloud-based object detection [46]. However, 3D convolution is computationally expensive, especially when the input has a high spatial resolution. Sparse 3D convolution [7, 9, 10] is shown to be effective in solving this problem. Our backbone in this paper uses voxelization with sparse convolutions to process the point cloud. + +Modeling auxiliary tasks is also studied in the literature. Fast and Furious [22] performs detection, tracking, and motion forecasting using a single network. HDNET [38] estimates high-definition maps from LIDAR sweeps and uses the geometric features to improve 3D detection. Liang et al. [19] performs 2D detection, 3D detection, ground estimation, and depth completion. Likewise, our system predicts the 3D shape of the objects from incomplete point clouds besides detecting the objects. + +# 2.2. 3D Shape Prediction for Object Detection + +For 3D object detection from images, 3D-RCNN [15] recovers the 3D shape of the objects by estimating the pose of known shapes. A render and compare loss with 2D segmentation annotation is used as supervision. Instead of using known shapes, Mesh R-CNN [8] first predicts a coarse voxelized shape followed by a refinement step. The 3D ground-truth information is assumed to be given. For semantic segmentation, [16] improved the generalization of unseen categories by estimating the shape of the detected objects. For 3D detection, GSPN [42] learns a generative model to predict 3D points on objects and uses them for proposal generation. ROI-10D [23] annotates ground-truth shapes offline and adds a new branch for shape prediction. In contrast, our approach does not need 3D shape ground-truth annotations in the target dataset. We use the recently proposed explicit shape modeling [27, 24, 32] to learn a function for representing a shape prior. This prior is then used as a weakly supervised signal when training the shape prediction branch on the target dataset. + +![](images/c89b7e3fc8228900100426366e1a9da2a5222cac8aa9a1fbf1785bbeff8bc69a.jpg) +Figure 2: Object Detection Pipeline. After voxelization, a 3D sparse U-Net [11] is used to extract features from each voxel. Then two blocks of sparse convolutions predict object properties per voxel. These features are then propagated back to the points and passed through a graph convolution module. Finally, a "farthest & highest score object sampling" layer followed by NMS outputs the per-object properties including the 3D shape. + +# 3. Approach + +The overall architecture of our model is depicted in Figure 2. The model consists of four parts: The first one consumes a point cloud and predicts per point object attributes and shape embedding. The second component builds a graph on top of these per-point predictions and uses graph convolutions to transfer information across the predictions. The third component proposes the final 3D boxes and their attributes by iteratively sampling high scoring boxes which are farthest from the already selected ones. Finally, the fourth component decodes the predicted shape embeddings into SDF values which we convert to 3D meshes using the Marching Cubes algorithm [21]. + +# 3.1. Per Point 3D Object Prediction + +Given a point cloud of size $N \times I$ consisting of $N$ points with $I$ -dimensional input features (e.g. positions, colors, intensities, normals), first, a 3D encoder-decoder network predicts 3D object attributes (center, size, rotation matrix, and semantic logits) and the shape embedding for every point. + +We use SparseConvNet [11] as backbone to generate perpoint features $\{f_i\in \mathbb{R}^F\}_{i = 1}^N$ . Each of the object attributes and the shape embedding vector are computed by applying two layers of 3D sparse convolutions on the extracted $N\times F$ features. + +Box Prediction Loss: We represent a 3D object box by three properties: size (length, width, height), center location $(c_x, c_y, c_z)$ , and a $3 \times 3$ rotation matrix. Given these predictions, we use a differentiable function to compute the eight 3D corners of each predicted box. We apply a Huber loss on the distance between predicted and the ground-truth corners. The loss will automatically propagate back to the size, center and rotation variables. + +To compute the rotation matrix, our network predicts 6 parameters: $(\cos_{x}, \sin_{x}, \cos_{y}, \sin_{y}, \cos_{z}, \sin_{z})$ . Then we formulate the rotation matrix as $R = R_{x} \times R_{y} \times R_{z}$ . + +The benefit of using this loss in comparison to separate losses for rotation, center, and size is that we do not need to tune the relative scale among multiple losses. Our box corner loss propagates back to all and minimizes the predicted corner errors. We define the per-point box corner regression loss as + +$$ +\begin{array}{l} \mathcal {L} _ {\text {c o r n e r}} (P, G) = \\ \frac {1}{8 \times \sum_ {i = 1} ^ {N} \mathbb {1} \left(x _ {i}\right)} \sum_ {i = 1} ^ {N} \mathbb {1} \left(x _ {i}\right) \sum_ {j = 1} ^ {8} \left\| p _ {i} ^ {(j)} - g _ {i} ^ {(j)} \right\| _ {H} \tag {1} \\ \end{array} +$$ + +where $|| \cdot ||_H$ is the Huber-loss (i.e. smooth $L_1$ -loss), and $\mathbb{1}(.)$ is binary function indicating whether a point $x_i$ is on an object surface. $P$ and $G$ are the sets of predicted and ground-truth corners in which $p_i^{(j)}$ represents the $j$ 'th predicted corner for point $i$ , and $g_i^{(j)}$ denotes the corresponding ground-truth corner. + +Dynamic Classification Loss: Every point in the point cloud predicts a 3D bounding box. The box prediction loss forces each point to predict the box that it belongs to. Some of the points make more accurate box predictions than others. Thus we design a classification loss that classifies points that make accurate predictions as positive and others as negative. During the training stage, at each iteration, we compute the IoU overlap between predicted boxes and ground-truth matches and classify the points that have an IoU more than $70\%$ as positive and the rest as negative. This loss gives us a few percent improvements in comparison to regular classification loss (where we would label points that fall inside an object as positive and points outside as negative). We use a softmax loss for classification. + +# 3.2. Object Proposal Consolidation + +Each point predicts its object center, size, and rotation matrix. We create a graph where the points are the nodes, and each point is connected to its $K$ nearest neighbors in + +the center space. In other words, each point is connected to those with similar center predictions. We perform a few layers of graph convolution to consolidate the per-point object predictions. A weight value is estimated per point by the network which determines the significance of the vote a point casts in comparison to its neighbors. We update each object attribute predicted by points as follows: + +$$ +a _ {x} = \frac {\sum_ {y \in \mathcal {N} _ {x}} w _ {y} \cdot a _ {y}}{\sum_ {y \in \mathcal {N} _ {x}} w _ {y}} \tag {2} +$$ + +where $a_{x}$ is an object attribute (e.g. object length) predicted for point $x$ , $\mathcal{N}_{x}$ is the set of neighbors of $x$ in the predicted center space, and $w_{y}$ is the weight predicted for point $y$ . + +We apply the bounding box prediction loss both before and after the graph convolution step to let the network learn a set of weights that make final predictions more accurate. In this way, instead of directly applying a loss on the predicted point weights, the network automatically learns to assign larger weights to more confident points. + +# 3.3. Proposing Boxes + +Our network predicts a 3D object box and a semantic score for every point. During the training stage, we apply the losses directly to the per point predictions. However, during the evaluation, we need to use a box proposal mechanism that can reduce the hundreds of thousands of box predictions into a few accurate box proposals. We can greedily pick boxes with high semantic scores. However, we also want to encourage spatial diversity in the locations of the proposed boxes. For this reason, we compute the distance between each predicted box center and all previously selected boxes and choose the one that is far from the already picked points (similar to the heuristic used by KMeans++ initialization [1]). More precisely, at step $t$ , given predicted boxes for previous steps $\mathcal{B}_{1:t-1}$ , we select a seed point as follows: + +$$ +b_{t} = \arg \max_{b\not\in\mathcal{B}_{1:t - 1}}\left[\log (s_{b}) + \alpha \log (D(b,\mathcal{B}_{1:t - 1})\right] +$$ + +where + +$$ +D(b,\mathcal{B}_{1:t - 1}) = \min_{b^{\prime}\in \mathcal{B}_{1:t - 1}}\| b - b^{\prime}\| +$$ + +and $s_b$ represents the foreground semantic score of box $b$ . Selecting boxes with high foreground semantic score guarantees high precision, and selecting diverse boxes guarantees high recall. Note that our sampling strategy is different from the non-maximum suppression algorithm. In NMS, boxes that have a high IoU are suppressed and are not redeemable, while in our algorithm, we can tune the balance between confidence and diversity. + +# 3.4. Shape Prediction + +To predict shapes, first, we learn a shape prior function from an external synthetic 3D dataset of CAD models as discussed in Section 3.4.1. Then we deploy our learned prior to recover 3D shapes from the embedding space predicted by the object detection pipeline. + +# 3.4.1 Modeling the Shape Prior + +There are various ways to represent a shape prior. For our application, given that a shape embedding vector should be predicted for each point in the point cloud, the representation needs to be compact. We use an encoder-decoder architecture with a compact bottleneck to model the shape prior. The general framework is depicted in Figure 3. + +The shape encoder consumes the point cloud of an object after data augmentation techniques (e.g. random cropping) and then outputs a compact shape embedding vector. The point cloud representation of the object is first voxelized and then forwarded through an encoder network. The network consists of three convolutional blocks, each having two 3D sparse convolution layers intervened by BatchNorm and ReLU layers (not shown in the figure for simplicity). The spatial resolution of the feature maps is reduced by a factor of two after each convolutional block. Finally, a fully-connected layer followed by a global average pooling layer output the embedding vector of the input shape. + +For shape decoding, we represent the shape as a level set of an implicit function [24, 32, 27]. That is, the shape is modeled as the level set zero of a signed distance field (SDF) function over a unit hyper-cube. Following [24], we rely on Conditional Batch Normalization[5, 6] layers to condition the decoder on the predicted embedding vector. The input to the decoder is a batch of 3D coordinates of the query points. After five conditional blocks, a fully connected layer followed by a tanh function predicts the signed distance of each query from the surface of the object in a canonical viewpoint. + +During training, we sample some query points close to the object surface and some uniformly in the unit hypercube surrounding the object to predict their SDF values. However, as suggested in [32], we regress towards discrete label values to capture more detail near the surface boundaries. More precisely, given a batch of training queries $Q = \{q_{i}\}_{i = 1}^{N}\in \mathbb{R}^{3\times N}$ , their corresponding ground-truth signed distance values $S = \{s_i\}_{i = 1}^N\in \mathbb{R}^N$ , and their predicted embedding vectors $E = \{e_i\}_{i = 1}^N\in \mathbb{R}^{D\times N}$ , the loss is defined as: + +$$ +\mathcal {L} (Q, S, E | f) = \frac {1}{N} \sum_ {i = 1} ^ {N} \| f \left(q _ {i} \mid e _ {i}\right) - \operatorname {s i g n} \left(s _ {i}\right) \| ^ {2} \tag {3} +$$ + +where $f(.)$ is the conditional decoder function and $sign(.)$ is the sign function. + +![](images/6326530289f8c9342e62c3e543d6f92d5fe2c68c767e9861164fd24643078b21.jpg) +Figure 3: Shape Prior Network Architecture. The encoder consumes the point cloud representation of an object after augmentations (e.g. random cropping) and outputs a compact embedding vector. The decoder consists of Conditional Batch Norm [5] layers which are conditioned on the predicted embeddings. The input to the decoder is a batch of 3D point coordinates and the output is the predicted signed distance of each point to the object surface. + +# 3.4.2 Training the Shape Prediction Branch + +Although there is no ground-truth 3D shape annotation available in detection datasets collected for applications such as autonomous driving, once trained, the learned prior model can be deployed to enforce shape constraints. That is, for each object in the incomplete point cloud, we expect that most of the observed points in its bounding box lie on its surface. + +To predict the shape embedding, we add a branch to the object detection pipeline to predict a $D$ -dimensional vector per point. The shape embeddings for all points belonging to an object is then averaged pool to form its shape representation. To enforce the constraints, we freeze the 3D decoder in Figure 3 and discard the encoder. Conditioned on the predicted shape embedding and given some shape queries per object, the frozen shape decoder should be able to predict the signed distances. + +To define the queries, for each object present in the point cloud, we subtract the object center and rotate the queries to match the canonical orientation used during training the shape prior network. Then, the queries are projected into a unit hyper-cube. We also pre-process them by removing points on the ground and augmenting the symmetrical points (if the object is symmetrical). Finally, as the shape prior is trained with discrete sign labels, we sample some number of queries on the ray connecting the object center to each of the observed points and assign $-1/+1$ labels to inside/outside queries respectively (in this paper we sample two points with distance $\delta = 0.1$ to each observed point along the rays). During training, we also optimize the loss defined in Eq. 3 for objects with a reasonable number of points observed (i.e. minimum of 500 points in this paper.) + +# 3.5. Achieving Real-Time Speed + +Our 3D sparse feature extractor with 30 3D sparse convolution layers, 7 3D sparse pooling layers, and 7 3D sparse + +un-pooling layers achieves a speed of $12ms$ per frame on Waymo Open dataset (with around 200k input points per frame). Here we describe the implementation details of our Tensorflow sparse GPU operations. + +We use CUDA to implement the submanifold sparse convolution [11] and sparse pooling GPU operations in TensorFlow. Since the input to the convolution operation is sparse, we need a mechanism to get all the neighbors for each non-empty voxel. We implemented a hashmap to do that, where the keys are the XYZ indices of the voxels, and the values are the indices of the corresponding voxels in the input voxel array. We use an optimized spatial hash function[37]. Our experiments on the Waymo Open dataset show that with a load factor of 0.42, the average collision rate is 0.18. We precompute the neighbor indices for all non-empty voxels and reuse them in one or more subsequent convolution operations. We use various CUDA techniques to speed up the computation (e.g. partitioning and caching the filter in shared memory and using bit operations). + +Both 3D sparse max pooling and 3D sparse average pooling operations are implemented in CUDA. Since each voxel needs to be looked up only once during pooling, we do not reuse the convolution bitmap that can introduce redundant lookups. Instead, we compute the pooled XYZ indices and use them as the key to building a new "hashmultimap"(multiple voxels can be pooled together thus having the same key), and shuffle the voxels based on the keys. Our experiments show that this approach is more than 10X faster than the radix sort provided by the CUB library. Furthermore, since our pooling operation does not rely on the original XYZ indices, it has the ability to handle duplicate input indices. This allows us to use the same operation for voxelizing the point cloud, which is the most expensive pooling operation in the network. Our implementation is around 20X faster than a well-designed implementation with pre-existing TensorFlow operations. + +# 4. Experiments + +# 4.1. Experimental Setup + +For our object detection backbone, we use an encoder-decoder UNET with sparse 3D convolutions. The encoder consists of 6 blocks of 3D sparse convolutions, each of which having two 3D sparse convolutions inside. Going deeper, we increase the number of channels gradually (i.e. 64, 96, 128, 160, 192, 224, 256 channels). We also apply a 3D sparse pooling operation after each block to reduce the spatial resolution of the feature maps. For the decoder, we use the same structure but in the reverse order and replace the 3D sparse pooling layers with unpooling operations. Two 3D sparse convolutions with 256 channels connect the encoder and decoder and form the bottleneck. Models are trained on 20 GPUs with a batch size of 6 scenes per each. We use stochastic gradient descent with an initial learning rate of 0.3 and drop the learning rate every 10K iterations by the factors of [1.0, 0.3, 0.1, 0.01, 0.001, 0.0001]. We use a weight decay of $5 \times 10^{-4}$ and stop training when the loss plateaus. We use random rotations of (-10, 10) degrees along the z-axis and random scaling of (0.9, 1.1) for data augmentation. + +The 3D sparse encoder in our shape prior network consists of three convolutional blocks with two 3D sparse convolutions in each. We use an embedding size of 128 dimensions and set $((32,64),(64,128),(128,128))$ as the number of channels in the 3D convolutional layers. We down-sample the feature maps by a factor of 2 after each block. A global average pooling, followed by a fully-connected layer outputs the predicted embedding. Our shape decoder consists of five conditional blocks with two 128 dimensional fully connected layers intervened by conditional batch normalization layers. A tanh function maps predictions to $[-1, +1]$ . We train our model with an initial learning rate of 0.1 with the same step-wise learning rate schedule used for training the detection pipeline. + +# 4.2. Datasets + +ScanNetV2 [4] is a dataset of 3D reconstructed meshes of around $1.5\mathrm{K}$ indoor scenes with both 3D instance and semantic segmentation annotations. The meshes are reconstructed from RGB-D videos that are captured in various indoor environments. Following the setup in [28], we sample vertices from the reconstructed meshes as our input point clouds and since ScanNetV2 does not provide amodal or oriented bounding box annotations, we predict axis-aligned bounding boxes instead, as in [28, 14]. + +Waymo Open Dataset [26, 45] is a large scale self-driving car dataset, recently released for benchmarking 3D object detection. The dataset captures multiple major cities in the U.S., under a variety of weather conditions and across different times of the day. The dataset contains a total of + +
InputmAP@0.25mAP@0.5
DSS [36, 14]Geo + RGB15.26.8
MRCNN 2D-3D [13, 14]Geo + RGB17.310.5
F-PointNet [29, 14]Geo + RGB19.810.8
GSPN [41]Geo + RGB30.617.7
3D-SIS [14]Geo + 1 view35.118.7
3D-SIS [14]Geo + 3 views36.619.0
3D-SIS [14]Geo + 5 views40.222.5
3D-SIS [14]Geo only25.414.6
DeepVote[28]Geo only58.633.5
DOPS (ours)Geo only63.738.2
+ +Table 1: 3D object detection results on ScanNetV2 validation set. We report results for other approaches as appeared in the original papers or provided by the authors. + +1000 sequences, where each sequence consists of around 200 frames that are $100\mathrm{ms}$ apart. The training split consists of 798 sequences containing 4.81M vehicle boxes. The validation split consists of 202 sequences with the same duration and sampling frequency, containing 1.25M vehicle boxes. The effective annotation radius in the Waymo Open dataset is $75\mathrm{m}$ for all object classes. For our experiments, we evaluate 3D object detection metrics for vehicles and predict 3D shapes for them. + +# 4.3. Object Detection on ScanNetV2 + +We present our object detection results on the ScanNetV2 dataset in Table 1. For this dataset, we follow [28, 14] and predict axis-aligned bounding boxes. Although we only use the available geometric information, we also compare the proposed method with approaches that use the available RGB images and different viewpoints. Our approach noticeably improves the state-of-the-art by $3\%$ and $4.6\%$ with respect to $\mathrm{mAP}@0.25$ and $\mathrm{mAP}@0.5$ metrics. We also report our per-category results on the ScanNetV2 dataset in Table 2. Figure 7 shows our qualitative results. + +# 4.4. Object Detection on Waymo Open + +We achieve an mAP of $56.4\%$ at IOU of 0.7. This is while StarNet [26] achieves an mAP of $53.0\%$ . Note that [45] also reports 3D object detection results on the Waymo open dataset. However, their results are not directly comparable to ours since they fuse 2D networks applied to multiple views in addition to a 3D network. Since our detection pipeline consists of different parts, we also perform our ablation studies on this dataset. Table 3 shows the contribution of each component of the system on its overall performance. Each column shows the performance when a single component of the system is excluded and the rest remain the same. Removing graph convolution over the predictions on the neighborhood graph reduces the detection performance + +
BathtubBedBook ShelfCabinetChairCounterCurtainDeskDoorOtherPictureRefrig.Shower CurtainSinkSofaTableToiletWindowOverall Score
mAP@0.2586.683.341.053.291.651.953.973.754.859.226.349.264.771.382.660.598.045.263.7
mAP@0.571.070.221.425.275.89.524.439.427.835.012.333.717.335.754.841.280.612.138.2
+ +by $\sim 2\%$ , showing its importance. Replacing the dynamic classification loss with a regular classification loss drops the performance by $3.3\%$ . Finally, if instead of the farthest and highest object sampling, one directly deploys NMS to form the objects, the performance drops by $0.7\%$ . We also noticed that shape prediction does not have a noticeable impact on the detection precision. We believe the main reason is that the Waymo Open dataset has manually labeled bounding boxes for object detection, but no ground-truth shape annotations. As a result, the shape predictions are supervised only with noisy, partial, and sparse LIDAR data, which provides a relatively weaker training signal. + +Table 2: Per-category results on ScanNetV2. We report mAP at IoU of $25\%$ and $50\%$ . + +
DOPS (ours)w/o Graph Convolutionw/o Dynamic Cls Lossw/o Farthest & Highest Sampling
mAP@0.756.454.553.155.7
+ +Table 3: The contribution of each component on the overall accuracy on the Waymo Open Dataset. + +![](images/997343ec77abef748117b51419168514436dc7b159c0ee255320c96ec5fc97c5.jpg) +Figure 4: Shapes recovered in ShapeNet dataset from the learned embedding by Marching Cube [21] on a $100^{3}$ SDF volume. Our prior network captures the shape information even using a low-dimensional embedding vector. + +# 4.5. 3D Shape Prediction on Waymo Open + +To model shape, we first learn a prior from the synthetic ShapeNet dataset [2]. Figure 4 shows shapes recovered from the compact embedding vectors predicted for CAD models in ShapeNet. Each row represents one shape and columns show the results for different embedding dimensions. We use marching cube [21] with a resolution of 100 points per side on SDF values predicted by our decoder for a uniform hyper-cube surrounding the object. As can be seen, the decoder can recover the extent of the object from the predicted embedding vector, even when the dimensionality of the embedding space is low. + +![](images/102a347495ac6fc89dc3a8f95365c83df79a7c89f876d6ed12772ee03cee2d9f.jpg) +Figure 5: Ablations for shape fitting on observed points in Waymo dataset. (a) Observed points. (b) Enforcing the decoder to predict zero SDFs only for the observed points. (c) Adding two points along the rays passing through the observations and object center inside/outside the object with a distance of $\delta = 0.5$ . (d) Decreasing $\delta$ to 0.1. + +Once trained on the ShapeNet dataset, we freeze the decoder and use it to recover shapes from the observed points in the real-world scenes captured by the LIDAR sensors. However, compared to the synthetic CAD models, LIDAR points are incomplete, noisy, and the distribution of the observed points can be different from the clean synthetic datasets. Consequently, we found proper preprocessing and data augmentation techniques crucial. Noticeably, ShapeNet contains dense annotations even for surfaces inside the objects. However, when it comes to autonomous driving datasets, only a sparse set of points on the surface of the object is observed. We remove internal points when training on the ShapeNet dataset and empirically noticed that this step improves convergence and shape prediction quality. Moreover, the LIDAR sensor frequently captures points on the ground while this does not happen in ShapeNet. We also remove points on the ground based on the coordinate frame of each object. + +Given a set of $N$ observed points in the point cloud, a predicted encoding vector, and a frozen decoder, it is possible to enforce $N$ weakly supervised constraints to recover the shapes. The points which are observed should lie on the surface of the object with a high probability. That is, the frozen decoder conditioned on the predicted embedding should predict a zero SDF value for these points. However, this set of constraints is not enough for reliably recovering the shape. Figure 5b shows the case when a shape is fitted to a set of points observed from an object in the Waymo Open dataset, shown in 5a. As can be seen, the decoder is able to fit a complex surface to the points. This is while the + +![](images/fae4c4f8e802cb0d754b4217f846294657faf713a8f8b8a987d3e79a628bc223.jpg) +Figure 6: Qualitative results of 3D object detection and 3D shape prediction. + +![](images/babdfbb31a0b6094cd7eda1420bf64d14b946a12f13cadaa006eb384208617fb.jpg) +Figure 7: Qualitative results for the axis aligned object detection on the ScanNet dataset. + +shape almost perfectly passes through the observed points. + +Instead, we augment points with additional ones sampled along the ray connecting the observations to the object center. For each observed point, we add two points on this ray inside and outside the object with distance $\delta$ from the surface and assign labels $-1/+1$ to them respectively. Figures 5c, and 5d show the shape fitting when we set $\delta$ to 0.5 and 0.1 respectively. As can be seen, this augmentation technique is crucial and sampling closer points increases the quality of the recovered shape. + +Finally, Figure 6 presents our end-to-end shape prediction results. Note that the car shapes fit the point cloud and are not simply copies of examples from a database. + +# 5. Conclusions + +We propose DOPS, a single-stage object detection system which operates on point cloud data. DOPS directly predicts object properties for each point. Instead of grouping points before prediction, a graph convolution module is deployed to aggregate the information across neighboring points. For a more accurate localization, it also outputs a 3D mesh using a shape prior learned on a synthetic dataset of CAD models. We show state-of-the-art results for on 3D object detection datasets for both indoor and outdoor scenes. Topics for future work include detection and tracking over time, semi-supervised training of shape priors, and extending shape models to handle non-rigid objects. + +# References + +[1] D. Arthur and S. Vassilvitskii. k-means++: The advantages of careful seeding. Proc. symposium on discrete algorithms, 2007. 4 +[2] A. X. Chang, T. Funkhouser, L. Guibas, P. Hanrahan, Q. Huang, Z. Li, S. Savarese, M. Savva, S. Song, and H. Su. Shapenet: An information-rich 3d model repository. In arXiv:1512.03012, 2015. 7 +[3] Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1907-1915, 2017. 2 +[4] Angela Dai, Angel X Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 6 +[5] Harm De Vries, Florian Strub, Jérémie Mary, Hugo Larochelle, Olivier Pietquin, and Aaron C Courville. Modulating early visual processing by language. In Advances in Neural Information Processing Systems, pages 6594-6604, 2017. 4, 5 +[6] Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Olivier Mastropietro, Alex Lamb, Martin Arjovsky, and Aaron Courville. Adversarily learned inference. arXiv preprint arXiv:1606.00704, 2016. 4 +[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. IEEE, 2017. 2 +[8] Georgia Gkioxari, Jitendra Malik, and Justin Johnson. Mesh r-cnn. arXiv preprint arXiv:1906.02739, 2019. 2 +[9] Ben Graham. Sparse 3d convolutional neural networks. In Gary K. L. Tam Xianghua Xie, Mark W. Jones, editor, Proceedings of the British Machine Vision Conference (BMVC), pages 150.1-150.9. BMVA Press, September 2015. 2 +[10] Benjamin Graham, Martin Engelcke, and Laurens van der Maaten. 3d semantic segmentation with submanifold sparse convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9224–9232, 2018. 2 +[11] Benjamin Graham and Laurens van der Maaten. Submanifold sparse convolutional networks. arXiv preprint arXiv:1706.01307, 2017. 3, 5 +[12] Thibault Groueix, Matthew Fisher, Vladimir G Kim, Bryan C Russell, and Mathieu Aubry. Atlasnet: A papier-m\`ach\`e approach to learning 3d surface generation. arXiv preprint arXiv:1802.05384, 2018. 2 +[13] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross Girshick. Mask r-cnn. In Computer Vision (ICCV), 2017 IEEE International Conference on, pages 2980-2988. IEEE, 2017. 6 + +[14] Ji Hou, Angela Dai, and Matthias Nießner. 3d-sis: 3d semantic instance segmentation of rgb-d scans. In Proc. Computer Vision and Pattern Recognition (CVPR), IEEE, 2019. 6 +[15] Abhijit Kundu, Yin Li, and James M Rehg. 3d-rcnn: Instance-level 3d object reconstruction via render-and compare. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3559–3568, 2018. 2 +[16] Weicheng Kuo, Anelia Angelova, Jitendra Malik, and Tsungyi Lin. Shapemask: Learning to segment novel objects by refining shape priors. In IEEE International Conference on Computer Vision (ICCV), 2019. 2 +[17] Alex H Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12697-12705, 2019. 2 +[18] Bo Li, Tianlei Zhang, and Tian Xia. Vehicle detection from 3d lidar using fully convolutional network. arXiv preprint arXiv:1608.07916, 2016. 2 +[19] Ming Liang, Bin Yang, Yun Chen, Rui Hu, and Raquel Urtasun. Multi-task multi-sensor fusion for 3d object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7345-7353, 2019. 2 +[20] Ming Liang, Bin Yang, Shenlong Wang, and Raquel Urtasun. Deep continuous fusion for multi-sensor 3d object detection. In Proceedings of the European Conference on Computer Vision (ECCV), pages 641-656, 2018. 2 +[21] William E Lorensen and Harvey E Cline. Marching cubes: A high resolution 3d surface construction algorithm. In ACM siggraph computer graphics, volume 21, pages 163-169. ACM, 1987. 3, 7 +[22] Wenjie Luo, Bin Yang, and Raquel Urtasun. Fast and furious: Real time end-to-end 3d detection, tracking and motion forecasting with a single convolutional net. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 3569-3577, 2018. 2 +[23] Fabian Manhardt, Wadim Kehl, and Adrien Gaidon. Roi10d: Monocular lifting of 2d detection to 6d pose and metric shape. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2069-2078, 2019. 2 +[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. 2, 4 +[25] Gregory P Meyer, Ankit Laddha, Eric Kee, Carlos Vallespi-Gonzalez, and Carl K Wellington. Lasernet: An efficient probabilistic 3d object detector for autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 12677-12686, 2019. 2 +[26] Jiquan Ngiam, Benjamin Caine, Wei Han, Brandon Yang, Yuning Chai, Pei Sun, Yin Zhou, Xi Yi, Ouais Alsharif, Patrick Nguyen, Zhifeng Chen, Jonathon Shlens, and Vijay Vasudevan. Starnet: Targeted computation for object detection in point clouds. In arXiv:1908.11069, 2019. 6 + +[27] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. arXiv preprint arXiv:1901.05103, 2019. 2, 4 +[28] Charles R Qi, Or Litany, Kaiming He, and Leonidas J Guibas. Deep hough voting for 3d object detection in point clouds. In Proceedings of the IEEE International Conference on Computer Vision, 2019. 2, 6 +[29] Charles R Qi, Wei Liu, Chenxia Wu, Hao Su, and Leonidas J Guibas. Frustum pointnets for 3d object detection from rgb-d data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 918-927, 2018. 2, 6 +[30] 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 +[31] Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. In Advances in neural information processing systems, pages 5099-5108, 2017. 2 +[32] Shunsuke Saito, Zeng Huang, Ryota Natsume, Shigeo Morishima, Angjoo Kanazawa, and Hao Li. Pifu: Pixel-aligned implicit function for high-resolution clothed human digitization. arXiv preprint arXiv:1905.05172, 2019. 2, 4 +[33] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. Pointcnn: 3d object proposal generation and detection from point cloud. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 770-779, 2019. 2 +[34] Martin Simon, Karl Amende, Andrea Kraus, Jens Honer, Timo Samann, Hauke Kaulbersch, Stefan Milz, and Horst Michael Gross. Complexer-yolo: Real-time 3d object detection and tracking on semantic point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 0–0, 2019. 2 +[35] Martin Simon, Stefan Milz, Karl Amende, and Horst-Michael Gross. Complex-yolo: An euler-region-proposal for real-time 3d object detection on point clouds. In European Conference on Computer Vision, pages 197-209. Springer, 2018. 2 +[36] Shuran Song and Jianxiong Xiao. Deep sliding shapes for amodal 3d object detection in rgb-d images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 808-816, 2016. 6 +[37] Matthias Teschner, Bruno Heidelberger, Matthias Müller, Danat Pomerantes, and Markus H Gross. Optimized spatial hashing for collision detection of deformable objects. In Vmv, volume 3, pages 47-54, 2003. 5 +[38] Bin Yang, Ming Liang, and Raquel Urtasun. Hdnet: Exploiting hd maps for 3d object detection. In Conference on Robot Learning, pages 146-155, 2018. 2 +[39] Bin Yang, Wenjie Luo, and Raquel Urtasun. Pixor: Realtime 3d object detection from point clouds. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pages 7652-7660, 2018. 2 +[40] Yaoqing Yang, Chen Feng, Yiru Shen, and Dong Tian. Foldingnet: Point cloud auto-encoder via deep grid deformation. + +In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 206-215, 2018. 2 +[41] Li Yi, Wang Zhao, He Wang, Minhyuk Sung, and Leonidas Guibas. Gspn: Generative shape proposal network for 3d instance segmentation in point cloud. arXiv preprint arXiv:1812.03320, 2018. 6 +[42] Li Yi, Wang Zhao, He Wang, Minhyuk Sung, and Leonidas J Guibas. Gspn: Generative shape proposal network for 3d instance segmentation in point cloud. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3947-3956, 2019. 2 +[43] 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. 2 +[44] Yongheng Zhao, Tolga Birdal, Haowen Deng, and Federico Tombari. 3d point capsule networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1009-1018, 2019. 2 +[45] Yin Zhou, Pei Sun, Yu Zhang, Dragomir Anguelov, Jiyang Gao, Tom Ouyang, James Guo, Jiquan Ngiam, and Vijay Vasudevan. End-to-end multi-view fusion for 3d object detection in lidar point clouds. In Conference on Robot Learning (CoRL), 2019. 6 +[46] Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4490-4499, 2018. 2 \ No newline at end of file diff --git a/dopslearningtodetect3dobjectsandpredicttheir3dshapes/images.zip b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..eeef3aaa6e56d4fe77ea7d6f5e4c3f476476b15e --- /dev/null +++ b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd16fa70b84f642f770b46257ed4d2c570429a5a6eb1faaae434cd3c86aaa89a +size 583207 diff --git a/dopslearningtodetect3dobjectsandpredicttheir3dshapes/layout.json b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..92327afda465f1ff12969c6671ee7e1991b23567 --- /dev/null +++ b/dopslearningtodetect3dobjectsandpredicttheir3dshapes/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50077e1c04e7d3dcad443e01a0c7122b30f56b215e5dc952c2d3d63c55c23bb2 +size 321618 diff --git a/dpgndistributionpropagationgraphnetworkforfewshotlearning/3b2ba513-b483-42c1-ac45-54448d3c8933_content_list.json b/dpgndistributionpropagationgraphnetworkforfewshotlearning/3b2ba513-b483-42c1-ac45-54448d3c8933_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..ccbf5817d35856d5675b714f6a51d02232d685e0 --- /dev/null +++ b/dpgndistributionpropagationgraphnetworkforfewshotlearning/3b2ba513-b483-42c1-ac45-54448d3c8933_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a5428f772f33542bff5b40411174afb93462781e6a4b0b55e35423c6486c6fc9 +size 75726 diff --git a/dpgndistributionpropagationgraphnetworkforfewshotlearning/3b2ba513-b483-42c1-ac45-54448d3c8933_model.json b/dpgndistributionpropagationgraphnetworkforfewshotlearning/3b2ba513-b483-42c1-ac45-54448d3c8933_model.json new file mode 100644 index 0000000000000000000000000000000000000000..2a7df7ae3d742b946c000dbf87807c304660e832 --- /dev/null +++ b/dpgndistributionpropagationgraphnetworkforfewshotlearning/3b2ba513-b483-42c1-ac45-54448d3c8933_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb4fa194bec49c297cc5d02826d566380d0d71b384c7fb965c35370399d9af6c +size 93309 diff --git a/dpgndistributionpropagationgraphnetworkforfewshotlearning/3b2ba513-b483-42c1-ac45-54448d3c8933_origin.pdf b/dpgndistributionpropagationgraphnetworkforfewshotlearning/3b2ba513-b483-42c1-ac45-54448d3c8933_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9dc81c8604d3b601e7efa7774d2426a8022c8c15 --- /dev/null +++ b/dpgndistributionpropagationgraphnetworkforfewshotlearning/3b2ba513-b483-42c1-ac45-54448d3c8933_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:86d051fd74ff723f194de14a9700ed7fd0814231e7fbef2917f0d3dfc90379b2 +size 5595307 diff --git a/dpgndistributionpropagationgraphnetworkforfewshotlearning/full.md b/dpgndistributionpropagationgraphnetworkforfewshotlearning/full.md new file mode 100644 index 0000000000000000000000000000000000000000..3b1e7750a90b40be902fb15a86becba44aa02443 --- /dev/null +++ b/dpgndistributionpropagationgraphnetworkforfewshotlearning/full.md @@ -0,0 +1,338 @@ +# DPGN: Distribution Propagation Graph Network for Few-shot Learning + +Ling Yang $^{1*}$ Liangliang Li $^{2*†}$ Zilun Zhang $^{2}$ Xinyu Zhou $^{2}$ Erjin Zhou $^{2}$ Yu Liu $^{2}$ Northwestern Polytechnical University $^{1}$ Megvii Technology $^{2}$ + +yangling0818@163.com, liliangliang@megvii.com + +zilun.zhang@mail.utoronto.ca,{zxy,zej,liuyu}@megvii.com + +# Abstract + +Most graph-network-based meta-learning approaches model instance-level relation of examples. We extend this idea further to explicitly model the distribution-level relation of one example to all other examples in a 1-vs-N manner. We propose a novel approach named distribution propagation graph network (DPGN) for few-shot learning. It conveys both the distribution-level relations and instance-level relations in each few-shot learning task. To combine the distribution-level relations and instance-level relations for all examples, we construct a dual complete graph network which consists of a point graph and a distribution graph with each node standing for an example. Equipped with dual graph architecture, DPGN propagates label information from labeled examples to unlabeled examples within several update generations. In extensive experiments on few-shot learning benchmarks, DPGN outperforms state-of-the-art results by a large margin in $5\% \sim 12\%$ under supervised settings and $7\% \sim 13\%$ under semi-supervised settings. Code is available at https://github.com/megvii-research/DPGN + +# 1. Introduction + +The success of deep learning is rooted in a large amount of labeled data [19, 38], while humans generalize well after having seen few examples. The contradiction between these two facts brings great attention to the research of few-shot learning [7, 20]. Few-shot learning task aims at predicting unlabeled data (query set) given a few labeled data (support set). + +Fine-tuning [4] is the defacto method in obtaining a predictive model from a small training dataset in practice nowadays. However, it suffers from overfitting issues [11]. Meta-learning [8] methods introduces the concept of episode to address the few-shot problem explicitly. + +![](images/4cf764c40cdf08b4c659985a9e310d4099df564bb6879c23db149a4f5546cbad.jpg) +Figure 1: Our proposed DPGN adopts contrastive comparisons between each sample with support samples to produce distribution representation. Then it incorporates distribution-level comparisons with instance-level comparisons when classifying the query sample. + +An episode is one round of model training, where in each episode, only few examples (e.g., 1 or 5) are randomly sampled from each class in training data. Meta-learning methods adopt a trainer (also called meta-learner) which takes the few-shot training data and outputs a classifier. This process is called episodic training [41]. Under the framework of meta-learning, a diverse hypothesis was made to build an efficient meta-learner. + +A rising trend in recent researches was to process the training data with Graph Networks [2], which is a powerful model that generalizes many data structures (list, trees) while introduces a combinatorial prior over data. Few-Shot GNN [10] is proposed to build a complete graph network where each node feature is concatenated with the corresponding class label, then node features are updated via the attention mechanism of graph network to propagate the label information. To further exploit intra-cluster similarity and inter-cluster dissimilarity in the graph-based network, EGNN [18] demonstrates an edge-labeling graph neural network under the episodic training framework. It is noted that previous GNN studies in few-shot learning mainly fo + +cused on pair-wise relations like node labeling or edge labeling, and ignored a large number of substantial distribution relations. Additionally, other meta-learning approaches claim to make use of the benefits of global relations by episodic training, but in an implicitly way. + +As illustrated in Figure 1, firstly, we extract the instance feature of support and query samples. Then, we obtain the distribution feature for each sample by calculating the instance-level similarity over all support samples. To leverage both instance-level and distribution-level representation of each example and process the representations at different levels independently, we propose a dual-graph architecture: a point graph (PG) and a distribution graph (DG). Specifically, a PG generates a DG by gathering 1-vs-n relation on every example, while the DG refines the PG by delivering distribution relations between each pair of examples. Such cyclic transformation adequately fuses instance-level and distribution-level relations and multiple generations (rounds) of this Gather-Compare process concludes our approach. Furthermore, it is easy to extend DPGN to semi-supervised few-shot learning task where support set containing both labeled and unlabeled samples for each class. DPGN builds a bridge connection between labeled and unlabeled samples in the form of similarity distribution, which leads to a better propagation for label information in semi-supervised few-shot classification. + +Our main contributions are summarized as follows: + +- To the best of our knowledge, DPGN is the first to explicitly incorporate distribution propagation in graph network for few-shot learning. The further ablation studies have demonstrated the effectiveness of distribution relations. +- We devise the dual complete graph network that combines instance-level and distribution-level relations. The cyclic update policy in this framework contributes to enhancing instance features with distribution information. +- Extensive experiments are conducted on four popular benchmark datasets for few-shot learning. By comparing with all state-of-the-art methods, the DPGN achieves a significant improvement of $5\% \sim 12\%$ on average in few-shot classification accuracy. In semi-supervised tasks, our algorithm outperforms existing graph-based few-shot learning methods by $7\% \sim 13\%$ . + +# 2. Related Work + +# 2.1. Graph Neural Network + +Graph neural networks were first designed for tasks on processing graph-structured data [34, 41]. Graph neural networks mainly refine the node representations by aggregating and transforming neighboring nodes recursively. Recent + +approaches [10, 25, 18] are proposed to exploit GNN in the field of few-shot learning task. TPN [25] brings the transductive setting into graph-based few-shot learning, which performs a Laplacian matrix to propagate labels from support set to query set in the graph. It also considers the similarity between support and query samples through the process of pairwise node features affinities to propagate labels. EGNN [18] uses the similarity/dissimilarity between samples and dynamically update both node and edge features for complicated interactions. + +# 2.2. Metric Learning + +Another category of few-shot learning approaches focuses on optimizing feature embeddings of input data using metric learning methods. Matching Networks [41] produces a weighted nearest neighbor classifier through computing embedding distance between support and query set. Prototypical Networks [36] firstly build a prototype representation of each class in the embedding space. As an extension of Prototypical Networks, IMF [1] constructs infinite mixture prototypes by self-adaptation. RelationNet [40] adopts a distance metric network to learn pointwise relations in support and query samples. + +# 2.3. Distribution Learning + +Distribution Learning theory was first introduced in [17] to find an efficient algorithm that determines the distribution from which the samples are drawn. Different methods [16, 5, 6] are proposed to efficiently estimate the target distributions. DLDL [9] is one of the researches that has assigned the discrete distribution instead of one-hot label for each instance in classification and regression tasks. CPNN [44] takes both features and labels as the inputs and produces the label distribution with only one hidden layer in its framework. LDLFs [35] devises a distribution learning method based on the decision tree algorithm. + +# 2.4. Meta Learning + +Some few-shot approaches adopt a meta-learning framework that learns meta-level knowledge across batches of tasks. MAML [8] are gradient-based approaches that design the meta-learner as an optimizer that could learn to update the model parameters (e.g., all layers of a deep network) within few optimization steps given novel examples. Reptile [28] simplifies the computation of meta-loss by incorporating an L2 loss which updates the meta-model parameters towards the instance-specific adapted models. SNAIL [27] learn a parameterized predictor to estimate the parameters in models. MetaOptNet [21] advocates the use of linear classifier instead of nearest-neighbor methods which can be optimized as convex learning problems. LEO [33] utilizes an encoder-decoder architecture to mine the latent genera + +![](images/b712fcc7590261b9e239d30b3fe23325ef4100a64e022ec3bc6bed20b9f15b02.jpg) +Figure 2: The overall framework of DPGN. In this illustration, we take a 2-way-1-shot task as an example. The support and query embeddings obtained from feature extractor are delivered to the dual complete graph (a point graph and a distribution graph) for transductive propagation generation after generation. The green arrow represents a edge-to-node transformation (P2D, described in Section 3.2.1) which aggregates instance similarities to construct distribution representations and the blue arrow represents another edge-to-node transformation (D2P, described in Section 3.2.2) which aggregates distribution similarities with instance features. DPGN makes the prediction for the query sample at the end of generation $l$ . + +tive representations and predicts high-dimensional parameters in extreme low-data regimes. + +# 3. Method + +In this section, we first provide the background of few-shot learning task, then introduce the proposed algorithm in detail. + +# 3.1. Problem Definition + +The goal of few-shot learning tasks is to train a model that can perform well in the case where only few samples are given. + +Each few-shot task has a support set $S$ and a query set $Q$ . Given training data $\mathbb{D}^{train}$ , the support set $S \subset \mathbb{D}^{train}$ contains $N$ classes with $K$ samples for each class (i.e., the $N$ -way $K$ -shot setting), it can be denoted as $S = \{(x_1, y_1), (x_2, y_2), \ldots, (x_{N \times K}, y_{N \times K})\}$ . The query set $Q \subset \mathbb{D}^{train}$ has $\bar{T}$ samples and can be denoted as $Q = \{(x_{N \times K + 1}, y_{N \times K + 1}), \ldots, (x_{N \times K + \bar{T}}, y_{N \times K + \bar{T}})\}$ . Specifically, in the training stage, data labels are provided for both support set $S$ and query set $Q$ . Given testing data $\mathbb{D}^{test}$ , our goal is to train a classifier that can map the query sample from $Q \in \mathbb{D}^{test}$ to the corresponding label accurately with few support samples from $S \in \mathbb{D}^{test}$ . Labels of support sets and query sets are mutually exclusive. + +# 3.2. Distribution Propagation Graph Networks + +In this section, we will explain the DPGN that we proposed for few-shot learning in detail. As shown in Figure 2. The DPGN consists of $l$ generations and each generation consists of a point graph $G_{l}^{p} = (V_{l}^{p},E_{l}^{p})$ and a distribution graph $G_{l}^{d} = (V_{l}^{d},E_{l}^{d})$ . Firstly, the feature embeddings + +of all samples are extracted by a convolutional backbone, these embeddings are used to compute the instance similarities $E_{l}^{p}$ . Secondly, the instance relations $E_{l}^{p}$ are delivered to construct the distribution graph $G_{l}^{d}$ . The node features $V_{l}^{d}$ are initialized by aggregating $E_{l}^{p}$ following the position order in $G_{l}^{p}$ and the edge features $E_{l}^{d}$ stand for the distribution similarities between the node features $V_{l}^{d}$ . Finally, the obtained $E_{l}^{d}$ is delivered to $G_{l}^{p}$ for constructing more discriminative representations of nodes $V_{l}^{p}$ and we repeat the above procedure generation by generation. A brief introduction of generation update for the DPGN can be expressed as $E_{l}^{p}\rightarrow V_{l}^{d}\rightarrow E_{l}^{d}\rightarrow V_{l}^{p}\rightarrow E_{l + 1}^{p}$ , where $l$ denotes the $l$ -th generation. + +For further explanation, we formulate $V_{l}^{p}, E_{l}^{p}, V_{l}^{d}$ and $E_{l}^{d}$ as follows: $V_{l}^{p} = \{v_{l,i}^{p}\}$ , $E_{l}^{p} = \{e_{l,ij}^{p}\}$ , $V_{l}^{d} = \{v_{l,i}^{d}\}$ , $E_{l}^{d} = \{e_{l,ij}^{d}\}$ where $i,j = 1,\dots T$ . $T = N\times K + \bar{T}$ denotes the total number of examples in a training episode. $v_{0,i}^{p}$ is first initialized by the output of the feature extractor $f_{emb}$ . For each sample $x_{i}$ : + +$$ +v _ {0, i} ^ {p} = f _ {e m b} \left(x _ {i}\right), \tag {1} +$$ + +where $v_{0,i}^{p} \in \mathbb{R}^{m}$ and $m$ denotes the dimension of the feature embedding. + +# 3.2.1 Point-to-Distribution Aggregation + +Point Similarity Each edge in the point graph stands for the instance (point) similarity and the edge $e_{0,ij}^p$ of the first generation is initialized as follows: + +$$ +e _ {0, i j} ^ {p} = f _ {e _ {0} ^ {p}} \left(\left(v _ {0, i} ^ {p} - v _ {0, j} ^ {p}\right) ^ {2}\right), \tag {2} +$$ + +where $e_{0,ij}^p \in \mathbb{R}$ . $f_{e_0^p} : \mathbb{R}^m \to \mathbb{R}$ is the encoding network that transforms the instance similarity to a certain scale. $f_{e_0^p}$ + +![](images/c1845977bf035f9eb0343378ec5dd68249af4b490306f13f1b55cef2fc4b5f8a.jpg) +Figure 3: Details about P2D aggregation and D2P aggregation in DPGN. A 2way-1-shot task is presented as an example. MLP-1 is the FC-ReLU blocks mentioned in P2D Aggregation and MLP-2 is the Conv-BN-ReLU blocks mentioned in D2P Aggregation. The green arrow denotes the P2D aggregation while the blue arrow denotes the D2P aggregation. Both aggregation processes integrate the node or edge features of their previous generation. + +contains two Conv-BN-ReLU [13, 15] blocks with the parameter set $\theta_{e^p}$ and a sigmoid layer. + +For generation $l > 0$ , given $e_{l-1,ij}^p$ , $v_{l-1,i}^p$ and $v_{l-1,j}^p$ , $e_{l,ij}^p$ can be updated as follows: + +$$ +e _ {l, i j} ^ {p} = f _ {e _ {l} ^ {p}} ((v _ {l - 1, i} ^ {p} - v _ {l - 1, j} ^ {p}) ^ {2}) \cdot e _ {l - 1, i j} ^ {p}. \qquad (3) +$$ + +In order to use edge information with a holistic view of the graph $G_{l}^{p}$ , a normalization operation is conducted on the $e_{l,ij}^{p}$ . + +P2D Aggregation After edge features $E_{l}^{p}$ in point graph $G_{l}^{p}$ are produced or updated, the distribution graph $G_{l}^{d} = (V_{l}^{d},E_{l}^{d})$ is the next to be constructed. As shown in Figure 3, $G_{l}^{d}$ aims at integrating instance relations from the point graph $G_{l}^{p}$ and process the distribution-level relations. Each distribution feature $v_{l,i}^{d}$ in $G_{l}^{d}$ is a NK dimension feature vector where the value in $j$ -th entry represents the relation between sample $x_{i}$ and sample $x_{j}$ and $NK$ stands for the + +total number of support samples in a task. For first initialization: + +$$ +v _ {0, i} ^ {d} = \left\{ \begin{array}{l l} \| _ {j = 1} ^ {N K} \delta \left(y _ {i}, y _ {j}\right) & \text {i f} x _ {i} \text {i s l a b e l e d ,} \\ \left[ \frac {1}{N K}, \dots , \frac {1}{N K} \right] & \text {o t h e r w i s e ,} \end{array} \right. \tag {4} +$$ + +where $v_{0,i}^{d} \in \mathbb{R}^{NK}$ and $|||$ is the concatenation operator. $\delta(\cdot)$ is the Kronecker delta function which outputs one when $y_{i} = y_{j}$ and zero otherwise ( $y_{i}$ and $y_{j}$ are labels). + +For generations $l > 0$ , the distribution node $v_{l,i}^{d}$ can be updated as follows: + +$$ +v _ {l, i} ^ {d} = \mathrm {P 2 D} \left(\prod_ {j = 1} ^ {N K} e _ {l, i j} ^ {p}, v _ {l - 1, i} ^ {d}\right), \tag {5} +$$ + +where $\mathrm{P2D}:(\mathbb{R}^{NK},\mathbb{R}^{NK})\to \mathbb{R}^{NK}$ is the aggregation network for distribution graph. P2D applies a concatenation operation between two features. Then, P2D performs a transformation: $\mathbb{R}^{2NK}\rightarrow \mathbb{R}^{NK}$ on the concatenated features which is composed of a fully-connected layer and ReLU [13], with the parameter set $\theta_{v_l^d}$ . + +# 3.2.2 Distribution-to-Point Aggregation + +Distribution Similarity Each edge in distribution graph stands for the similarity between distribution features of different samples. For generation $l = 0$ , the distribution similarity $e_{0,ij}^{d}$ is initialized as follows: + +$$ +e _ {0, i j} ^ {d} = f _ {e _ {0} ^ {d}} \left(\left(v _ {0, i} ^ {d} - v _ {0, j} ^ {d}\right) ^ {2}\right), \tag {6} +$$ + +where $e_{0,ij}^{d}\in \mathbb{R}$ . The encoding network $f_{e_0^d}:\mathbb{R}^{NK}\to \mathbb{R}$ transforms the distribution similarity using two Conv-BNReLU blocks with the parameter set $\theta_{e_0^d}$ and a sigmoid layer in the end. For generation $l > 0$ , the update rule for $e_{l,ij}^{d}$ in $G_{l}^{d}$ is formulated as follows: + +$$ +e _ {l, i j} ^ {d} = f _ {e _ {l} ^ {d}} \left(\left(v _ {l, i} ^ {d} - v _ {l, j} ^ {d}\right) ^ {2}\right) \cdot e _ {l - 1, i j} ^ {d}. \tag {7} +$$ + +Also, we apply a normalization to $e_{l,ij}^{d}$ . + +D2P Aggregation As illustrated in Figure 3, the encoded distribution information in $G_{l}^{d}$ flows back into the point graph $G_{l}^{p}$ at the end of each generation. Then node features $v_{l,i}^{p}$ in $G_{l}^{p}$ captures the distribution relations through aggregating all the node features in $G_{l}^{p}$ with edge features $e_{l,i}^{d}$ as follows: + +$$ +v _ {l, i} ^ {p} = \mathrm {D 2 P} \left(\sum_ {j = 1} ^ {T} \left(e _ {l, i j} ^ {d} \cdot v _ {l - 1, j} ^ {p}\right), v _ {l - 1, i} ^ {p}\right), \tag {8} +$$ + +where $v_{l,i}^{p}\in \mathbb{R}^{m}$ and D2P: $(\mathbb{R}^m,\mathbb{R}^m)\to \mathbb{R}^m$ is the aggregation network for point graph in $G_{l}^{p}$ with the parameter set + +$\theta_{v_l^p}$ . D2P concatenates the feature which is computed by $\sum_{j=1}^{T}(e_{l,ij}^d \cdot v_{l-1,j}^p)$ with the node features $v_{l-1,i}^p$ in previous generation and update the concatenated feature with two Conv-BN-ReLU blocks. After this process, the node features can integrate the distribution-level information into the instance-level feature and prepares for computing instance similarities in the next generation. + +# 3.3. Objective + +The class prediction of each node can be computed by feeding the corresponding edges in the final generation $l$ of DPGN into softmax function: + +$$ +P \left(\hat {y} _ {i} \mid x _ {i}\right) = \operatorname {S o f t m a x} \left(\sum_ {j = 1} ^ {N K} e _ {l, i j} ^ {p} \cdot \text {o n e - h o t} \left(y _ {j}\right)\right), \tag {9} +$$ + +where $P(\hat{y}_i|x_i)$ is the probability distribution over classes given sample $x_{i}$ , and $y_{j}$ is the label of $j$ th sample in the support set. $e_{l,ij}^{p}$ stands for the edge feature in the point graph at the final generation. + +Point Loss It is noted that we make classification predictions in the point graph for each sample. Therefore, the point loss at generation $l$ is defined as follows: + +$$ +\mathcal {L} _ {l} ^ {p} = \mathcal {L} _ {C E} \left(P \left(\hat {y} _ {i} \mid x _ {i}\right), y _ {i}\right), \tag {10} +$$ + +where $\mathcal{L}_{CE}$ is the cross-entropy loss function, $T$ stands for the number of samples in each task $(S,Q)\in D^{train}$ . $P(\hat{y}_i|x_i)$ and $y_{i}$ are model probability predictions of sample $x_{i}$ and the ground-truth label respectively. + +Distribution Loss To facilitate the training process and learn discriminative distribution features, we incorporate the distribution loss which plays a significant role in contributing to faster and better convergence. We define the distribution loss for generation $l$ as follows: + +$$ +\mathcal {L} _ {l} ^ {d} = \mathcal {L} _ {C E} (\operatorname {S o f t m a x} \left(\sum_ {j = 1} ^ {N K} e _ {l, i j} ^ {d} \cdot \text {o n e - h o t} \left(y _ {j}\right), y _ {i}\right), \tag {11} +$$ + +where $e_{l,ij}^{d}$ stands for the edge feature in the distribution graph at generation $l$ . + +The total objective function is a weighted summation of all the losses mentioned above: + +$$ +\mathcal {L} = \sum_ {l = 1} ^ {\hat {l}} \left(\lambda_ {p} \mathcal {L} _ {l} ^ {p} + \lambda_ {d} \mathcal {L} _ {l} ^ {d}\right), \tag {12} +$$ + +where $\hat{l}$ denotes total generations of DPGN and the weights $\lambda_{p}$ and $\lambda_{d}$ of each loss are set to balance their importance. In most of our experiments, $\lambda_{p}$ and $\lambda_{d}$ are set to 1.0 and 0.1 respectively. + +# 4. Experiments + +# 4.1. Datasets and Setups + +# 4.1.1 Datesets + +We evaluate DPGN on four standard few-shot learning benchmarks: miniImageNet [41], tieredImageNet [31], CUB-200-2011 [42] and CIFAR-FS [3]. The miniImageNet and tieredImageNet are the subsets of ImageNet [32]. CUB-200-2011 is initially designed for fine-grained classification and CIFAR-FS is a subset of CIFAR-100 for few-shot classification. As shown in Table 1, we list details for images number, classes number, images resolution and train/val/test splits following the criteria of previous works [41, 31, 4, 3]. + +Table 1: Details for few-shot learning benchmarks. + +
DatasetImagesClassesTrain-val-testResolution
miniImageNet6000010064/16/2084x84
tieredImageNet779165608351/97/16084x84
CUB-200-201111788200100/50/5084x84
CIFAR-FS6000010064/16/2032x32
+ +# 4.1.2 Experiment Setups + +Network Architecture We use four popular networks for fair comparison, which are ConvNet, ResNet12, ResNet18 and WRN that are used in EGNN [18], MetaOptNet [21], CloserLook [4] and LEO [33] respectively. ConvNet mainly consists of four Conv-BN-ReLU blocks. The last two blocks also contain a dropout layer [37]. ResNet12 and ResNet18 are the same as the one described in [14]. They mainly have four blocks, which include one residual block for ResNet12 and two residual blocks for ResNet18 respectively. WRN was firstly proposed in [46]. It mainly has three residual blocks and the depth of the network is set to 28 as in [33]. The last features of all backbone networks are processed by a global average pooling, then followed by a fully-connected layer with batch normalization [15] to obtain a 128-dimensions instance embedding. + +Training Schema We perform data augmentation before training, such as horizontal flip, random crop, and color jitter (brightness, contrast, and saturation), which are mentioned in [11, 43]. We randomly sample 28 meta-task episodes in each iteration for meta-training. The Adam optimizer is used in all experiments with the initial learning rate of $10^{-3}$ . We decay the learning rate by 0.1 per 15000 iterations and set the weight decay to $10^{-5}$ . + +Evaluation Protocols We evaluate DPGN in 5way-1shot/5shot settings on standard few-shot learning datasets, + +miniImageNet, tieredImageNet, CUB-200-2011 and CIFAR-FS. We follow the evaluation process of previous approaches [18, 33, 43]. We randomly sample 10,000 tasks then report the mean accuracy (in %) as well as the $95\%$ confidence interval. + +# 4.2. Experiment Results + +Main Results We compare the performance of DPGN with several state-of-the-art models including graph and non-graph methods. For fair comparisons, we employ DPGN on miniImageNet, tieredImageNet, CIFAR-FS and CUB-200-2011 datasets, which is compared with other methods in the same backbones. As shown in Table 2, 3 and 4, the proposed DPGN is superior to other existing methods and achieves the state-of-the-art performance, especially compared with the graph-based methods. + +Table 2: Few-shot classification accuracies on miniImageNet. ${}^{ \dagger }$ denotes that it is implemented by public code. [10, 25, 18] and DPGN are tested in transduction. + +
MethodBackbone5way-1shot5way-5shot
MatchingNet [41]ConvNet43.56±0.8455.31±0.73
ProtoNet [36]ConvNet49.42±0.7868.20±0.66
RelationNet [40]ConvNet50.44±0.8265.32±0.70
R2D2 [3]ConvNet51.20±0.6068.20±0.60
MAML [8]ConvNet48.70±1.8455.31±0.73
Dynamic [11]ConvNet56.20±0.8671.94±0.57
GNN [10]ConvNet50.33±0.3666.41±0.63
TPN [25]ConvNet55.51±0.8669.86±0.65
Global [26]ConvNet53.21±0.4072.34±0.32
Edge-label [18]ConvNet59.63±0.52†76.34±0.48
DPGNConvNet66.01±0.3682.83±0.41
LEO [33]WRN61.76±0.0877.59±0.12
wDAE [12]WRN61.07±0.1576.75±0.11
DPGNWRN67.24±0.5183.72±0.44
CloserLook [4]ResNet1851.75±0.8074.27±0.63
CTM [22]ResNet1862.05±0.5578.63±0.06
DPGNResNet1866.63±0.5184.07±0.42
MetaGAN [47]ResNet1252.71±0.6468.63±0.67
SNAIL [27]ResNet1255.71±0.9968.88±0.92
TADAM [29]ResNet1258.50±0.3076.70±0.30
Shot-Free [30]ResNet1259.04±0.4377.64±0.39
Meta-Transfer [39]ResNet1261.20±1.8075.53±0.80
FEAT [43]ResNet1262.96±0.0278.49±0.02
TapNet [45]ResNet1261.65±0.1576.36±0.10
Dense [24]ResNet1262.53±0.1978.95±0.13
MetaOptNet [21]ResNet1262.64±0.6178.63±0.46
DPGNResNet1267.77±0.3284.60±0.43
+ +Semi-supervised Few-shot Learning We employ DPGN on semi-supervised few-shot learning. Following [25, 18], we use the same criteria to split miniImageNet dataset into + +Table 3: Few-shot classification accuracies on tieredImageNet. $\dagger$ denotes that it is implemented by public code. * denotes that it is reported from [21]. [25, 18] and DPGN are tested in transduction. + +
Methodbackbone5way-1shot5way-5shot
MAML* [8]ConvNet51.67±1.8170.30±1.75
ProtoNet* [36]ConvNet53.34±0.8972.69±0.74
RelationNet* [40]ConvNet54.48±0.9371.32±0.78
TPN [25]ConvNet59.91±0.9473.30±0.75
Edge-label [18]ConvNet63.52±0.52†80.24±0.49
DPGNConvNet69.43±0.4985.92±0.42
CTM [22]ResNet1864.78±0.1181.05±0.52
DPGNResNet1870.46±0.5286.44±0.41
TapNet [45]ResNet1263.08±0.1580.26±0.12
Meta-Transfer [39]ResNet1265.62±1.80†80.61±0.90†
MetaOptNet [21]ResNet1265.81±0.7481.75±0.53
Shot-Free [30]ResNet1266.87±0.4382.64±0.39
DPGNResNet1272.45±0.5187.24±0.39
+ +Table 4: Few-shot classification accuracies on CUB-200-2011 and CIFAR-FS. * denotes that it is reported from [21] or [4]. DPGN are tested in transduction. + +
MethodbackboneCUB-200-2011
5way-1shot5way-5shot
ProtoNet* [36]ConvNet51.31±0.9170.77±0.69
MAML* [8]ConvNet55.92±0.9572.09±0.76
MatchingNet* [41]ConvNet61.16±0.8972.86±0.70
RelationNet* [40]ConvNet62.45±0.9876.11±0.69
CloserLook [4]ConvNet60.53±0.8379.34±0.61
DN4 [23]ConvNet53.15±0.8481.90±0.60
DPGNConvNet76.05±0.5189.08±0.38
FEAT [43]ResNet1268.87±0.2282.90±0.15
DPGNResNet1275.71±0.4791.48±0.33
MethodbackboneCIFAR-FS
5way-1shot5way-5shot
ProtoNet* [36]ConvNet55.5±0.772.0±0.6
MAML* [8]ConvNet58.9±1.971.5±1.0
RelationNet* [40]ConvNet55.0±1.069.3±0.8
R2D2 [3]ConvNet65.3±0.279.4±0.1
DPGNConvNet76.4±0.588.4±0.4
Shot-Free [30]ResNet1269.2±0.484.7±0.4
MetaOptNet [21]ResNet1272.0±0.784.2±0.5
DPGNResNet1277.9±0.590.2±0.4
+ +labeled and unlabeled parts with different ratios. For a $20\%$ labeled semi-supervised scenario, we split the support samples with a ratio of 0.2/0.8 for labeled and unlabeled data in each class. In semi-supervised few-shot learning, DPGN uses unlabeled support samples to explicitly construct similarity distributions over all other samples and the distributions work as a connection between queries and labeled sup + +![](images/f8afc404b8a5050b98a13a842fd29aceb35327101b7b7ebb1a168f48ee39c7b7.jpg) +Figure 4: Semi-supervised few-shot learning accuracy in 5way-10shot on miniImageNet. DPGN surpass TPN and EGNN by a large margin consistently. + +port samples, which could propagate label information from labeled samples to queries sufficiently. + +Table 5: Trasductive/non-transductive experiments on miniImageNet. "BN" means information is shared among test examples using batch normalization. $\dagger$ denotes that it is implemented by public code released by authors. + +
MethodTransduction5way-5shot
Reptile [28]No62.74
GNN [10]No66.41
Edge-label [18]No66.85†
DPGNNo72.83
MAML [8]BN63.11
Reptile [28]BN65.99
RelationNet [40]BN67.07
MAML [8]Yes66.19
TPN [25]Yes69.86
Edge-label [18]Yes76.37
DPGNYes84.62
+ +In Figure 4, DPGN shows the superiority to existing semi-supervised few-shot methods and the result demonstrates the effectiveness to exploit the relations between labeled and unlabeled data when the label ratio decreases. Notably, DPGN surpasses TPN [25] and EGNN [18] by $11\% \sim 16\%$ and $7\% \sim 13\%$ respectively in few-shot average classification accuracy on miniImageNet. + +Transductive Propagation To validate the effectiveness of the transductive setting in our framework, we conduct the transductive and non-transductive experiments on miniImageNet dataset in 5way-5shot setting. Table 5 shows + +![](images/6efc977260bf953a870a791151177f686c01571adce5f2badbdc5b3ac330fcf6.jpg) +Figure 5: High-way few-shot classification accuracies on miniImageNet. + +that the accuracy of DPGN increases by a large margin in the transductive setting (comparing with non-transductive setting). Compared to TPN and EGNN which consider instance-level features only, DPGN utilizes distribution similarities between query samples and adopts dual graph architecture to propagate label information in a sufficient way. + +High-way classification Furthermore, the performance of DPGN in high-way few-shot scenarios is evaluated on miniImageNet dataset and its results are shown in Figure 5. The observed results show that DPGN not only exceeds the powerful graph-based methods [25, 18] but also surpasses the state-of-the-art non-graph methods significantly. As the number of ways increasing in few-shot tasks, it can broaden the horizons of distribution utilization and make it possible for DPGN to collect more abundant distribution-level information for queries. + +# 4.3. Ablation Studies + +Impact of Distribution Graph The distribution graph $G_{l}^{d}$ works as an important component of DPGN by propagating distribution information, so it is necessary to investigate the effectiveness of $G_{l}^{d}$ quantitatively. We design the experiment by limiting the distribution similarities which flow to $G_{l}^{p}$ for performing aggregation in each generation during the inference process. Specifically, we mask out the edge features $E_{l}^{d}$ through keeping a different number of feature dimensions and set the value of rest dimensions to zero, since zero gives no contribution. Figure 6 shows the result for our experiment in 5way-1shot on miniImageNet. It is obvious that test accuracy and the number of feature dimensions kept in $E_{l}^{d}$ have positive correlations and accuracy increment (area in blue) decreases with more feature dimen + +![](images/4cf1990a61d6685003cac5dc753883e8429fef50aac3c4059845ffb733be70e8.jpg) +Figure 6: Effectiveness of $G_{l}^{d}$ through keeping n dimensions in 5way-1shot on miniImageNet. + +![](images/d623e8076b0b6b7078591e3b39cf92551c812f687a4994777cada2c551aaa222.jpg) +Figure 7: Generation number in DPGN on miniImageNet, tieredImageNet, CUB-200-2011 and CIFAR-FS. + +sions. Keeping dimensions from 0 to 5, DPGN boosts the performance nearly by $10\%$ in absolute value and the result shows that the distribution graph has a great impact on our framework. + +Generation Numbers DPGN has a cyclic architecture that includes point graph and distribution graph, each graph has node-update and edge-update modules respectively. The total number of generations is an important ingredient for DPGN, so we perform experiments to obtain the trend of test accuracy with different generation numbers in DPGN on miniImageNet, tieredImageNet, CUB-200-2011, and CIFAR-FS. In Figure 7, with the generation number changing from 0 to 1, the test accuracy has a significant rise. When the generation number changes from 1 to 10, the test accuracy increases by a small margin and the curve becomes to fluctuate in the last several generations. Consider + +![](images/fbeb0c760c1508442371610ebe6d7512adb7f806ff065afdc618aa2755976d65.jpg) + +![](images/9e60bd1032cd0ae540ed557a14fefd49b760ed627d11470f1ca8a1ba269b786c.jpg) + +![](images/2f7a608a541b5b374648fdbf55594623e2b02b9a9d27bfc5161c2776e67c1a5f.jpg) + +![](images/c6fd60fd566be327f497d8bfbdf6ab363ad40c8d8566601195e7b84b5664e520.jpg) + +![](images/56ddb78c004de684039e43c965845e8586e8521b2d3e3ed0b0b11c8a880d4ae0.jpg) + +![](images/c26b4a1915cdbd118e858ce415d67e2daae92ed24de7fa827194d725ed49cfe2.jpg) + +Figure 8: The visualization of edge prediction in each generation of DPGN. (a) to (f) denotes generation 1 to 6. The dark denotes higher score and the shallow denotes lower confidence. The left axis stands for the index of 5 query images and the bottom axis stands for 5 support class. + +ing that more generations need more iterations to converge, we choose generation 6 as a trade-off between the test accuracy and convergence time. Additionally, to visualize the procedure of cyclic update, we choose a test scenario where the ground truth classes of five query images are [1, 2, 3, 4, 5] and visualize instance-level similarities which is used for predictions of five query samples as shown in Figure 8. The heatmap shows DPGN refines the instance-level similarity matrix after several generations and makes the right predictions for five query samples in the final generation. Notably, DPGN not only contributes to predicting more accurately but also enlarge the similarity distances between the samples in different classes through making instance features more discriminative, which cleans the prediction heatmap. + +# 5. Conclusion + +In this paper, we have presented the Distribution Propagation Graph Network for few-shot learning, a dual complete graph network that combines instance-level and distribution-level relations in an explicit way equipped with label propagation and transduction. The point and distribution losses are used to jointly update the parameters of the DPGN with episodic training. Extensive experiments demonstrate that our method outperforms recent state-of-the-art algorithms by $5\% \sim 12\%$ in the supervised task and $7\% \sim 13\%$ in semi-supervised task on few-shot learning benchmarks. For future work, we aim to focus on the high-order message propagation through encoding more complicated information which is linked with task-level relations. + +# 6. Acknowledgement + +This research was supported by National Key R&D Program of China (No. 2017YFA0700800). + +# References + +[1] Kelsey R Allen, Evan Shelhamer, Hanul Shin, and Joshua B Tenenbaum. Infinite mixture prototypes for few-shot learning. arXiv preprint arXiv:1902.04552, 2019. +[2] Peter W Battaglia, Jessica B Hamrick, Victor Bapst, Alvaro Sanchez-Gonzalez, Vinicius Zambaldi, Mateusz Malinowski, Andrea Tacchetti, David Raposo, Adam Santoro, Ryan Faulkner, et al. Relational inductive biases, deep learning, and graph networks. arXiv preprint arXiv:1806.01261, 2018. +[3] Luca Bertinetto, Joao F. Henriques, Philip Torr, and Andrea Vedaldi. Meta-learning with differentiable closed-form solvers. In International Conference on Learning Representations, 2019. +[4] Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Wang, and Jia-Bin Huang. A closer look at few-shot classification. In International Conference on Learning Representations, 2019. +[5] Sanjoy Dasgupta. Learning mixtures of gaussians. In 40th Annual Symposium on Foundations of Computer Science (Cat. No. 99CB37039), pages 634-644. IEEE, 1999. +[6] Constantinos Daskalakis, Ilias Diakonikolas, and Rocco A Servedio. Learning poisson binomial distributions. Algorithmica, 72(1):316-357, 2015. +[7] Li Fei-Fei, Rob Fergus, and Pietro Perona. One-shot learning of object categories. IEEE transactions on pattern analysis and machine intelligence, 28(4):594-611, 2006. +[8] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1126-1135. JMLR.org, 2017. +[9] Bin-Bin Gao, Chao Xing, Chen-Wei Xie, Jianxin Wu, and Xin Geng. Deep label distribution learning with label ambiguity. IEEE Transactions on Image Processing, 26(6):2825-2838, 2017. +[10] Victor Garcia and Joan Bruna. Few-shot learning with graph neural networks. arXiv preprint arXiv:1711.04043, 2017. +[11] Spyros Gidaris and Nikos Komodakis. Dynamic few-shot visual learning without forgetting. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4367-4375, 2018. +[12] Spyros Gidaris and Nikos Komodakis. Generating classification weights with gnn denoising autoencoders for few-shot learning. arXiv preprint arXiv:1905.01102, 2019. +[13] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. pages 315-323, 2011. +[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] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. +[16] Adam Tauman Kalai, Ankur Moitra, and Gregory Valiant. Efficiently learning mixtures of two gaussians. In Proceed- + +ings of the forty-second ACM symposium on Theory of computing, pages 553-562. ACM, 2010. +[17] Michael Kearns, Yishay Mansour, Dana Ron, Ronitt Rubinfeld, Robert E Schapire, and Linda Sellie. On the learnability of discrete distributions. In STOC, volume 94, pages 273-282. CiteSeer, 1994. +[18] Jongmin Kim, Taesup Kim, Sungwoong Kim, and Chang D Yoo. Edge-labeling graph neural network for few-shot learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 11-20, 2019. +[19] 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. +[20] Brenden Lake, Ruslan Salakhutdinov, Jason Gross, and Joshua Tenenbaum. One shot learning of simple visual concepts. In Proceedings of the annual meeting of the cognitive science society, volume 33, 2011. +[21] Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 10657-10665, 2019. +[22] Hongyang Li, David Eigen, Samuel Dodge, Matthew Zeiler, and Xiaogang Wang. Finding task-relevant features for few-shot learning by category traversal. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1-10, 2019. +[23] Wenbin Li, Lei Wang, Jinglin Xu, Jing Huo, Yang Gao, and Jiebo Luo. Revisiting local descriptor based image-to-class measure for few-shot learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 7260-7268, 2019. +[24] Yann Lifchitz, Yannis Avrithis, Sylvaine Picard, and Andrei Bursuc. Dense classification and implanting for few-shot learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 9258-9267, 2019. +[25] Yanbin Liu, Juho Lee, Minseop Park, Saehoon Kim, Eunho Yang, Sung Ju Hwang, and Yi Yang. Learning to propagate labels: Transductive propagation network for few-shot learning. arXiv preprint arXiv:1805.10002, 2018. +[26] Tiange Luo, Aoxue Li, Tao Xiang, Weiran Huang, and Liwei Wang. Few-shot learning with global class representations. arXiv preprint arXiv:1908.05257, 2019. +[27] Nikhil Mishra, Mostafa Rohaninejad, Xi Chen, and Pieter Abbeel. A simple neural attentive meta-learner. arXiv preprint arXiv:1707.03141, 2017. +[28] Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018. +[29] Boris Oreshkin, Pau Rodríguez López, and Alexandre Lacoste. Tadam: Task dependent adaptive metric for improved few-shot learning. In Advances in Neural Information Processing Systems, pages 721-731, 2018. +[30] Avinash Ravichandran, Rahul Bhotika, and Stefano Soatto. Few-shot learning with embedded class models and shot-free meta training. arXiv preprint arXiv:1905.04398, 2019. + +[31] Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B Tenenbaum, Hugo Larochelle, and Richard S Zemel. Meta-learning for semi-supervised few-shot classification. arXiv preprint arXiv:1803.00676, 2018. +[32] 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. +[33] Andrei A Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. arXiv preprint arXiv:1807.05960, 2018. +[34] Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61-80, 2008. +[35] Wei Shen, Kai Zhao, Yilu Guo, and Alan L Yuille. Label distribution learning forests. In Advances in Neural Information Processing Systems, pages 834-843, 2017. +[36] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems, pages 4077-4087, 2017. +[37] 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. +[38] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In Proceedings of the IEEE international conference on computer vision, pages 843-852, 2017. +[39] Qianru Sun, Yaoyao Liu, Tat-Seng Chua, and Bernt Schiele. Meta-transfer learning for few-shot learning. In CVPR, 2019. +[40] Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1199-1208, 2018. +[41] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. In Advances in neural information processing systems, pages 3630-3638, 2016. +[42] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The caltech-ucsd birds-200-2011 dataset. 2011. +[43] Han-Jia Ye, Hexiang Hu, De-Chuan Zhan, and Fei Sha. Learning embedding adaptation for few-shot learning. arXiv preprint arXiv:1812.03664, 2018. +[44] Chao Yin and Xin Geng. Facial age estimation by conditional probability neural network. In Chinese Conference on Pattern Recognition, pages 243-250. Springer, 2012. +[45] Sung Whan Yoon, Jun Seo, and Jaekyun Moon. Tapnet: Neural network augmented with task-adaptive projection for few-shot learning. arXiv preprint arXiv:1905.06549, 2019. +[46] Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016. + +[47] Ruixiang Zhang, Tong Che, Zoubin Ghahramani, Yoshua Bengio, and Yangqiu Song. Metagan: An adversarial approach to few-shot learning. In Advances in Neural Information Processing Systems, pages 2365-2374, 2018. \ No newline at end of file diff --git a/dpgndistributionpropagationgraphnetworkforfewshotlearning/images.zip b/dpgndistributionpropagationgraphnetworkforfewshotlearning/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..42e0df512bcd40ed2d8757e0375f0f81c6651d60 --- /dev/null +++ b/dpgndistributionpropagationgraphnetworkforfewshotlearning/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e2bfac9941db8c016194e4cafcc75bbf6802d048279a59e513326f8057cba1f +size 699212 diff --git a/dpgndistributionpropagationgraphnetworkforfewshotlearning/layout.json b/dpgndistributionpropagationgraphnetworkforfewshotlearning/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..1e74d270994044f7ccf5876661364da71edb03ec --- /dev/null +++ b/dpgndistributionpropagationgraphnetworkforfewshotlearning/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73d053971de75049d9910d7539bfd37bca77b2a116f8f3e619d48b71ed2f3fdd +size 438969 diff --git a/drlossimprovingobjectdetectionbydistributionalranking/e5e87369-0817-425b-947e-1d61bf484391_content_list.json b/drlossimprovingobjectdetectionbydistributionalranking/e5e87369-0817-425b-947e-1d61bf484391_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..de44d32b98bafd2c95ac7ea069ee18af7891dbb6 --- /dev/null +++ b/drlossimprovingobjectdetectionbydistributionalranking/e5e87369-0817-425b-947e-1d61bf484391_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:45c7c19e10926c92311a6d52a61c617915074d353a071337b04cfdf8c477fac8 +size 80146 diff --git a/drlossimprovingobjectdetectionbydistributionalranking/e5e87369-0817-425b-947e-1d61bf484391_model.json b/drlossimprovingobjectdetectionbydistributionalranking/e5e87369-0817-425b-947e-1d61bf484391_model.json new file mode 100644 index 0000000000000000000000000000000000000000..a5a0dce6b6ef2c8c5f586834f2ea8ef615c20960 --- /dev/null +++ b/drlossimprovingobjectdetectionbydistributionalranking/e5e87369-0817-425b-947e-1d61bf484391_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8de874b581e0973049cf03ea310fa70d93aadfdd792d68dcfcc6f89390f2dbf8 +size 94747 diff --git a/drlossimprovingobjectdetectionbydistributionalranking/e5e87369-0817-425b-947e-1d61bf484391_origin.pdf b/drlossimprovingobjectdetectionbydistributionalranking/e5e87369-0817-425b-947e-1d61bf484391_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b13917ce1e969059379fef8634901f216dc98781 --- /dev/null +++ b/drlossimprovingobjectdetectionbydistributionalranking/e5e87369-0817-425b-947e-1d61bf484391_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af4a843c69d5d60753e548a8d29ef327747277d879ac0762f1e12a5ab5e1cad9 +size 755449 diff --git a/drlossimprovingobjectdetectionbydistributionalranking/full.md b/drlossimprovingobjectdetectionbydistributionalranking/full.md new file mode 100644 index 0000000000000000000000000000000000000000..af048af0b8a9fd660f691920fd7eb0fd35a02c6d --- /dev/null +++ b/drlossimprovingobjectdetectionbydistributionalranking/full.md @@ -0,0 +1,389 @@ +# DR Loss: Improving Object Detection by Distributional Ranking + +Qi Qian $^{1}$ Lei Chen $^{2}$ Hao Li $^{2}$ Rong Jin $^{1}$ + +Alibaba Group + +Bellevue, WA, 98004, USA + +$^{2}$ Hangzhou, China + +{qi.qian, fanjiang.cl, lihao.lh, jinrong.jr}@alibaba-inc.com + +# Abstract + +Most of object detection algorithms can be categorized into two classes: two-stage detectors and one-stage detectors. Recently, many efforts have been devoted to one-stage detectors for the simple yet effective architecture. Different from two-stage detectors, one-stage detectors aim to identify foreground objects from all candidates in a single stage. This architecture is efficient but can suffer from the imbalance issue with respect to two aspects: the inter-class imbalance between the number of candidates from foreground and background classes and the intra-class imbalance in the hardness of background candidates, where only a few candidates are hard to be identified. In this work, we propose a novel distributional ranking (DR) loss to handle the challenge. For each image, we convert the classification problem to a ranking problem, which considers pairs of candidates within the image, to address the inter-class imbalance problem. Then, we push the distributions of confidence scores for foreground and background towards the decision boundary. After that, we optimize the rank of the expectations of derived distributions in lieu of original pairs. Our method not only mitigates the intra-class imbalance issue in background candidates but also improves the efficiency for the ranking algorithm. By merely replacing the focal loss in RetinaNet with the developed DR loss and applying ResNet-101 as the backbone, mAP of the single-scale test on COCO can be improved from $39.1\%$ to $41.7\%$ without bells and whistles, which demonstrates the effectiveness of the proposed loss function. + +# 1. Introduction + +The performance of object detection has been improved dramatically with the development of deep neural networks in the past few years. Most of detection algorithms fall into two categories: two-stage detectors [4, 11, 12, 15] and one-stage detectors [3, 14, 16, 18, 21, 25, 29]. For the two-stage schema, the procedure of the algorithms can be divided + +![](images/872789be0d0d0a2b6304e8949ff1b0890613cabe1ab4b9f342e95f9c9f5b2bf3.jpg) +Figure 1. Illustration of the proposed distributional ranking loss. First, we push the distributions of confidence scores towards the decision boundary by re-weighting examples. Then, we try to rank the expectation of the derived distribution of foreground above that of background by a large margin. + +into two parts. In the first stage, a region proposal method filters most of background candidate bounding boxes and keeps only a small set of candidates. In the following stage, these candidates are classified as specific foreground classes or background and the bounding boxes will be further refined by minimizing a regression loss. Two-stage detectors demonstrate the superior performance on real-world data sets while the efficiency can be an issue in practice, especially for the devices with limited computing resources, e.g., smartphones, cameras, etc. + +Therefore, one-stage detectors are developed for the efficient detection. Different from two-stage detectors, one-stage methods consist of a single phase and have to identify foreground objects from all candidates directly. The procedure of one-stage detectors is straightforward and efficient. However, one-stage detectors can suffer from the imbalance problem that can reside in the following two aspects. First, the numbers of candidates between classes are imbalanced. Without a region proposal phase, the number of background candidates can easily overwhelm that of foreground ones. Second, the hardness of identification for background candidates is imbalanced. Most of them can be easily identified from foreground objects while only a few of them are hard to be classified. + +To mitigate the imbalance problem, SSD [18] adopts hard negative mining in training, which is a popular strategy [24, 27] to keep a small set of background candidates + +with the highest loss. By eliminating simple background candidates, the strategy balances the number of candidates between classes and the hardness of background simultaneously. However, certain information from background can be lost, and thus the detection performance can degrade as illustrated in [16]. RetinaNet [16] proposes to keep all background candidates but assign different weights for the loss functions of candidates. The weighted cross entropy loss is referred as focal loss. It makes the algorithm focus on the hard candidates while reserving the information from all candidates. This strategy improves the performance of one-stage detectors significantly. Despite the success of focal loss, it re-weights classification losses in a heuristic way and can be insufficient to address the imbalance problem. Moreover, focal loss is designed for a single candidate and is image-independent while object detection aims to identify objects in a single image. Focal loss lacks the exploration for each image as a whole and the inconsistency can make the performance suboptimal. + +In this work, we propose an image-dependent ranking loss to handle the imbalance challenge. First, to mitigate the effect of the inter-class imbalance problem, we convert the classification problem to a ranking problem, which considers ranks of pairs. Since each pair consists of a foreground candidate and a background candidate, it is well balanced. Moreover, considering the intra-class imbalance in hardness of background candidates, we design the distributional ranking (DR) loss to rank the distribution of confidence scores for foreground above that for background candidates. As illustrated in Fig. 1, we first push the original distributions towards the decision boundary with appropriate constraints. After obtaining the drifted distributions, we can rank the expectations of distributions in lieu of original examples to identify foreground from background, which improves the efficiency by reducing the number of pairs from $\mathcal{O}(n^2)$ to $\mathcal{O}(1)$ in ranking, where $n$ is the number of candidates in an image. Compared with focal loss, DR loss is image-dependent and can explore the information within each image sufficiently. + +We conduct experiments on COCO [17] to demonstrate the proposed DR loss. Since the focal loss is designed as the classification loss in RetinaNet, we adopt RetinaNet as the base detector for a fair comparison. Specifically, we merely replace the focal loss with the DR loss while keeping other components unchanged. With ResNet-101 [12] as the backbone, minimizing our loss function can boost the mAP of RetinaNet from $39.1\%$ to $41.7\%$ , which confirms the effectiveness of the proposed loss. + +The rest of this paper is organized as follows. Section 2 reviews the related work in object detection. Section 3 describes the details of the proposed DR loss. Section 4 compares our method to others on COCO detection task. Finally, Section 5 concludes this work. + +# 2. Related Work + +Detection is a fundamental task in computer vision. In conventional methods, hand crafted features, e.g., HOG [5] and SIFT [19], are used for detection either with a sliding-window strategy which holds a dense set of candidates, e.g., DPM [6] or with a region proposal method which keeps a sparse set of candidates, e.g., Selective Search [26]. Recently, deep neural networks have shown the dominating performance in classification tasks [13], and the features obtained from neural networks are leveraged for detection tasks. + +R-CNN [9] equips the region proposal stage and works as a two-stage algorithm. It first obtains a sparse set of regions by selective search. In the next stage, a deep convolutional neural network is applied to extract features for each region. Finally, regions are classified with a conventional classifier, e.g., SVM. R-CNN improves the performance of detection by a large margin but the procedure is too slow for real-world applications. Hence, many variants are developed to accelerate it [8, 22]. To further improve the accuracy, Mask-RCNN [11] adds a branch for object mask prediction to boost the performance with the additional information from multi-task learning. Besides the two-stage structure, Cascade R-CNN [2] develops a multi-stage strategy to promote the quality of detectors after the region proposal stage in a cascade fashion. + +One-stage detectors are developed for efficiency [3, 18, 20, 23, 29]. Since there is no region proposal phase to sample background candidates, one-stage detectors can suffer from the imbalance issue from both the inter-class imbalance between foreground and background candidates and intra-class imbalance in the background candidates. To address the challenge, SSD [18] adopts hard negative mining, which only keeps a small set of hard background candidates for training. Recently, focal loss [16] is proposed to handle the problem in RetinaNet. Unlike SSD, it keeps all background candidates but re-weights them such that the hard examples are assigned with a large weight. Focal loss improves the performance of one-stage detection explicitly, but the imbalance problem in detection is still not sufficiently explored. Besides those anchor-based algorithms, anchor-free one-stage detectors [25, 29] have been developed, where focal loss is also applied for classification. The work closest to ours is the AP-loss in [3], where a ranking loss is designed to optimize the average precision. However, the loss focuses on the original pairs and is nondifferentiable. A specific algorithm has to be developed to minimize the AP-loss. In this work, we develop the DR loss that ranks the expectations of distributions in lieu of original pairs. DR loss is differentiable and can be optimized with stochastic gradient descent (SGD) in the standard training pipeline. Therefore, our loss can work in a plug and play manner, which is important for real-world applications. + +# 3. DR Loss + +Given a set of candidate bounding boxes from an image, a detector has to identify the foreground objects from background ones with a classification model. Let $\theta$ denote a classifier and it can be learned by optimizing the problem + +$$ +\min _ {\theta} \sum_ {i} ^ {N} \sum_ {j, k} \ell \left(p _ {i, j, k}\right) \tag {1} +$$ + +where $N$ is the number of total images. In this work, we employ sigmoid function to predict the probability for each candidate. $p_{i,j,k}$ is the prediction from $\theta$ and indicates the estimated probability that the $j$ -th candidate in the $i$ -th image is from the $k$ -th class. $\ell(\cdot)$ is the loss function. In most of detectors, the classifier is learned by minimizing the cross entropy loss or its variants. + +The objective in Eqn. 1 is prevalent but can suffer from the inter-class imbalance problem. The problem can be demonstrated by rewriting the original problem as + +$$ +\min _ {\theta} \sum_ {i} ^ {N} \left(\sum_ {j _ {+}} ^ {n _ {+}} \ell \left(p _ {i, j _ {+}}\right) + \sum_ {j _ {-}} ^ {n _ {-}} \ell \left(p _ {i, j _ {-}}\right)\right) \tag {2} +$$ + +where $j_{+}$ and $j_{-}$ denote the positive (i.e., foreground) and negative (i.e., background) examples (e.g., anchors), respectively. $n_{+}$ and $n_{-}$ are the corresponding number of examples. When $n_{-} \gg n_{+}$ , the accumulated loss from the latter term will dominate. This issue is from the fact that the losses for positive and negative examples are separated and the contribution from positive examples will be overwhelmed by negative ones. One heuristic to handle the problem is emphasizing positive examples, which can change the weights for the corresponding losses. In this work, we aim to address the problem in a fundamental way. For brevity, we will omit the index of image (i.e., $i$ ) from the next subsection. + +# 3.1. Ranking + +To mitigate the challenge from the imbalance between classes, we consider to optimize the rank between positive and negative examples. Given a pair of positive and negative examples, an ideal ranking model can rank the positive example above the negative one with a large margin + +$$ +\forall j _ {+}, j _ {-} \quad p _ {j +} - p _ {j -} \geq \gamma +$$ + +where $\gamma$ is a non-negative constant. Compared with the objective in Eqn. 1, the ranking model optimizes the relationship between individual positive and negative examples, which is well balanced. + +The objective of ranking for a single image can be written as + +$$ +\min _ {\theta} \sum_ {j +} ^ {n _ {+}} \sum_ {j -} ^ {n _ {-}} \ell \left(p _ {j -} - p _ {j +} + \gamma\right) \tag {3} +$$ + +where the hinge loss is applied as the loss function + +$$ +\ell_ {\text {h i n g e}} (z) = [ z ] _ {+} = \left\{ \begin{array}{l l} z & z > 0 \\ 0 & o. w. \end{array} \right. +$$ + +The objective can be interpreted by the equivalent form + +$$ +\begin{array}{l} \frac {1}{n _ {+} n _ {-}} \sum_ {j _ {+}} ^ {n _ {+}} \sum_ {j _ {-}} ^ {n _ {-}} \ell \left(p _ {j _ {-}} - p _ {j _ {+}} + \gamma\right) \\ = E _ {j _ {+}, j _ {-}} \left[ \ell \left(p _ {j _ {-}} - p _ {j _ {+}} + \gamma\right) \right] \tag {4} \\ \end{array} +$$ + +It demonstrates that the objective measures the expectation of the ranking loss on a randomly sampled pair. + +The ranking loss addresses the inter-class imbalance issue by comparing the rank of each positive example to negative examples. However, it ignores a phenomenon in object detection, where the hardness of negative examples is also imbalanced. Besides, the ranking loss introduces a new challenge, that is, the vast number of pairs. We tackle them in the following subsection. + +# 3.2. Distributional Ranking + +As indicated in Eqn. 4, the ranking loss in Eqn. 3 punishes a mis-ranking for a uniformly sampled pair. In detection, most of negative examples can be easily ranked well, that is, a randomly sampled pair will not incur the ranking loss with high probability. Therefore, we consider to optimize the ranking boundary to avoid the trivial solution + +$$ +\min _ {\theta} \ell \left(\max _ {j -} \left\{p _ {j -} \right\} - \min _ {j +} \left\{p _ {j +} \right\} + \gamma\right) \tag {5} +$$ + +If we can rank the positive example with the lowest score above the negative one with the highest confidence, the whole set of examples in an image are perfectly ranked. The pair in Eqn. 5 is referred as the worst-case scenario, which will incur the largest loss among all pairs. Compared with the conventional ranking loss, optimizing the loss from the worst-case scenario is much more efficient, which reduces the number of pairs from $n_{+}n_{-}$ to 1. Moreover, it clearly eliminates the inter-class imbalance issue since only a single pair of positive and negative examples is required for each image. However, this formulation is very sensitive to the selected pair, which can result in the degraded detection model. + +To improve the robustness, we first introduce the distribution of confidence scores for the positive and negative examples and obtain the expectation as + +$$ +P _ {+} = \sum_ {j _ {+}} ^ {n _ {+}} q _ {j _ {+}} p _ {j _ {+}}; \quad P _ {-} = \sum_ {j -} ^ {n _ {-}} q _ {j -} p _ {j -} +$$ + +where $\mathbf{q}_{+} \in \Delta$ and $\mathbf{q}_{-} \in \Delta$ denote the distributions over positive and negative examples, respectively. $P_{+}$ and + +$P_{-}$ represent the expected scores under the corresponding distribution. $\Delta$ is the simplex as $\Delta = \{q:\sum_{j}q_{j} = 1,\forall j,q_{j}\geq 0\}$ . When $\mathbf{q}_{+}$ and $\mathbf{q}_{-}$ are the uniform distribution, $P_{+}$ and $P_{-}$ demonstrate the expectation from the original distribution. + +With these definitions, the distribution corresponding to the worst-case scenario can be derived as + +$$ +P _ {+} = \min _ {\mathbf {q} _ {+} \in \Delta} \sum_ {j _ {+}} ^ {n _ {+}} q _ {j _ {+}} p _ {j _ {+}}; P _ {-} = \max _ {\mathbf {q} _ {-} \in \Delta} \sum_ {j _ {-}} ^ {n _ {-}} q _ {j _ {-}} p _ {j _ {-}} +$$ + +We can rewrite the problem in Eqn. 5 in the equivalent form + +$$ +\min _ {\theta} \ell \left(P _ {-} - P _ {+} + \gamma\right) +$$ + +which can be considered as ranking the distributions between positive and negative examples in the worst-case scenario. + +By investigating the new formulation, it is obvious that optimizing the worst-case scenario is not robust due to the fact that the domain of the generated distribution is unconstrained. Consequently, it will concentrate on a single example while ignoring the influence of the original distribution that contains massive information. Hence, we improve the robustness of the loss by regularizing the freedom of the derived distribution + +$$ +\begin{array}{l} P _ {-} = \max _ {\mathbf {q} _ {-} \in \Delta , \Omega (\mathbf {q} _ {-} | | \mathbf {o} _ {-}) \leq \epsilon_ {-}} \sum_ {j -} ^ {n _ {-}} q _ {j -} p _ {j -} \\ - P _ {+} = \max _ {\mathbf {q} _ {+} \in \Delta , \Omega (\mathbf {q} _ {+} | | \mathbf {o} _ {+}) \leq \epsilon_ {+}} \sum_ {j +} ^ {n _ {+}} q _ {j +} (- p _ {j +}) \\ \end{array} +$$ + +where $\mathbf{o}_{+},\mathbf{o}_{-}$ denote the original distributions for positive and negative examples, respectively. $\Omega (\cdot)$ is a regularizer for the diversity of the distribution to prevent the distribution from the trivial one-hot solution. It measures the similarity between the generated distribution and the original distribution, and some popular similarity function can be applied, e.g., $L_{p}$ distance, Renyi entropy, Shannon entropy, etc. $\epsilon_{-}$ and $\epsilon_{+}$ are constants to control the freedom of derived distributions. + +To obtain the constrained distribution, we consider the subproblem + +$$ +\begin{array}{l} \max _ {\mathbf {q} _ {-} \in \Delta} \sum_ {j -} q _ {j -} p _ {j -} \\ s. t. \quad \Omega (\mathbf {q} _ {-} | | \mathbf {o} _ {-}) \leq \epsilon_ {-} \\ \end{array} +$$ + +According to the dual theory [1], given $\epsilon_{-}$ , we can find the parameter $\lambda_{-}$ to obtain the optimal $\mathbf{q}_{-}$ by solving the problem + +$$ +\max _ {\mathbf {q} _ {-} \in \Delta} \sum_ {j -} q _ {j _ {-}} p _ {j _ {-}} - \lambda_ {-} \Omega (\mathbf {q} _ {-} \| \mathbf {o} _ {-}) +$$ + +We observe that the former term is linear in $\mathbf{q}_{-}$ . Hence, if $\Omega (\cdot)$ is convex in $\mathbf{q}_{-}$ , the problem can be solved efficiently by first order algorithms [1]. In this work, we adopt KL-divergence as the regularizer and have the closed-form solution as follows + +Proposition 1. For the problem + +$$ +\max _ {\mathbf {q} _ {-} \in \Delta} \sum_ {j -} q _ {j _ {-}} p _ {j _ {-}} - \lambda_ {-} \mathrm {K L} (\mathbf {q} _ {-} \| \mathbf {o} _ {-}) +$$ + +we have the closed-form solution as + +$$ +q _ {j _ {-}} = \frac {1}{Z _ {-}} o _ {j _ {-}} \exp \left(\frac {p _ {j _ {-}}}{\lambda_ {-}}\right); \quad Z _ {-} = \sum_ {j _ {-}} o _ {j _ {-}} \exp \left(\frac {p _ {j _ {-}}}{\lambda_ {-}}\right) +$$ + +Proof. It can be proved directly from K.K.T. condition [1]. $\square$ + +For the distribution over positive examples, we have the similar result as + +Proposition 2. For the problem + +$$ +\max _ {\mathbf {q} + \in \Delta} \sum_ {j +} q _ {j +} (- p _ {j +}) - \lambda_ {+} \mathrm {K L} (\mathbf {q} _ {+} \| \mathbf {o} _ {+}) +$$ + +we have the closed-form solution as + +$$ +q _ {j _ {+}} = \frac {1}{Z _ {+}} o _ {j _ {+}} \exp \left(\frac {- p _ {j _ {+}}}{\lambda_ {+}}\right); \quad Z _ {+} = \sum_ {j _ {+}} o _ {j _ {+}} \exp \left(\frac {- p _ {j _ {+}}}{\lambda_ {+}}\right) +$$ + +Remark 1 These Propositions show that the harder the example, the larger the weight of the example. Besides, the weight is image-dependent and will be affected by other examples in the same image. + +The original distributions (i.e., $\mathbf{o}_{-}$ and $\mathbf{o}_{+}$ ) can also influence the derived distributions by weighting each candidate. Therefore, the prior knowledge about the problem can be encoded into the original distributions, which makes generating new distributions more flexible. Here we take $\mathbf{o}_{-}$ as an example to illustrate different distributions. + +- Uniform distribution: It means that $\forall j$ , $o_{j-} = 1 / n-$ . With the constant value, the closed-form solution can be simplified as $q_{j-} = \frac{1}{Z_{-}} \exp \left( \frac{p_{j-}}{\lambda_{-}} \right)$ ; $Z_{-} = \sum_{j-} \exp \left( \frac{p_{j-}}{\lambda_{-}} \right)$ +- Hard negative mining: In this scenario, we assume $\forall j$ , $o_{j-} \in \{0,1/\hat{n}_{-}\}$ , where $\hat{n}_{-}$ denotes the number of non-zero elements in $\mathbf{o}_{-}$ . According to Proposition 1, only candidates selected by $\mathbf{o}_{-}$ will be accumulated to derive the new distribution. Therefore, our formulation can incorporate with hard negative mining by setting the weights in $\mathbf{o}_{-}$ appropriately. + +To keep the loss function simple, we adopt the uniform distribution in this work. Fig. 2 illustrates the changing of the distribution with the proposed strategy. The derived distribution approaches the distribution corresponding to the worst-case scenario when decreasing $\lambda$ . Note that the original distributions in Fig. 2 (a) and Fig. 2 (b) have the same mean but different variance. For the distribution with the small variance as in Fig. 2 (a), we can observe that the regularizer $\lambda$ should be small to change the distribution effectively. When the distribution has the large variance, Fig. 2 (b) shows that a large $\lambda$ is sufficient to change the shape of the distribution dramatically. Considering that the distributions of positive and negative examples have different variances, Fig. 2 implies that different weights for the regularizers should be assigned. + +![](images/6b1d14da9efea4daf22ea335d1e62329387f9845109011b6663ebb536df56445.jpg) +(a) Small Variance +Figure 2. Illustration of the drifting in the distribution. We randomly sample $1e7$ points from a Gaussian distribution with different variances to mimic scores of anchors. We change the weights of examples according to the proposed strategy as in Proposition 1 and then plot the curves of different probability density functions (PDF) when varying $\lambda$ . + +![](images/2c37228b13c12922527b7a73d7ff83ab992a586a551f604a94f88836f9c9f3d9.jpg) +(b) Large Variance + +With the closed-form solutions of distributions, the expectation of distributions can be computed as + +$$ +\hat {P} _ {-} = \sum_ {j -} ^ {n _ {-}} q _ {j -} p _ {j -} = \sum_ {j -} ^ {n _ {-}} \frac {1}{Z _ {-}} \exp \left(\frac {p _ {j -}}{\lambda_ {-}}\right) p _ {j -} \tag {6} +$$ + +$$ +\hat {P} _ {+} = \sum_ {j -} ^ {n _ {-}} q _ {j +} p _ {j +} = \sum_ {j +} ^ {n _ {+}} \frac {1}{Z _ {+}} \exp \left(\frac {- p _ {j +}}{\lambda_ {+}}\right) p _ {j +} +$$ + +Finally, smoothness is crucial for the convergence of non-convex optimization [7]. So we apply the smooth approximation instead of the original hinge loss as the loss function for pairs. The popular substitutes to the hinge loss include quadratic loss and logistic loss + +$$ +\ell_ {\text {q u a d}} (z) = \left\{ \begin{array}{c c} z & z \geq \rho \\ \frac {(z + \rho) ^ {2}}{4 \rho} & - \rho < z < \rho \\ 0 & z \leq - \rho \end{array} \right. \tag {7} +$$ + +$$ +\ell_ {\text {l o g i s t i c}} (z) = \frac {1}{L} \log (1 + \exp (L z)) \tag {8} +$$ + +where $\rho$ and $L$ control the approximation error of the function. The larger the $L$ is, the closer to the hinge loss the + +approximation is. $\rho$ works in an opposite direction. Fig. 3 compares the hinge loss to its smooth variants. Explicitly, these functions share the similar shape and we adopt the logistic loss in this work. + +![](images/463b16134d26805317330535913d9d97767d7977becd210e06246504b619f886.jpg) +(a) Quadratic Loss +Figure 3. Illustration of the hinge loss and its smooth variants. + +![](images/c2855202ab1079d08696659d452a362455d492156bf290cb1dc8431e9b35259a.jpg) +(b) Logistic Loss + +Incorporating all of these components, our distributional ranking loss can be defined as + +$$ +\min _ {\theta} \mathcal {L} _ {\mathrm {D R}} (\theta) = \sum_ {i} ^ {N} \ell_ {\text {l o g i s t i c}} \left(\hat {P} _ {i, -} - \hat {P} _ {i, +} + \gamma\right) \tag {9} +$$ + +where $\hat{P}_{i, - }$ and $\hat{P}_{i, + }$ are given in Eqn. 6 and $\ell_{\mathrm{logistic}}(\cdot)$ is in Eqn. 8. If there is no positive examples in an image, we will let $\hat{P}_{i, + } = 1$ . Compared with the conventional ranking loss, we rank the expectations of two distributions. It shrinks the number of pairs to 1 that leads to the efficient optimization. + +The gradient of the objective in Eqn. 9 is easy to compute. The detailed calculation of the gradient can be found in the supplementary. + +If optimizing the DR loss by the standard SGD with mini-batch as $\theta_{t + 1} = \theta_t - \eta \frac{1}{m}\sum_{s = 1}^{m}\nabla \ell_t^s$ , we can show that it can converge as in the following theorem. The norm of the gradient is applied to measure the convergence, which is a standard criterion for non-convex optimization [7]. The detailed proof is cast to the supplementary. + +Theorem 1. Let $\theta_t$ denote the model obtained from the $t$ -th iteration with SGD optimizer and the size of minibatch is $m$ . If we assume the objective $\mathcal{L}$ in Eqn. 9 is $\mu$ -smoothness and the variance of the gradient is bounded as $\forall s, \| \nabla \ell_t^s - \nabla \mathcal{L}_t \|_F \leq \delta$ , when setting the learning rate as $\eta = \frac{\sqrt{2m\mathcal{L}(\theta_0)}}{\delta\sqrt{\mu T}}$ and $\eta \leq \frac{1}{\mu}$ , we have + +$$ +\frac {1}{T} \sum_ {t} \| \nabla \mathcal {L} (\theta_ {t}) \| _ {F} ^ {2} \leq \frac {2 \delta \sqrt {2 \mu}}{\sqrt {m T \mathcal {L} (\theta_ {0})}} +$$ + +Remark 2 Theorem 1 implies that the learning rate depends on the mini-batch size and the number of iterations as $\eta = \mathcal{O}(\sqrt{m / T})$ and the convergence rate is $\mathcal{O}(1 / \sqrt{mT})$ , where $mT / N$ is the number of training epochs. + +We can obtain a scaling strategy for the learning rate. Let $\eta_0$ , $m_0$ and $T_{0}$ denote a default configuration for training. If we change the mini-batch size as $m^{\prime} = m_{0} / \alpha$ , where + +$\alpha$ is a non-negative constant, and keep the same number of epochs for training (i.e., $T' = \alpha T_0$ ), the convergence rate remains the same. However, the learning rate becomes $\eta' = \mathcal{O}(\sqrt{m'/T'}) = \eta_0 / \alpha$ . It shows that to obtain the same performance with a different mini-batch size, we have to rescale the learning rate with a corresponding factor, which is consistent with the observation in [10]. Besides, the learning rate should be no larger than $1 / \mu$ , which means that the scaling strategy is inapplicable when the mini-batch size is too large. + +# 3.3. Recover Classification from Ranking + +Detection is to identify foreground objects from background. Therefore, the results from ranking have to be converted to classification. A straightforward way is to set a threshold for all ranking scores. However, the range of ranking scores from different images can vary due to the image-dependent mechanism, and should be calibrated for classification. We investigate the bound for the ranking scores of positive and negative examples as follows. + +Theorem 2. When optimizing the ranking problem as + +$$ +\forall j _ {+}, j _ {-}, \quad p _ {j _ {+}} - p _ {j _ {-}} \geq \gamma +$$ + +it implies + +$$ +\forall j _ {+}, \quad p _ {j _ {+}} > \gamma ; \quad \forall j _ {-}, \quad p _ {j _ {-}} \leq 1 - \gamma +$$ + +Therefore, we can recover the standard classification criterion by setting a large margin. + +Corollary 1. If setting the margin of ranking as $\gamma = 0.5$ , we can recover the classification criterion for ranking scores + +$$ +\forall j _ {+}, \quad p _ {j _ {+}} > 0. 5; \quad \forall j _ {-}, \quad p _ {j _ {-}} \leq 0. 5 +$$ + +With these appropriate settings, our final objective for detection can be summarized as + +$$ +\min \sum_ {i} ^ {N} \tau \ell_ {\mathrm {D R}} ^ {i} + \ell_ {\mathrm {R e g}} ^ {i} +$$ + +where $\ell_{\mathrm{Reg}}$ is the original regression loss in RetinaNet and we keep it unchanged. $\tau$ is the parameter for balancing the weights between classification and regression. We fix it as $\tau = 4$ in the experiments. + +# 4. Experiments + +# 4.1. Implementation Details + +We evaluate the proposed DR loss on COCO data set [17], which contains about $118k$ images for training, $5k$ images for validation, and $40k$ images for test. To focus on the comparison of loss functions, we employ the structure of + +RetinaNet [16] as the backbone and only substitute the corresponding focal loss. For a fair comparison, we implement our algorithm in a public codebase ${}^{1}$ . Besides,we train the model with the same configuration as RetinaNet. Specifically,the model is learned with SGD on 8 GPUs and the mini-batch size is set as 16 where each GPU can hold 2 images at each iteration. Most of experiments are trained with ${90k}$ iterations that is denoted as " $1 \times$ ". The initial learning rate is 0.01 and is decayed by a factor of 10 after ${60k}$ iterations and then ${80k}$ iterations. For anchor density,we apply the same setting as in [16],where each location has 3 scales and 3 aspect ratios. The standard COCO evaluation criterion is used to compare the performance of different methods. + +# 4.2. Parameters in DR Loss + +From the definition in Eqn. 9, DR loss has three parameters $\lambda_{+}, \lambda_{-}$ and $L$ to be tuned. $\lambda_{+}$ and $\lambda_{-}$ regularize the distribution of scores for positive and negative examples, respectively. $L$ controls the smoothness of the loss function. The margin $\gamma$ is fixed as 0.5 according to Corollary 1. Compared with the focal loss [16], DR loss has one more parameter. However, RetinaNet lacks optimizing the relationship between positive and negative distributions, and it has an additional parameter to initialize the output probability of the classifier (i.e., 0.01) to fit the distribution of background. In contrast, we initialize the probability of the sigmoid function at 0.5, which is the default threshold for binary classification scenario without any prior knowledge. It verifies that the proposed DR loss can handle the imbalance problem better. Consequently, DR loss roughly has the same number of parameters as that in focal loss. + +We will have the ablation study on these parameters to illustrate the influence in the next subsections. Note that RetinaNet applies Feature Pyramid Network (FPN) [15] to obtain multiple scale features. To compute DR loss in one image, we collect anchors from multiple pyramid levels and obtain a single distribution for positive and negative anchors, respectively. + +# 4.3. Effect of Parameters + +We conduct ablation experiments to evaluate the effect of multiple parameters on the minival set. All experiments in this subsection are implemented with a single image scale of 800 for training and test. ResNet-50 [12] is applied as the backbone for comparison. Only horizontal flipping is adopted as the data augmentation in this subsection. + +Effect of $\lambda_{+}$ and $\lambda_{-}$ : First, we evaluate the effect of $\lambda_{+}$ and $\lambda_{-}$ in Eqn. 6. These parameters constrain the freedom of the derived distributions. As illustrated in Fig. 2, + +variances of distributions will have the impact on selecting appropriate weights for regularizers. We investigate the variance of positive and negative anchors, and observe that the standard deviation of positive anchors is about 10 times larger than that of negative ones. So we roughly set $\lambda_{+} = 1$ and $\lambda_{-} = 0.1$ and fine-tune them as $\lambda_{+} = 1 / \log (h_{+})$ and $\lambda_{-} = 0.1 / \log (h_{-})$ . It is easy to show that this strategy is equivalent to fixing $\lambda_{+}$ and $\lambda_{-}$ as 1 and 0.1, and changing the base in the definition of the KL-divergence as $\mathrm{KL}(\mathbf{q}||\mathbf{o}) = \sum_{j}q_{j}\log_{h}\frac{q_{j}}{o_{j}}$ . + +We vary $h_{+}$ and $h_{-}$ and summarize the results in Table 1. First, we observe that the default setting with $\lambda_{+} = 1$ and $\lambda_{-} = 0.1$ can outperform focal loss by $1\%$ , which demonstrates the effectiveness of the proposed DR loss. Second, the performance of our loss is quite stable in a reasonable range. Finally, the distribution of positive anchors is more sensitive to a small $\lambda_{+}$ , which is consistent with the illustration in Fig. 2. We keep the best settings in the following experiments. + +
h+h-APAP50AP75APSAPMAPL
ee37.156.139.419.740.950.1
e3.537.456.040.020.841.250.5
e5.537.255.740.019.641.250.4
e2036.654.739.419.640.550.3
5.53.536.755.239.419.940.450.0
203.535.654.238.119.239.748.3
+ +Table 1. Comparison of $\lambda_{+}$ and $\lambda_{-}$ as in Eqn. 6. Note that we tune the parameters in the form of $\lambda_{+} = 1 / \log (h_{+})$ and $\lambda_{-} = 0.1 / \log (h_{-})$ . We adopt $1\times$ iterations and ResNet-50 as the backbone in training. Performance on the minival is reported for the ablation study. + +Effect of Smoothness: $L$ controls the smoothness of the loss function in Eqn. 8. We compare the model with different $L$ 's in Table 2. We also include the results for the quadratic loss function in Eqn. 7 with different $\rho$ 's for comparison. The original hinge loss is denoted as "Hinge". First, all smooth loss functions outperform hinge loss. It confirms that smoothness is important for non-convex optimization. Second, the smooth variants of hinge loss surpass focal loss with a significant margin. It is because that DR loss leverages the information from an image rather than an anchor, which can handle the imbalance issue better. Since quadratic loss and logistic loss have the similar performance, we adopt the logistic loss with $L = 6$ in the rest experiments. + +Effect of Pairing Strategy: In DR loss, we propose to rank a single pair consisting of expectations from positive and negative distributions. To evaluate the pairing strategy, we compare it to different strategies for ranking. Specifically, we denote optimizing all pairs in Eqn. 3 as "All". + +
LossAP\( AP_{50} \)\( AP_{75} \)\( AP_S \)\( AP_M \)\( AP_L \)
Focal36.155.038.719.539.549.0
Hinge35.854.038.319.339.547.6
\( \rho = 0.2 \)36.955.539.521.140.749.6
\( \rho = 0.5 \)37.256.039.821.141.150.4
L=437.255.939.920.341.050.3
L=637.456.040.020.841.250.5
L=837.155.739.719.541.250.5
L=1036.855.439.420.040.750.0
+ +Table 2. Comparison of different loss functions. $\rho$ and $L$ are from Eqn. 7 and Eqn. 8, respectively. + +
PairAP\( AP_{50} \)\( AP_{75} \)\( AP_S \)\( AP_M \)\( AP_L \)
All12.923.012.68.816.715.0
NegOnly37.055.539.519.840.750.5
DR37.456.040.020.841.250.5
+ +Table 3. Comparison of different pairing strategies. + +which is corresponding to the standard ranking problem. We also include a variant of DR loss as "NegOnly" that pushes distributions for negative anchors only. The objective of NegOnly on a single image can be written as + +$$ +\min _ {\theta} \frac {1}{n _ {+}} \sum_ {j _ {+}} \ell_ {\mathrm {l o g i s t i c}} (\hat {P} _ {-} - p _ {j _ {+}} + \gamma) +$$ + +The result of optimizing the worst-case scenario in Eqn. 5 is not included since training with that fails to obtain the meaningful result. + +The comparison is summarized in Table 3. As illustrated in Section 3.1, the conventional ranking algorithm suffers from the intra-class imbalance in the hardness of negative anchors, which results in the poor performance for detection. By mitigating this issue with the proposed strategy, NegOnly can outperform focal loss. It confirms that handling the imbalance in the negative anchors is important and the proposed strategy can serve the purpose well. Finally, we observe that a tailored distribution for positive anchors can further improve the performance as in DR loss. + +Effect of DR Loss: To illustrate the effectiveness of DR loss, we collect the confidence scores of anchors from all images in minival and compare the empirical probability density in Fig. 4. We include the results from cross entropy loss and focal loss in the comparison. + +First, we observe that most of examples have an extremely low confidence after minimizing cross entropy loss. It is because the number of negative examples overwhelms that of positive ones and it will classify most of examples to be negative to obtain a small loss as demonstrated in Eqn. 2. Second, focal loss is better than cross entropy loss by improving the distribution of positive anchors. However, the expectation of the foreground distribution is still close to + +
MethodsBackboneAP\( AP_{50} \)\( AP_{75} \)\( AP_S \)\( AP_M \)\( AP_L \)
two-stage detectors
Faster R-CNN+++ [12]ResNet-101-C434.955.737.415.638.750.9
Faster R-CNN w FPN [15]ResNet-101-FPN36.259.139.018.239.048.2
Deformable R-FCN [4]Aligned-Inception-ResNet37.558.040.819.440.152.5
Mask R-CNN [11]ResNet-101-FPN38.260.341.720.141.150.2
one-stage detectors
YOLOv2 [21]DarkNet-1921.644.019.25.022.435.5
SSD513 [18]ResNet-101-SSD31.250.433.310.234.549.8
AP-Loss [3]ResNet-101-FPN37.458.640.517.340.851.9
RetinaNet [16]ResNet-101-FPN39.159.142.321.842.750.2
RetinaNet [16]ResNeXt-32x8d-101-FPN40.861.144.124.144.251.2
CornerNet [14]Hourglass-10440.556.543.119.442.753.9
FSAF [29]ResNet-101-FPN40.961.544.024.044.251.3
FCOS [25]ResNet-101-FPN41.560.745.024.444.851.6
FCOS [25]ResNeXt-32x8d-101-FPN42.762.246.126.045.652.6
Dr. RetinaResNet-101-FPN41.760.944.823.544.953.1
Dr. RetinaResNeXt-32x8d-101-FPN43.162.846.425.646.254.0
Dr. Retina (multi-scale test)ResNet-101-FPN43.462.147.026.746.155.0
Dr. Retina (multi-scale test)ResNeXt-32x8d-101-FPN44.763.848.728.247.456.2
+ +Table 4. Comparison with the state-of-the-art methods on COCO test-dev set. + +![](images/7ecd74f20cdd6a7bb8cc557ade6739130d2b770eddb3a875f85d32d4b8143c1b.jpg) +(a) Negative Anchors Distribution (b) Positive Anchors Distribution Figure 4. Illustration of empirical PDF of distributions that are computed from images in the minival. + +![](images/32d7bf1b53310ef93e4c8735622f1e6c3b8b3984c0ba82a215e259f99174f934.jpg) + +that of background, and it interprets the fact that focal loss has to initialize the probability of the classifier to be small (i.e., 0.01). Compared to cross entropy and focal loss, DR loss improves the foreground distribution significantly. By optimizing our ranking loss with a large margin, the expectation of the positive anchors is larger than 0.5 while that of background is smaller than 0.1. It confirms that DR loss can address the imbalance between classes well. Besides, the hardness of negative anchors with DR loss is more balanced than that with cross entropy or focal loss. It verifies that with the image-dependent mechanism, DR loss can handle the intra-class imbalance in background examples and focus on the hard negative examples appropriately. More analysis can be found in the supplementary. + +# 4.4. Comparison with State-of-the-Art + +We denote RetinaNet with DR loss as "Dr. Retina" and compare it to the state-of-the-art detectors on COCO test-dev set. We follow the setting in [16] to increase the number + +of training iterations to $2 \times$ , which contains $180k$ iterations, and applies scale jitter in [640, 800] as the additional data augmentation for training. Note that we still use a single image scale and a single crop for test as above. Table 4 summarizes the comparison for Dr. Retina. With ResNet-101 as the backbone, we can observe that Dr. Retina improves mAP from $39.1\%$ to $41.7\%$ . It illustrates that DR loss can explore the imbalance issue in detection more sufficiently than focal loss. Equipped with ResNeXt-32x8d-101 [28] and $1.5 \times$ iterations (i.e., $135k$ iterations), the performance of Dr. Retina can achieve $43.1\%$ as a one-stage detector on COCO detection task without bells and whistles. Note that we only replace focal loss with DR loss to obtain the significant gain, which implies that DR loss can be a good substitute of focal loss. Finally, the multi-scale test with scales from $\{400, 500, 600, 700, 800, 900, 1000, 1100, 1200\}$ can further improve the performance as expected. + +# 5. Conclusion + +In this work, we introduce the distributional ranking loss to address the imbalance challenge in one-stage object detection. We first convert the original classification problem to a ranking problem, which balances the positive and negative classes. After that, we propose to push the original distributions to the decision boundary and rank the expectations of derived distributions in lieu of original examples to focus on the hard examples, which balances the hardness of background examples. Experiments on COCO verify the effectiveness of the proposed loss function. + +# References + +[1] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. +[2] Zhaowei Cai and Nuno Vasconcelos. Cascade R-CNN: delving into high quality object detection. In CVPR, pages 6154-6162, 2018. +[3] Kean Chen, Jianguo Li, Weiyao Lin, John See, Ji Wang, Lingyu Duan, Zhibo Chen, Changwei He, and Junni Zou. Towards accurate one-stage object detection with ap-loss. In CVPR, pages 5119-5127, 2019. +[4] Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In ICCV, pages 764-773, 2017. +[5] Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. In CVPR, pages 886-893, 2005. +[6] Pedro F. Felzenszwalb, David A. McAllester, and Deva Ramanan. A discriminatively trained, multiscale, deformable part model. In CVPR, 2008. +[7] Saeed Ghadimi and Guanghui Lan. Stochastic first- and zeroth-order methods for nonconvex stochastic programming. SIAM Journal on Optimization, 23(4):2341-2368, 2013. +[8] Ross B. Girshick. Fast R-CNN. In ICCV, pages 1440-1448, 2015. +[9] Ross B. Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, pages 580-587, 2014. +[10] 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. +[11] Kaiming He, Georgia Gkioxari, Piotr Dólar, and Ross B. Girshick. Mask R-CNN. In ICCV, pages 2980-2988, 2017. +[12] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. +[13] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1106-1114, 2012. +[14] Hei Law and Jia Deng. Cornernet: Detecting objects as paired keypoints. In ECCV, pages 765-781, 2018. +[15] Tsung-Yi Lin, Piotr Dólar, Ross B. Girshick, Kaiming He, Bharath Hariharan, and Serge J. Belongie. Feature pyramid networks for object detection. In CVPR, pages 936-944, 2017. + +[16] Tsung-Yi Lin, Priya Goyal, Ross B. Girshick, Kaiming He, and Piotr Dólar. Focal loss for dense object detection. In ICCV, pages 2999-3007, 2017. +[17] 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, pages 740-755, 2014. +[18] 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. +[19] David G. Lowe. Distinctive image features from scale-invariant keypoints. International Journal of Computer Vision, 60(2):91-110, 2004. +[20] Joseph Redmon, Santosh Kumar Divvala, Ross B. Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In CVPR, pages 779-788, 2016. +[21] Joseph Redmon and Ali Farhadi. YOLO9000: better, faster, stronger. In CVPR, pages 6517-6525, 2017. +[22] 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. +[23] Pierre Sermanet, David Eigen, Xiang Zhang, Michael Mathieu, Rob Fergus, and Yann LeCun. Overfeat: Integrated recognition, localization and detection using convolutional networks. In ICLR, 2014. +[24] Abhinav Shrivastava, Abhinav Gupta, and Ross B. Girshick. Training region-based object detectors with online hard example mining. In CVPR, pages 761-769, 2016. +[25] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. FCOS: Fully convolutional one-stage object detection. In ICCV, 2019. +[26] Jasper R. R. Uijlings, Koen E. A. van de Sande, Theo Gevers, and Arnold W. M. Smeulders. Selective search for object recognition. International Journal of Computer Vision, 104(2):154-171, 2013. +[27] Paul A. Viola and Michael J. Jones. Rapid object detection using a boosted cascade of simple features. In CVPR, pages 511-518, 2001. +[28] 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. +[29] Chenchen Zhu, Yihui He, and Marios Savvides. Feature selective anchor-free module for single-shot object detection. In CVPR, pages 840-849, 2019. \ No newline at end of file diff --git a/drlossimprovingobjectdetectionbydistributionalranking/images.zip b/drlossimprovingobjectdetectionbydistributionalranking/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..de23fd04cc0d321d4cf757045bc064a83a4ed17d --- /dev/null +++ b/drlossimprovingobjectdetectionbydistributionalranking/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f44994c23f9f0e21a6b6856b1dc6d3405eb5cbbb1f33db2269f6ddcb25bbbd2d +size 450411 diff --git a/drlossimprovingobjectdetectionbydistributionalranking/layout.json b/drlossimprovingobjectdetectionbydistributionalranking/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..9ac408a8121de8ac1a5ecfea46d26252966975f3 --- /dev/null +++ b/drlossimprovingobjectdetectionbydistributionalranking/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eaa0c40bdda463b2be696e0aa405d8e77e20ebcc1cd718e93d1bb7c1120ffba8 +size 429022 diff --git a/dsgndeepstereogeometrynetworkfor3dobjectdetection/f290faef-617d-475c-b743-a4e31d52dffc_content_list.json b/dsgndeepstereogeometrynetworkfor3dobjectdetection/f290faef-617d-475c-b743-a4e31d52dffc_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..84b17bfe0135b960de6bb3b87baf816822f8751f --- /dev/null +++ b/dsgndeepstereogeometrynetworkfor3dobjectdetection/f290faef-617d-475c-b743-a4e31d52dffc_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:086be2fbf6a48b0c1f18485b26669e29bac0176305480168e14cf69e95343c8d +size 83391 diff --git a/dsgndeepstereogeometrynetworkfor3dobjectdetection/f290faef-617d-475c-b743-a4e31d52dffc_model.json b/dsgndeepstereogeometrynetworkfor3dobjectdetection/f290faef-617d-475c-b743-a4e31d52dffc_model.json new file mode 100644 index 0000000000000000000000000000000000000000..4f265a6e88803c7a7d8dff3726c6bb213eaecb14 --- /dev/null +++ b/dsgndeepstereogeometrynetworkfor3dobjectdetection/f290faef-617d-475c-b743-a4e31d52dffc_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbcac319db7630f9d051c607976fae9e20beb10b609b6a80d752f81d3ea63e89 +size 104869 diff --git a/dsgndeepstereogeometrynetworkfor3dobjectdetection/f290faef-617d-475c-b743-a4e31d52dffc_origin.pdf b/dsgndeepstereogeometrynetworkfor3dobjectdetection/f290faef-617d-475c-b743-a4e31d52dffc_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..82646fff077355444e9c6e41b1dc9bf7a8ab0fcc --- /dev/null +++ b/dsgndeepstereogeometrynetworkfor3dobjectdetection/f290faef-617d-475c-b743-a4e31d52dffc_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f4ec9f58b8508a20473f11adcb8b012352c0e0b50510b3fefa2f4409a6e1da3 +size 444397 diff --git a/dsgndeepstereogeometrynetworkfor3dobjectdetection/full.md b/dsgndeepstereogeometrynetworkfor3dobjectdetection/full.md new file mode 100644 index 0000000000000000000000000000000000000000..59077bbe7a7f9c5486b25a0f302f387984609800 --- /dev/null +++ b/dsgndeepstereogeometrynetworkfor3dobjectdetection/full.md @@ -0,0 +1,373 @@ +# DSGN: Deep Stereo Geometry Network for 3D Object Detection + +Yilun Chen1 Shu Liu2 Xiaoyong Shen2 Jiaya Jia1,2 + +1The Chinese University of Hong Kong 2SmartMore + +{ylchen, leojia}@cse.cuhk.edu.hk {sliu, xiaoyong}@smartmore.com + +# Abstract + +Most state-of-the-art 3D object detectors heavily rely on LiDAR sensors because there is a large performance gap between image-based and LiDAR-based methods. It is caused by the way to form representation for the prediction in 3D scenarios. Our method, called Deep Stereo Geometry Network (DSGN), significantly reduces this gap by detecting 3D objects on a differentiable volumetric representation - 3D geometric volume, which effectively encodes 3D geometric structure for 3D regular space. With this representation, we learn depth information and semantic cues simultaneously. For the first time, we provide a simple and effective one-stage stereo-based 3D detection pipeline that jointly estimates the depth and detects 3D objects in an end-to-end learning manner. Our approach outperforms previous stereo-based 3D detectors (about 10 higher in terms of AP) and even achieves comparable performance with several LiDAR-based methods on the KITTI 3D object detection leaderboard. Our code will be (or is) available at https://github.com/chenyilun95/DSGN. + +# 1. Introduction + +3D scene understanding is a challenging task in 3D perception, which serves as a basic component for autonomous driving and robotics. Due to the great capability of LiDAR sensors to accurately retrieve 3D information, we witness fast progress on 3D object detection. Various 3D object detectors were proposed [9, 23, 58, 26, 27, 33, 39, 52, 54] to exploit LiDAR point cloud representation. The limitation of LiDAR is on the relatively sparse resolution of data with several laser beams and on the high price of the devices. + +In comparison, video cameras are cheaper and are with much denser resolutions. The way to compute scene depth on stereo images is to consider disparity via stereo correspondence estimation. Albeit recently several 3D detectors based on either monocular [36, 7, 6, 30, 48] or stereo [25, 45, 37, 56] setting push the limit of image-based 3D object detection, the accuracy is still left far behind compared with the LiDAR-based approaches. + +![](images/f2b8f6783d2843b8246177abe851490d0bbe0697ab4623897d7637bbb204e3c7.jpg) +Figure 1. DSGN jointly estimates depth and detects 3D objects from a stereo image pair. It intermediately generates a plane-sweep volume and 3D geometric volume to represent 3D structure in two different 3D space. + +Challenges One of the greatest challenges for image-based approaches is to give appropriate and effective representation for predicting 3D objects. Most recent work [25, 36, 48, 37, 40, 2] divides this task into two sub ones, i.e., depth prediction and object detection. Camera projection is a process that maps 3D world into a 2D image. One 3D feature in different object poses causes local appearance changes, making it hard for a 2D network to extract stable 3D information. + +Another line of solutions [45, 56, 47, 30] generate intermediate point cloud followed by a LiDAR-based 3D object detector. This 3D representation is less effective since the transformation is non-differentiable and incorporates several independent networks. Besides, the point cloud faces the challenge of object artifacts [18, 47, 56] that limits the detection accuracy of the following 3D object detector. + +Our Solution In this paper, we propose a stereo-based end-to-end 3D object detection pipeline (Figure 1) - Deep Stereo Geometry Network (DSGN), which relies on space transformation from 2D features to an effective 3D structure, called 3D geometric volume (3DGV). + +The insight behind 3DGV lies in the approach to construct the 3D volume that encodes 3D geometry. 3D geometric volume is defined in 3D world space, transformed from a plane-sweep volume (PSV) [10, 11] constructed in the camera frustum. The pixel-correspondence constraint can be well learned in PSV, while 3D features for real-world + +objects can be learned in 3DGV. The volume construction is fully differentiable and thus can be jointly optimized for learning of both stereo matching and object detection. + +This volumetric representation has two key advantages. First, it is easy to impose the pixel-correspondence constraint and encode full depth information into 3D real-world volume. Second, it provides 3D representation with geometry information that makes it possible to learn 3D geometric features for real-world objects. As far as we know, there was no study yet to explicitly investigate the way of encoding 3D geometry into an image-based detection network. Our contribution is summarized as follows. + +- To bridge the gap between 2D image and 3D space, we establish stereo correspondence in a plane-sweep volume and then transform it to 3D geometric volume for capability to encode both 3D geometry and semantic cues for prediction in 3D regular space. +- We design an end-to-end pipeline for extracting pixel-level features for stereo matching and high-level features for object recognition. The proposed network jointly estimates scene depth and detects 3D objects in 3D world, enabling many practical applications. +- Without bells and whistles, our simple and fully-differentiable network outperforms all other stereobased 3D object detectors (10 points higher in terms of AP) on the official KITTI leaderboard [13]. + +# 2. Related Work + +We briefly review recent work on stereo matching and multi-view stereo. Then we survey 3D object detection based on LiDAR, monocular images, and stereo images. + +Stereo Matching In the field of stereo matching on binocular images, methods of [21, 4, 57, 14, 43, 46] process the left and right images by a Siamese network and construct a 3D cost volume to compute the matching cost. Correlation-based cost volume is applied in recent work [31, 55, 51, 14, 28, 42]. GC-Net [21] forms a concatenation-based cost volume and applies 3D convolution to regress disparity estimates. Recent PSMNet [4] further improves the accuracy by introducing pyramid pooling module and stacks hourglass modules [32]. State-of-the-art methods already achieved less than $2\%$ 3-pixel error on KITTI 2015 stereo benchmark. + +Multi-View Stereo Methods of [5, 53, 19, 20, 17, 16] reconstruct 3D objects in a multi-view stereo setting [1, 3]. + +MVSNet [53] constructs plane-sweep volumes upon a camera frustum to generate the depth map for each view. Point-MVSNet [5] instead intermediateally transforms the plane-sweep volume to point cloud representation to save computation. Kar et al. [20] proposed the differentiable projection and unprojection operation on multi-view images. + +LiDAR-based 3D Detection LiDAR sensors are very powerful, proven by several leading 3D detectors. Generally two types of architectures, i.e., voxel-based approaches [58, 9, 24, 54] and point-based approaches [34, 35, 39, 52, 49], were proposed to process point cloud. + +Image-based 3D Detection Another line of detection is based on images. Regardless of monocular- or stereo-based setting, methods can be classified into two types according to intermediate representation existence. + +3D detector with depth predictor: the solution relies on 2D image detectors and depth information extraction from monocular or stereo images. Stereo R-CNN $_{\text{Stereo}}$ [25] formulates 3D detection into multiple branches/stages to explicitly resolve several constraints. We note that the keypoint constraint may be hard to generalize to other categories like Pedestrian, and the dense alignment for stereo matching directly operating raw RGB images may be vulnerable to occlusion. + +MonoGRNetMono [36] consists of four subnetworks for progressive 3D localization and directly learning 3D information based solely on semantic cues. MonoDISMono [40] disentangles the loss for 2D and 3D detection. It achieves both tasks in an end-to-end manner. M3D-RPNMono [2] applies multiple 2D convolutions of non-shared weights to learn location-specific features for joint prediction of 2D and 3D boxes. TriangulationStereo [37] directly learns offset from predefined 3D anchors on bird's eye view and establishes object correspondence on RoI-level features. Due to low resolutions, pixel correspondence is not fully exploited. + +3D representation based 3D Detector: $3\mathrm{DOP}_{\mathrm{Stereo}}$ [7, 8] generates point cloud by stereo and encodes the prior knowledge and depth in an energy function. Several methods [45, 56, 47, 30] transform the depth map to Pseudo-LiDAR (point cloud) intermediately followed by another independent network. This pipeline yields large improvement over previous methods. OFT-NetMono [38] maps image feature into an orthographic bird's eye view representation and detects 3D objects on bird's eye view. + +# 3. Our Approach + +In this section, we first explore the proper representation for 3D space and motivate our network design. Based on the discussion, we present our complete 3D detection pipeline under a binocular image pair setting. + +# 3.1. Motivation + +Due to perspective, objects appear smaller with the increase of distance, which makes it possible to roughly estimate the depth according to the relative scale of objects sizes and the context. However, 3D objects of the same category may still have various sizes and orientations. It + +![](images/ea4a668b6a759d0597503902ffb1ad4385fde503a6660bd35194c1a1780393a9.jpg) +Figure 2. Overview of Deep Stereo Geometry Network (DSGN). The whole neural network consists of four components. (a) A 2D image feature extractor for capture of both pixel- and high-level feature. (b) Constructing the plane-sweep volume and 3D geometric volume. (c) Depth Estimation on the plane-sweep volume. (d) 3D object detection on 3D geometric volume. + +greatly increases the difficulty to make accurate prediction. + +Besides, the visual effect of foreshortening causes that nearby 3D objects are not scaled evenly in images. A regular cuboid car appears like an irregular frustum. These two problems impose major challenges for 2D neural networks to model the relationship between 2D imaging and real 3D objects [25]. Thus, instead of relying on 2D representation, by reversing the process of projection, an intermediate 3D representation provides a more promising way for 3D object understanding. The following two representations can be typically used in 3D world. + +Point-based Representation Current state-of-the-art pipelines [45, 56, 30] generate intermediate 3D structure of point cloud by depth prediction approaches [12, 4, 21] and apply LiDAR-based 3D object detectors. The main possible weakness is that it involves several independent networks and potentially loses information during intermediate transformation, making the 3D structure (such as cost volume) boiled down to point cloud. + +This representation often encounters streaking artifacts near object edges [18, 47, 56]. Besides, the network is hard to be differentiated for multi-object scenes [5, 54]. + +Voxel-based Representation Volumetric representation, as another way of 3D representation, is investigated less intensively. OFT-Netmono [38] directly maps the image feature to the 3D voxel grid and then collapses it to the feature on bird's eye view. However, this transformation keeps the 2D representation for this view and does not explicitly encode the 3D geometry of data. + +Our Advantage The key to establishment of an effective 3D representation relies on the ability to encode accurate 3D geometric information of the 3D space. A stereo camera provides an explicit pixel-correspondence constraint for computing depth. Aiming to design a unified network to exploit this constraint, we explore deep architectures capable of extracting both pixel-level features for stereo correspond- + +dence and high-level features for semantic cues. + +On the other hand, the pixel-correspondence constraint is supposedly imposed along the projection ray through each pixel where the depth is considered to be definite. To this end, we create an intermediate plane-sweep volume from a binocular image pair to learn stereo correspondence constraint in camera frustum and then transform it to a 3D volume in 3D space. In this 3D volume with 3D geometric information lifted from the plane-sweep volume, we are able to well learn 3D features for real-world objects. + +# 3.2. Deep Stereo Geometry Network + +In this subsection, we describe our overall pipeline - Deep Stereo Geometry Network (DSGN) as shown in Figure 2. Taking the input of a binocular image pair $(I_L, I_R)$ , we extract features by a Siamese network and construct a plane-sweep volume (PSV). The pixel-correspondence is learned on this volume. By differentiable warping, we transform PSV to a 3D geometric volume (3DGV) to establish 3D geometry in 3D world space. Then the following 3D neural network on the 3D volume learns necessary structure for 3D object detection. + +# 3.2.1 Image Feature Extraction + +Networks for stereo matching [21, 4, 14] and object recognition [15, 41] have different architecture designs for their respective tasks. To ensure reasonable accuracy of stereo matching, we adopt the main design of PSMNet [4]. + +Because the detection network requires a discriminative feature based on high-level semantic features and large context information, we modify the network for grasping more high-level information. Besides, the following 3D CNN for cost volume aggregation takes much more computation, which gives us room to modify the 2D feature extractor without introducing extra heavy computation overhead in the overall network. + +Network Architecture Details Here we use the notations conv_1, conv_2, ..., conv_5 following [15]. The key modification for 2D feature extractor is as follows. + +- Shift more computation from conv_3 to conv_4 and conv_5, i.e., changing the numbers of basic blocks of conv_2 to conv_5 from $\{3,16,3,3\}$ to $\{3,6,12,4\}$ . +- The SPP module used in PSMNet concatenates the output layers of conv_4 and conv_5. +- The output channel number of convolutions in conv_1 is 64 instead of 32 and the output channel number of a basic residual block is 192 instead of 128. + +Full details of our 2D feature extraction network are included in the supplementary material. + +# 3.2.2 Constructing 3D Geometric Volume + +To learn 3D convolutional features in 3D regular space, we first create a 3D geometric volume (3DGV) by warping a plane-sweep volume to 3D regular space. Without loss of generality, we discretize the region of interest in 3D world space to a 3D voxel occupancy grid of size $(W_V, H_V, D_V)$ along the right, down and front directions in camera view. $W_V, H_V, D_V$ denote the width, height and length of the grid, respectively. Each voxel is of size $(v_w, v_h, v_d)$ . + +Plane-Sweep Volume In binocular vision, an image pair $(I_L, I_R)$ is used to construct a disparity-based cost volume for computing matching cost, which matches a pixel $i$ in the left image $I_L$ to the correspondence in the right image $I_R$ horizontally shifted by an integral disparity value $d$ . The depth is inversely proportional to disparity. + +It is thus hard to distinguish among distant objects due to the similar disparity values [25, 45, 56]. For example, objects 40-meter and 39-meter away have almost no difference $(< 0.25\mathrm{pix})$ on disparity on KITTI benchmark [13]. + +In a different way to construct the cost volume, we follow the classic plane sweeping approach [10, 11, 53] to construct a plane-sweep volume by concatenating the left image feature $F_{L}$ and the reprojected right image feature $F_{R - > L}$ at equally spaced depth interval, which avoids imbalanced mapping of features to 3D space. + +The coordinate of PSV is represented by $(u, v, d)$ , where $(u, v)$ represents $(u, v)$ -pixel in the image and it adds another axis orthogonal to the image plane for depth. We call the space of $(u, v, d)$ grid camera frustum space. The depth candidates $d_{i}$ are uniformly sampled along the depth dimension with interval $v_{d}$ following the pre-defined 3D grid. Concatenation-based volume enables the network to learn semantic features for object recognition. + +We apply 3D convolution to this volume and finally get a matching cost volume for all depth. To ease computation, we apply only one 3D hourglass module, contrary to the + +![](images/a590fe6c511ba96380e43e3a2aa148537272bd9f4554f9c4bf7f8cecbd1acdfe.jpg) +Figure 3. Illustration of volume transformation. The image is captured at the image plane (red solid line). PSV is constructed by projecting images at equally spaced depth (blue dotted lines) in left camera frustum, which is shown in the $3D$ world space (left) and camera frustum space (middle). Car is shown to be distorted in the middle. Mapping by the camera intrinsic matrix $K$ , PSV is warped to 3DGV, which restores the car. + +three used in PSMNet [4]. We note that the resulting performance degradation can be compensated in the following detection network since the overall network is differentiable. + +3D Geometric Volume With known camera internal parameters, we transform the last feature map of PSV before computing matching cost from camera frustum space $(u,v,d)$ to 3D world space $(x,y,z)$ by reversing 3D projection with + +$$ +\left( \begin{array}{c} x \\ y \\ z \end{array} \right) = \left( \begin{array}{c c c} 1 / f _ {x} & 0 & - c _ {u} / f _ {x} \\ 0 & 1 / f _ {y} & - c _ {v} / f _ {y} \\ 0 & 0 & 1 \end{array} \right) \left( \begin{array}{c} u d \\ v d \\ d \end{array} \right) \tag {1} +$$ + +where $f_{x}, f_{y}$ are the horizontal and vertical focal lengths. This transformation is fully-differentiable and saves computation by eliminating background outside the pre-defined grid, such as the sky. It can be implemented by warp operation with trilinear interpolation. + +Figure 3 illustrates the transformation process. The common pixel-correspondence constraint (red dotted lines) is imposed in camera frustum while object recognition is learned in regular 3D world space (Euclidean space). There obviously is difference in these two representations. + +In the last feature map of plane-sweep volume, a low-cost voxel $(u,v,d)$ means the high probability of object existing at depth $d$ along the ray through the focal point and image point $(u,v)$ . With the transformation to regular 3D world space, the feature of low cost suggests that this voxel is occupied in the front surface of the scene, which can serve as a feature for 3D geometric structure. Thus it is possible for the following 3D network to learn 3D object features on this volume. + +This operation is fundamentally different from differentiable unprojection [20], which directly lifts the image feature from 2D image frame to 3D world by bilinear interpolation. Our goal is to lift geometric information from cost volume to 3D world grid. We make pixel-correspondence constraint easy to be imposed along the projection ray. + +The contemporary work [56] applies a similar idea to + +construct depth-cost-volume like plane-sweep volume. Differently, we aim to avoid imbalanced warping from planesweep volume to 3D geometric volume, and deal with the streaking artifact problem. Besides, our transformation keeps the distribution of depth instead of deducting it to a depth map. Our strategy intriguingly avoids object artifacts. + +# 3.2.3 Depth Regression on Plane-Sweep Cost Volume + +To compute the matching cost on the plane-sweep volume, we reduce the final feature map of plane-sweep volume by two 3D convolutions to get 1D cost volume (called plane-sweep cost volume). Soft arg-min operation [21, 4, 57] is applied to compute the expectation for all depth candidates with probability $\sigma(-c_d)$ as + +$$ +\hat {d} = \sum_ {d \in \left\{z _ {\min }, z _ {\min } + v _ {d}, \dots , z _ {\max } \right\}} d \times \sigma (- c _ {d}) \tag {2} +$$ + +where the depth candidates are uniformly sampled within pre-defined grid $[z_{\min}, z_{\max}]$ with interval $v_d$ . The softmax function encourages the model to pick a single depth plane per pixel. + +# 3.2.4 3D Object Detector on 3D Geometric Volume + +Motivated by recent one-stage 2D detector FCOS [44], we extend the idea of centerness branch in our pipeline and design a distance-based strategy to assign targets for the real world. Because objects of the same category are of similar size in 3D scene, we still keep the design of anchors. + +Let $\mathcal{V} \in \mathbb{R}^{W \times H \times D \times C}$ be the feature map for 3DGV of size $(W, H, D)$ and denote the channels as $C$ . Considering the scenario of autonomous driving, we gradually downsample along the height dimension and finally get the feature map $\mathcal{F}$ of size $(W, H)$ for bird's eye view. The network architecture is included in the supplementary material. + +For each location $(x,z)$ in $\mathcal{F}$ , several anchors of different orientations and sizes are placed. Anchors $\mathbf{A}$ and ground-truth boxes $\mathbf{G}$ are represented by the location, prior size and orientation, i.e., $(x_{\mathbf{A}},y_{\mathbf{A}},z_{\mathbf{A}},h_{\mathbf{A}},w_{\mathbf{A}},l_{\mathbf{A}},\theta_{\mathbf{A}})$ and $(x_{\mathbf{G}},y_{\mathbf{G}},z_{\mathbf{G}},h_{\mathbf{G}},w_{\mathbf{G}},l_{\mathbf{G}},\theta_{\mathbf{G}})$ . Our network regresses from anchor and gets the final prediction $(h_{\mathbf{A}}e^{\delta h},w_{\mathbf{A}}e^{\delta w},l_{\mathbf{A}}e^{\delta l},x_{\mathbf{A}} + \delta x,y_{\mathbf{A}} + \delta y,z_{\mathbf{A}} + \delta z,\theta_{\mathbf{A}}+$ $\pi /N_{\theta}\tanh (\delta \theta))$ where $N_{\theta}$ denotes the number of anchor orientations and $\delta$ is the learned offset for each parameter. + +Distance-based Target Assignment Taking object orientation into consideration, we propose distance-based target assignment. The distance is defined as the distance of 8 corners between anchor and ground-truth boxes as + +$$ +d i s t a n c e (\mathbf {A}, \mathbf {G}) = \frac {1}{8} \sum_ {i = 1} ^ {8} \sqrt {\left(x _ {\mathbf {A} _ {i}} - x _ {\mathbf {G} _ {i}}\right) ^ {2} + \left(z _ {\mathbf {A} _ {i}} - z _ {\mathbf {G} _ {i}}\right) ^ {2})} +$$ + +In order to balance the ratio of positive and negative samples, we let the anchors with top $N$ nearest distance to ground-truth as positive samples, where $N = \gamma \times k$ and $k$ is the number of voxels inside ground-truth box on bird's eye view. $\gamma$ adjusts the number of positive samples. Our centerness is defined as the exponent of the negative normalized distance of eight corners as + +$$ +c e n t e r n e s s (\mathbf {A}, \mathbf {G}) = e ^ {- \operatorname {n o r m} (d i s t a n c e (\mathbf {A}, \mathbf {G}))}, \tag {3} +$$ + +where norm denotes min-max normalization. + +# 3.3. Multi-task Training + +Our network with stereo matching network and 3D object detector is trained in an end-to-end fashion. We train the overall 3D object detector with a multi-task loss as + +$$ +\text {L o s s} = \mathcal {L} _ {\text {d e p t h}} + \mathcal {L} _ {\text {c l s}} + \mathcal {L} _ {\text {r e g}} + \mathcal {L} _ {\text {c e n t e r n e s s}}. \tag {4} +$$ + +For the loss of depth regression, we adopt smooth $L_{1}$ loss [21] in this branch as + +$$ +\mathcal {L} _ {\text {d e p t h}} = \frac {1}{N _ {D}} \sum_ {i = 1} ^ {N _ {D}} \operatorname {s m o o t h} _ {L _ {1}} \left(d _ {i} - \hat {d} _ {i}\right), \tag {5} +$$ + +where $N_{D}$ is the number of pixels with ground-truth depth (obtained from the sparse LiDAR sensor). + +For the loss of classification, focal loss [29] is adopted in our network to deal with the class imbalance problem in 3D world as + +$$ +\mathcal {L} _ {c l s} = \frac {1}{N _ {p o s}} \sum_ {(x, z) \in \mathcal {F}} F o c a l L o s s \left(p _ {\mathbf {A} _ {(x, z)}}, p _ {\mathbf {G} _ {(x, z)}}\right), \tag {6} +$$ + +where $N_{pos}$ denotes the number of positive samples. Binary cross-entropy (BCE) loss is used for centerness. + +For the loss of 3D bounding box regression, smooth $L_{1}$ Loss is used for the regression of bounding boxes as + +$$ +\mathcal {L} _ {r e g} = \frac {1}{N _ {p o s}} \sum_ {(x, z) \in F _ {p o s}} \operatorname {c e n t e r n e s s} (\mathbf {A}, \mathbf {G}) \times \tag {7} +$$ + +$$ +\operatorname {s m o o t h} _ {L _ {1}} (l 1 \text {- d i s t a n c e} (\mathbf {A}, \mathbf {G})) +$$ + +where $F_{pos}$ denotes all positive samples on bird's eye view. + +We try two different regression targets with and without jointly learning all parameters. + +- Separably optimizing box parameters. The regression loss is directly applied to the offset of $(x, y, z, h, w, l, \theta)$ . +- Jointly optimizing box corners. For jointly optimizing box parameters, the loss is made on the average $L1$ distance of eight box corners between predicted boxes from 3D anchors and ground-truth boxes following that of [33]. + +In our experiments, we use the second regression target for Car and the first regression target for Pedestrian and Cyclist. Because it is hard for even human to accurately predict or annotate the orientation of objects like Pedestrian from an image, other parameter estimation under joint optimization can be affected. + +# 4. Experiments + +Datasets Our approach is evaluated on the popular KITTI 3D object detection dataset [13], which is union of 7,481 stereo image-pairs and point clouds for training and 7,518 for testing. The ground-truth depth maps are generated from point clouds following [45, 56]. The training data has annotation for Car, Pedestrian and Cyclist. The KITTI leaderboard limits the access to submission to the server for evaluating test set. Thus, following the protocol in [9, 25, 45], the training data is divided into a training set (3,712 images) and a validation set (3,769 images). All ablation studies are conducted on the split. For the submission of our approach, our model is trained from scratch on the 7K training data only. + +Evaluation Metric KITTI has three levels of difficulty setting of easy, moderate (main index) and hard, according to the occlusion/truncation and the size of an object in the 2D image. All methods are evaluated for three levels of difficulty under different IoU criteria per class, i.e., IoU $\geq 0.7$ for Car and IoU $\geq 0.5$ for Pedestrian and Cyclist for 2D, bird's eye view and 3D detection. + +Following most image-based 3D object detection setting [45, 25, 37, 36, 2, 40], the ablation experiments are conducted on Car. We also report the results of Pedestrian and Cyclist for reference in the supplementary file. KITTI benchmark recently changes evaluation where AP calculation uses 40 recall positions instead of the 11 recall positions proposed in the original Pascal VOC benchmark. Thus, we show the main test results following the official KITTI leaderboard. We generate the validation results using the original evaluation code for fair comparison with other approaches in ablation studies. + +# 4.1. Implementation + +Training Details By default, models are trained on 4 NVIDIA Tesla V100 (32G) GPUs with batch-size 4 - that is, each GPU holds one pair of stereo images of size $384 \times 1248$ . We apply ADAM [22] optimizer with initial learning rate 0.001. We train our network for 50 epochs and the learning rate is decreased by 10 at 50-th epoch. The overall training time is about 17 hours. The data augmentation used is horizontal flipping only. + +Following other approaches [56, 45, 58, 50, 39, 54], another network is trained for Pedestrian and Cyclist, we first pre-train the network with all training images for the stereo + +network and then apply fine-tune with 3D box annotation for both branches because only about $1/3$ images have annotations of these two objects. + +Implementation Details For constructing plane-sweep volume, the image feature map is shrunk to 32D and downsampled by 4 for both left and right images. Then by reprojection and concatenation, we construct the volume of shape $(W_I / 4, H_I / 4, D_I / 4, 64)$ , where the image size is $(W_I = 1248, H_I = 384)$ and the number of depth is $D_I = 192$ . It is followed by one 3D hourglass module [4, 32] and extra 3D convolutions to get the matching cost volume of shape $(W_I / 4, H_I / 4, D_I / 4, 1)$ . Then interpolation is used to upsample this volume to fit the image size. + +To construct 3D geometric volume, We discretize the region in range $[-30.4, 30.4] \times [-1, 3] \times [2, 40.4]$ (meters) to a 3D voxel occupancy grid of size $(W_V = 300, H_V = 20, D_V = 192)$ along the right $(X)$ , down $(Y)$ and front $(Z)$ directions in camera's view. 3D geometric volume is formed by warping the last feature map of PSV. Each voxel is a cube of size $(0.2, 0.2, 0.2)$ (meter). + +Other implementation details and the network architecture are included in the supplementary file. + +# 4.2. Main Results + +We give comparison with state-of-the-art 3D detectors in Tables 1 and 2. Without bells and whistles, our approach outperforms all other image-based methods on 3D and BEV object detection. We note that Pseudo-LiDARs [45, 56] is with pre-trained PSMNet [4] on a large-scale synthetic scene flow dataset [31] (with $30,000+$ pairs of stereo images and dense disparity maps) for stereo matching. Stereo R-CNN [25] uses ImageNet pre-trained ResNet-101 as backbone and has input images of resolution $600 \times 2000$ . + +Differently, our model is trained from scratch only on these 7K training data with input of resolution $384 \times 1248$ . Also, Pseudo-LiDARs [45, 56] approaches apply two independent networks including several LiDAR-based detectors, while ours is just one unified network. + +DSGN without explicitly learning 2D boxes surpasses those applying strong 2D detectors based on ResNet-101 [25] or DenseNet-121 [2]. It naturally achieves duplicate removal by non-maximum suppression (NMS) in 3D space, which coincides with the common belief that there is no collision between regular objects. + +More intriguingly, as shown in Table 1, DSGN even achieves comparable performance on BEV detection and better performance on 3D detection on KITTI easy regime with MV3D [9] (with LiDAR input only) - a classic LiDAR-based 3D object detector, for the first time. This result demonstrates a promising future application at least in the scenario of low-speed autonomous driving. + +The above comparison manifests the effectiveness of 3D geometric volume, which serves as a link between 2D im + +
ModalityMethod3D Detection AP (%)BEV Detection AP (%)2D Detection AP (%)
EasyModerateHardEasyModerateHardEasyModerateHard
LiDARMV3D (LiDAR) [9]68.3554.5449.1686.4978.9872.23---
MonoOFT-Net [38]1.611.321.007.165.694.61---
MonoGRNet [36]9.615.744.2518.1911.178.7388.6577.9463.31
M3D-RPN [2]14.769.717.4221.0213.6710.2389.0485.0869.26
AM3D [30]16.5010.749.5225.0317.3214.9192.5588.7177.78
Stereo3DOP [7]------93.0488.6479.10
Stereo R-CNN* [25]47.5830.2323.7261.9241.3133.4293.9885.9871.25
PL: AVOD* [45]54.5334.0528.2567.3045.0038.4085.4067.7958.50
PL++: P-RCNN* [56]61.1142.4336.9978.3158.0151.2594.4682.9075.45
DSGN (Ours)73.5052.1845.1482.9065.0556.6095.5386.4378.75
+ +Table 1. Comparison of main results on KITTI test set (official KITTI leaderboard). The results are evaluated using new evaluation metric on the KITTI leaderboard. Several methods undergoing old evaluation are not available on the leaderboard. PL/PL++* uses extra Scene Flow dataset to pre-train the stereo matching network and Stereo R-CNN* uses ImageNet pre-trained model. + +
ModalityMethod3D Detection AP (%)BEV Detection AP (%)2D Detection AP (%)
EasyModerateHardEasyModerateHardEasyModerateHard
LiDARMV3D (LiDAR) [9]71.2956.6055.3086.1877.3276.3388.4187.7679.90
MonoOFT-Net [38]4.073.273.2911.068.798.91---
MonoGRNet [36]13.8810.197.6243.7528.3923.87-78.14-
M3D-RPN [2]20.2717.0615.2125.9421.1817.9090.2483.6767.69
AM3D [30]32.2321.0917.2643.7528.3923.87---
StereoMLF [48]-9.80--19.54----
3DOP [7]6.555.074.1012.639.497.59---
Triangulation [37]18.1514.2613.7229.2221.8818.83---
Stereo R-CNN* [25]54.136.731.168.548.341.598.7388.4871.26
PL: F-PointNet* [45]59.439.833.572.851.833.5---
PL: AVOD* [45]61.945.339.074.956.849.0---
PL++: AVOD* [56]63.246.839.877.063.756.0---
PL++: FIXOR* [56]---79.761.154.5---
PL++: P-RCNN* [56]67.950.145.382.064.057.3---
DSGN (Ours)72.3154.2747.7183.2463.9157.8389.2583.5978.45
+ +Table 2. Comparison of main results on KITTI val set. As described in Section 4, we use original KITTI evaluation metric here. PL/PL++* uses extra Scene Flow dataset to pre-train the stereo matching network and Stereo R-CNN* uses ImageNet pre-trained model. + +ages and 3D space by combining the depth information and semantic feature. + +Inference Time On a NVIDIA Tesla V100 GPU, the inference time of DSGN for one image pair is 0.682s on average, where 2D feature extraction for left and right images takes 0.113s, constructing the plane-sweep volume and 3D geometric volume takes 0.285s, and 3D object detection on 3D geometric volume takes 0.284s. The computation bottleneck of DSGN lies on 3D convolution layers. + +# 4.3. Ablation Study + +# 4.3.1 Ablation study of 3D Volume Construction + +One of the main obstacles to construct an effective 3D geometric representation is the appropriate way of learning 3D geometry. We therefore investigate the effect of following three key components to construct a 3D volume. + +Input Data Monocular-based 3D volume only has the potential to learn the correspondence between 2D and 3D feature, while stereo-based 3D volume can learn extra 2D fea + +ture correspondence for pixel-correspondence constraint. + +Constructing 3D Volume One straightforward solution to construct 3D volume is by directly projecting the image feature to 3D voxel grid [20, 38] (denoted as $\mathrm{IMG} \rightarrow 3\mathrm{DV}$ ). Another solution in Figure 3 transforms plane-sweep volume or disparity-based cost volume to 3D volume, which provides a natural way to impose pixel-correspondence constraint along the projection ray in camera frustum (denoted as $\mathrm{IMG} \rightarrow (\mathrm{PS})\mathrm{CV} \rightarrow 3\mathrm{DV}$ ). + +Supervising Depth Supervised with or without the point cloud data, the network learns the depth explicitly or implicitly. One way is to supervise the voxel occupancy of 3D grid by ground-truth point cloud using binary cross-entropy loss. The second is to supervise depth on the plane-sweep cost volume as explained in Section 3.3. + +For fair comparison, the models $\mathrm{IMG} \rightarrow 3\mathrm{DV}$ and $\mathrm{IMG} \rightarrow (\mathrm{PS})\mathrm{CV} \rightarrow 3\mathrm{DV}$ have the same parameters by adding the same 3D hourglass module for the model $\mathrm{IMG} \rightarrow 3\mathrm{DV}$ . In addition, several important facts can be revealed from + +
InputTransformationSupervisionAP3D / APBEV / AP2D
MonoIMG→3DV× 3DV6.22 / 11.98 / 58.23 13.66 / 19.92 / 65.89
StereoIMG→3DV× 3DV11.03 / 15.17 / 57.30 42.57 / 54.55 / 81.86
IMG→CV→3DVCV45.89 / 58.40 / 81.71
IMG→PSCV→3DV× PSCV38.48 / 52.85 / 77.83 54.27 / 63.91 / 83.59
+ +Table 3 and are explained in the following. + +Supervision of point cloud is important. The approaches under the supervision of the LiDAR point cloud consistently perform better than those without supervision, which demonstrates the importance of 3D geometry for image-based approaches. + +Stereo-based approaches work much better than monocular ones under supervision. The discrepancy between stereo and monocular approaches indicates that direct learning of 3D geometry from semantic cues is a quite difficult problem. In contrast, image-based approaches without supervision make these two lines yield similar performance, which indicates that supervision only by 3D bounding boxes is insufficient for learning of 3D geometry. + +Plane-sweep volume is a more suitable representation for 3D structure. Plane-sweep cost volume (54.27 AP) performs better than disparity-based cost volume (45.89 AP). It shows that balanced feature mapping is important during the transformation to 3D volume. + +Plane-sweep volume, as an intermediate encoder, more effectively contains depth information. The inconsistency between $\mathrm{IMG} \rightarrow \mathrm{PSCV} \rightarrow 3\mathrm{DV}$ and $\mathrm{IMG} \rightarrow 3\mathrm{DV}$ manifests that plane-sweep volume as the intermediate representation can effectively help learning of depth information. The observation explains that the soft arg-min operation encourages the model to pick a single depth plane per pixel along the projection ray, which shares the same spirit as the assumption that only one depth-value is true for each pixel. Another reason can be that PSCV and 3DV have different matching densities - PSCV intermediately imposes the dense pixel correspondence over all image pixels. In contrast, only the left-right pixel pairs through the voxel centers are matched on 3DV. + +From above comparison of volume construction, we observe that the three key facts affect the performance of computation pipelines. The understanding and recognition of how to construct a suitable 3D volume is still at the very early stage. More study is expected to reach comprehensive understanding of the volume construction from the multi- + +Table 3. Ablation study of depth encoded approaches. "PSCV" and "3DV" with "Supervision" header represent that the constraint is imposed in (plane-sweep) cost volume and 3D volume, respectively. The results are evaluated in moderate level. + +
NetworksTargetsDepth Error (meters)AP3D / APBEV / AP2D
MeanMedian
PSMNet-PSV*Depth0.53370.1093—
DSGN0.52790.1055—
PSMNet-PSV*Both0.56060.115746.41 / 57.57 / 80.67
DSGN0.55860.110454.27 / 63.91 / 83.59
+ +Table 4. Influence on depth estimation, evaluated on KITTI val images. PSMNet-PSV* is a variant of PSMNet [4], which uses one 3D hourglass module instead of three of them for refinement considering limited memory space and takes the plane-sweep approach to construct cost volume. + +view images. + +# 4.3.2 Influence on Stereo Matching + +We conduct experiments for investigating the influence of depth estimation, which is evaluated on KITTI val set following [45]. The average and median value of absolute depth estimation errors within the pre-defined range of $[z_{\min}, z_{\max}]$ is shown in Table 4. A natural baseline for our approach is PSMNet-PSV* modified from PSMNet [4] whose 2D feature extractor takes 0.041s while ours takes 0.113s. + +Trained with depth estimation branch only, DSGN performs slightly better than PSMNet-PSV* with the same training pipeline in depth estimation. For joint training of both tasks, both approaches suffer from larger and similar depth error (0.5586 meter for DSGN vs. 0.5606 meter for PSMNet-PSV*). Differently, DSGN outperforms the alternatives by 7.86 AP on 3D object detection and 6.34 AP on BEV detection. The comparison indicates that our 2D network extracts better high-level semantic features for object detection. + +# 5. Conclusion + +We have presented a new 3D object detector on binocular images. It shows that an end-to-end stereo-based 3D object detection is feasible and effective. Our unified network encodes 3D geometry via transforming the plane-sweep volume to a 3D geometric one. Thus, it is able to learn high-quality geometric structure features for 3D objects on the 3D volume. The joint training lets the network learn both pixel- and high-level features for the important tasks of stereo correspondence and 3D object detection. + +Without bells and whistles, our one-stage approach outperforms other image-based approaches and even achieves comparable performance with a few LiDAR-based approaches on 3D object detection. The ablation study investigates several key components for training 3D volume in Table 3. Although the improvement is clear and explained, our understanding of how the 3D volume transformation works will be further explored in our future work. + +# References + +[1] Henrik Aanaes, Rasmus Ramsbøl Jensen, George Vogiatzis, Engin Tola, and Anders Bjorholm Dahl. Large-scale data for multiple-view stereopsis. volume 120, pages 153-168. Springer, 2016. +[2] Garrick Brazil and Xiaoming Liu. M3d-rpn: Monocular 3d region proposal network for object detection. 2019. +[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], Stanford University — Princeton University — Toyota Technological Institute at Chicago, 2015. +[4] Jia-Ren Chang and Yong-Sheng Chen. Pyramid stereo matching network. In CVPR, pages 5410-5418, 2018. +[5] Rui Chen, Songfang Han, Jing Xu, and Hao Su. Point-based multi-view stereo network. 2019. +[6] Xiaozhi Chen, Kaustav Kundu, Ziyu Zhang, Huimin Ma, Sanja Fidler, and Raquel Urtasun. Monocular 3d object detection for autonomous driving. In CVPR, 2016. +[7] Xiaozhi Chen, Kaustav Kundu, Yukun Zhu, Andrew G Berneshawi, Huimin Ma, Sanja Fidler, and Raquel Urtasun. 3d object proposals for accurate object class detection. In NIPS, pages 424-432, 2015. +[8] Xiaozhi Chen, Kaustav Kundu, Yukun Zhu, Huimin Ma, Sanja Fidler, and Raquel Urtasun. 3d object proposals using stereo imagery for accurate object class detection. volume 40, pages 1259-1272. IEEE, 2017. +[9] Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. In CVPR, 2017. +[10] Robert T Collins. A space-sweep approach to true multi-image matching. In CVPR, pages 358-363. IEEE, 1996. +[11] John Flynn, Ivan Neulander, James Philbin, and Noah Snavely. Deepstereo: Learning to predict new views from the world's imagery. In CVPR, pages 5515-5524, 2016. +[12] Huan Fu, Mingming Gong, Chaohui Wang, Kayhan Bat-manghelich, and Dacheng Tao. Deep ordinal regression network for monocular depth estimation. In CVPR, pages 2002-2011, 2018. +[13] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, 2012. +[14] Xiaoyang Guo, Kai Yang, Wukui Yang, Xiaogang Wang, and Hongsheng Li. Group-wise correlation stereo network. In CVPR, 2019. +[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770-778, 2016. +[16] Po-Han Huang, Kevin Matzen, Johannes Kopf, Narendra Ahuja, and Jia-Bin Huang. Deepmvs: Learning multi-view stereopsis. In CVPR, pages 2821-2830, 2018. +[17] Sunghoon Im, Hae-Gon Jeon, Stephen Lin, and In So Kweon. Dpsnet: end-to-end deep plane sweep stereo. 2019. + +[18] Saif Imran, Yunfei Long, Xiaoming Liu, and Daniel Morris. Depth coefficients for depth completion. In CVPR, June 2019. +[19] Mengqi Ji, Juergen Gall, Haitian Zheng, Yebin Liu, and Lu Fang. Surfacenet: An end-to-end 3d neural network for multiview stereopsis. In ICCV, pages 2307-2315, 2017. +[20] Abhishek Kar, Christian Hane, and Jitendra Malik. Learning a multi-view stereo machine. In Advances in neural information processing systems, pages 365-376, 2017. +[21] 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 ICCV, pages 66-75, 2017. +[22] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. 2014. +[23] Jason Ku, Melissa Mozifian, Jungwook Lee, Ali Harakeh, and Steven Waslander. Joint 3d proposal generation and object detection from view aggregation. 2018. +[24] Alex H Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. 2018. +[25] Peiliang Li, Xiaozhi Chen, and Shaojie Shen. Stereo r-cnn based 3d object detection for autonomous driving. In CVPR, pages 7644-7652, 2019. +[26] Ming Liang, Bin Yang, Yun Chen, Rui Hu, and Raquel Urtasun. Multi-task multi-sensor fusion for 3d object detection. In CVPR, pages 7345-7353, 2019. +[27] Ming Liang, Bin Yang, Shenlong Wang, and Raquel Urtasun. Deep continuous fusion for multi-sensor 3d object detection. In ECCV, 2018. +[28] 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 CVPR, pages 2811-2820, 2018. +[29] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollar. Focal loss for dense object detection. In ICCV, 2017. +[30] Xinzhu Ma, Zhihui Wang, Haojie Li, Wanli Ouyang, and Pengbo Zhang. Accurate monocular 3d object detection via color-embedded 3d reconstruction for autonomous driving. 2019. +[31] Nikolaus Mayer, Eddy Ilg, Philip Hausser, Philipp Fischer, Daniel Cremers, Alexey Dosovitskiy, and Thomas Brox. A large dataset to train convolutional networks for disparity, optical flow, and scene flow estimation. In CVPR, pages 4040-4048, 2016. +[32] Alejandro Newell, Kaiyu Yang, and Jia Deng. Stacked hourglass networks for human pose estimation. In ECCV, pages 483-499. Springer, 2016. +[33] Charles R. Qi, Wei Liu, Chenxia Wu, Hao Su, and Leonidas J. Guibas. Frustum pointnets for 3d object detection from rgb-d data. In CVPR, 2018. +[34] Charles R. Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. 2017. +[35] Charles R. Qi, Li Yi, Hao Su, and Leonidas J Guibas. Point-net++: Deep hierarchical feature learning on point sets in a metric space. In NIPS, 2017. + +[36] Zengyi Qin, Jinglu Wang, and Yan Lu. Monogrnet: A geometric reasoning network for monocular 3d object localization. In AAAI, volume 33, pages 8851-8858, 2019. +[37] Zengyi Qin, Jinglu Wang, and Yan Lu. Triangulation learning network: from monocular to stereo 3d object detection. 2019. +[38] Thomas Roddick, Alex Kendall, and Roberto Cipolla. Orthographic feature transform for monocular 3d object detection. 2019. +[39] Shaoshuai Shi, Xiaogang Wang, and Hongsheng Li. Pointrcnn: 3d object proposal generation and detection from point cloud. 2018. +[40] Andrea Simonelli, Samuel Rota Bulo, Lorenzo Porzi, Manuel Lopez-Antequera, and Peter Kontschieder. Disentangling monocular 3d object detection. In ICCV, 2019. +[41] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. 2014. +[42] Xiao Song, Xu Zhao, Hanwen Hu, and Liangji Fang. Edgestereo: A context integrated residual pyramid network for stereo matching. In Asian Conference on Computer Vision, 2018. +[43] Deqing Sun, Xiaodong Yang, Ming-Yu Liu, and Jan Kautz. Pwc-net: Cnns for optical flow using pyramid, warping, and cost volume. In CVPR, pages 8934-8943, 2018. +[44] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. 2019. +[45] Yan Wang, Wei-Lun Chao, Divyansh Garg, Bharath Hariharan, Mark Campbell, and Kilian Q Weinberger. Pseudo-lidar from visual depth estimation: Bridging the gap in 3d object detection for autonomous driving. In CVPR, pages 8445-8453, 2019. +[46] Yan Wang, Zihang Lai, Gao Huang, Brian H Wang, Laurens van der Maaten, Mark Campbell, and Kilian Q Weinberger. Anytime stereo image depth estimation on mobile devices. In ICRA, pages 5893-5900. IEEE, 2019. +[47] Xinshuo Weng and Kris Kitani. Monocular 3d object detection with pseudo-lidar point cloud. 2019. +[48] Bin Xu and Zhenzhong Chen. Multi-level fusion based 3d object detection from monocular images. In CVPR, pages 2345-2353, 2018. +[49] Danfei Xu, Dragomir Anguelov, and Ashesh Jain. Pointfusion: Deep sensor fusion for 3d bounding box estimation. In CVPR, 2018. +[50] Yan Yan, Yuxing Mao, and Bo Li. Second: Sparsely embedded convolutional detection. 2018. +[51] Guorun Yang, Hengshuang Zhao, Jianping Shi, Zhidong Deng, and Jiaya Jia. Segstereo: Exploiting semantic information for disparity estimation. In ECCV, pages 636-651, 2018. +[52] Zetong Yang, Yanan Sun, Shu Liu, Xiaoyong Shen, and Jiaya Jia. Std: Sparse-to-dense 3d object detector for point cloud. In ICCV, 2019. +[53] Yao Yao, Zixin Luo, Shiwei Li, Tian Fang, and Long Quan. Mvsnet: Depth inference for unstructured multi-view stereo. In ECCV, pages 767-783, 2018. +[54] Chen Yilun, Liu Shu, Shen Xiaoyong, and Jia Jiaya. Fast point r-cnn. In ICCV, 2019. + +[55] Zhichao Yin, Trevor Darrell, and Fisher Yu. Hierarchical discrete distribution decomposition for match density estimation. In CVPR, pages 6044-6053, 2019. +[56] Yurong You, Yan Wang, Wei-Lun Chao, Divyansh Garg, Geoff Pleiss, Bharath Hariharan, Mark Campbell, and Kilian Q Weinberger. Pseudo-lidar++: Accurate depth for 3d object detection in autonomous driving. 2019. +[57] Feihu Zhang, Victor Prisacariu, Ruigang Yang, and Philip HS Torr. Ga-net: Guided aggregation net for end-to-end stereo matching. In CVPR, pages 185-194, 2019. +[58] Yin Zhou and Oncel Tuzel. Voxelnet: End-to-end learning for point cloud based 3d object detection. In CVPR, 2018. \ No newline at end of file diff --git a/dsgndeepstereogeometrynetworkfor3dobjectdetection/images.zip b/dsgndeepstereogeometrynetworkfor3dobjectdetection/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..9e903f499dff84377dd50b3fd15a07dac33fa439 --- /dev/null +++ b/dsgndeepstereogeometrynetworkfor3dobjectdetection/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05ad262c4fbed0c83b4380077af25007d2e65baa4b5f51feea553be915055880 +size 433697 diff --git a/dsgndeepstereogeometrynetworkfor3dobjectdetection/layout.json b/dsgndeepstereogeometrynetworkfor3dobjectdetection/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..c7dad633f3c6cf92e8c753e2352e5ff33faf0068 --- /dev/null +++ b/dsgndeepstereogeometrynetworkfor3dobjectdetection/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98a8fbbd37fa9e753e1d6c10c2768e6d2229f2d4eda53b5a88c8f1afca989233 +size 407090 diff --git a/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/9e8fa882-eac5-4db7-9713-9db8aa2b6cb1_content_list.json b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/9e8fa882-eac5-4db7-9713-9db8aa2b6cb1_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..64f90d330298d8a80499ddcdb9b1a6e2e6665a66 --- /dev/null +++ b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/9e8fa882-eac5-4db7-9713-9db8aa2b6cb1_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:858d327d8a8cfbae2fdc2bad13083550915a8aba2480070813434d928c92bbb7 +size 75039 diff --git a/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/9e8fa882-eac5-4db7-9713-9db8aa2b6cb1_model.json b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/9e8fa882-eac5-4db7-9713-9db8aa2b6cb1_model.json new file mode 100644 index 0000000000000000000000000000000000000000..ea6b10d75bfb1d0573bdc2b6b9e0da2372af9856 --- /dev/null +++ b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/9e8fa882-eac5-4db7-9713-9db8aa2b6cb1_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e38144ad39b782719067de2bd6ca3e0916ca7e0b974a32c397a2e9d1deb3a95b +size 89009 diff --git a/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/9e8fa882-eac5-4db7-9713-9db8aa2b6cb1_origin.pdf b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/9e8fa882-eac5-4db7-9713-9db8aa2b6cb1_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..89cf5c7cb238fec22cbe1009f95dda4219342496 --- /dev/null +++ b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/9e8fa882-eac5-4db7-9713-9db8aa2b6cb1_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc10b2278b1fe1b95e4c12b13b94fa7a9fcdf65304306f44e2522a3f755723ea +size 624514 diff --git a/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/full.md b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/full.md new file mode 100644 index 0000000000000000000000000000000000000000..97466275f21445bcca67f877369ff360c116bb44 --- /dev/null +++ b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/full.md @@ -0,0 +1,297 @@ +# DSNAS: Direct Neural Architecture Search without Parameter Retraining + +Shoukang Hu\*1, Sirui Xie\*2, Hehui Zheng3, Chunxiao Liu4, Jianping Shi4, Xunying Liu1, Dahua Lin\* + +# Abstract + +If NAS methods are solutions, what is the problem? Most existing NAS methods require two-stage parameter optimization. However, performance of the same architecture in the two stages correlates poorly. In this work, we propose a new problem definition for NAS, task-specific end-to-end, based on this observation. We argue that given a computer vision task for which a NAS method is expected, this definition can reduce the vaguely-defined NAS evaluation to i) accuracy of this task and ii) the total computation consumed to finally obtain a model with satisfying accuracy. Seeing that most existing methods do not solve this problem directly, we propose DSNAS, an efficient differentiable NAS framework that simultaneously optimizes architecture and parameters with a low-biased Monte Carlo estimate. Child networks derived from DSNAS can be deployed directly without parameter retraining. Comparing with two-stage methods, DSNAS successfully discovers networks with comparable accuracy (74.4%) on ImageNet in 420 GPU hours, reducing the total time by more than 34%. + +# 1. Introduction + +The success of deep learning is partially built upon the architecture of neural networks. However, the variation of network architectures always incurs unpredictable changes in performance, causing tremendous efforts in ad hoc architecture design. Neural Architecture Search (NAS) is believed to be promising in alleviating this pain. Practitioners from the industry would like to see NAS techniques that automatically discover task-specific networks with reasonable performance, regardless of their generalization capability. Therefore, NAS is always formulated as a hyper-parameter optimization problem, whose algorithmic realization spans evolution algorithm [21, 7], reinforcement learning [28], Bayesian optimization [9], Monte Carlo Tree Search [25], and differentiable architecture search [14, 27, 3]. Re + +![](images/5e2c7289904b84b689834d7e3e4ffe0c06d9b5720769769245c07294c6d15e7c.jpg) +Figure 1. Projecting from the architecture space $\mathcal{A}$ to the network space $\mathcal{N}(\theta)$ with different parameter training schemes in searching and retraining results in accuracy with low correlation. + +cently, these algorithmic frameworks have exhibited pragmatic success in various challenging tasks, e.g. semantic segmentation [12] and object detection [4] etc. + +However, even as an optimization problem, NAS is almost vaguely defined. Most of the NAS methods proposed recently are implicitly two-stage methods. These two stages are searching and evaluation (or retraining). While the architecture optimization process is referring to the searching stage, in which a co-optimization scheme is designed for parameters and architectures, there runs another round of parameter optimization in the evaluation stage, on the same set of training data for the same task. This is to some extent contradicting the norm in a machine learning task that no optimization is allowed in evaluation. A seemingly sensible argument could be that the optimization result of NAS is only the architecture, and the evaluation of an architecture is to check its performance after retraining. There is certainly no doubt that architectures that achieve high performance when retrained from scratch are reasonable choices + +for deployment. But is this search method still valid if the searched architecture does not perform well after retraining, due to the inevitable difference of training setup in searching and evaluation? + +These questions can only be answered with an assumption that the final searching performance can be generalized to evaluation stage even though the training schemes in two stages are different. Specifically, differences in training schemes may include different number of cells, different batch sizes, and different epoch numbers, etc. Using parameter sharing with efficiency concerns during search is also a usual cause. Unfortunately, this assumption is not a valid one. The correlation between the performance at the end of searching and after the retraining in evaluation is fairly low, as long as the parameter-sharing technique is used [20, 5]. + +We are thus motivated to rethink the problem definition of neural architecture search. We want to argue that as an application-driven field, there can be a diverse set of problem definitions, but every one of them should not be vague. And in this work, we put our cards on the table: we aim to tackle the task-specific end-to-end NAS problem. Given a task, defined by a data set and an objective (e.g. training loss), the expected NAS solution optimizes architecture and parameters to automatically discover a neural network with reasonable (if not optimal by principle) performance. By the term end-to-end, we highlight the solution only need a single-stage training to obtain a ready-to-deploy neural network of the given task. And the term task-specific highlights the boundary of this solution. The searched neural network can only handle this specific task. We are not confident whether this neural network generalizes well in other tasks. Rather, what can be expected to generalize is this NAS framework. + +Under this definition, the evaluation metrics of a proposed framework become clear, namely searching efficiency and final performance. Scrutinizing most existing methods in these two metrics, we find a big niche for a brand new framework. On one side of the spectrum, gradient-based methods such as ENAS [17], DARTS [14], Proxyless-NAS [3] require two-stage parameter optimization. This is because in the approximation to make them differentiable, unbounded bias or variance are introduced to their gradients. Two-stage methods always consume more computation than single-stage ones, not only because of another round of training but also the reproducibility issue [11]. On the other side of the spectrum, one-shot methods such as random search [11] and SPOS [7] can be extended to single-stage training. But since they do not optimize the architecture distribution in parameter training, the choice of prior distribution becomes crucial. A uniform sampling strategy may potentially subsume too many resources for satisfying accuracy. Lying in the middle, SNAS [27] shows a proof of concept, where the derived network maintains the + +performance in the searching stage. However, the gumbel-softmax relaxation makes it necessary to store the whole parent network in memory in both forward and backward, inducing tremendous memory and computation waste. + +In this work, we confront the challenge of single-stage simultaneous optimization on architecture and parameters. Our proposal is an efficient differentiable NAS framework, Discrete Stochastic Neural Architecture Search (DSNAS). Once the search process finishes, the best-performing subnetwork is derived with optimized parameters, and no further retraining is needed. DSNAS is built upon a novel search gradient, combining the stability and robustness of differentiable NAS and the memory efficiency of discrete-sampling NAS. This search gradient is shown to be equivalent to SNAS's gradient at the discrete limit, optimizing the task-specific end-to-end objective with little bias. And it can be calculated in the same round of back-propagation as gradients to neural parameters. Its forward pass and backpropagation only involve the compact subnetwork, whose computational complexity can be shown to be much more friendly than DARTS, SNAS and even ProxylessNAS, enabling large-scale direct search. We instantiate this framework in a single-path setting. The experimental results show that DSNAS discovers networks with comparable performance $(74.4\%)$ in ImageNet classification task in only 420 GPU hours, reducing the total time of obtaining a ready-to-deploy solution by $34\%$ from two-stage NAS. + +To summarize, our main contributions are as follows: + +- We propose a well-defined neural architecture search problem, task-specific end-to-end NAS, under the evaluation metrics of which most existing NAS methods still have room for improvement. +- We propose a plug-and-play NAS framework, DSNAS, as an efficient solution to this problem in large scale. DSNAS updates architecture parameters with a novel search gradient, combining the advantages of policy gradient and SNAS gradient. A simple but smart implementation is also introduced. +- We instantiate it in a single-path parent network. The empirical study shows DSNAS robustly discovers neural networks with state-of-the-art performance in ImageNet, reducing the computational resources by a big margin over two-stage NAS methods. We have made our implementation public1. + +# 2. Problem definition of NAS + +# 2.1. Two-Stage NAS + +Most existing NAS methods involve optimization in both searching stage and evaluation stage. In the searching + +stage, there must be parameter training and architecture optimization, even though they may not run simultaneously. The ideal way is to train all possible architectures from scratch and then select the optimal one. However, it is infeasible with the combinatorial complexity of architecture. Therefore, designing the co-occurrence of parameter and architecture optimization to improve efficiency is the main challenge of any general NAS problems. This challenge has not been overcome elegantly yet. The accuracy at the end of the searching stage has barely been reported to be satisfying. And an ad hoc solution is to perform another round of parameter optimization in the evaluation stage. + +Optimizing parameters in evaluation stage is not normal in traditional machine learning. Normally, the data set provided is divided into training set and validation set. Ones do learning in the training stage, with data from the training set. Then the learned model is tested on the withheld validation set, where no further training is conducted. With the assumption that training data and validation data are from the same distribution, the learning problem is reduced to an optimization problem. Ones can hence be confident to expect models with high training accuracy, if the assumption is correct, have high evaluation accuracy. + +Allowing parameter retraining in the evaluation stage makes NAS a vaguely defined machine learning problem. Terming problems as Neural Architecture Search give people an inclined interpretation that only the architecture is the learning result, instead of parameters. But if the searched architecture is the answer, what is the problem? Most NAS methods claim they are discovering best-performing architecture in the designated space efficiently [3, 7, 9], but what specifically does best-performing mean? Given that retraining is conducted in evaluation stage, ones may naturally presume it is a meta-learning-like hyperparameter problem. Then the optimization result should exhibit some meta-level advantages, such as faster convergence, better optimum or higher transferability, etc. These are objectives that ones are supposed to state clearly in a NAS proposal. Nonetheless, objectives are only implicitly conveyed (mostly better optimum) in experiments. + +Defining problem precisely is one of the milestones in scientific research, whose direct gift in a machine learning task is a clear objective and evaluation metric. Subsequent efforts can then be devoted into validating if the proposed learning loss is approximating a necessary and sufficient equivalence of this objective. Unfortunately, under this criterion, most existing two-stage NAS methods are reported [20, 11] failing to prove the correlation between the searching accuracy and the retraining accuracy. + +# 2.2. Task-specific end-to-end NAS + +Seeing that the aforementioned dilemma lies in the ambiguity in evaluating an architecture alone, we propose a + +type of problem termed task-specific end-to-end NAS, the solution to which should provide a ready-to-deploy network with optimized architecture and parameters. + +Task refers to generally any machine learning tasks (in this work we discuss computer vision tasks specifically). A well-defined task should at least have a set of data representing its functioning domain, a learning objective for the task-specific motives e.g. classification, segmentation, etc. And the task is overwritten if there is a modification in either factor, even a trivial augmentation in the data. In other words, task-specific sets a boundary on what we can expect from the searched result and what cannot. This can bring tremendous operational benefits to industrial applications. + +End-to-end highlights that, given a task, the expected solution can provide a ready-to-deploy network with satisfying accuracy, the whole process of which can be regarded as a black-box module. Theoretically, it requires a direct confrontation of the main challenge of any general NAS problem, i.e. co-optimizing parameter and architecture efficiently. Empirically, task-specific end-to-end is the best description of NAS's industrial application scenarios: i) the NAS method itself should be generalizable for any off-the-shelf tasks; and ii) when applied to a specific task, practitioners can at least have some conventional guarantees on the results. Basically, it is to reduce vaguely defined NAS problems to established tasks. + +The evaluation metrics become clear under this problem definition. The performance of the final result is, by principle, the accuracy in this task. And the efficiency should be calculated based on the time from this NAS solver starts taking data to it outputs the neural network whose architecture and parameters are optimized. This efficiency metric is different from all existing works. For two-stage methods, the time for both searching and evaluation should be taken into account in this metric. Therefore, their efficiency may not be as what they claim. Moreover, two-stage methods do not optimize the objective higher accuracy of final derived networks in an end-to-end manner. + +# 3. Direct NAS without retraining + +# 3.1. Stochastic Neural Architecture Search (SNAS) + +In the literature, SNAS is one of those close to a solution to the task-specific end-to-end NAS problem. Given any task with differentiable loss, the SNAS framework directly optimizes the expected performance over architectures in terms of this task. In this subsection, we provide a brief introduction on SNAS. + +Basically, SNAS is a differentiable NAS framework that maintains the generative nature as reinforcement-learning-based methods [28]. Exploiting the deterministic nature of the Markov Decision Process (MDP) of network construction process, SNAS reformulated it as a Markov Chain. This + +reformulation leads to a novel representation of the network construction process. As shown in Fig.2, nodes $x_{i}$ (blue lumps) in the DAG represent feature maps. Edges $(i,j)$ (arrow lines) represent information flows between nodes $x_{i}$ and $x_{j}$ , on which $n$ possible operations $O_{i,j}$ (orange lumps) are attached. Different from DARTS, which avoids sampling subnetwork with an attention mechanism, SNAS instantiates this Directed Acyclic Graph (DAG) with a stochastic computational graph. Forwarding a SNAS parent network is to first sample random variables $Z_{i,j}$ and multiplying it to edges $(i,j)$ in the DAG: + +$$ +\tilde {\boldsymbol {O}} _ {i, j} (\cdot) = \boldsymbol {Z} _ {i, j} ^ {T} \boldsymbol {O} _ {i, j} (\cdot). \tag {1} +$$ + +Ones can thus obtain a Monte Carlo estimate of the expectation of task objective $L_{\theta}(Z)$ over possible architectures: + +$$ +\mathbb {E} _ {\boldsymbol {Z} \sim p _ {\alpha} (\boldsymbol {Z})} [ L _ {\boldsymbol {\theta}} (\boldsymbol {Z}) ], \tag {2} +$$ + +where $\alpha$ and $\theta$ are parameters of architecture distribution and neural operations respectively. This is exactly the task-specific end-to-end NAS objective. + +To optimize parameters $\theta$ and architecture $\alpha$ simultaneously with Eq. 2, (termed as single-level optimization in [14]), SNAS relaxes the discrete one-hot random variable $Z$ to a continuous random variable $\tilde{Z}$ with the gumbel-softmax trick. However, the continuous relaxation requires to store the whole parent network in GPU, preventing it from directly applying to large-scale networks. In Xie et al. [27], SNAS is still a two-stage method. + +If the temperature in SNAS's gumble-softmax trick can be directly pushed to zero, SNAS can be extended to large-scale networks trivially. However, it is not the case. Take a look at the search gradient given in Xie et al. [27]: + +$$ +\frac {\partial \mathcal {L}}{\partial \alpha_ {i , j} ^ {k}} = \frac {\partial \mathcal {L}}{\partial x _ {j}} \boldsymbol {O} _ {i, j} ^ {T} (x _ {i}) (\delta (k ^ {\prime} - k) - \tilde {\boldsymbol {Z}} _ {i, j}) Z _ {i, j} ^ {k} \frac {1}{\lambda \alpha_ {i , j} ^ {k}}, \tag {3} +$$ + +ones can see that the temperature $\lambda$ is not valid to be zero for the search gradient. Xie et al. [27] only gradually annealed it to be close to zero. In this work, we seek for an alternative way to differentiate Eq. 2, combining the efficiency of discrete sampling and the robustness of continuous differentiation. And we start from SNAS's credit assignment. + +# 3.2. Discrete SNAS (DSNAS) + +In original SNAS [27], to prove its efficiency over ENAS, a policy gradient equivalent of the search gradient is provided + +$$ +\begin{array}{l} \mathbb {E} _ {\tilde {\boldsymbol {Z}} \sim p (\tilde {\boldsymbol {Z}})} \left[ \frac {\partial \mathcal {L}}{\partial \alpha_ {i , j} ^ {k}} \right] \tag {4} \\ = \mathbb {E} _ {\tilde {\boldsymbol {Z}} \sim p (\tilde {\boldsymbol {Z}})} [ \nabla_ {\alpha_ {i, j} ^ {k}} \log p (\tilde {\boldsymbol {Z}}) [ \frac {\partial \mathcal {L}}{\partial x _ {j}} \boldsymbol {O} _ {i, j} ^ {T} (x _ {i}) \tilde {\boldsymbol {Z}} _ {i, j} ] _ {c} ], \\ \end{array} +$$ + +where $\tilde{Z}_{i,j}$ is the gumbel-softmax random variable, $[\cdot ]_c$ denotes that $\cdot$ is a cost independent from $\alpha$ for gradient calculation. In other words, Eq. 4 and Eq. 3 both optimize the task-specific end-to-end NAS objective i.e. Eq. 2. + +In order to get rid of SNAS's continuous relaxation, we push the $\lambda$ in the PG equivalent (4) to the limit 0, with the insight that only reparameterization trick needs continuous relaxation but policy gradient doesn't. The expected search gradient for architecture parameters at each edge becomes: + +$$ +\begin{array}{l} \lim _ {\lambda \to 0} \mathbb {E} _ {\tilde {\boldsymbol {Z}} \sim p (\tilde {\boldsymbol {Z}})} [ \frac {\partial \mathcal {L}}{\partial \alpha_ {i , j} ^ {k}} ] \\ = \lim _ {\lambda \rightarrow 0} \mathbb {E} _ {\tilde {\boldsymbol {Z}} \sim p (\tilde {\boldsymbol {Z}})} \left[ \nabla_ {\alpha_ {i, j} ^ {k}} \log p (\tilde {\boldsymbol {Z}} _ {i, j}) \left[ \frac {\partial \mathcal {L}}{\partial x _ {j}} \tilde {\boldsymbol {O}} _ {i, j} (x _ {i}) \right] _ {c} \right] \\ = \mathbb {E} _ {\boldsymbol {Z} \sim p (\boldsymbol {Z})} \left[ \nabla_ {\alpha_ {i, j} ^ {k}} \log p (\boldsymbol {Z} _ {i, j}) \left[ \frac {\partial L}{\partial x _ {j}} \boldsymbol {O} _ {i, j} ^ {T} (x _ {i}) \boldsymbol {Z} _ {i, j} \right] _ {c} \right] \\ = \mathbb {E} _ {\boldsymbol {Z} \sim p (\boldsymbol {Z})} \left[ \nabla_ {\alpha_ {i, j} ^ {k}} \log p \left(\boldsymbol {Z} _ {i, j}\right) \left[ \frac {\partial L}{\partial x _ {j}} \sum_ {k} O _ {i, j} ^ {k} \left(x _ {i}\right) Z _ {i, j} ^ {k} \right] _ {c} \right], \tag {5} \\ \end{array} +$$ + +where $Z_{i,j}$ is a strictly one-hot random variable, $Z_{i,j}^{k}$ is the $k$ th element in it, $[\cdot]_c$ denotes that $\cdot$ is a cost independent from $\alpha$ for gradient calculation. Line 3 is derived from line 2 since $p(Z_{i,j}) = \lim_{\lambda \to 0} p(\tilde{Z}_{i,j})$ [16], $L = \lim_{\lambda \to 0} \mathcal{L}$ . + +Exploiting the one-hot nature of $Z_{i,j}$ , i.e. only $Z_{i,j}^{s}$ on edge $(i,j)$ is 1, others i.e. $Z_{i,j}^{\setminus s}$ are 0, the cost function can be further reduced to + +$$ +\begin{array}{l} C \left(\boldsymbol {Z} _ {i, j}\right) = \sum_ {k} \frac {\partial L}{\partial x _ {j}} O _ {i, j} ^ {k} \left(x _ {i}\right) Z _ {i, j} ^ {k} \\ = \frac {\partial L}{\partial x _ {j} ^ {i}} O _ {i, j} ^ {s} \left(x _ {i}\right) Z _ {i, j} ^ {s} = \frac {\partial L}{\partial x _ {j} ^ {i}} x _ {j} ^ {i} \tag {6} \\ = \frac {\partial L}{\partial x _ {j} ^ {i}} \frac {\partial x _ {j} ^ {i}}{\partial Z _ {i , j} ^ {s}} = \frac {\partial L}{\partial Z _ {i , j} ^ {s}}, \\ \end{array} +$$ + +as long as $\left| \frac{\partial \mathcal{L}}{\partial x_j} O_{i,j}^{\searrow s}(x_i) \right| \neq \infty$ . Here $x_j^i = O_{i,j}^s(x_i) Z_{i,j}^s$ is the output of the operation $O_{i,j}^s$ chosen at edge $(i,j)$ . The equality in line 3 is due to $Z_{i,j}^s = 1$ . + +# 3.3. Implementation + +The algorithmic fruit of the mathematical manipulation in Eq. 6 is a parallel-friendly implementation of Discrete SNAS, as illustrated in Fig. 2. In SNAS, the network construction process is a pass of forward of stochastic computational graph. The whole network has to be instantiated with the batch dimension. In DSNAS we offer an alternative implementation. Note that $C(Z_{i,j}) = \frac{\partial L}{\partial Z_{i,j}^s}$ only needs to be calculated for the sampled subnetworks. And apparently it is also the case for $\frac{\partial L}{\partial \theta}$ . That is to say, the back-propagation of DSNAS only involves the sampled network, instead of the whole parent network. Thus we only instantiate the + +![](images/180913bfc309223da76f32b1ec4238dec6ca440205dc4c8726a808abaad5022f.jpg) +Figure 2. Forward and backward on SNAS, ProxylessNAS and DSNAS. Blue lumps stand for feature maps, orange ones for operation candidates. Blue arrow lines indicate forward data flows, purple dashed lines indicate backward ones. Semi-transparent lumps stand for parent networks that are not instantiated with batch dimension, a technique to reduce computation in ProxylessNAS and DSNAS. dummy 1 highlights the smart implementation introduced in Sec. 3.3. + +![](images/b88b344f4639a930dfe6db1129ca43cb462d6577455bb672fa920e4fc7f913c0.jpg) + +![](images/34a321604b6ee63602dd1be7f3401be42147d838c9b1e93911f1ec1ecdfcd5a6.jpg) + +# Algorithm 1 Discrete SNAS + +Require: parent network, operation parameters $\pmb{\theta}$ and categorical arch distribution $p_{\alpha}(Z)$ + +Initialize $\theta ,\alpha$ + +while not converged do + +Sample one-hot random variables $Z$ from $p_{\alpha}(Z)$ + +Construct child network with $\theta$ according to $Z$ , multiply a $1^{dummy}$ after each feature map $X$ + +Get a batch from data and forward to get $L$ + +Backward $L$ to both $\theta$ and $1^{dummy}$ , backward $\log p_{\alpha}(Z)$ to $\pmb{\alpha}$ + +Update $\pmb{\theta}$ with $\frac{\partial L}{\partial\pmb{\theta}}$ , update $\alpha$ with $\frac{\partial\log p_{\alpha}(\pmb{Z})}{\partial\alpha}$ +du mmy + +end while + +subnetwork with the batch dimension for forward and backward. However, the subnetwork derived in this way does not necessarily contain $Z_{i,j}$ . If it was not with Line 3 of Eq. 6, we would have to calculate $C(Z_{i,j})$ with $\frac{\partial L}{\partial x_j^i} x_j^i$ . Then the policy gradient loss would explicitly depend on the intermediate result $x_j^i = O_{i,j}^s (x_i)$ , which may need an extra round of forward if it is not stored by the automated differentiation infrastructure. With a smart mathematical manipulation in Eq. 6, ones can simply multiply a dummy 1 to the output of each selected operation, and calculate $C(Z_{i,j})$ with $\frac{\partial L}{\partial 1_{i,j}^{dummy}}$ . The whole algorithm is shown in Alg. 1 + +# 3.4. Complexity analysis + +In this subsection, we provide a complexity analysis of DSNAS, SNAS, and ProxylessNAS. Without loss of generality, we define a parent network with $l$ layers and each layer has $n$ candidate choice blocks. Let the forward time on a sampled subnetwork be $P$ , its backward time be $Q$ , and the memory requirement for this round be $M$ . + +As the original SNAS instantiates the whole graph with batch dimension, it needs $n$ times GPU memory and $n$ times calculation comparing to a subnetwork. It is the same case in DARTS. + +
MethodForward timeBackward timeMemory
SubnetworkO(P)O(Q)O(M)
SNASO(nP)O(nQ)O(nM)
ProxylessNAS*O(nP)O(nQ)O(nM)
ProxylessNASO(2P)O(2Q)O(2M)
DSNASO(P)O(Q)O(M)
+ +Table 1. Computation complexity comparison between SNAS, ProxylessNAS and DSNAS. ProxylessNAS* indicates its theoretical complexity. + +This memory consumption problem of differentiable NAS was first raised by [3]. And they proposed an approximation to DARTS's optimization objective, with the BinaryConnect [6] technique: + +$$ +\frac {\partial \mathcal {L}}{\partial \boldsymbol {\alpha} _ {i , j}} = \frac {\partial \mathcal {L}}{\partial \hat {\boldsymbol {Z}} _ {i , j}} \frac {\partial \hat {\boldsymbol {Z}} _ {i , j}}{\partial \boldsymbol {\alpha} _ {i , j}} \approx \sum_ {k} \frac {\partial \mathcal {L}}{\partial Z _ {i , j} ^ {k}} \frac {\partial \hat {Z} _ {i , j} ^ {k}}{\partial \boldsymbol {\alpha} _ {i , j}}, \tag {7} +$$ + +where $\hat{Z}_{i,j}$ denotes the attention-based estimator as in DARTS [14], distinct from the discrete random variable $Z_{i,j}$ , highlighting how the approximation is being done. But this approximation does not directly save the memory and computation. Different from Eq. 5 and Eq. 6, theoretically, the calculation of Eq. 7 still involves the whole network, as indicated by the summation $\sum$ . To reduce memory consumption, they further empirically proposed a path sampling heuristic to decrease the number of paths from $n$ to 2. Table 1 shows the comparison. + +# 3.5. Progressive early stop + +One potential problem in sample-based differentiable NAS is that empirically, the entropy of architecture distribution does not converge to zero, even though comparing to attention-based NAS [14] they are reported [27] to converge with smaller entropy. The non-zero entropy keeps the sampling going on until the end, regardless of the fact that sampling at that uncertainty level does not bring significant gains. To the opposite, it may even hinder the learning on other edges. + +To avoid this side-effect of architecture sampling, DSNAS applies a progressive early stop strategy. Sampling and optimization stop at layers/edges in a progressive manner. Specifically, a threshold $h$ is set for the stopping condition: + +$$ +\min \left\{\alpha_ {i, j} ^ {k} - \alpha_ {i, j} ^ {m}, \forall m \neq k \right\| \alpha_ {i, j} ^ {k} = \max \left\{\boldsymbol {\alpha} _ {i, j} \right\} \} \geq h. \tag {8} +$$ + +Once this condition is satisfied on any edge/layer, we directly select the operation choice with the highest probability there, stop its sampling and architecture parameters update in the following training. + +# 3.6. Comparison with one-shot NAS + +Different from all differentiable NAS methods, one-shot NAS only do architecture optimization in one-shot, before which they obtain a rough estimation of the graph through either pretraining [1, 7] or an auxiliary hypernetwork [2]. All of them are two-stage methods. The advantage of DSNAS is that it optimizes architecture alongside with parameters, which is expected to save some resources in the pretraining stage. Intuitively, DSNAS rules out non-promising architectures in an adaptive manner by directly optimizing the objective in an end-to-end manner. Although one-shot methods can also have an end-to-end realization, by investing more resources in pretraining, it may take them more epochs to achieve comparable performance as DSNAS. They can also do finetuning, but still parameters of the optimal networks are updated less frequently than DSNAS. Ones can expect better performance from DSNAS given equivalent training epochs. + +# 4. Experimental Results + +In this section, we first demonstrate why the proposed task-specific end-to-end is an open problem for NAS, by investigating the performance correlation between searching stage and evaluation stage of the two-stage NAS. We then validate the effectiveness and efficiency of DSNAS under the proposed task-specific end-to-end metric on the same search space as SPOS [7]. We further provide a breakup of time consumption to illustrate the computational efficiency of DSNAS. + +# 4.1. Accuracy correlation of two-stage NAS + +Since the validity of the searching in two-stage NAS relies on a high correlation in the performance of searching stage and evaluation stage, we check this assumption with a ranking correlation measure, Kendall Tau metric $\tau$ [10]. + +$$ +\tau = \frac {2 \left(N _ {\text {c o n c o r d a n t}} - N _ {\text {d i s c o n c o r d a n t}}\right)}{N (N - 1)}, \tag {9} +$$ + +where $N$ is the total number of pairs $(x_{i},y_{i})$ from the searching stage and evaluation stage consisting of $N_{\text{concordant}}$ concordant ranking pairs $(x_{1} > x_{2},y_{1} > y_{2}$ or $x_{1} < x_{2},y_{1} < y_{2})$ and $N_{\text{discordant}}$ discordant ranking pairs $(x_{1} > x_{2},y_{1} < y_{2}$ or $x_{1} < x_{2},y_{1} > y_{2})$ . Kendall Tau metric ranges from -1 to 1, which means the ranking order changes from reversed to identical. $\tau$ being close to 0 indicates the absence of correlation. + +We measure the ranking correlation by calculating Kendall Tau metric from two perspectives: (1) The $\tau_{inter}$ is calculated based on the top-k model performance of the searching and evaluation stage in one single searching process; (2) The Kendal Tau metric $\tau_{intra}$ is calculated by running the two-stage NAS methods several times with different random seeds using the top-1 model performance in each searching process. As shown in Table 2, the performance correlation between the searching stage and evaluation stage in both SPOS and ProxylessNAS is fairly low. This indicates the necessity of task-specific end-to-end NAS problem formulation. Fairly low correlation may also imply reproducibility problems. + +
Modelτinterτintra
Single Path One-Shot[7]0.33-0.07
ProxylessNas [3]--0.33
+ +Table 2. Kendall Tau metric $\tau$ calculated with the top-k model performance in the searching and evaluation stage. $\tau_{inter}$ measures the correlation of top-k model performance of the searching and evaluation stage in one single searching process while $\tau_{intra}$ measures the correlation of top-1 model performance from different searching processes. + +# 4.2. Single-path architecture search + +Motivation To compare the efficiency and accuracy of derived networks from DSNAS versus existing two-stage methods, we conduct experiment in single-path setting. Results are compared in the task-specific end-to-end metrics. + +Dataset All our experiments are conducted in a mobile setting on the ImageNet Classification task [18] with a resource constraint $FLOPS \leq 330M$ . This dataset consists of around $1.28 \times 10^{6}$ training images and $5 \times 10^{4}$ validation images. Data transformation is achieved by the standard pre-processing techniques described in the supplementary material. + +![](images/df0463778334e7828c7af35753ec70a46e61c137851b9ac8d42c60a5c098286f.jpg) +Figure 3. Searching process of two-stage SPOS and single-stage SPOS/DSNAS. SPOSsearch120retrain240 and SPOSsearch240retrain240 search for 120/240 epochs then retrain the derived architecture for 240 epochs. Instead of retraining, SPOSsearch120tune120 finetunes the result for 120 epochs. DSNASsearch240 and SPOSsearch240 utilize one-stage training for 240 epochs. DSNASsearch240 applies progressive early stop, SPOSsearch240 applies one-shot EA at 120th epoch. + +![](images/e7decb41e9679948a8e8b2d1567d6f33f7b7939e2ce1408b00168fcaea3fc59c.jpg) + +Search Space The basic building block design is inspired by ShuffleNet v2 [15]. There are 4 candidates for each choice block in the parent network, i.e., choice_3, choice_5, choice_7, and choice_x. These candidates differ in the kernel size and the number of depthwise convolutions, spanning a search space with $4^{20}$ single path models. The overall architecture of the parent network and building blocks are shown in the supplementary material. + +Training Settings We follow the same setting as SPOS [7] except that we do not have an evaluation stage in our searching process. We adopt a SGD optimizer with a momentum of 0.9 [22] to update the parent network weight parameters. A cosine learning rate scheduler with an initial learning rate of 0.5 is applied. Moreover, an L2 weight decay $(4 \times 10e^{-5})$ is used to regularize the training process. The architecture parameters are updated using the Adam optimizer with an initial learning rate of 0.001. All our experiments are done on 8 NVIDIA Titan X GPUs. + +Searching Process To demonstrate the efficiency of DSNAS, we compare the whole process needed to accomplish task-specific end-to-end NAS in ImageNet classification with two-stage NAS methods. Among all existing two-stage methods, SPOS [7] is the one with state-of-the-art accuracy and efficiency. SPOS can be regarded as a weight-sharing version of random search, where the search is conducted with one-shot evolution algorithm after training the uniformly sampled parent network. + +Figure 3 shows DSNAS's advantage over several different configurations of SPOS. We purposefully present curves in terms of both epoch number and time to illustrate that even though DSNAS updates architecture in an iteration-basis, almost no extra computation time is introduced. Among the four configurations of SPOS, + +SPOSsearch120retrain240 is the original one as in Guo et al. [7], using the two-stage paradigm. Obviously, DSNAS achieves comparable accuracy in an end-to-end manner, with roughly $34\%$ less computational resources. As SPOSsearch120retrain240 updates block parameters for only 120 epochs², we run the SPOSsearch120tune120 and SPOSsearch240retrain240 configurations for fair comparison. At the end of the 240th epoch, the accuracy of SPOS models is around $1.4\%$ and $4\%$ lower than DSNAS's respectively. + +In addition, for the ablation study of DSNAS's progressive early stop strategy, we call the EA algorithm of SPOS at the 120th epoch in the one-stage DSNASsearch240 configuration. Continuing the parameter training, the selected models experience a leap in accuracy and converge with accuracy $1.3\%$ lower than DSNAS's. However, seeking this EA point is fairly ad hoc and prone to random noise. + +Searching Results The experimental results are reported in Table 3. Comparing with all existing two-stage NAS methods, DSNAS shows comparable performance using at least 1/3 less computational resources. More importantly, the standard deviation in DSNAS's accuracy is lower than those from both searching and evaluation stage from EA-based SPOS (0.22 vs 0.38/0.36). This exhibits as a differentiable NAS framework, DSNAS is a more robust method in the task-specific end-to-end metric. + +# 4.3. Time consumption breakup + +In last subsection, we show DSNAS can achieve comparable performance under the task-specific end-to-end met + +
ModelFLOPSSearchRetrainNo proxyTime (GPU hour)
Top-1 acc(%)Top-5 acc(%)Top-1 acc(%)Top-5 acc(%)SearchRetrain
MobileNet V1 (0.75x)[8]325MManual68.4-Manual
MobileNet V2 (1.0x)[19]300MManual72.091.00Manual
ShuffleNet V2 (1.5x)[15]299MManual72.690.60Manual
NASNET-A(4@1056)[29]564M--74.091.60False48000-
PNASNET[13]588M--74.291.90False5400-
MnasNet-A1[23]312M--75.292.50False\( 40000^§ \)-
DARTS[14]574M--73.391.30False24288
SNAS[27]522M--72.790.80False36288
Proxyless-R (mobile)[3]320M62.6*84.7*74.692.20True\( 300^‡ \)≥384
Single Path One-Shot[7]319M\( 68.7^† \)-74.3-True250384
Single Path One-Shot*323M68.2±0.3888.2874.3±0.3691.79True250384
Random Search≤330M≤68.2≤88.31≤73.9≤91.8True250384
DSNAS324M74.4±0.2291.5474.3±0.2791.90True420
+ +Table 3. Results of choice block search. The time is measured based on NVIDIA TITAN X and accuracy is calculated on the validation set. * is our implementation with the original paper setting. $40000^{\S}$ is the GPU hour converted from 6912 TPUv2 hours with a ratio of roughly 1:6. $300^{\ddagger}$ is the GPU hour converted from V100 GPU with a ratio of 1:1.5. $68.7^{\dagger}$ is the accuracy on the search set. + +ric with much less computation than one-shot NAS methods. In this subsection, we further break up the time consumption of DSNAS into several specific parts, i.e. forward, backward, optimization and test3, and conduct a controlled comparison with other differentiable NAS methods. We also hope such a detailed breakup can help readers gain insight into further optimizing our implementation. + +We first compare the computation time of SNAS and DSNAS on CIFAR-10 dataset. The average time of each splitted part4 is shown in Table 4. Under the same setting, our DSANS is almost five folds faster than SNAS and consumes only $\mathbf{1} / \mathbf{n}$ of GPU memory as SNAS ( $n$ is the total number of candidate operations in each edge). + +
MethodTrainTest
ForwardBackwardOpt
SNAS0.26s0.46s0.14s0.18s
DSNAS0.05s0.07s0.13s0.04s
+ +Table 4. Computation time of SNAS and DSNAS + +We further compare the average time of each splited part between DSNAS and ProxylessNAS in a mobile setting on the ImageNet Classification task. As shown in Table 5, the average time $^5$ is calculated on the same search space of ProxylessNAS [3] with a total batch size of 512. With a fair comparison, DSNAS is roughly two folds faster than + +ProxylessNAS. + +
MethodTrainTest
ForwardBackwardOpt
ProxylessNAS3.3s2.3s3.6s1.2s
DSNAS1.9s1.3s2.6s0.9s
+ +Table 5. Computation time of ProxylessNAS and DSNAS + +# 5. Summary and future work + +In this work, we first define a task-specific end-to-end NAS problem, under the evaluation metrics of which we scrutinize the efficiency of two-stage NAS methods. We then propose an efficient differentiable NAS framework, DSNAS, which optimizes architecture and parameters in the same round of back-propagation. Subnetworks derived from DSNAS are ready-to-deploy. One competitive counterpart would be EfficientNet[24], which tries to bridge two stages with extra grid search on network scale after NAS. However, its total cost is larger than DSNAS. More accuracy gain can be achieved in DSNAS if scales are searched similarly. As a framework, DSNAS is orthogonal to the random wiring solution, which focuses on graph topology search [26]. We look forward to their combination for a joint search of topology, operations, and parameters. + +# Acknowledgement + +This work is mainly done at SenseTime Research Hong Kong. SH and XL are also partially supported by by Hong Kong Research Grants Council General Research Fund No. 14200218 and Shun Hing Institute of Advanced Engineering Project No. MMT-p1-19. + +# References + +[1] 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. 6 +[2] Andrew Brock, Theodore Lim, James M Ritchie, and Nick Weston. Smash: one-shot model architecture search through hypernetworks. arXiv preprint arXiv:1708.05344, 2017. 6 +[3] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. arXiv preprint arXiv:1812.00332, 2018. 1, 2, 3, 5, 6, 8 +[4] 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. 1 +[5] 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. 2 +[6] Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Binaryconnect: Training deep neural networks with binary weights during propagations. In Advances in neural information processing systems, pages 3123-3131, 2015. 5 +[7] 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. arXiv preprint arXiv:1904.00420, 2019. 1, 2, 3, 6, 7, 8 +[8] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. 8 +[9] Kirthevasan Kandasamy, Willie Neiswanger, Jeff Schneider, Barnabas Poczos, and Eric P Xing. Neural architecture search with bayesian optimisation and optimal transport. In Advances in Neural Information Processing Systems, pages 2016-2025, 2018. 1, 3 +[10] Maurice G Kendall. A new measure of rank correlation. Biometrika, 30(1/2):81-93, 1938. 6 +[11] Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. arXiv preprint arXiv:1902.07638, 2019. 2, 3 +[12] Chenxi Liu, Liang-Chieh Chen, Florian Schroff, Hartwig Adam, Wei Hua, Alan L Yuille, and Li Fei-Fei. Auto-deeplab: Hierarchical neural architecture search for semantic image segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 82–92, 2019. 1 +[13] 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. 8 +[14] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018. 1, 2, 4, 5, 6, 8 + +[15] Ningning Ma, Xiangyu Zhang, Hai-Tao Zheng, and Jian Sun. Shufflenet v2: Practical guidelines for efficient cnn architecture design. In Proceedings of the European Conference on Computer Vision (ECCV), pages 116-131, 2018. 7, 8 +[16] Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016. 4 +[17] 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 +[18] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211-252, 2015. 6 +[19] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zh-moginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4510-4520, 2018. 8 +[20] Christian Sciuto, Kaicheng Yu, Martin Jaggi, Claudiu Musat, and Mathieu Salzmann. Evaluating the search phase of neural architecture search. arXiv preprint arXiv:1902.08142, 2019. 2, 3 +[21] Kenneth O Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99-127, 2002. 1 +[22] Ilya Sutskever, James Martens, George Dahl, and Geoffrey Hinton. On the importance of initialization and momentum in deep learning. In International conference on machine learning, pages 1139-1147, 2013. 7 +[23] 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. 8 +[24] Mingxing Tan and Quoc V Le. Efficientnet: Rethinking model scaling for convolutional neural networks. arXiv preprint arXiv:1905.11946, 2019. 8 +[25] Martin Wistuba. Finding competitive network architectures within a day using uct. arXiv preprint arXiv:1712.07420, 2017. 1 +[26] Saining Xie, Alexander Kirillov, Ross Girshick, and Kaiming He. Exploring randomly wired neural networks for image recognition. arXiv preprint arXiv:1904.01569, 2019. 8 +[27] Sirui Xie, Hehui Zheng, Chunxiao Liu, and Liang Lin. Snas: stochastic neural architecture search. arXiv preprint arXiv:1812.09926, 2018. 1, 2, 4, 6, 8 +[28] Barret Zoph and Quoc V Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. 1, 3 +[29] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8697-8710, 2018. 8 \ No newline at end of file diff --git a/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/images.zip b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..f0d8dabb13185a0a1c64fe8e83cd267238484f97 --- /dev/null +++ b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae02c90d16ca4925b3f42e5cafa129187acece5c5406a0ac8a823cc134c3178e +size 414884 diff --git a/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/layout.json b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..2297e84939f0b0c7cfe2158c58a9e862c1f8da52 --- /dev/null +++ b/dsnasdirectneuralarchitecturesearchwithoutparameterretraining/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1b08a14e619e27b3255012feb5634befddaba21190200b2dc587810e88381b93 +size 363683 diff --git a/dunitdetectionbasedunsupervisedimagetoimagetranslation/cf7f5019-565e-4e3c-bd53-56bdd00cb78a_content_list.json b/dunitdetectionbasedunsupervisedimagetoimagetranslation/cf7f5019-565e-4e3c-bd53-56bdd00cb78a_content_list.json new file mode 100644 index 0000000000000000000000000000000000000000..0e3ba801ad398f3246c552b69f9756d6512cc211 --- /dev/null +++ b/dunitdetectionbasedunsupervisedimagetoimagetranslation/cf7f5019-565e-4e3c-bd53-56bdd00cb78a_content_list.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:388e80d96b79cbee8138ff7a106505a08f96508289516ebbc55a752625a465ca +size 68674 diff --git a/dunitdetectionbasedunsupervisedimagetoimagetranslation/cf7f5019-565e-4e3c-bd53-56bdd00cb78a_model.json b/dunitdetectionbasedunsupervisedimagetoimagetranslation/cf7f5019-565e-4e3c-bd53-56bdd00cb78a_model.json new file mode 100644 index 0000000000000000000000000000000000000000..c89ef91e9b964bfa4369fcdf77dc745067493c03 --- /dev/null +++ b/dunitdetectionbasedunsupervisedimagetoimagetranslation/cf7f5019-565e-4e3c-bd53-56bdd00cb78a_model.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5620f933da66d3fa7246bb75f41c521ad0fccc7831630596f7fcb8053e3f5e38 +size 87062 diff --git a/dunitdetectionbasedunsupervisedimagetoimagetranslation/cf7f5019-565e-4e3c-bd53-56bdd00cb78a_origin.pdf b/dunitdetectionbasedunsupervisedimagetoimagetranslation/cf7f5019-565e-4e3c-bd53-56bdd00cb78a_origin.pdf new file mode 100644 index 0000000000000000000000000000000000000000..09c792e5eeb895e8c967d0d4f8ed5abe72ed743a --- /dev/null +++ b/dunitdetectionbasedunsupervisedimagetoimagetranslation/cf7f5019-565e-4e3c-bd53-56bdd00cb78a_origin.pdf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c4b4dbf85b7ac76cf9639de7433ca6123660f66b9fae58719acfb78cf2a559d4 +size 1182097 diff --git a/dunitdetectionbasedunsupervisedimagetoimagetranslation/full.md b/dunitdetectionbasedunsupervisedimagetoimagetranslation/full.md new file mode 100644 index 0000000000000000000000000000000000000000..76540d51db234568c6e147752614ee6dbb714c73 --- /dev/null +++ b/dunitdetectionbasedunsupervisedimagetoimagetranslation/full.md @@ -0,0 +1,257 @@ +# DUNIT: Detection-based Unsupervised Image-to-Image Translation + +Deblina Bhattacharjee, Seungryong Kim, Guillaume Vizier, Mathieu Salzmann +School of Computer and Communication Sciences, EPFL, Switzerland + +{deblina.bhattacharjee, seungryong.kim, guillaume.vizier, mathieu.salzmann}@epfl.ch + +# Abstract + +Image-to-image translation has made great strides in recent years, with current techniques being able to handle unpaired training images and to account for the multimodality of the translation problem. Despite this, most methods treat the image as a whole, which makes the results they produce for content-rich scenes less realistic. In this paper, we introduce a Detection-based Unsupervised Image-to-image Translation (DUNIT) approach that explicitly accounts for the object instances in the translation process. To this end, we extract separate representations for the global image and for the instances, which we then fuse into a common representation from which we generate the translated image. This allows us to preserve the detailed content of object instances, while still modeling the fact that we aim to produce an image of a single consistent scene. We introduce an instance consistency loss to maintain the coherence between the detections. Furthermore, by incorporating a detector into our architecture, we can still exploit object instances at test time. As evidenced by our experiments, this allows us to outperform the state-of-the-art unsupervised image-to-image translation methods. Furthermore, our approach can also be used as an unsupervised domain adaptation strategy for object detection, and it also achieves state-of-the-art performance on this task. + +# 1. Introduction + +Image-to-image translation (I2I) has recently gained significant traction, to the point of being deployed in diverse applications, such as super-resolution [20], photo-realistic image synthesis [37, 29], colorization [19, 41] and domain adaptation [2]. This trend was initiated by the pioneering Pix2Pix work [15] that used conditional generative adversarial networks (GANs) [27] on paired training images. Since then, great progress has been made in this field, first by removing the requirement for the training images to be paired, leading to cycleGAN [45] and UNIT [25], and then by accounting for the inherent multimodality of the I2I task, both with paired [44] and unpaired [12, 22] images. + +![](images/3bed25f9bb027bc3924786601694d340965c9e5cda6a5675eea52221b98ed31b.jpg) + +![](images/f00ec82a1ef2c63ffd12c23efd43414fb52e873576f7903b6237e312abaca396.jpg) +Figure 1: Overview of DUNIT. (Top) We combine the style of one domain with the image-level and instance-level content of the other. Instance-level and image-level features are extracted separately and fused to generate a single consistent image. (Bottom) By accounting for the instances, our method produces more realistic results than image-level translation techniques such as UNIT [25] and DRIT [22]. + +While these methods have demonstrated promising results, they all consider the I2I task as a global translation problem over the whole image. Consequently, they remain limited in their ability to translate content-rich images with many disparate object instances. INIT [34] and InstaGAN [28] address this issue by treating the object instances and the global image/background separately. While InstaGAN aims to preserve the background style when translating the instances, INIT targets the same goal as us, and as the previous methods, of translating the entire image. To achieve this, INIT independently translates the global image and the instances, using separate reconstruction losses on these different elements. At test time, INIT then uses the global image translation module only, thus discarding the instance-level information. Further, INIT has not used the instance-boosted feature representation which is shown by + +![](images/9714fd9a75cf79af3d58fb5b5bac06deef8f2b1fbb2ffa3d6a009f1ac5cb2cff.jpg) +Figure 2: Overall DUNIT architecture. The instance aware I2I translation block on the right is the exact replica of the operations taking place between the night image in domain $X$ and the corresponding translated day image. Similarly, the global I2I translation block mirrors the operations between the day image in domain $Y$ and its translated night image. The blue background separates our contribution from the DRIT [22] backbone on which our work is built. The pink lines correspond to domain $X$ and the black lines to domain $Y$ . The global-level residual blocks have different features in domain $X$ and domain $Y$ and hence are color coded differently. The global features in domain $X$ are shown in dark blue, those in domain $Y$ in dark grey, the losses are in green, the global operations are in light orange, the instance features in domain $X$ are in yellow, the detection subnetwork in light blue and the merged features in dark orange. + +the merged feature map in figure 2. + +In this paper, we introduce a framework that, while accounting for the object instances, unifies their translation with that of the global image as seen in figure 1, so that instances can also be leveraged at test time. To this end, we incorporate an object detector within the I2I architecture, process the instance features and the image ones separately, and reassemble the resulting representations in a joint one, which we decode into a single image. Processing the features separately allows us to account for the detailed and diverse content of the different objects and of the background, yet fusing the instance-level and image-level representation models the fact that we aim to translate one consistent scene. To further exploit the detections during training, we introduce an instance-consistency loss, which compares the detections in the original image with that in the translated one. At test time, we follow the same process as during training, consisting of detecting the object instances, processing them independently of the global image and fusing the resulting representations to generate the final image. + +Our main contributions therefore are as follows: + +- We improve unsupervised I2I translation by introduc + +ing a detection-based translation method that, while processing the object instances and global image separately, fuses their representations so as to produce a single consistent image. + +- We introduce an instance-consistency loss, which further exploits the instances during training by modeling the intuition that the detections in the original and translated images should be consistent. +- By incorporating the detector into the architecture, we explicitly reason about instances not only during training but also at test time. +- During training, we only need access to ground-truth detections in a single domain. Therefore, our method can also be thought of as performing unsupervised domain adaptation for object detection. + +Our experiments on the standard INIT, Pascal-VOC classes [7], Comic2k [14], cityscapes [4] and KITTI [9] benchmark show that our approach outperforms the state-of-the-art global I2I methods, as well as the instance-level INIT one. Furthermore, we demonstrate that our approach also outperforms the state-of-the-art unsupervised domain adaptation detection algorithms. + +# 2. Related Work + +# 2.1. Image to Image Translation + +The advent of I2I translation methods began with the invention of conditional GAN[27], which were first applied to learn a mapping between a source and a target domain in Pix2Pix [15]. Since then, conditional GANs have been applied to a multitude of tasks, such as scene translation [13], season transfer [25], and sketch-to-photo translation [35]. While conditional GANs yield impressive results, they require paired images during training. Unfortunately, in many I2I translation scenarios, such paired training data is difficult and expensive to collect. To overcome this, cycleGAN [45] introduces a cycle consistency loss between the source and target domains, following the intuition that translating an image from the source domain to the target one and then back to the source one should yield consistent images. This idea was further extended by UNIT [25], which replaced the domain-specific latent spaces of cycleGAN with a single latent space shared by the domains. + +Nevertheless, neither conditional GANs, nor cycleGAN, nor UNIT account for the multi-modality of I2I translation; in general, a single image in one domain can be translated to another in many different, yet equally realistic ways. This was the task addressed by BicycleGAN [44], yet by leveraging paired images during training. More recently, MUNIT [12] and DRIT [22] introduced solutions to the multi-modal, unpaired scenario by learning a disentangled representation with a domain-invariant content space and a domain-specific attribute/style space. + +While effective, all the above-mentioned methods perform image-level translation, without considering the object instances. As such, they tend to yield less realistic results when translating complex scenes with many objects, such as traffic scenes. InstaGAN [28] was the first work to tackle instance-level translation. To this end, InstaGAN takes as input objects' segmentation masks in the two domains of interest, and performs translation between the object instances only, while maintaining the background unchanged. Here, by contrast, we aim to translate the entire image, object instances and background included. This is also the task addressed by INIT [34], which proposed to define a style bank to translate the instances and the global image separately. During training, however, INIT treats the object instances and the global image completely independently, each one having its own reconstruction loss. As such, at test time, it does not exploit the object instances at all, thus going back to image-level translation. Here, we propose to unify the translation of the image and its instances, thus allowing us to leverage the object instances at test time. As will be shown in our experiments, this results in more realistic translations and further allows us to perform unsupervised domain adaptation. + +![](images/cdcb10f2708ad8b8af63f8563af0916a8f88042d128672a3dae92b391bb495cb.jpg) +Figure 3: Merging the global and instance-level features. We use bilinear sampling [16] to position the instance-level features of each object at the corresponding location in the global feature map. We then merge this representation with the global one by, in essence, overwriting the global features at the object locations. + +# 2.2. Domain Adaptation + +Domain adaptation has been extensively studied in computer vision, using, e.g., multiple kernel learning [5, 6], subspace alignment [8] and covariance matrix alignment [38]. More recently, I2I translation has also been exploited for this task [17, 40, 39, 43, 11, 3, 23]. By contrast, the literature on domain adaptation for object detection remains sparser [26, 1], as the task is inherently more challenging due to its additional localization property. In [39] a deformable part-based model based on adaptive support vector machines was introduced to overcome domain shift for object detection. More recently, [30] used subspace alignment to transform the features extracted from two domains with a region-based convolutional neural network (RCNN) [10] to a common representation. These methods, however, are not end-to-end trainable. This was remedied in [2] via a domain adaptive Faster-RCNN object detection network reasoning jointly at image and instance level. Also, the weakly supervised cross domain adaptive paper [14] introduces a domain transfer stage where the detections on cycleGAN generated images are fine tuned. Furthermore, in [18], a domain adaptive representation learning technique is introduced which diversifies the shifted domain. All these methods use Faster-RCNN [31] as the detector to adapt between domains on a global level. While we jointly leverage the global image and the object instances, we do so in an I2I translation formalism, which we will show yields better results. + +# 3. Methodology + +# 3.1. Problem Formulation and Overview + +We aim to learn a multi-modal mapping between two visual domains $X \subset \mathbb{R}^{H \times W \times 3}$ and $Y \subset \mathbb{R}^{H \times W \times 3}$ that jointly accounts for the global image and the object instances. To this end, we build our approach on the DRIT backbone [22], which handles multi-modality but does not reason about instances. Our architecture is depicted in Figure 2. We assume that, during training, we have access to the ground-truth bounding boxes in a single domain, $X$ , i.e., Night in Figure 2. At test time, however, we do not require access to ground-truth object bounding boxes; they will be predicted by our network. We now explain the components of our network in more detail. + +# 3.2. Image-to-Image Translation Module + +Our architecture comprises 2 style encoders $\{E_x^s,E_y^s\}$ , one for each domain, and 3 content encoders $\{E_x^c,E_x^{ci},E_y^c\}$ , two to process the global images in each domain $(E_x^c,E_y^c)$ , and an additional one $(E_x^{ci})$ for the instances in domain $X$ . Let us now consider domain $Y$ for which we do not have instances. We use $E_{y}^{c}$ to extract global content features from an image $I_{y}$ in domain $Y$ , which is then merged with style features extracted from an image $I_{x}$ in domain $X$ using $E_{x}^{s}$ . The resulting representation is then passed through a decoder $G_{x}$ that generates a translation of $I_{y}$ to domain $X$ . In the standard DRIT framework, this process is mirrored to go from domain $X$ to domain $Y$ . + +# 3.3. Object Detection Module + +We aim to take the object instances into account. To this end, we first detect object instances in $I_{x}$ using a detection subnetwork, and then process the global image and the object instances in parallel, before fusing their representations and achieving translation to domain $Y$ using a decoder $G_{y}$ . Specifically, at the image level, we extract global content features from $I_{x}$ using $E_{x}^{c}$ and merge these features with the style features extracted from $I_{y}$ using $E_{y}^{s}$ . This is achieved using the global-level residual block depicted in Figure 2, whose architecture follows that of the residual block used in DRIT [21]. Let us denote by $F_{x}$ the global feature map resulting from this operation. + +In parallel as we extract $F_{x}$ , we also process each individual object detection. To this end, for each instance $i$ we first crop the corresponding image region, which can be done in an ROI pooling manner, and extract instance level content features using $E_{x}^{ci}$ . We then merge these features with the globally-pooled style features extracted from $I_{y}$ using the instance-level residual block shown in Figure 2, whose architecture is the same as the global-level one. Let + +![](images/b7a58134cf7f1f0358799ea53f90b200f5489a85848d54347550956083653ff3.jpg) +Figure 4: Visualization of the Instance Consistency loss, which is the summation of the $l_{1}$ distance between the top-left pixels of the detected bounding boxes in domains $X$ and $Y$ with the $l_{1}$ distance between the bottom-right pixels of the detected bounding boxes in domains $X$ and $Y$ . + +$\{F_x^i\}$ denote the set of feature maps obtained in this manner, with one feature map $F_{x}^{i}$ for each object instance. + +Instead of decoding separately the image-level features $F_{x}$ and the instance-level ones $\{F_{x}^{i}\}$ , in a similar manner as in INIT, here we propose to fuse them so as to obtain a single representation that we can decode into one consistent image using $G_{y}$ . To achieve this, we need to reintroduce the instance features at their respective locations in the global feature map. This process is illustrated in Figure 3. In essence, we make use of the bilinear sampling strategy introduced in [16] to place the instance features in a map of the same size as $F_{x}$ , and then merge this map with $F_{x}$ by simply replacing the features in $F_{x}$ at non-empty locations in the map with those in the map. + +# 3.4. Training + +To be able to handle unpaired training images, we follow the cycle-consistency approach and translate the generated images back to their original domains. In essence, this process mirrors that described above; it uses the instances to go back to domain $X$ and acts at the global image level to generate the domain $Y$ image. Below, we detail the loss function and training procedure for the resulting Detection-based Unsupervised Image-to-image Translation (DUNIT) model. + +Image-to-image translation module. Our method is built on the DRIT backbone which embeds the input images onto a shared style space and a domain specific content space. As such, we use the same weight-sharing strategy as DRIT for the two style encoders $(E_x^s,E_y^s)$ and exploit the same loss terms. They include: + +- A content adversarial loss $\mathcal{L}_{adv}^{content}(E_x^c,E_y^c,D^c)$ relying on a content discriminator $D^{c}$ , whose goal is to distinguish the content features of both domains; +- Domain adversarial losses $\mathcal{L}_{adv}^{x}(E_{y}^{c}, E_{x}^{s}, G_{x}, D^{x})$ and $\mathcal{L}_{adv}^{y}(E_{x}^{c}, E_{x}^{ci}, E_{y}^{s}, G_{y}, D^{y})$ , one for each domain, with corresponding domain classifiers $D^{x}$ and $D^{y}$ ; + +- A cross-cycle consistency loss $\mathcal{L}_1^{cc}(G_x,G_y,E_x^c,E_x^{ci},E_y^c,E_x^s,E_y^s)$ that exploits the disentangled content and style representations for cyclic reconstruction [36]; +- Self-reconstruction losses $\mathcal{L}_{rec}^{x}(E_{x}^{c}, E_{x}^{ci}, E_{x}^{s}, G_{x})$ and $\mathcal{L}_{rec}^{y}(E_{y}^{c}, E_{y}^{s}, G_{y})$ ensuring that the generators can reconstruct samples from their own domain; +- KL losses $\mathcal{L}_{KL}^{x}(E_{x}^{s})$ and $\mathcal{L}_{KL}^{y}(E_{y}^{s})$ encouraging the distribution of the style representations to be close to a standard normal distribution; +- Latent regression losses $\mathcal{L}_{lat}^{x}(E_{x}^{c}, E_{x}^{ci}, E_{x}^{s}, G_{x})$ and $\mathcal{L}_{lat}^{y}(E_{y}^{c}, E_{y}^{s}, G_{y})$ encouraging the mappings between the latent style representation and the image to be invertible. + +Note that, in contrast to DRIT, here, several of these loss terms exploit the instance content encoder $E_{x}^{ci}$ . + +Object detection module. In addition to all the DRIT losses listed above, we introduce a new instance consistency loss that explicitly reasons about the detected objects. The intuition behind this loss is that the same object instances should be detected in $I_{x}$ and in the corresponding image after translation. Enforcing consistency between the detections in two images raises the question of how to match these detections. To overcome this, we exploit a modern detector that relies on fixed detection anchors. Since the set of anchors is the same in both images, the detections are naturally paired. We then aim for the positive detections at the same anchors in both images to correspond to the same object, and thus have the same bounding boxes. To the end, we define the instance consistency loss + +$$ +\mathcal {L} _ {1} ^ {i c} = \sum_ {i | \hat {y} _ {i} ^ {x} = 1 \wedge \hat {y} _ {i} ^ {y} = 1} \left| P _ {t l} ^ {x i} - P _ {t l} ^ {y i} \right| _ {1} + \sum_ {i | \hat {y} _ {i} ^ {x} = 1 \wedge \hat {y} _ {i} ^ {y} = 1} \left| P _ {b r} ^ {x i} - P _ {b r} ^ {y i} \right| _ {1}, \tag {1} +$$ + +where $\hat{y}_i^x = 1$ indicates that anchor $i$ is predicted as positive in domain $X$ and similarly $\hat{y}_i^y$ in domain $Y$ , $P_{tl}^{xi}$ and $P_{tl}^{yi}$ are the bounding box top-left pixels for anchor $i$ in domain $X$ and domain $Y$ , respectively, and $P_{br}^{xi}$ and $P_{br}^{yi}$ the corresponding the bottom-right pixels. + +In our experiments, we make use of the RetinaNet detector [24]. We employ the focal loss of [24] for the instance detections. The focal loss further introduces parameters $\alpha$ to offset the class imbalance. In our experiments, we use $\alpha = [0.25, 0.5]$ as in [24] and $\gamma = 2$ . We will study the influence of these parameters in our experiments. Note that we apply the RetinaNet on both $I_x$ and its translated version in domain $Y$ . We therefore use the focal loss in both cases, which further encourages the translated image to contain object instances at the same locations as the input image, since, during training, we compare all detections to the ground-truth bounding boxes. + +# 4. Experiments and Results + +# 4.1. Unsupervised Image to Image Translation + +To validate our method, we conduct experiments on the INIT [34] dataset which is a very diverse and challenging dataset. Following DRIT, we resize the images in the dataset to $216 \times 216$ to consider GPU limitations. We used 4 GPUs to train our model with a batch-size of 16. To evaluate our method, we compare it with the following five state-of-the-art unpaired I2I translation approaches. + +- CycleGAN [45], which comprises forward and backward translation functions between the source and target domains along with an adversarial loss. +- UNIT [25], which improves upon CycleGAN by using a shared latent space and comprises two VAE-GANs and a cycle-consistency loss. +- MUNIT [12], which assumes that an image representation can be disentangled into a domain specific style representation and a domain invariant content representation and swaps these disentangled content/style latent features to generate the translations. +- DRIT [22], which is very similar to MUNIT except that it contains generators and domain discriminators in both the domains, along with the two content encoders and two style encoders. +- INIT [34], which is built on the MUNIT backbone and considers instance level style translations along with the global translation. It uses the cross-cycle consistency loss, a global and instance level GAN loss and a global and instance level reconstruction loss. + +We implemented our method in PyTorch and will make our code available at https://github.com/IVRL/DUNIT. + +To evaluate these methods, we use the following three standard performance metrics. + +- Inception Score (IS) [33], which encodes the diversity across all translated outputs. +- Conditional Inception Score (CIS) [12], which encodes the diversity of the translated output conditioned on a single input image, and is typically used for multimodal methods. +- LPIPS distance [42], which measures the diversity of the translated images, and has been shown to be strongly correlated with human perception. To compute this metric, following the setting used in [34], we randomly sample 19 pairs of translated outputs from the 100 input test images. + +
CycleGAN [45]UNIT [25]MUNIT [12]DRIT [22]INIT [34]DUNIT
ISCISISCISISCISISCISISCISISCIS
Sunny →Night1.0260.0141.0300.0821.2781.1591.2241.0581.1181.0601.2591.166
Night →Sunny1.0230.0121.0240.0271.0511.0361.0991.0241.0801.0451.1081.083
Sunny →Rainy1.0730.0111.0750.0971.1461.0121.2071.0071.1521.0361.2251.029
Rainy →Sunny1.0900.0101.0230.0141.1021.0551.1031.0281.1191.0601.1251.083
Sunny →Cloudy1.0970.0141.1340.0811.0951.0081.1041.0251.1421.0401.1491.033
Cloudy →Sunny1.0330.0901.0460.2191.3211.0261.2491.0461.4601.0161.4721.077
Average1.0570.0251.0550.0871.1661.0321.1641.0311.1791.0431.2231.079
+ +Table 1: Quantitative comparison of our approach with the state of the art on the INIT dataset. We report the Inception Score (IS) and Conditional Inception Score (CIS) (higher is better). DUNIT with the Instance Consistency Loss (IC) gives the best results. + +
MethodDiversity of results (LPIPS Distance)
Sunny →NightSunny →RainySunny →CloudyAverage
UNIT [25]0.0670.0620.0680.066
CycleGAN [45]0.0160.0080.0110.012
MUNIT [12]0.2920.2390.2110.247
DRIT [22]0.2310.1730.1660.190
INIT [34]0.3300.2670.2240.274
DUNIT0.3380.2980.2250.287
Real Images0.5730.4890.4650.509
+ +Table 2: Quantitative comparison of our approach with the state of the art in terms of image diversity. Following [21], we report the LPIPS metric. Note that DUNIT yields the highest diversity score. + +![](images/5309da49e51b7fd0cf9d82709c8635bdec4a123deac92fdb52db92f608a793ad.jpg) +Figure 5: Qualitative comparison on Sunny to Night. We show, from left to right, the input image in the source domain, the result of cycleGAN [45] and UNIT [25], and random outputs from MUNIT [12], DRIT [22] and DUNIT (ours), respectively. + +We provide the IS and CIS in Table 1 and the LPIPS in Table 2. DUNIT outperforms the baselines on all pairs of domains and according to all metrics, with the exception of IS on Sunny $\rightarrow$ Night, where MUNIT yields a slightly higher score. On average, we outperform the baselines by a comfortable margin, including INIT which also exploits object instances. In Fig. 5, we compare qualitatively the different methods. Note that DUNIT yields sharper and more realistic images than the baselines. We do not include INIT in this qualitative comparison because its code is not publicly available. + +Ablation study. We now evaluate different aspects of our method. First, we study the influence of the instance consistency loss. To this end, we compare the results ob + +tained using our method with the instance consistency loss (DUNIT w/ IC) and without it (DUNIT w/o IC). We report the LPIPS distance and the IS and CIS metrics over three pairs of domains from the INIT dataset in Table 3. Note that the IC loss consistently improves the results of DUNIT on all pairs. This demonstrates the benefits of constraining the content in the translated image to preserve the instances in the input image. We believe this to be an instance of a more general phenomenon, where auxiliary tasks can help to improve the translation process. We then turn to exploring the choice of detection subnetwork in our architecture. In addition to the RetinaNet used in our previous experiments, we also evaluate the Faster-RCNN. Note that, in this case, the detections are not paired, and we cannot use the + +![](images/217515b3d87bcdc134665c0cf3ef8f84e6e70b63ca9dd86abbf0a41d2edde964.jpg) +Input + +![](images/68f55a5e5b4a06abb4dfcc50917ded35140641490fec01753f59d7820a4103a4.jpg) +Style Image + +![](images/9bab5b448a2a8a89f627a2265026654a8f7629348304735cb43e46935b50ae7e.jpg) +MUNIT +Figure 6: Qualitative comparisons conditioned on one image style for Sunny to Cloudy (first row) and Sunny to Rainy (second row). We show, from left to right, the input image in the source domain, the style image for translation, followed by outputs from MUNIT [12], DRIT [22] and DUNIT (ours), respectively. We only show multimodal results as they perform better than unimodal methods like CycleGAN [45] and UNIT [25] as seen in figure 5. + +![](images/6737ef974cea1019f36e519bdbc971fdb18373388e107151ee897c5c12f9d2ca.jpg) +DRIT + +![](images/e03241cfdb8664106b758e06eaa1cd8fee339c3dc6fb49e16a4170a669c468e8.jpg) +DUNIT + +
Effect of the IC loss
w/ Liicw/o Liicw/ Liicw/o LiicCISCIS
LPIPSLPIPSISCISISCIS
Sunny to Night0.3380.3221.2591.1661.2161.049
Sunny to Rainy0.2980.2521.2251.0291.1381.002
Sunny to Cloudy0.2250.2031.1491.0331.1081.009
Average0.2870.2591.2111.0761.1541.020
+ +Table 3: Ablation Study: We compare our method with the instance consistency loss (DUNIT w/ $L_{i}^{ic}$ ) and without it (DUNIT w/o $L_{i}^{ic}$ ). We report the LPIPS distance, inception score (IS) and conditional inception score (CIS). + +![](images/ba362d798336ad61915b4508137c24dfb53c8138a1483b21df351e72dd1636b6.jpg) +Figure 7: Predicted detections for an input day image (left) using RetinaNet (middle), Faster-RCNN (right). Note that the higher $mAP$ of RetinaNet yields better instance translations. + +![](images/0c86ce2711fd2ef8a62e4e1bcd46890794372670c8140e2698f47cfc7ca8878f.jpg) + +![](images/6bceca4005a6bf09f75b348751a474e93ce03ba1ef50a97736a574eedf2ec846.jpg) + +IC loss. Furthermore, with RetinaNet, we evaluate different hyperparameter settings for $\alpha \in [0,1]$ and $\gamma \in \{1,2\}$ . From Table 4, we can see that RetinaNet with $\alpha = 0.25$ and $\gamma = 2$ gives the best IS and CIS across the tested domains. Changing $\alpha$ while keeping $\gamma = 2$ yields very close results, but decreasing $\gamma$ to 1 results in lower scores. Nevertheless, RetinaNet consistently outperforms Faster-RCNN. In Fig. 7, we compare qualitatively the detections obtained + +with RetinaNet and Faster-RCNN, and their impact on the translated image; the higher detection accuracy of RetinaNet translates to higher quality images. Note that the relatively low performance of our approach with a Faster-RCNN detector is due to the detector itself. In particular, the fact that Faster-RCNN is a two-stage detector prevents a complete end-to-end training and means that the region proposals in the original and translated image may not match. This resulted in less robust detections than RetinaNet, and we observed these non-robust detections to impede the minimization of the instance consistency loss during training. Ultimately, this contributed to incorporating incorrect instance information in the global feature map, thus yielding worse results than when using a RetinaNet that can be trained end-to-end and relies on anchors that are naturally paired. This shows that the results of our approach depend on the detector, but that state-of-the-art, single-stage detectors already achieve sufficient accuracy for us to outperform global image translation. + +# 4.2. Unsupervised Domain Adaptive Detection + +We further test our method on the task of unsupervised domain adaptation for object detection. We use as baselines the state-of-the-art methods that tackle this task, namely, domain adaptive Faster RCNN [2], the domain transfer stage of [14], the shifted domain stage of [18] and the style transfer with feature consistency stage of [32]. We conduct experiments on diverse datasets including Pascal VOC classes [7] as source domain with Comics2K [14] as target domain, and the Kitty object detection benchmark [9] as source domain with Cityscapes [4] as target domain. We follow the same data preparation and the same experimental setup as in [18]. Note that the inter-class variance and the large difference in data distribution between the source and target domains make these dataset very challenging for synthesis. In Table 5, we report the mean average pre + +
Object Detection Methods
Faster-RCNNRetinaNetα = 0.25,γ = 2RetinaNetα = 0.50,γ = 2RetinaNetα = 1.0,γ = 1.0
ISCISISCISISCISISCIS
Sunny →Night1.2231.0581.2591.1661.2551.1631.2301.104
Sunny →Rainy1.2081.0081.2251.0291.2231.0251.2131.017
Sunny →Cloudy1.1041.0251.1491.0331.1441.0311.1131.027
Average1.1781.0301.2111.0761.2071.0731.1851.049
+ +![](images/6051dbc79435c5e4ffed5b7d9391a6b5c25f2ed143cf1900c944d3ad1ebcabdf.jpg) +Figure 8: Qualitative domain adaptation results. We translate Pascal VOC images to the Comics2k domain using DUNIT and apply a detector trained on the original Comics2k data to the translated images. (Left) Input image, (Middle) translated image and (Right) detections. + +![](images/cd34b727f5cf3af98719e2ed08d6120bf5a63891777db074b61859dce7812403.jpg) + +![](images/7d6c111e3d471d2c80fe43606e74db5eb980dfcb5aad58af1b1e261f4b9d0fd8.jpg) + +Table 4: Ablation Study: We compare our method (DUNIT) used in conjunction with different object detection subnetworks (Faster R-CNN or RetinaNet). For RetinaNet, we report the results obtained with different values of the hyperparameters $\alpha$ and $\gamma$ . We report the inception score (IS) and conditional inception score (CIS). We use $\alpha = 0.25$ and $\gamma = 2$ for our best model. + +
MethodsVOC →ComicsKITTI →Citysc.
DT [14]23.531.2
DAF [2]23.238.5
DARL [18]34.545.3
DAOD [32]36.446.1
DUNIT w/Liic40.254.1
DUNIT wo/Liic39.447.2
+ +cision (mAP) for the detected objects across the different domains and, in Table 6, we detail the per-class average precisions (AP) for the KITTI $\rightarrow$ Cityscapes case. Furthermore, in Fig. 8, we show qualitative detection examples the VOC $\rightarrow$ Comics case. In this set of experiments, we used Faster-RCNN [31] as detector on the translated outputs of our approach because all the above-mentioned baselines rely on this detector. Note that our model significantly outperforms the baselines. Note that the robust pseudolabeling technique proposed in the baselines above, could be incorporated in our approach and can further boost the performance. Furthermore, the gap is consistent across all classes. This suggests that translating images between domains with our approach is more effective than aiming to learn domain-invariant representations. + +Table 5: Quantitative comparison on the task of domain adaptation. We report the mAP for two pairs of domains. DT is the domain transfer stage in [14], DAF is the domain adaptive faster-rnn method [2] and DARL is the domain adaptive representation learning method [18]. + +
MethodsPers.CarTruc.Bic.mAP
DT [14]28.540.725.929.731.2
DAF [2]39.240.225.748.938.5
DARL [18]46.458.727.049.145.3
DAOD [32]47.359.128.349.646.1
DUNIT w/Liic60.765.132.757.754.1
DUNIT wo/Liic56.259.524.948.247.2
+ +Table 6: Quantitative comparison of the per-class Average Precision for the KITTI $\rightarrow$ Cityscapes adaptation scenario. + +# 5. Conclusion + +We have introduced an approach to account for object instances when translating images between domains. To this end, we have proposed to process the instances and the global image separately, but to fuse their respective representations so as to generate a single consistent image. This has allowed us to translate content-rich images, resulting in realistic images that quantitatively outperform the state-of-the-art I2I translation algorithms. By only requiring access to ground-truth object bounding boxes for a single domain during training, our approach has also allowed us to perform unsupervised domain adaptation for object detection, again producing state-of-the-art results. + +In our I2I translation experiments, our instance consistency loss has proven to be important to obtain realistic results. We believe, however, that this loss is just an instance of a broader idea: One can enforce consistency between the outputs of any auxiliary task to help the I2I translation process. In the future, we will therefore investigate the use of other auxiliary tasks, such as instance segmentation, surface depth and normal prediction, and object pose estimation. + +Acknowledgement. This work was supported in part by the Swiss National Science Foundation via the Sinergia grant CRSII5-180359. + +# References + +[1] Fabio Maria Carlucci, Lorenzo Porzi, Barbara Caputo, Elisa Ricci, and Samuel Rota Bulò. Autodial: Automatic domain alignment layers. CoRR, abs/1704.08082, 2017. 3 +[2] Yuhua Chen, Wen Li, Christos Sakaridis, Dengxin Dai, and Luc Van Gool. Domain adaptive faster R-CNN for object detection in the wild. CoRR, abs/1803.03243, 2018. 1, 3, 7, 8 +[3] Yun-Chun Chen, Yen-Yu Lin, Ming-Hsuan Yang, and Jia-Bin Huang. Crdoco: Pixel-level domain transfer with cross-domain consistency, 2020. 3 +[4] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In Proc. of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2, 7 +[5] Lixin Duan, Ivor Tsang, and Dezhi Xu. Domain transfer multiple kernel learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34:1-1, 05 2011. 3 +[6] Lixin Duan, Dong Xu, Ivor Wai-Hung Tsang, and Jiebo Luo. Visual event recognition in videos by learning from web data. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(9):1667-1680, 2011. 3 +[7] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88(2):303-338, June 2010. 2, 7 +[8] Basura Fernando, Amaury Habrard, Marc Sebban, and Tinne Tuytelaars. Unsupervised visual domain adaptation using subspace alignment. In Proceedings of the IEEE international conference on computer vision, pages 2960-2967, 2013. 3 +[9] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In Conference on Computer Vision and Pattern Recognition (CVPR), 2012. 2, 7 +[10] Ross B. Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. CoRR, abs/1311.2524, 2013. 3 +[11] Judy Hoffman, Eric Tzeng, Taesung Park, Jun-Yan Zhu, Phillip Isola, Kate Saenko, Alexei A. Efros, and Trevor Darrell. Cycada: Cycle-consistent adversarial domain adaptation. ICML, abs/1711.03213, 2018. 3 +[12] Xun Huang, Ming-Yu Liu, Serge J. Belongie, and Jan Kautz. Multimodal unsupervised image-to-image translation. ECCV, abs/1804.04732, 2018. 1, 3, 5, 6, 7 +[13] Satoshi Iizuka, Edgar Simo-Serra, and Hiroshi Ishikawa. Globally and locally consistent image completion. ACM Transactions on Graphics, 36:1-14, 07 2017. 3 +[14] Naoto Inoue, Ryosuke Furuta, Toshihiko Yamasaki, and Kiyoharu Aizawa. Cross-domain weakly-supervised object detection through progressive domain adaptation. CoRR, abs/1803.11365, 2018. 2, 3, 7, 8 +[15] Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A. Efros. Image-to-image translation with conditional adversarial networks. CoRR, abs/1611.07004, 2016. 1, 3 + +[16] Max Jaderberg, Karen Simonyan, Andrew Zisserman, and Koray Kavukcuoglu. Spatial transformer networks. CoRR, abs/1506.02025, 2015. 3, 4 +[17] Taeksoo Kim, Moonsu Cha, Hyunsoo Kim, Jung Kwon Lee, and Jiwon Kim. Learning to discover cross-domain relations with generative adversarial networks. CoRR, abs/1703.05192, 2017. 3 +[18] Taekyung Kim, Minki Jeong, Seunghyeon Kim, Seokeon Choi, and Changick Kim. Diversify and match: A domain adaptive representation learning paradigm for object detection. CoRR, abs/1905.05396, 2019. 3, 7, 8 +[19] Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Learning representations for automatic colorization. CoRR, abs/1603.06668, 2016. 1 +[20] Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew P. Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, and Wenzhe Shi. Photo-realistic single image superresolution using a generative adversarial network. CoRR, abs/1609.04802, 2016. 1 +[21] Hsin-Ying Lee, Hung-Yu Tseng, Jia-Bin Huang, Maneesh Kumar Singh, and Ming-Hsuan Yang. Diverse image-to-image translation via disentangled representations. CoRR, abs/1808.00948, 2018. 4, 6 +[22] Hsin-Ying Lee, Hung-Yu Tseng, Jia-Bin Huang, Maneesh Kumar Singh, and Ming-Hsuan Yang. Diverse image-to-image translation via disentangled representations. In European Conference on Computer Vision, 2018. 1, 2, 3, 4, 5, 6, 7 +[23] Yunsheng Li, Lu Yuan, and Nuno Vasconcelos. Bidirectional learning for domain adaptation of semantic segmentation, 2019. 3 +[24] Tsung-Yi Lin, Priya Goyal, Ross B. Girshick, Kaiming He, and Piotr Dálár. Focal loss for dense object detection. CoRR, abs/1708.02002, 2017. 5 +[25] Ming-Yu Liu, Thomas Breuel, and Jan Kautz. Unsupervised image-to-image translation networks. CoRR, abs/1703.00848, 2017. 1, 3, 5, 6, 7 +[26] Hao Lu, Lei Zhang, Zhiguo Cao, Wei Wei, Ke Xian, Chunhua Shen, and Anton van den Hengel. When unsupervised domain adaptation meets tensor representations. CoRR, abs/1707.05956, 2017. 3 +[27] Mehdi Mirza and Simon Osindero. Conditional generative adversarial nets. CoRR, abs/1411.1784, 2014. 1, 3 +[28] Sangwoo Mo, Minsu Cho, and Jinwoo Shin. Instagram: Instance-aware image-to-image translation. CoRR, abs/1812.10889, 2018. 1, 3 +[29] Taesung Park, Ming-Yu Liu, Ting-Chun Wang, and Jun-Yan Zhu. Semantic image synthesis with spatially-adaptive normalization. CoRR, abs/1903.07291, 2019. 1 +[30] Anant Raj, Vinay P. Namboodiri, and Tinne Tuytelaars. Subspace alignment based domain adaptation for RCNN detector. CoRR, abs/1507.05578, 2015. 3 +[31] Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster R-CNN: towards real-time object detection with region proposal networks. CoRR, abs/1506.01497, 2015. 3, 8 + +[32] Adrian Lopez Rodriguez and Krystian Mikolajczyk. Domain adaptation for object detection via style consistency, 2019. 7, 8 +[33] Tim Salimans, Ian J. Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. CoRR, abs/1606.03498, 2016. 5 +[34] Zhiqiang Shen, Mingyang Huang, Jianping Shi, Xiangyang Xue, and Thomas S. Huang. Towards instance-level imaged-to-image translation. CoRR, abs/1905.01744, 2019. 1, 3, 5, 6 +[35] Radim Tyleček and Radim Šára. Spatial pattern templates for recognition of objects with regular structure. In German Conference on Pattern Recognition, pages 364-374. Springer, 2013. 3 +[36] Chengjia Wang, Gillian Macnaught, Giorgos Papanastasiou, Tom MacGillivray, and David E. Newby. Unsupervised learning for cross-domain medical image synthesis using deformation invariant cycle consistency networks. CoRR, abs/1808.03944, 2018. 5 +[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. CoRR, abs/1711.11585, 2017. 1 +[38] Yifei Wang, Wen Li, Dengxin Dai, and Luc Van Gool. Deep domain adaptation by geodesic distance minimization. In Proceedings of the IEEE International Conference on Computer Vision, pages 2651-2657, 2017. 3 +[39] Jiaolong Xu, Sebastian Ramos, David Vázquez, and Antonio Manuel López Peña. Domain adaptation of deformable part-based models. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36:2367-2380, 2014. 3 +[40] Zili Yi, Hao Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for image-to-image translation. CoRR, abs/1704.02510, 2017. 3 +[41] Richard Zhang, Phillip Isola, and Alexei A. Efros. Colorful image colorization. CoRR, abs/1603.08511, 2016. 1 +[42] Richard Zhang, Phillip Isola, Alexei A. Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. CoRR, abs/1801.03924, 2018. 5 +[43] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A. Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. CoRR, abs/1703.10593, 2017. 3 +[44] Jun-Yan Zhu, Richard Zhang, Deepak Pathak, Trevor Darrell, Alexei A. Efros, Oliver Wang, and Eli Shechtman. Toward multimodal image-to-image translation. CoRR, abs/1711.11586, 2017. 1, 3 +[45] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Computer Vision (ICCV), 2017 IEEE International Conference on, 2017. 1, 3, 5, 6, 7 \ No newline at end of file diff --git a/dunitdetectionbasedunsupervisedimagetoimagetranslation/images.zip b/dunitdetectionbasedunsupervisedimagetoimagetranslation/images.zip new file mode 100644 index 0000000000000000000000000000000000000000..724a7b8e80aa5b5e916cb207a3970d4bc56dc24d --- /dev/null +++ b/dunitdetectionbasedunsupervisedimagetoimagetranslation/images.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f1b543d3ea902a3158e8d0d3e6a5c68d68a02c86691f85e3bfb144a0d123330c +size 613700 diff --git a/dunitdetectionbasedunsupervisedimagetoimagetranslation/layout.json b/dunitdetectionbasedunsupervisedimagetoimagetranslation/layout.json new file mode 100644 index 0000000000000000000000000000000000000000..6a0ab3d3d0d4405563fc0a0fea1cdbc9a548b2fe --- /dev/null +++ b/dunitdetectionbasedunsupervisedimagetoimagetranslation/layout.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf476e6af95d6df3657b003c887b30d1c701947f59a4108071136627ffb2da3a +size 382783