Add Batch 313e0cae-a089-465e-bd09-2a8d6ba8e643
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/eb749fd7-1b54-4ac6-9205-9819a6736b27_content_list.json +3 -0
- gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/eb749fd7-1b54-4ac6-9205-9819a6736b27_model.json +3 -0
- gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/eb749fd7-1b54-4ac6-9205-9819a6736b27_origin.pdf +3 -0
- gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/full.md +365 -0
- gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/images.zip +3 -0
- gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/layout.json +3 -0
- itamlanincrementaltaskagnosticmetalearningapproach/b14ded44-8285-418c-9ee8-e176c1d8e99f_content_list.json +3 -0
- itamlanincrementaltaskagnosticmetalearningapproach/b14ded44-8285-418c-9ee8-e176c1d8e99f_model.json +3 -0
- itamlanincrementaltaskagnosticmetalearningapproach/b14ded44-8285-418c-9ee8-e176c1d8e99f_origin.pdf +3 -0
- itamlanincrementaltaskagnosticmetalearningapproach/full.md +281 -0
- itamlanincrementaltaskagnosticmetalearningapproach/images.zip +3 -0
- itamlanincrementaltaskagnosticmetalearningapproach/layout.json +3 -0
- nuscenesamultimodaldatasetforautonomousdriving/b9d1c4e4-0177-4824-9c11-607bb187188e_content_list.json +3 -0
- nuscenesamultimodaldatasetforautonomousdriving/b9d1c4e4-0177-4824-9c11-607bb187188e_model.json +3 -0
- nuscenesamultimodaldatasetforautonomousdriving/b9d1c4e4-0177-4824-9c11-607bb187188e_origin.pdf +3 -0
- nuscenesamultimodaldatasetforautonomousdriving/full.md +320 -0
- nuscenesamultimodaldatasetforautonomousdriving/images.zip +3 -0
- nuscenesamultimodaldatasetforautonomousdriving/layout.json +3 -0
- xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/f0ff7f4c-a799-410c-a8fe-ee33130929bf_content_list.json +3 -0
- xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/f0ff7f4c-a799-410c-a8fe-ee33130929bf_model.json +3 -0
- xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/f0ff7f4c-a799-410c-a8fe-ee33130929bf_origin.pdf +3 -0
- xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/full.md +278 -0
- xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/images.zip +3 -0
- xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/layout.json +3 -0
- you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/4ef69657-ae4f-459e-99d0-31167a2dc3d4_content_list.json +3 -0
- you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/4ef69657-ae4f-459e-99d0-31167a2dc3d4_model.json +3 -0
- you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/4ef69657-ae4f-459e-99d0-31167a2dc3d4_origin.pdf +3 -0
- you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/full.md +333 -0
- you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/images.zip +3 -0
- you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/layout.json +3 -0
- yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/3ecf9bf3-c417-45b3-bbd4-bb24516d409f_content_list.json +3 -0
- yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/3ecf9bf3-c417-45b3-bbd4-bb24516d409f_model.json +3 -0
- yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/3ecf9bf3-c417-45b3-bbd4-bb24516d409f_origin.pdf +3 -0
- yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/full.md +283 -0
- yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/images.zip +3 -0
- yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/layout.json +3 -0
- zeroassignmentconstraintforgraphmatchingwithoutliers/94f0b4fa-1c58-41d2-a067-7fe27ff363db_content_list.json +3 -0
- zeroassignmentconstraintforgraphmatchingwithoutliers/94f0b4fa-1c58-41d2-a067-7fe27ff363db_model.json +3 -0
- zeroassignmentconstraintforgraphmatchingwithoutliers/94f0b4fa-1c58-41d2-a067-7fe27ff363db_origin.pdf +3 -0
- zeroassignmentconstraintforgraphmatchingwithoutliers/full.md +491 -0
- zeroassignmentconstraintforgraphmatchingwithoutliers/images.zip +3 -0
- zeroassignmentconstraintforgraphmatchingwithoutliers/layout.json +3 -0
- zeroqanovelzeroshotquantizationframework/8eb9862e-76c1-48f0-95df-88fcdac5f982_content_list.json +3 -0
- zeroqanovelzeroshotquantizationframework/8eb9862e-76c1-48f0-95df-88fcdac5f982_model.json +3 -0
- zeroqanovelzeroshotquantizationframework/8eb9862e-76c1-48f0-95df-88fcdac5f982_origin.pdf +3 -0
- zeroqanovelzeroshotquantizationframework/full.md +265 -0
- zeroqanovelzeroshotquantizationframework/images.zip +3 -0
- zeroqanovelzeroshotquantizationframework/layout.json +3 -0
- zeroreferencedeepcurveestimationforlowlightimageenhancement/004320b3-6cfa-499c-a573-94a92570c5c8_content_list.json +3 -0
- zeroreferencedeepcurveestimationforlowlightimageenhancement/004320b3-6cfa-499c-a573-94a92570c5c8_model.json +3 -0
gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/eb749fd7-1b54-4ac6-9205-9819a6736b27_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd2d19b61eeeef8e2bf25a248b750635ec3d0f804f108a42cb544f4e8a9b7fca
|
| 3 |
+
size 89655
|
gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/eb749fd7-1b54-4ac6-9205-9819a6736b27_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ebde429caa52dadd2183f013e372a2fea63573d869205311e04501c263cab1f
|
| 3 |
+
size 108811
|
gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/eb749fd7-1b54-4ac6-9205-9819a6736b27_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b613aedc17a612de77b2ce84012f71f2f0481439fc906f9440f2e674c7c58c0
|
| 3 |
+
size 683970
|
gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/full.md
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# gDLS*: Generalized Pose-and-Scale Estimation Given Scale and Gravity Priors
|
| 2 |
+
|
| 3 |
+
Victor Fragoso
|
| 4 |
+
Microsoft
|
| 5 |
+
|
| 6 |
+
victor.fragoso@microsoft.com
|
| 7 |
+
|
| 8 |
+
Joseph DeGol
|
| 9 |
+
Microsoft
|
| 10 |
+
|
| 11 |
+
joseph.degol@microsoft.com
|
| 12 |
+
|
| 13 |
+
Gang Hua<sup>1</sup>
|
| 14 |
+
Wormpex AI
|
| 15 |
+
|
| 16 |
+
ganghua@gmail.com
|
| 17 |
+
|
| 18 |
+
# Abstract
|
| 19 |
+
|
| 20 |
+
Many real-world applications in augmented reality (AR), 3D mapping, and robotics require both fast and accurate estimation of camera poses and scales from multiple images captured by multiple cameras or a single moving camera. Achieving high speed and maintaining high accuracy in a pose-and-scale estimator are often conflicting goals. To simultaneously achieve both, we exploit a priori knowledge about the solution space. We present gDLS*, a generalized-camera-model pose-and-scale estimator that utilizes rotation and scale priors. gDLS* allows an application to flexibly weigh the contribution of each prior, which is important since priors often come from noisy sensors. Compared to state-of-the-art generalized-posed-and-scale estimators (e.g. gDLS), our experiments on both synthetic and real data consistently demonstrate that gDLS* accelerates the estimation process and improves scale and pose accuracy.
|
| 21 |
+
|
| 22 |
+
# 1. Introduction
|
| 23 |
+
|
| 24 |
+
Estimating the pose and scale from multiple images taken from multiple cameras or multiple images from one moving camera (e.g., a SLAM [6, 18, 19, 34, 46] trajectory) is an essential step in many augmented reality (AR) [32, 39, 41, 49, 47], 3D mapping [3, 11, 31, 38, 42, 44], and robotics applications [15, 20, 21, 30, 50, 54]. Consider hologram sharing services (e.g., Azure Spatial Anchors [1]) as an example. These services have a reference map and need to localize query images accurately (so that holograms are positioned correctly) and quickly (to maintain a nice user experience). However, as Figure 1 shows, current methods leave room for improvement in terms of both accuracy and processing time. In this work, we propose gDLS*, a multi-camera pose-and-scale estimator that exploits scale and gravity priors to improve accuracy and speed. Despite using additional information, gDLS* computes its parameters with linear complexity in the number of points and multiple optimal solutions in a single shot, avoiding iterative optimization procedures.
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
Figure 1. Estimating the pose and scale accurately and quickly is essential in many applications in AR, 3D mapping, and robotics. We introduce $\mathrm{gDLS^{*}}$ , a pose-and-scale estimator that exploits scale and/or gravity priors to improve accuracy and speed. Compared to state-of-the-art estimators (e.g., $\mathrm{gDLS} + + +$ [44] and $\mathrm{gP + s}$ [48]), $\mathrm{gDLS^{*}}$ achieves more accurate estimates in less time when registering a set of cameras to an existing 3D reconstruction. The right image above shows an existing 3D reconstruction (gray) with aligned cameras and points for $\mathrm{gDLS^{*}}$ (green), $\mathrm{gDLS} + + +$ (red), and $\mathrm{gP + s}$ (orange). The left image shows a zoomed view of the positions of the aligned cameras. The white points are the expected camera positions and the green/red/orange points are the estimate positions for each method. The cyan line between indicates a match, where longer lines indicate more error.
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
|
| 31 |
+
Using single camera pose estimators (e.g., [2, 7, 16, 23, 26, 29, 33, 53]) to develop a multi-camera pose-and-scale estimator is cumbersome, and their estimates tend to be inaccurate [22, 43]. Instead, many multi-camera pose-and-scale estimators [22, 43, 44] use the generalized camera model [12, 37] to elegantly treat the collection of cameras as one generalized camera, yielding accuracy improvements. Despite their improvements, these estimators often produce erroneous results due to noisy input data and numerical instabilities in their underlying polynomial solvers.
|
| 32 |
+
|
| 33 |
+
Given the need of accurate pose and scale estimates by many applications in AR, 3D mapping, and robotics, some algorithms [41, 42, 52] exploit inertial measurements (e.g., gravity directions). Most of these approaches assume that the gravity or down directions are reliable, and include this extra knowledge as part of their mathematical derivation to simplify the problem. However, the gravity directions can still be noisy due to the nature of these sensors
|
| 34 |
+
|
| 35 |
+
and can affect the accuracy of the estimates. In contrast, $\mathrm{gDLS^{*}}$ adopts a generalized-camera model with regularizers that encode scale and rotation priors (e.g., gravity direction). These regularizers allow a user to independently control the contribution of each individual prior, which is beneficial to reduce the effect of noise present in each prior.
|
| 36 |
+
|
| 37 |
+
We show using synthetic data that $\mathrm{gDLS^{*}}$ is numerically stable and resilient to noise. We demonstrate this by (1) varying pixel noise and sample size and showing that $\mathrm{gDLS^{*}}$ estimates transformations with errors that are no worse than current estimators; and (2) varying the noise in the scale and gravity priors and showing that $\mathrm{gDLS^{*}}$ maintains accuracy and speed. We then use real data (i.e. [10, 40]) to evaluate $\mathrm{gDLS^{*}}$ when registering a set of cameras to an existing 3D reconstruction. Our extensive experiments show that $\mathrm{gDLS^{*}}$ is significantly faster and slightly more accurate than current pose-and-scale estimators (i.e., [22, 43, 44, 48]). Moreover, the experiments show that a rotation prior based on gravity directions improves rotation and translation estimates while achieving significant speed-ups. On the other hand, a scale prior mainly improves scale estimates while modestly enhancing translation estimates and speed.
|
| 38 |
+
|
| 39 |
+
In summary, the contributions of this work are (1) $\mathrm{gDLS}^*$ , a novel and generalized formulation of $\mathrm{gDLS}$ [43] that includes scale and gravity priors that computes its parameters with an $\mathcal{O}(n)$ complexity; (2) a novel evaluation protocol for pose-and-scale estimators that reports rotation, translation, and scale errors; and (3) extensive experimental results showing that $\mathrm{gDLS}^*$ consistently improves pose accuracy in less time.
|
| 40 |
+
|
| 41 |
+
# 2. Related Work
|
| 42 |
+
|
| 43 |
+
Estimating the position and orientation of a camera is crucial for many applications because they need to accurately register computer-generated content into the real-world, localize an agent (e.g., a visually impaired person) within an environment, and autonomously navigate (e.g., self-driving cars). While these applications use camera pose estimators to operate, most of the estimators have focused on localizing single cameras. Although these estimators [2, 8, 23, 25, 26, 29, 51, 53] have achieved impressive performance and accuracy, many applications [21] have started to adopt multi-camera systems. This is because a multi-camera system can provide additional information that allows an application to estimate its pose more accurately. For this reason, this section reviews existing work on multi-camera pose and pose-and-scale estimators.
|
| 44 |
+
|
| 45 |
+
# 2.1. Multi-Camera Pose Estimators
|
| 46 |
+
|
| 47 |
+
Chen and Chang [4] and Nister and Stewenius [35] proposed gP3P, a minimal estimator which requires three 2D-3D correspondences to estimate the pose of a multi-camera
|
| 48 |
+
|
| 49 |
+
Table 1. gDLS* compares favorably to existing state-of-the-art pose-and-scale estimators because it maintains all the properties of other estimators while also being the only estimator that enables the use of gravity and scale priors.
|
| 50 |
+
|
| 51 |
+
<table><tr><td>Reference</td><td>gP+s [48]</td><td>gDLS [43]</td><td>gDLS+++ [44]</td><td>UPnP [22]</td><td>Ours -</td></tr><tr><td>Year</td><td>2014</td><td>2014</td><td>2016</td><td>2014</td><td>2019</td></tr><tr><td>Generalized Camera</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>Geometric Optimality</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>Linear Complexity</td><td></td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>Multiple Solutions</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>Similarity Transformation</td><td>✓</td><td>✓</td><td>✓</td><td></td><td>✓</td></tr><tr><td>Singularity-Free Rotation</td><td>✓</td><td></td><td>✓</td><td>✓</td><td>✓</td></tr><tr><td>Gravity Prior</td><td></td><td></td><td></td><td></td><td>✓</td></tr><tr><td>Scale Prior</td><td></td><td></td><td></td><td></td><td>✓</td></tr></table>
|
| 52 |
+
|
| 53 |
+
system. gP3P computes up to eight solutions by finding the intersections of a circle and a ruled quartic surface. Lee et al. [14] also introduced a minimal estimator that utilizes Plücker lines to estimate the depth of each point. Subsequently, it estimates the position of each point w.r.t. to the frame of reference of the multi-camera system. Then it estimates the absolute pose of the multi-camera system.
|
| 54 |
+
|
| 55 |
+
Unlike previous minimal solvers, Kneip et al. [22] introduced UPnP, an efficient minimal and non-minimal pose estimator derived from a least-squares reprojection-error-based cost function. Inspired by DLS [16], UPnP reformulates the cost function as one depending only on a unit-norm quaternion. UPnP finds the optimal rotation by solving a polynomial system that encodes the vanishing of the cost gradient at the optimal unit-norm quaternion via a Gröbner-basis solver [24, 28].
|
| 56 |
+
|
| 57 |
+
# 2.2. Pose-and-Scale Estimators
|
| 58 |
+
|
| 59 |
+
Different from multi-camera pose estimators, pose-and-scale estimators compute the pose of a multi-camera system and a scale value; this value scales the positions of the cameras in order to align a 3D representation into the frame of reference of the multi-camera system more accurately.
|
| 60 |
+
|
| 61 |
+
Ventura et al. [48] proposed $\mathrm{gP + s}$ , a minimal pose-and-scale estimator that requires four 2D-3D correspondences and a Gröbner basis polynomial solver [24, 28]. However, $\mathrm{gP + s}$ can also work with more than four points. Kukelova et al. [27] introduced another minimal pose-and-scale estimator that avoids using a Gröbner basis polynomial solver, leading to impressive speed-ups but a decrease in accuracy.
|
| 62 |
+
|
| 63 |
+
Unlike previous estimators, Sweeney et al. [43] presented gDLS, an estimator derived from a least-squares reprojection-error cost function. gDLS derives a cost function that depends only on a rotation matrix. Inspired by DLS [16], gDLS solves a polynomial system that encodes the vanishing of the cost gradient at the optimal Cayley-Gibbs-Rodrigues angle-axis vector using the DLS polynomial solver (a Macaulay solver). Unfortunately, its Macaulay solver can be slow since it requires obtaining the
|
| 64 |
+
|
| 65 |
+
eigenvectors of a $27 \times 27$ action matrix. To alleviate this issue, Sweeney et al. [44] introduced gDLS+++, a gDLS-based estimator using a unit-norm quaternion. Thanks to the rotation representation of gDLS++, it can use the efficient UPnP polynomial solver.
|
| 66 |
+
|
| 67 |
+
Different from previous methods, $\mathrm{gDLS^{*}}$ is one of the first estimators to incorporate scale and rotation priors. As we show in Section 4, these priors improve both speed and accuracy. Moreover, $\mathrm{gDLS^{*}}$ maintains many of the desirable properties of current solvers: (1) uses a generalized camera model which elegantly simplifies the formulation; (2) computes multiple optimal solutions in a single shot, avoiding iterative optimization procedures; (3) scales linearly when building its parameters; and (4) uses a singularity-free rotation representation. See Table 1 for a brief comparison of estimator properties.
|
| 68 |
+
|
| 69 |
+
# 3. Pose-and-Scale Estimation using Priors
|
| 70 |
+
|
| 71 |
+
The goal of $\mathrm{gDLS^{*}}$ is to provide hints about the scale and rotation parameters of the similarity transformation using a generalized pose-and-scale estimator (e.g., gDLS [43]). Thanks to the prevalence of inertial sensors in mobile devices, these priors are readily available. For instance, a rotation prior can be obtained from the gravity direction using measurements from inertial sensors, and a scale prior can be obtained from the IMU [36], GPS, or known landmark sizes [5].
|
| 72 |
+
|
| 73 |
+
One of the design considerations of gDLS* is the ability to control the contribution of each of the priors independently. This allows the user to either disable or enable each of the priors. When enabling the priors, gDLS* allows a user to set a weight for each prior to control their confidence. In Section 4, we test a range of weights, but we plan to explore in future work how to set these weights automatically using the variance of the noise of the sensors. Because gDLS* is based on the pose-and-scale formulations of gDLS [43, 44], we first describe the pose-and-scale formulation and then present our modifications that enable the use of scale and rotation priors.
|
| 74 |
+
|
| 75 |
+
# 3.1. gDLS - A Pose-and-Scale Estimator Review
|
| 76 |
+
|
| 77 |
+
Given $n$ 2D-3D correspondences, gDLS computes the scale and pose of a non-central camera by minimizing the following least-squares cost function:
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
J (R, \mathbf {t}, s, \boldsymbol {\alpha}) = \sum_ {i = 1} ^ {n} \| \alpha_ {i} \mathbf {r} _ {i} - \left(R \mathbf {p} _ {i} + \mathbf {t} - s \mathbf {c} _ {i}\right) \| ^ {2}, \tag {1}
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
where $\mathbf{r}_i$ is a unit-vector indicating the direction from the position of the camera $\mathbf{c}_i$ to a 3D point $\mathbf{p}_i$ ; $\alpha_i$ is the depth of the point $\mathbf{p}_i$ with respect to the camera position $\mathbf{c}_i$ ; $\alpha$ is a vector holding the depths; $R \in \mathrm{SO}(3)$ is a rotation matrix; $\mathbf{t} \in \mathbb{R}^3$ is a translation vector; and $s \in \mathbb{R}$ is the scale; see Fig. 2 for a visual representation of Eq. (1).
|
| 84 |
+
|
| 85 |
+

|
| 86 |
+
Figure 2. Estimating the pose of a multi-camera system $\mathcal{Q}$ requires the estimation of $R$ and $\mathbf{t}$ , while the scale $s$ adjusts the camera positions $\mathbf{c}_i$ so that $\mathcal{W}$ and $\mathcal{Q}$ use the same metric scale. gDLS* can use the gravity directions $\mathbf{g}$ to impose a rotation prior and a scale-prior $s_0$ to place the cameras at the right scale.
|
| 87 |
+
|
| 88 |
+
The pose-and-scale formulation shown in Eq. (1) accumulates the errors between the transformed $i$ -th 3D point $(R\mathbf{p}_i + \mathbf{t} - s\mathbf{c}_i)$ and the same point described with respect to the camera $\alpha_i\mathbf{r}_i$ . The rotation $R$ , the translation $\mathbf{t}$ , and $s\mathbf{c}_i$ transform a 3D point from a world coordinate system to the coordinate system of a generalized camera.
|
| 89 |
+
|
| 90 |
+
To find the minimizer $(R^{\star},\mathbf{t}^{\star},s^{\star},\pmb{\alpha}^{\star})$ ,gDLS [43] first rewrites $J(R,\mathbf{t},s,\pmb {\alpha})$ as a function that only depends on the rotation matrix. As Hesch and Roumeliotis [16] and Sweeney et al. [43, 44] demonstrated, the translation $\mathbf{t}$ scale $S_{i}$ and depth $\alpha_{i}$ can be written as a linear function of the rotation matrix $R$ . Thus, it is possible to re-write the pose-and-scale least-squares cost formulation as follows:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\begin{array}{l} J (R) = \sum_ {i = 1} ^ {n} \| \alpha_ {i} (R) \mathbf {r} _ {i} - \left(R \mathbf {p} _ {i} + \mathbf {t} (R) - s (R) \mathbf {c} _ {i}\right) \| ^ {2} \tag {2} \\ = \operatorname {v e c} (R) ^ {\intercal} M \operatorname {v e c} (R), \\ \end{array}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $\operatorname{vec}(R)$ is a vectorized form of the rotation matrix, and $M$ is a square matrix capturing the constraints from the input 2D-3D correspondences; the dimensions of $M$ depend on the vectorization and representation of $\operatorname{vec}(R)$ .
|
| 97 |
+
|
| 98 |
+
Given the cost function $J(R)$ , gDLS finds the optimal rotation $R^{\star}$ by solving a polynomial system representing the constraint that the gradient $\nabla_{\mathbf{q}}J(R^{\star}) = 0$ is null with respect to the rotation parameters $\mathbf{q}$ , and rotation-parameter constraints (e.g., ensuring a unit-norm quaternion).
|
| 99 |
+
|
| 100 |
+
# 3.2. Incorporating Priors via Regularizers
|
| 101 |
+
|
| 102 |
+
In order to impose scale and rotation priors to Eq. (1), gDLS* uses regularizers. Adding these regularizers leads to the following least-squares cost function:
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
J ^ {\prime} = J (R, \mathbf {t}, s, \boldsymbol {\alpha}) + \lambda_ {s} \left(s _ {0} - s\right) ^ {2} + \lambda_ {g} \| \mathbf {g} _ {\mathcal {Q}} \times R \mathbf {g} _ {\mathcal {W}} \| ^ {2}, \tag {3}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
where $s_0$ is the scale prior; $\mathbf{g}_{\mathcal{Q}}$ and $\mathbf{g}_{\mathcal{W}}$ are the gravity directions of the multi-camera setting and world, respectively; the symbol $\times$ represents the cross-product operator; and $\lambda_s$ and $\lambda_g$ are weights controlling the contribution of the scale
|
| 109 |
+
|
| 110 |
+
and rotation priors, respectively. These weights (i.e., $\lambda_{s}$ and $\lambda_{g}$ ) must be greater than or equal to zero.
|
| 111 |
+
|
| 112 |
+
The scale regularizer $\lambda_s(s_0 - s)^2$ imposes a penalty by deviating from the scale prior $s_0$ . On the other hand, the rotation prior $\lambda_g\| \mathbf{g}_{\mathcal{Q}}\times R\mathbf{g}_{\mathcal{W}}\| ^2$ imposes a misalignment penalty between the transformed world gravity direction $R\mathbf{g}_{\mathcal{W}}$ and the query gravity direction $\mathbf{g}_{\mathcal{Q}}$ .
|
| 113 |
+
|
| 114 |
+
As discussed earlier, the first step to solve for pose and scale is to re-write the cost $J'$ as a function that only depends on the rotation matrix. To do so, it is mathematically convenient to define
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\mathbf {x} = \left[ \begin{array}{l l l l l} \alpha_ {1} & \dots & \alpha_ {n} & s & \mathbf {t} ^ {\intercal} \end{array} \right] ^ {\intercal}. \tag {4}
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
The gradient evaluated at the optimal $\mathbf{x}^{\star}$ must satisfy the following constraint: $\left.\nabla_{\mathbf{x}}J^{\prime}\right|_{\mathbf{x} = \mathbf{x}^{\star}} = 0$ . From this constraint, we obtain the following relationship:
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\begin{array}{l} \mathbf {x} = \left(A ^ {\intercal} A + P\right) ^ {- 1} A ^ {\intercal} W \mathbf {b} + \left(A ^ {\intercal} A + P\right) ^ {- 1} P \mathbf {x} _ {0} \\ = \left[ \begin{array}{l} U \\ S \\ V \end{array} \right] W \mathbf {b} + \lambda_ {s} s _ {o} \mathbf {l} \tag {5} \\ \end{array}
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
where
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\begin{array}{l} A = \left[ \begin{array}{c c c c c} \mathbf {r} _ {1} & & & \mathbf {c} _ {1} & - I \\ & \ddots & & \vdots & \vdots \\ & & \mathbf {r} _ {n} & \mathbf {c} _ {n} & - I \end{array} \right], \mathbf {b} = \left[ \begin{array}{c} \mathbf {p} _ {1} \\ \vdots \\ \mathbf {p} _ {n} \end{array} \right] \tag {6} \\ P = \left[ \begin{array}{c c c} 0 _ {n \times n} & & \\ & \lambda_ {s} & \\ & & 0 _ {3 \times 3} \end{array} \right], W = \left[ \begin{array}{c c c} R & & \\ & \ddots & \\ & & R \end{array} \right], \\ \end{array}
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
and $\mathbf{x}_0 = \left[ \begin{array}{ccc}0_n^\intercal & s_0 & 0_3^\intercal \end{array} \right]^\intercal$ . Inspired by gDLS [43] and DLS [16], we partition $(A^{\intercal}A + P)^{-1}A^{\intercal}$ into three matrices U, S, and V such that the depth, scale, and translation parameters are functions of U, S, and V, respectively. These matrices and the vector I can be computed in closed form by exploiting the sparse structure of the matrices $A$ and $P$ ; see the supplemental material for the full derivation.
|
| 133 |
+
|
| 134 |
+
Eq. (5) provides a linear relationship between the depth, scale, and translation and the rotation matrix. Consequently, these parameters are computed as a function of the rotation matrix as follows:
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\begin{array}{l} \alpha_ {i} (R) = \mathbf {u} _ {i} ^ {\intercal} W \mathbf {b} + \lambda_ {s} s _ {o} \mathbf {l} _ {i} \\ s (R) = S W \mathbf {b} + \lambda_ {s} s _ {o} \mathbf {l} _ {n + 1} \tag {7} \\ \mathbf {t} (R) = V W \mathbf {b} + \lambda_ {s} s _ {o} \mathbf {l} _ {\mathbf {t}}, \\ \end{array}
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
where $\mathbf{u}_i^{\mathrm{T}}$ is the $i$ -th row of matrix $U$ , $\mathbf{l}_j$ is the $j$ -th entry of the vector $\mathbf{l}$ , and $\mathbf{l}_{\mathbf{t}}$ corresponds to the last three entries of the vector $\mathbf{l}$ . Note that we can obtain the exact same relationships for depth, scale, and translation obtained by Sweeney et al. for gDLS [43, 44] when $\lambda_s = 0$ .
|
| 141 |
+
|
| 142 |
+
In order to re-write the regularized least-squares cost function (i.e., Eq. (3)) as clearly as possible, we define
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
\begin{array}{l} \mathbf {e} _ {i} = \alpha_ {i} (R) \mathbf {r} _ {i} - \left(R \mathbf {p} _ {i} + \mathbf {t} (R) - s (R) \mathbf {c} _ {i}\right) \\ = \boldsymbol {\eta} _ {i} + \mathbf {k} _ {i} \tag {8} \\ \end{array}
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
\begin{array}{l} \boldsymbol {\eta} _ {i} = \mathbf {u} _ {i} ^ {\intercal} W \mathbf {b r} _ {i} - R \mathbf {p} _ {i} - V W \mathbf {b} + S W \mathbf {b c} _ {i} \\ \mathbf {k} _ {i} = \lambda_ {s} s _ {0} \left(\mathbf {l} _ {i} \mathbf {r} - \mathbf {l} _ {\mathbf {t}} + \mathbf {l} _ {n + 1} \mathbf {c} _ {i}\right). \\ \end{array}
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
The residual $\mathbf{e}_i$ is divided into two terms: $\eta_{i}$ , the residual part considering the unconstrained terms; and $\mathbf{k}_i$ the residual part considering the scale-prior-related terms. Note again that when $\lambda_s = 0$ , $\mathbf{k}_i$ becomes null and $\mathbf{e}_i$ becomes the residual corresponding to gDLS [43, 44].
|
| 153 |
+
|
| 154 |
+
Using the definitions from Eq. (8), and the scale, depth, and translation relationships shown in Eq. (7), we can now re-write the regularized least-squares cost function shown in Eq. (3) as follows:
|
| 155 |
+
|
| 156 |
+
$$
|
| 157 |
+
\begin{array}{l} J ^ {\prime} = J _ {\mathrm {g D L S}} ^ {\prime} + J _ {s} ^ {\prime} + J _ {g} ^ {\prime} \tag {9} \\ = \operatorname {v e c} (R) ^ {\intercal} M \operatorname {v e c} (R) + 2 \mathbf {d} ^ {\intercal} \operatorname {v e c} (R) + k \\ \end{array}
|
| 158 |
+
$$
|
| 159 |
+
|
| 160 |
+
where
|
| 161 |
+
|
| 162 |
+
$$
|
| 163 |
+
\begin{array}{l} J _ {\mathrm {g D L S}} ^ {\prime} = \sum_ {i = 1} ^ {n} \mathbf {e} _ {i} ^ {\intercal} \mathbf {e} _ {i} = \sum_ {i = 1} ^ {n} \boldsymbol {\eta} _ {i} ^ {\intercal} \boldsymbol {\eta} _ {i} + 2 \mathbf {k} _ {i} ^ {\intercal} \boldsymbol {\eta} _ {i} + \mathbf {k} _ {i} ^ {\intercal} \mathbf {k} _ {i} \\ = \operatorname {v e c} (R) ^ {\intercal} M _ {\mathrm {g D L S}} \operatorname {v e c} (R) + 2 \mathbf {d} _ {\mathrm {g D L S}} ^ {\intercal} \operatorname {v e c} (R) + k _ {\mathrm {g D L S}} \\ \end{array}
|
| 164 |
+
$$
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
\begin{array}{l} J _ {s} ^ {\prime} = \lambda_ {s} (s _ {0} - S (R)) ^ {2} \\ = \operatorname {v e c} (R) ^ {\intercal} M _ {s} \operatorname {v e c} (R) + 2 \mathbf {d} _ {s} ^ {\intercal} \operatorname {v e c} (R) + k _ {s} \\ \end{array}
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
$$
|
| 171 |
+
J _ {g} ^ {\prime} = \lambda_ {g} \| \mathbf {g} _ {\mathcal {Q}} \times R \mathbf {g} _ {\mathcal {W}} \| ^ {2} = \operatorname {v e c} (R) ^ {\intercal} M _ {g} \operatorname {v e c} (R)
|
| 172 |
+
$$
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\begin{array}{l} M = M _ {\mathrm {g D L S}} + M _ {s} + M _ {g} \\ \mathbf {d} = \mathbf {d} _ {\mathrm {g D L S}} + \mathbf {d} _ {s} \\ k = k _ {\mathrm {g D L S}} + k _ {s}. \tag {10} \\ \end{array}
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
The parameters of Eq. (9) (i.e., $M_{\mathbf{gDLS}}$ , $M_s$ , $M_g$ , $\mathbf{d}_{\mathrm{gDLS}}$ , $\mathbf{d}_s$ , $k_{\mathrm{gDLS}}$ , and $k_s$ ) can be computed in closed form and in $\mathcal{O}(n)$ time; see the supplemental material for the closed form solutions of these parameters.
|
| 179 |
+
|
| 180 |
+
An important observation is that Eq. (9) generalizes the unconstrained quadratic function of gDLS shown in Eq. (1). When both priors are disabled, i.e., $\lambda_g = \lambda_s = 0$ , then $J'(R) = J(R)$ . Also, note that the weights $\lambda_g$ and $\lambda_s$ allow the user to control the contribution of each of the priors independently. This gives $\mathrm{gDLS^*}$ great flexibility since it can be adapted to many scenarios. For instance, these weights can be adjusted so that $\mathrm{gDLS^*}$ reflects the confidence on certain priors, reduces the effect of noise present in the priors, and fully disables one prior but enables another.
|
| 181 |
+
|
| 182 |
+
# 3.3. Solving for Rotation
|
| 183 |
+
|
| 184 |
+
Given that the prior-based pose-and-scale cost function (i.e., Eq. (3)) depends only on the rotation matrix, the next
|
| 185 |
+
|
| 186 |
+

|
| 187 |
+
(a) Robustness to pixel noise with minimal samples
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
(b) Accuracy as a function of sample size
|
| 191 |
+
Figure 3. Rotation, translation, and scale errors as a function of (a) pixel noise when estimating pose and scale using a minimal sample of correspondences, and (b) sample size. s-gDLS*, g-gDLS*, and sg-gDLS* produce comparable errors to that of gDLS [43, 44]. On the other hand, gP+s [48] produces the highest errors.
|
| 192 |
+
|
| 193 |
+
step is to find $R$ such that it minimizes Eq. (9). To achieve this, $\mathrm{gDLS}^*$ represents the rotation matrix $R$ using a quaternion $\mathbf{q} = [q_1 q_2 q_3 q_4]^\top$ . To compute all the minimizers of Eq. (9), $\mathrm{gDLS}^*$ follows [16, 22, 43, 44] and builds a polynomial system that encodes the first-order optimality conditions and the unit-norm-quaternion constraint, i.e.,
|
| 194 |
+
|
| 195 |
+
$$
|
| 196 |
+
\left\{ \begin{array}{l l} \frac {\partial J ^ {\prime}}{\partial q _ {j}} = 0, & \forall j = 1, \dots , 4 \\ q _ {j} \left(\mathbf {q} ^ {\intercal} \mathbf {q} - 1\right) = 0, & \forall j = 1, \dots , 4 \end{array} . \right. \tag {11}
|
| 197 |
+
$$
|
| 198 |
+
|
| 199 |
+
The polynomial system shown in Eq. (11) encodes the unit-norm-quaternion constraint with
|
| 200 |
+
|
| 201 |
+
$$
|
| 202 |
+
\frac {\partial \left(\mathbf {q} ^ {\intercal} \mathbf {q} - 1\right) ^ {2}}{\partial q _ {j}} = q _ {j} \left(\mathbf {q} ^ {\intercal} \mathbf {q} - 1\right) = 0, \forall j. \tag {12}
|
| 203 |
+
$$
|
| 204 |
+
|
| 205 |
+
Eq. (12) yields efficient elimination templates and small action matrices, which delivers efficient polynomial solvers as Kneip et al. [22] shows. In fact, $\mathrm{gDLS^{*}}$ adopts the efficient polynomial solver of Kneip et al. [22] as we leverage their rotation representation
|
| 206 |
+
|
| 207 |
+
$$
|
| 208 |
+
\operatorname {v e c} (R) = \left[ q _ {1} ^ {2} q _ {2} ^ {2} q _ {3} ^ {2} q _ {4} ^ {2} q _ {1} q _ {2} q _ {1} q _ {3} q _ {1} q _ {4} q _ {2} q _ {3} q _ {2} q _ {4} q _ {3} q _ {4} \right] ^ {\intercal}. \tag {13}
|
| 209 |
+
$$
|
| 210 |
+
|
| 211 |
+
Given this representation, the dimensions of the parameters of the regularized least-squares cost function shown in Eq. (9) become $M \in \mathbb{R}^{10 \times 10}$ , $\mathbf{d} \in \mathbb{R}^{10}$ , and $k \in \mathbb{R}$ .
|
| 212 |
+
|
| 213 |
+
Because $\mathrm{gDLS^{*}}$ uses the solver of Kneip et al. [22], it efficiently computes eight rotations. After computing these solutions, $\mathrm{gDLS^{*}}$ discards quaternions with complex numbers, and then recovers the depth, scale, and translation using Eq. (7). Finally, $\mathrm{gDLS^{*}}$ uses the computed similarity transformations to discard solutions that map the input 3D points behind the camera.
|
| 214 |
+
|
| 215 |
+
Our gDLS* derivation can be generalized. Imposing scale and translation priors via the regularizers is general enough to be adopted by least-squares-based estimators (e.g., DLS [16] and UPnP [22]). This is because the regularizers are quadratic functions that can be added without much effort into their derivations.
|
| 216 |
+
|
| 217 |
+

|
| 218 |
+
|
| 219 |
+

|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
Figure 4. (a) $\mathrm{gDLS^{*}}$ ’s accuracy slowly degrades as the noise increases in the scale prior. (b) $\mathrm{gDLS^{*}}$ ’s accuracy is barely affected by noise in the gravity prior. (c) Time is not affected when using noisy scale (left) and gravity (right) priors. The orange line shows the best timing of $\mathrm{gDLS} + + +$ [44], the second fastest estimator in our experiments.
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
|
| 226 |
+
# 4. Experiments
|
| 227 |
+
|
| 228 |
+
This section presents experiments that use (i) synthetic data to demonstrate the numerical stability and robustness of $\mathrm{gDLS^{*}}$ and (ii) real data to show the performance of $\mathrm{gDLS^{*}}$ in registering a SLAM trajectory to a pre-computed point cloud. We test three $\mathrm{gDLS^{*}}$ configurations: scale-only-regularized (s-gDLS\*), gravity-only-regularized (g-gDLS\*), and scale-gravity-regularized (sg-gDLS\*). For all experiments except the ablation study, $\lambda_{s}$ and $\lambda_{g}$ are fixed to 1. We compare to several state-of-the-art pose-and-scale estimators: gP+s [48], gDLS [43], gDLS+++ [44], and UPnP [22]. All implementations are integrated into Theia-SfM [45]. For all experiments, we use one machine with two 2.10 GHz Intel Xeon CPUs and 32 GB of RAM.
|
| 229 |
+
|
| 230 |
+
Datasets. For the SLAM trajectory registration, the experiments use two publicly available SLAM datasets: the TUM RGBD dataset [40] and the KITTI dataset [10]. These
|
| 231 |
+
|
| 232 |
+
Table 2. Estimation times in seconds for gP+s [48], gDLS [43], gDLS+++ [44], UPnP [22], s-gDLS* (s column), g-gDLS* (g column), and sg-gDLS* (sg column) for rigid ( $s_0 = 1$ ) and similarity ( $s_0 = 2.5$ ) transformations. The top six rows show results for the TUM dataset, and the last six rows show results for the KITTI dataset. A gravity prior tends to deliver fast estimates, while a scale prior modestly slows down the estimation. On the other hand, scale and gravity priors tend to be modestly faster than gDLS+++.
|
| 233 |
+
|
| 234 |
+
<table><tr><td rowspan="2"></td><td colspan="7">Rigid Transformation [s0=1]</td><td colspan="6">Similarity Transformation [s0=2.5]</td></tr><tr><td>[48]</td><td>[43]</td><td>[44]</td><td>[22]</td><td>s</td><td>g</td><td>sg</td><td>[48]</td><td>[43]</td><td>[44]</td><td>s</td><td>g</td><td>sg</td></tr><tr><td>Fr1 Desk</td><td>10.77</td><td>15.38</td><td>5.79</td><td>9.60</td><td>8.11</td><td>3.39</td><td>5.80</td><td>10.54</td><td>15.38</td><td>5.79</td><td>8.12</td><td>3.82</td><td>6.89</td></tr><tr><td>Fr1 Room</td><td>8.86</td><td>12.23</td><td>4.51</td><td>5.52</td><td>6.66</td><td>2.85</td><td>4.70</td><td>8.55</td><td>11.98</td><td>4.61</td><td>7.96</td><td>3.24</td><td>5.40</td></tr><tr><td>Fr2 LargeNoLoop</td><td>5.63</td><td>8.10</td><td>2.76</td><td>2.23</td><td>2.52</td><td>2.01</td><td>2.10</td><td>6.46</td><td>8.25</td><td>2.82</td><td>2.49</td><td>2.40</td><td>2.39</td></tr><tr><td>Fr1 Desk2</td><td>4.99</td><td>7.72</td><td>2.96</td><td>4.20</td><td>3.89</td><td>1.67</td><td>3.65</td><td>5.04</td><td>7.47</td><td>2.59</td><td>3.99</td><td>1.86</td><td>3.38</td></tr><tr><td>Fr2 Pioneer SLAM</td><td>21.06</td><td>27.77</td><td>10.82</td><td>8.27</td><td>12.08</td><td>6.48</td><td>8.08</td><td>17.10</td><td>25.42</td><td>9.34</td><td>11.84</td><td>7.41</td><td>9.70</td></tr><tr><td>Fr2 Pioneer SLAM 2</td><td>3.39</td><td>3.49</td><td>1.93</td><td>0.88</td><td>1.17</td><td>1.02</td><td>1.40</td><td>3.16</td><td>3.66</td><td>1.96</td><td>1.17</td><td>1.09</td><td>0.99</td></tr><tr><td>Drive 1 (10-2[sec])</td><td>1.66</td><td>2.32</td><td>0.93</td><td>1.17</td><td>0.90</td><td>0.58</td><td>0.90</td><td>1.31</td><td>1.79</td><td>1.19</td><td>1.0</td><td>0.61</td><td>0.87</td></tr><tr><td>Drive 9</td><td>0.32</td><td>0.49</td><td>0.23</td><td>0.14</td><td>0.34</td><td>0.23</td><td>0.28</td><td>0.35</td><td>0.48</td><td>0.22</td><td>0.50</td><td>0.22</td><td>0.26</td></tr><tr><td>Drive 19</td><td>0.51</td><td>0.29</td><td>0.80</td><td>0.27</td><td>0.29</td><td>0.26</td><td>0.29</td><td>0.57</td><td>0.90</td><td>0.39</td><td>0.29</td><td>0.26</td><td>0.29</td></tr><tr><td>Drive 22</td><td>0.12</td><td>0.22</td><td>0.12</td><td>0.07</td><td>0.12</td><td>0.06</td><td>0.11</td><td>0.12</td><td>0.19</td><td>0.07</td><td>0.11</td><td>0.06</td><td>0.12</td></tr><tr><td>Drive 23 (10-2[sec])</td><td>3.40</td><td>4.72</td><td>2.14</td><td>2.18</td><td>2.19</td><td>1.45</td><td>2.04</td><td>3.25</td><td>4.71</td><td>2.07</td><td>2.34</td><td>1.55</td><td>1.94</td></tr><tr><td>Drive 29</td><td>1.15</td><td>1.95</td><td>0.76</td><td>1.19</td><td>1.13</td><td>0.77</td><td>1.11</td><td>1.16</td><td>1.96</td><td>0.75</td><td>1.14</td><td>0.74</td><td>1.12</td></tr></table>
|
| 235 |
+
|
| 236 |
+
datasets provide per-frame accelerometer estimates, which we use to compute one gravity direction for each SLAM trajectory. Specifically, we low pass filter and smooth the accelerations (because the gravity acceleration is constant within the high frequency noise) to get an estimate of the gravity vector for each image. Then, we take the mean of all these estimates to get a final gravity vector estimate. The final result is one gravity vector for each trajectory.
|
| 237 |
+
|
| 238 |
+
Error Metrics. All the experiments report rotation, translation, and scale errors. The rotation error is the angular distance [13, 17] between the expected and the estimated rotation matrix. The translation error is the L2 norm between the expected and the estimated translation. Lastly, the scale error is the absolute difference between the expected and the estimated scale values.
|
| 239 |
+
|
| 240 |
+
# 4.1. Robustness to Noisy Synthetic Data
|
| 241 |
+
|
| 242 |
+
This experiment consists of three parts: (1) measuring robustness to pixel noise with minimal samples (i.e., four 2D-3D correspondences); (2) measuring accuracy as a function of the size of a non-minimal sample (i.e., more than four 2D-3D correspondences); and (3) testing how noise in scale and gravity priors effects solution accuracy and run time. For all experiments, we execute 1,000 trials using 10 randomly positioned cameras within the cube $[-10,10] \times [-10,10] \times [-10,10]$ , and 300 random 3D points in the cube $[-5,5] \times [-5,5] \times [10,20]$ . For each trial, we transform the 3D points by the inverse of a randomly generated ground truth similarity transformation (i.e., a random unit vector direction and random rotation angle between $0^{\circ}$ and $360^{\circ}$ , random translation between 0 and 5 in $(x,y,z)$ , and random scale between 0 and 5).
|
| 243 |
+
|
| 244 |
+
gDLS* is robust to pixel noise with minimal samples. We generate random minimal samples with zero-mean Gaussian noise added to the pixel positions. We vary the noise standard deviation between 0 and 10 and measure
|
| 245 |
+
|
| 246 |
+

|
| 247 |
+
Figure 5. Evaluation Protocol: (1) Reconstruct a scene using Theia-SfM; (2) Split the reconstruction into Query $(\mathcal{Q})$ and Reference $(\mathcal{W})$ parts; (3) Transform $\mathcal{Q}$ using a similarity transform $S$ ; and (4) Estimate similarity transform $S^{\star}$ aligning $\mathcal{Q}$ and $\mathcal{W}$ .
|
| 248 |
+
|
| 249 |
+
the rotation, translation, and scale errors. The results of this experiment can be seen in Fig. 3(a). We observe that s-gDLS*, g-gDLS*, and sg-gDLS* perform similarly to gDLS [43] and gDLS+++ [44] when comparing their rotation and translation errors. Also, we see that the rotation and translation errors produced by $\mathrm{gP + s}$ [48] are the highest. All methods produce similar scale errors.
|
| 250 |
+
|
| 251 |
+
Accuracy of gDLS* improves with non-minimal samples. For this experiment, we vary the size of the sample from 5 to 1000 2D-3D correspondences and fix the standard deviation to 0.5 for the zero-mean Gaussian pixel noise. Fig. 3(b) shows that s-gDLS*, g-gDLS*, and sg-gDLS* produce comparable rotation, translation, and scale errors to that of gDLS and gDLS++. On the other hand, $\mathrm{gP + s}$ produced the largest errors.
|
| 252 |
+
|
| 253 |
+
gDLS* is numerically stable. From Fig. 3, we conclude that s-gDLS* (green), g-gDLS* (red), sg-gDLS* (cyan) are numerically stable because the errors are similar to that of $\mathrm{gDLS} + + +$
|
| 254 |
+
|
| 255 |
+
gDLS* is robust to noise in scale and gravity priors. For this experiment, we gradually increase the noise in the scale and gravity priors. In Fig. 4(a), we see that noise in the scale prior slowly increases the rotation, translation, and
|
| 256 |
+
|
| 257 |
+
Table 3. Rotation, translation, and scale errors of $\mathrm{gP + s}$ [48], gDLS [43], gDLS++ [44], UPnP [22], and $\mathrm{gDLS^{*}}$ using a unit scale (i.e., $s_0 = 1$ ) and gravity priors. The first six rows show results for the TUM dataset, and the last six rows show results for the KITTI dataset. The smallest errors are shown in bold. We observe that $\mathrm{gDLS^{*}}$ and UPnP perform equivalently when comparing rotation and translation errors. However, $\mathrm{gDLS^{*}}$ produces the lowest errors among the pose-and-scale estimators (i.e., $\mathrm{gP + s}$ , gDLS, and $\mathrm{gDLS}++$ ).
|
| 258 |
+
|
| 259 |
+
<table><tr><td colspan="15">Rigid Transformation [s0=1]</td></tr><tr><td></td><td colspan="5">Rerror [deg] (10-1)</td><td colspan="5">terror (10-2)</td><td colspan="4">serror (10-3)</td></tr><tr><td></td><td>[48]</td><td>[43]</td><td>[44]</td><td>[22]</td><td>Ours</td><td>[48]</td><td>[43]</td><td>[44]</td><td>[22]</td><td>Ours</td><td>[48]</td><td>[43]</td><td>[44]</td><td>Ours</td></tr><tr><td>Fr1 Desk</td><td>2.78</td><td>2.58</td><td>2.72</td><td>1.89</td><td>1.57</td><td>2.02</td><td>1.92</td><td>1.91</td><td>1.36</td><td>1.19</td><td>1.46</td><td>1.33</td><td>1.29</td><td>0.68</td></tr><tr><td>Fr1 Room</td><td>2.05</td><td>1.95</td><td>1.99</td><td>1.05</td><td>0.98</td><td>1.09</td><td>1.05</td><td>1.09</td><td>0.55</td><td>0.52</td><td>1.48</td><td>1.40</td><td>1.39</td><td>0.32</td></tr><tr><td>Fr2 LargeNoLoop</td><td>1.90</td><td>1.61</td><td>1.62</td><td>1.35</td><td>1.32</td><td>6.77</td><td>5.77</td><td>6.01</td><td>4.70</td><td>4.45</td><td>4.04</td><td>4.15</td><td>4.39</td><td>1.39</td></tr><tr><td>Fr1 Desk2</td><td>2.34</td><td>2.13</td><td>2.26</td><td>1.63</td><td>1.25</td><td>2.03</td><td>1.85</td><td>1.90</td><td>1.38</td><td>1.06</td><td>1.35</td><td>1.15</td><td>1.26</td><td>0.49</td></tr><tr><td>Fr2 Pioneer SLAM</td><td>1.50</td><td>1.51</td><td>1.47</td><td>0.76</td><td>0.87</td><td>1.29</td><td>1.18</td><td>1.19</td><td>0.59</td><td>0.70</td><td>2.77</td><td>2.73</td><td>2.67</td><td>0.87</td></tr><tr><td>Fr2 Pioneer SLAM 2</td><td>1.63</td><td>1.49</td><td>1.51</td><td>0.97</td><td>1.08</td><td>1.93</td><td>1.77</td><td>1.80</td><td>1.22</td><td>1.34</td><td>6.81</td><td>7.48</td><td>7.44</td><td>0.88</td></tr><tr><td>Drive 1</td><td>0.44</td><td>0.40</td><td>0.42</td><td>0.34</td><td>0.33</td><td>0.27</td><td>0.25</td><td>0.24</td><td>0.17</td><td>0.16</td><td>0.72</td><td>0.66</td><td>0.61</td><td>0.02</td></tr><tr><td>Drive 9</td><td>1.15</td><td>1.10</td><td>1.15</td><td>0.64</td><td>1.13</td><td>0.43</td><td>0.40</td><td>0.44</td><td>0.13</td><td>0.20</td><td>6.27</td><td>5.79</td><td>6.14</td><td>0.05</td></tr><tr><td>Drive 19</td><td>3.42</td><td>3.57</td><td>3.30</td><td>2.48</td><td>3.04</td><td>0.83</td><td>0.85</td><td>0.80</td><td>0.63</td><td>0.73</td><td>4.99</td><td>5.64</td><td>5.54</td><td>0.01</td></tr><tr><td>Drive 22</td><td>0.66</td><td>0.62</td><td>0.66</td><td>0.31</td><td>0.63</td><td>0.28</td><td>0.27</td><td>0.30</td><td>0.16</td><td>0.27</td><td>1.90</td><td>1.70</td><td>1.67</td><td>0.94</td></tr><tr><td>Drive 23</td><td>0.74</td><td>0.58</td><td>0.62</td><td>0.84</td><td>0.56</td><td>0.19</td><td>0.18</td><td>0.19</td><td>0.12</td><td>0.09</td><td>1.28</td><td>1.16</td><td>1.28</td><td>0.03</td></tr><tr><td>Drive 29</td><td>1.00</td><td>1.06</td><td>1.06</td><td>0.56</td><td>0.82</td><td>0.34</td><td>0.35</td><td>0.35</td><td>0.21</td><td>0.26</td><td>1.60</td><td>3.39</td><td>1.73</td><td>0.75</td></tr></table>
|
| 260 |
+
|
| 261 |
+
Table 4. Rotation, translation, and scale errors of gP+s [48], gDLS [43], gDLS+++ [44], and gDLS* using a scale prior of $s_0 = 2.5$ and gravity priors. The first six rows show results for the TUM dataset, and the last six rows show results for the KITTI dataset. The smallest errors are shown in bold. We see that gDLS* produces the smallest errors in almost every case.
|
| 262 |
+
|
| 263 |
+
<table><tr><td colspan="12">Similarity Transformation [s0=2.5]</td><td></td></tr><tr><td></td><td colspan="4">Rerror [deg] (10-1)</td><td colspan="4">terror (10-2)</td><td colspan="3">serror (10-3)</td><td></td></tr><tr><td></td><td>[48]</td><td>[43]</td><td>[44]</td><td>Ours</td><td>[48]</td><td>[43]</td><td>[44]</td><td>Ours</td><td>[48]</td><td>[43]</td><td>[44]</td><td>Ours</td></tr><tr><td>Fr1 Desk</td><td>2.77</td><td>2.59</td><td>2.72</td><td>2.23</td><td>5.50</td><td>5.21</td><td>5.22</td><td>4.55</td><td>3.59</td><td>3.27</td><td>3.23</td><td>1.56</td></tr><tr><td>Fr1 Room</td><td>2.02</td><td>1.99</td><td>1.99</td><td>1.29</td><td>2.79</td><td>2.78</td><td>2.79</td><td>1.71</td><td>3.74</td><td>3.41</td><td>3.48</td><td>0.91</td></tr><tr><td>Fr2 LargeNoLoop</td><td>1.90</td><td>1.57</td><td>1.62</td><td>1.49</td><td>13.9</td><td>12.3</td><td>12.8</td><td>10.1</td><td>10.7</td><td>10.8</td><td>11.0</td><td>3.66</td></tr><tr><td>Fr1 Desk2</td><td>2.29</td><td>2.13</td><td>2.26</td><td>1.77</td><td>4.37</td><td>4.14</td><td>4.32</td><td>3.28</td><td>3.22</td><td>2.88</td><td>3.14</td><td>1.37</td></tr><tr><td>Fr2 Pioneer SLAM</td><td>1.43</td><td>1.48</td><td>1.47</td><td>1.17</td><td>3.67</td><td>3.44</td><td>3.50</td><td>2.42</td><td>6.98</td><td>6.81</td><td>6.68</td><td>1.65</td></tr><tr><td>Fr2 Pioneer SLAM 2</td><td>1.84</td><td>1.49</td><td>1.51</td><td>1.27</td><td>5.23</td><td>4.49</td><td>4.58</td><td>3.69</td><td>15.8</td><td>18.7</td><td>18.6</td><td>2.42</td></tr><tr><td>Drive 1</td><td>0.43</td><td>0.40</td><td>0.42</td><td>0.33</td><td>0.47</td><td>0.44</td><td>0.43</td><td>0.28</td><td>1.73</td><td>1.62</td><td>1.54</td><td>0.05</td></tr><tr><td>Drive 9</td><td>1.17</td><td>1.09</td><td>1.15</td><td>1.13</td><td>1.11</td><td>1.06</td><td>1.16</td><td>0.50</td><td>15.7</td><td>14.4</td><td>15.3</td><td>0.12</td></tr><tr><td>Drive 19</td><td>3.60</td><td>3.27</td><td>3.57</td><td>3.09</td><td>2.13</td><td>1.91</td><td>2.06</td><td>1.80</td><td>14.6</td><td>14.0</td><td>14.1</td><td>0.04</td></tr><tr><td>Drive 22</td><td>0.64</td><td>0.62</td><td>0.66</td><td>0.62</td><td>0.77</td><td>0.75</td><td>0.82</td><td>0.75</td><td>4.40</td><td>4.27</td><td>4.19</td><td>2.34</td></tr><tr><td>Drive 23</td><td>0.75</td><td>0.59</td><td>0.62</td><td>0.57</td><td>0.58</td><td>0.51</td><td>0.56</td><td>0.24</td><td>3.13</td><td>2.87</td><td>3.20</td><td>0.14</td></tr><tr><td>Drive 29</td><td>1.00</td><td>1.09</td><td>1.06</td><td>0.82</td><td>0.80</td><td>0.89</td><td>0.88</td><td>0.65</td><td>3.81</td><td>4.46</td><td>4.33</td><td>1.86</td></tr></table>
|
| 264 |
+
|
| 265 |
+
scale errors. Conversely, in Fig. 4(b), noise in the gravity prior has little effect on the final accuracy. Lastly, Fig. 4(c) shows that noise has a minimal effect on the solution time.
|
| 266 |
+
|
| 267 |
+
# 4.2. SLAM Trajectory Registration
|
| 268 |
+
|
| 269 |
+
The goal of this experiment is to measure the accuracy of an estimated similarity transformation which registers a SLAM trajectory (a collection of images from a moving camera) to a pre-computed 3D reconstruction. This experiment uses both scale and gravity priors for gDLS*. Part of this experiment considers a unit-scale similarity transformation, which makes it equivalent to a rigid transformation. In the latter case, the experiment also includes UPnP [22], a state-of-the-art multi-camera pose estimator that only estimates a rigid transformation (i.e., no scale estimation).
|
| 270 |
+
|
| 271 |
+
For each dataset and method combination, we run 100 trials. Each estimator is wrapped in RANSAC [9] to esti
|
| 272 |
+
|
| 273 |
+
mate the transformations and the same parameters are used for all of the scale-and-pose experiments. RANSAC labels correspondences with more than 4 pixels of reprojection error as outliers. Because we use RANSAC, all methods tend to converge to accurate solutions (Tables 3 and 4); however, the speed of convergence can differ significantly (Table 2).
|
| 274 |
+
|
| 275 |
+
While there exist datasets and clear methods to evaluate visual-based localization or SfM reconstructions (e.g., [5, 38]), there is not a well established methodology to evaluate pose-and-scale estimators. Previous evaluation procedures (e.g., [43, 44]) mostly show camera position errors, but discard orientation and scale errors. To evaluate the registration of a SLAM trajectory, we propose a novel evaluation procedure as illustrated in Fig. 5: (1) reconstruct the trajectory using Theia-SfM; (2) remove a subset of images with their corresponding 3D points and tracks to create a new query set (the remaining images, points, and tracks are
|
| 276 |
+
|
| 277 |
+

|
| 278 |
+
Figure 6. Average rotation, translation, and scale errors of the best baseline (best performing baseline for a given metric) and $\mathrm{gDLS^{*}}$ as a function of $\lambda_{s}$ and $\lambda_{g}$ on (a) KITTI and (b) TUM datasets. A gravity prior (g-gDLS*) tends to reduce rotation and translation errors and modestly improves scale errors. A scale prior (s-gDLS*) tends to improve scale accuracy and modestly reduces translation errors. The combination of scale and gravity priors (sg-gDLS*) tends to reduce translation and scale errors and improves rotation estimates (see (b)).
|
| 279 |
+
|
| 280 |
+

|
| 281 |
+
|
| 282 |
+
the reference reconstruction); (3) apply a similarity transformation to describe the reconstruction in a different frame of reference with a different scale; and (4) estimate the similarity transformation. To compute the input 2D-3D correspondences, the evaluation procedure matches the features from the query images to the features of the reference reconstruction and geometrically verifies them. From these matches and reconstruction, the procedure builds the 2D-3D correspondences by first computing the rays pointing to the corresponding 3D points using the camera positions.
|
| 283 |
+
|
| 284 |
+
The gravity prior significantly improves speed. Table 2 shows the average estimation times for both rigid $(s_0 = 1)$ and similarity $(s_0 = 2.5)$ transformations. We observe that both priors help the estimators find the solution much faster than many baselines (see sg columns). In particular, a gravity only prior (see g columns) can speed up gDLS* significantly while producing good estimates (see Sec. 4.3). On the other hand, a scale only prior (see s columns) can modestly accelerate gDLS*.
|
| 285 |
+
|
| 286 |
+
Incorporating scale and rotation priors consistently improves accuracy. Tables 3 and 4 present the average rotation, translation, and scale errors of 100 trials, each estimating rigid and similarity transformations, respectively. Both Tables show six TUM trajectories at the top and six KITTI trajectories at the bottom. The scale priors $s_0$ are shown at the top of both Tables. Note that UPnP does not estimate scales, so it is not included in similarity transformation sections. Table 3 shows that gDLS* and UPnP produce the most accurate rotation and translation estimates, and that gDLS* produces the most accurate scale estimates. Table 4 shows that gDLS* tends to produce the most accurate rotation and translation estimates, and that gDLS* produces the most accurate scale estimates.
|
| 287 |
+
|
| 288 |
+
# 4.3. Ablation Study
|
| 289 |
+
|
| 290 |
+
This study aims to show the impact on the estimator accuracy of the weights $\lambda_{s}$ and $\lambda_{g}$ as they vary. We use the same TUM and KITTI datasets and RANSAC configuration as in previous experiments. We vary the weights from 0.25 to 3 using increments of 0.25 and run 100 trials for each weight. To summarize the results, we average the rotation,
|
| 291 |
+
|
| 292 |
+
translation, and scale errors.
|
| 293 |
+
|
| 294 |
+
The priors improve accuracy and speed when used individually or together. Fig. 6 shows the results of this study. We see that on average a gravity prior (g-gDLS*) significantly improves rotation and translation errors, while modestly improving scale errors. On the other hand, a scale prior (s-gDLS*) on average significantly improves the scale errors, while modestly improving translation errors. Finally, both gravity and scale priors improve translation and scale errors and can help the estimator improve rotation errors.
|
| 295 |
+
|
| 296 |
+
From these results, we can conclude that accurate priors can greatly improve accuracy estimates (thereby also improving speed). However, we know from Fig. 4 that noisy priors can also degrade accuracy. Thus, for future work, we will explore how to automatically set $\lambda_{s}$ and $\lambda_{g}$ based on the noise of the priors to maximize accuracy and speed.
|
| 297 |
+
|
| 298 |
+
# 5. Conclusion
|
| 299 |
+
|
| 300 |
+
This work presents gDLS*, a novel pose-and-scale estimator that exploits scale and/or gravity priors to improve accuracy and speed. gDLS* is based on a least-squares re-projection error cost function which facilitates the use of regularizers that impose prior knowledge about the solution space. This gDLS* derivation is general because these regularizers are quadratic functions that can easily be added to other least-squares-based estimators. Experiments on both synthetic and real data show that gDLS* improves speed and accuracy of the pose-and-scale estimates given sufficiently accurate priors. The gravity prior is particularly effective, but the scale prior also improves the translation and scale estimates. These findings make gDLS* an excellent estimator for many applications where inertial sensors are available such as AR, 3D mapping, and robotics.
|
| 301 |
+
|
| 302 |
+
# Acknowledgment
|
| 303 |
+
|
| 304 |
+
Gang Hua was supported in part by the National Key R&D Program of China Grant 2018AAA0101400 and NSFC Grant 61629301.
|
| 305 |
+
|
| 306 |
+
# References
|
| 307 |
+
|
| 308 |
+
[1] Azure spatial anchors. https://azure.microsoft.com/en-us/services/spatial-anchors/. 1
|
| 309 |
+
[2] Martin Bujnak, Zuzana Kukelova, and Tomas Pajdla. A general solution to the p4p problem for camera with unknown focal length. In Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2008. 1, 2
|
| 310 |
+
[3] Federico Camposeco, Andrea Cohen, Marc Pollefeys, and Torsten Sattler. Hybrid camera pose estimation. In Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1
|
| 311 |
+
[4] Chu-Song Chen and Wen-Yan Chang. Pose estimation for generalized imaging device via solving non-perspective n point problem. In Proc. of the IEEE International Conference on Robotics and Automation (ICRA), 2002. 2
|
| 312 |
+
[5] Joseph DeGol, Timothy Bretl, and Derek Hoiem. Improved structure from motion using fiducial marker matching. In Proc. of the European Conf. on Computer Vision (ECCV), 2018. 3, 7
|
| 313 |
+
[6] Jakob Engel, Thomas Schöps, and Daniel Cremers. Ldslam: Large-scale direct monocular slam. In Proc. of the European Conference on Computer Vision (ECCV), 2014. 1
|
| 314 |
+
[7] Luis Ferraz, Xavier Binefa, and Francesc Moreno-Noguer. Very fast solution to the pnp problem with algebraic outlier rejection. In Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2014. 1
|
| 315 |
+
[8] Luis Ferraz, Xavier Binefa, and Francesc Moreno-Noguer. Very fast solution to the pnp problem with algebraic outlier rejection. In Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2014. 2
|
| 316 |
+
[9] Martin A Fischler and Robert C Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 24(6):381-395, 1981. 7
|
| 317 |
+
[10] Andreas Geiger, Philip Lenz, Christoph Stiller, and Raquel Urtasun. Vision meets robotics: The kitti dataset. Intl. Journal of Robotics Research (IJRR), 2013. 2, 5
|
| 318 |
+
[11] Marcel Geppert, Peidong Liu, Zhaopeng Cui, Marc Pollefeys, and Torsten Sattler. Efficient 2d-3d matching for multi-camera visual localization. ArXiV preprint arXiv:1809.06445, 2018. 1
|
| 319 |
+
[12] M. D. Grossberg and S. K. Nayar. A general imaging model and a method for finding its parameters. In Proc. of the IEEE Intl. Conf. on Computer Vision (ICCV), 2001. 1
|
| 320 |
+
[13] Richard Hartley, Jochen Trumpf, Yuchao Dai, and Hongdong Li. Rotation averaging. Intl. Journal of Computer Vision (IJCV), 103(3):267-305, 2013. 6
|
| 321 |
+
[14] Gim Hee Lee, Bo Li, Marc Pollefeys, and Friedrich Fraundorfer. Minimal solutions for pose estimation of a multicamera system. In Robotics Research: The 16th Intl. Symposium ISRR, pages 521-538. Springer, 2016. 2
|
| 322 |
+
[15] Lionel Heng, Benjamin Choi, Zhaopeng Cui, Marcel Geppert, Sixing Hu, Benson Kuan, Peidong Liu, Rang Nguyen, Ye Chuan Yeo, Andreas Geiger, et al. Project automation: Localization and 3d scene perception for an autonomous vehicle with a multi-camera system. ArXiV preprint arXiv:1809.05477, 2018. 1
|
| 323 |
+
|
| 324 |
+
[16] Joel A Hesch and Stergios I Roumeliotis. A direct least-squares (DLS) method for PnP. In Proc. of the IEEE Intl. Conf. on Computer Vision (ICCV), 2011. 1, 2, 3, 4, 5
|
| 325 |
+
[17] Du Q Huynh. Metrics for 3d rotations: Comparison and analysis. Journal of Mathematical Imaging and Vision, 35(2):155-164, 2009. 6
|
| 326 |
+
[18] Eagle S Jones and Stefano Soatto. Visual-inertial navigation, mapping and localization: A scalable real-time causal approach. The Intl. Journal of Robotics Research, 30(4):407-430, 2011. 1
|
| 327 |
+
[19] Georg Klein and David Murray. Parallel tracking and mapping on a camera phone. In Proc. of the IEEE Intl. Symposium on Mixed and Augmented Reality (ISMAR), 2009. 1
|
| 328 |
+
[20] Laurent Kneip, Margarita Chli, and Roland Y Siegwart. Robust real-time visual odometry with a single camera and an imu. In Proc. of the British Machine Vision Conference (BMVC), 2011. 1
|
| 329 |
+
[21] Laurent Kneip, Paul Furgale, and Roland Siegwart. Using multi-camera systems in robotics: Efficient solutions to the npnp problem. In Proc. of the IEEE Intl. Conf. on Robotics and Automation (ICRA), 2013. 1, 2
|
| 330 |
+
[22] Laurent Kneip, Hongdong Li, and Yongduek Seo. Upnp: An optimal o(n) solution to the absolute pose problem with universal applicability. In Proc. of the European Conf. on Computer Vision (ECCV), 2014. 1, 2, 5, 6, 7
|
| 331 |
+
[23] Laurent Kneip, Davide Scaramuzza, and Roland Siegwart. A novel parametrization of the perspective-three-point problem for a direct computation of absolute camera position and orientation. In Proc. of the IEEE Conf. Computer Vision and Pattern Recognition (CVPR), 2011. 1, 2
|
| 332 |
+
[24] Zuzana Kukelova, Martin Bujnak, and Tomas Pajdla. Automatic generator of minimal problem solvers. In Proc. of the European Conf. on Computer Vision (ECCV), 2008. 2
|
| 333 |
+
[25] Zuzana Kukelova, Martin Bujnak, and Tomas Pajdla. Closed-form solutions to minimal absolute pose problems with known vertical direction. In Proc. of the Asian Conf. on Computer Vision (ACCV), 2010. 2
|
| 334 |
+
[26] Zuzana Kukelova, Martin Bujnak, and Tomas Pajdla. Real-time solution to the absolute pose problem with unknown radial distortion and focal length. In Proc. of the IEEE Intl. Conf. on Computer Vision (ICCV), 2013. 1, 2
|
| 335 |
+
[27] Zuzana Kukelova, Jan Heller, and Andrew Fitzgibbon. Efficient intersection of three quadrics and applications in computer vision. In Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2016. 2
|
| 336 |
+
[28] Viktor Larsson, Magnus Oskarsson, Kalle Astrom, Alge Wallis, Zuzana Kukelova, and Tomas Pajdla. Beyond grobner bases: Basis selection for minimal solvers. In Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 2
|
| 337 |
+
[29] Vincent Lepetit, Francesc Moreno-Noguer, and Pascal Fua. Epnp: An accurate o(n) solution to the pnp problem. *Intl. Journal of Computer Vision (IJCV)*, 81(2):155, 2009. 1, 2
|
| 338 |
+
[30] Jesse Levinson, Michael Montemerlo, and Sebastian Thrun. Map-based precision vehicle localization in urban environments. In Robotics: Science and Systems, 2007. 1
|
| 339 |
+
[31] Yi Ma, Stefano Soatto, Jana Kosecka, and S Shankar Sastry. An invitation to 3-d vision: from images to geometric models, volume 26. Springer Science & Business Media, 2012. 1
|
| 340 |
+
|
| 341 |
+
[32] Pierre Martin, Eric Marchand, Pascal Houlier, and Isabelle Marchal. Mapping and re-localization for mobile augmented reality. In Proc. of the IEEE Intl. Conf. on Image Processing (ICIP), 2014. 1
|
| 342 |
+
[33] P. Miraldo and H. Araujo. A simple and robust solution to the minimal general pose estimation. In Proc. of the IEEE International Conference on Robotics and Automation (ICRA), 2014. 1
|
| 343 |
+
[34] 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
|
| 344 |
+
[35] David Nistér and Henrik Stewénius. A minimal solution to the generalised 3-point pose problem. Journal of Mathematical Imaging and Vision, 27(1):67-79, 2007. 2
|
| 345 |
+
[36] Gabriel Nutzi, Stephan Weiss, Davide Scaramuzza, and Roland Siegwart. Fusion of imu and vision for absolute scale estimation in monocular slam. Journal of Intelligent & Robotic Systems, 2011. 3
|
| 346 |
+
[37] Robert Pless. Using many cameras as one. In Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2003. 1
|
| 347 |
+
[38] Torsten Sattler, Will Maddern, Carl Toft, Akihiko Torii, Lars Hammarstrand, Erik Stenborg, Daniel Safari, Masatoshi Okutomi, Marc Pollefeys, Josef Sivic, et al. Benchmarking 6dof outdoor visual localization in changing conditions. In Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2018. 1, 7
|
| 348 |
+
[39] Dieter Schmalstieg and Tobias Hollerer. Augmented reality: principles and practice. Addison-Wesley Professional, 2016. 1
|
| 349 |
+
[40] J. Sturm, N. Engelhard, F. Endres, W. Burgard, and D. Cremers. A benchmark for the evaluation of rgb-d slam systems. In Proc. of the Intl. Conf. on Intelligent Robot Systems (IROS), 2012. 2, 5
|
| 350 |
+
[41] Chris Sweeney, John Flynn, Benjamin Nuernberger, Matthew Turk, and Tobias Höllerer. Efficient computation of absolute pose for gravity-aware augmented reality. In Proc. of the IEEE Intl. Symposium on Mixed and Augmented Reality (ISMAR), 2015. 1
|
| 351 |
+
[42] Chris Sweeney, John Flynn, and Matthew Turk. Solving for relative pose with a partially known rotation is a quadratic eigenvalue problem. In Proc. of the Intl. Conf. on 3D Vision (3DV), 2014. 1
|
| 352 |
+
[43] Chris Sweeney, Victor Fragoso, Tobias Höllerer, and Matthew Turk. gDLS: A scalable solution to the general-
|
| 353 |
+
|
| 354 |
+
ized pose and scale problem. In Proc. of the European Conf. on Computer Vision (ECCV), 2014. 1, 2, 3, 4, 5, 6, 7
|
| 355 |
+
[44] Chris Sweeney, Victor Fragoso, Tobias Höllerer, and Matthew Turk. Large scale sfm with the distributed camera model. In Proc. of the IEEE Intl. Conf. on 3D Vision (3DV), 2016. 1, 2, 3, 4, 5, 6, 7
|
| 356 |
+
[45] Christopher Sweeney, Tobias Hollerer, and Matthew Turk. Theia: A fast and scalable structure-from-motion library. In Proc. of the ACM Intl. Conf. on Multimedia, 2015. 5
|
| 357 |
+
[46] K. Tsotsos, A. Chiuso, and S. Soatto. Robust inference for visual-inertial sensor fusion. In Proc. of the Intl. Conference on Robotics and Automation (ICRA). 2015. 1
|
| 358 |
+
[47] Jonathan Ventura, Clemens Arth, Gerhard Reitmayr, and Dieter Schmalstieg. Global localization from monocular slam on a mobile phone. IEEE Transactions on Visualization and Computer Graphics, 20(4):531-539, 2014. 1
|
| 359 |
+
[48] Jonathan Ventura, Clemens Arth, Gerhard Reitmayr, and Dieter Schmalstieg. A minimal solution to the generalized pose-and-scale problem. In Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2014. 1, 2, 5, 6, 7
|
| 360 |
+
[49] Jonathan Ventura and Tobias Höllerer. Wide-area scene mapping for mobile visual tracking. In Proc. of the IEEE Intl. Symposium on Mixed and Augmented Reality (ISMAR), 2012. 1
|
| 361 |
+
[50] Stephan Weiss, Markus W Achtelik, Simon Lynen, Michael C Achtelik, Laurent Kneip, Margarita Chli, and Roland Siegwart. Monocular vision for long-term micro aerial vehicle state estimation: A compendium. Journal of Field Robotics, 30(5):803-831, 2013. 1
|
| 362 |
+
[51] Changchang Wu. P3. 5p: Pose estimation with unknown focal length. In Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2015. 2
|
| 363 |
+
[52] Bernhard Zeisl, Torsten Sattler, and Marc Pollefeys. Camera pose voting for large-scale image-based localization. In Proc. of the IEEE Intl. Conf. on Computer Vision (ICCV), 2015. 1
|
| 364 |
+
[53] Yinqiang Zheng, Yubin Kuang, Shigeki Sugimoto, Kalle Astrom, and Masatoshi Okutomi. Revisiting the pnp problem: A fast, general and optimal solution. In Proc. of the IEEE Intl. Conf. on Computer Vision (ICCV), 2013. 1, 2
|
| 365 |
+
[54] Julius Ziegler, Henning Lategahn, Markus Schreiber, Christoph G Keller, Carsten Knöppel, Jochen Hipp, Martin Haueis, and Christoph Stiller. Video based localization for bertha. In Proc. of the IEEE Intelligent Vehicles Symposium, 2014. 1
|
gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a7cdbd52fae062f480fea62d0bf627bd339fa39f2ff0b819091d3a1ef15fb90
|
| 3 |
+
size 644658
|
gdlsgeneralizedposeandscaleestimationgivenscaleandgravitypriors/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:faf0ec9db66219afc71e299e5b8837aa2038cf4272221d9767fefbfb88c948a9
|
| 3 |
+
size 481469
|
itamlanincrementaltaskagnosticmetalearningapproach/b14ded44-8285-418c-9ee8-e176c1d8e99f_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:545c04ffcd63232302b858638b47d8f41db9dc85d05886fe0a458accb372c057
|
| 3 |
+
size 71930
|
itamlanincrementaltaskagnosticmetalearningapproach/b14ded44-8285-418c-9ee8-e176c1d8e99f_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:568f8c8e312df3eb593e605066594e3fe872adc17444a68a38bf71ef20f3babb
|
| 3 |
+
size 85157
|
itamlanincrementaltaskagnosticmetalearningapproach/b14ded44-8285-418c-9ee8-e176c1d8e99f_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56dbb7e02b57310af39b3e25164faf41eec526f4607d4d9cf7fe8dc6a4930e0a
|
| 3 |
+
size 1663331
|
itamlanincrementaltaskagnosticmetalearningapproach/full.md
ADDED
|
@@ -0,0 +1,281 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# iTAML : An Incremental Task-Agnostic Meta-learning Approach
|
| 2 |
+
|
| 3 |
+
Jathushan Rajasegaran*, Salman Khan*, Munawar Hayat*, Fahad Shahbaz Khan*†, Mubarak Shah†
|
| 4 |
+
|
| 5 |
+
$^{*}$ Inception Institute of Artificial Intelligence, UAE $^{\dagger}$ University of Central Florida, USA $^{\ddagger}$ CVL, Linköping University, Sweden {first.lastname}@inceptioniai.org, mshah@ucf.edu
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Humans can continuously learn new knowledge as their experience grows. In contrast, previous learning in deep neural networks can quickly fade out when they are trained on a new task. In this paper, we hypothesize this problem can be avoided by learning a set of generalized parameters, that are neither specific to old nor new tasks. In this pursuit, we introduce a novel meta-learning approach that seeks to maintain an equilibrium between all the encountered tasks. This is ensured by a new meta-update rule which avoids catastrophic forgetting. In comparison to previous meta-learning techniques, our approach is task-agnostic. When presented with a continuum of data, our model automatically identifies the task and quickly adapts to it with just a single update. We perform extensive experiments on five datasets in a class-incremental setting, leading to significant improvements over the state of the art methods (e.g., a $21.3\%$ boost on CIFAR100 with 10 incremental tasks). Specifically, on large-scale datasets that generally prove difficult cases for incremental learning, our approach delivers absolute gains as high as $19.1\%$ and $7.4\%$ on ImageNet and MS-Celeb datasets, respectively. Our codes are available at: https://github.com/brjathu/iTAML.
|
| 10 |
+
|
| 11 |
+
# 1. Introduction
|
| 12 |
+
|
| 13 |
+
Visual content is ever-evolving and its volume is rapidly increasing each day. High-dimensionality and mass volume of visual media makes it impractical to store ephemeral or streaming data and process it all at once. Incremental Learning (IL) addresses this issue, and requires an agent to continually learn new tasks, while preserving old knowledge with limited or no access to previous data. The goal is to end-up with a single model, that performs well for all the tasks. In this manner, incremental learning models offer adaptation, gradual development and scalability capabilities that are very central to human-inspired learning.
|
| 14 |
+
|
| 15 |
+
This paper studies class-incremental learning where groups of classes are sequentially observed. This case is fundamentally different from conventional classification task due to two key factors, plasticity and stability. A plastic network can quickly forget old tasks while performing well on new ones (forgetting), and a stable network can impede
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: We propose a task-agnostic meta-learning approach for class-incremental learning. In this setting, tasks are observed sequentially where each task is a set of classes. During training, iTAML incrementally learns new tasks with meta-updates and tries to retain previous knowledge to learn a generic model. At inference, given a data continuum, iTAML first predicts the task and then quickly adapts to it. A fixed-size memory buffer is kept to support the adaptation.
|
| 19 |
+
|
| 20 |
+
learning new tasks in an effort to keep old information (interference). Despite several attempts, catastrophic forgetting and interference are still challenging problems for deep learning [20]. This paper takes a different approach to IL based on the following principle: instead of a 'one size fits all' approach that learns a single model well-suited for all tasks, we propose to learn a generic meta-model which can be quickly adapted to the desired task. The meta-learning framework focuses on learning 'how to rapidly learn?' The generality of the model arises from the 'learning to learn' training strategy, that focuses on figuring out the shared parametric space common to all hitherto observed tasks.
|
| 21 |
+
|
| 22 |
+
Adapting meta-learning for IL involves numerous challenges. First, an incremental classifier keeps observing new tasks, therefore it must maintain a balance between plasticity and stability. Current meta-learning algorithms such as MAML (Model Agnostic Meta-Learning) [6], FOMAML
|
| 23 |
+
|
| 24 |
+
(First Order MAML) [18] and Reptile [19] do not offer the ability to adapt to new tasks or remember old tasks. Secondly, without any task-specific feedback, meta-learning algorithms are not suitable for classification problems. Although meta-learned models can quickly adapt to new tasks, they require task-information to update their parameters which restricts their applicability. Finally, most IL methods use a fixed-size memory buffer for old task replay. This makes the training distribution imbalanced due to majority samples from newer task, thereby learning a biased model.
|
| 25 |
+
|
| 26 |
+
To overcome these challenges, we propose iTAML, a task-agnostic meta-learning algorithm specifically designed for IL settings. To minimize catastrophic forgetting, iTAML applies a meta-update rule that maintains an equilibrium between current and old knowledge. Further, it separates the generic feature extraction module from the task-specific classifier, similar to [11], thereby minimizing interference and promoting a shared feature space amongst tasks. To avoid the limitation of knowing task information beforehand, iTAML learns a task-agnostic model that predicts the task automatically and subsequently adapts to the predicted task. This makes iTAML unique compared to other meta-learning strategies. Finally, iTAML mitigates the data imbalance problem by tuning the task specific parameters separately for each task. Thus, the task-specific parameters are not influenced by the majority samples of the current task.
|
| 27 |
+
|
| 28 |
+
The major contributions of this work are: (i) A new task-agnostic meta-learning algorithm, iTAML, which automatically predicts the task as well as the final class, (ii) A momentum based strategy for meta-update which effectively avoids forgetting, (iii) A new sampling rate selection approach that provides the lower-bound for the number of samples in the data continuum required for meta-update during inference, and (iv) Significant performance gains demonstrated by extensive experiments on ImageNet, CIFAR100, MNIST, SVHN and MS-Celeb datasets.
|
| 29 |
+
|
| 30 |
+
# 2. Related Work
|
| 31 |
+
|
| 32 |
+
Existing IL methods propose architectural modifications for deep CNNs e.g., dynamic networks [22, 21], dual-memory modules [7], and network expansion [25]. Rehearsal based methods have also been proposed that replay the old task by using an exemplar set [23, 4] or synthesize samples using generative models [27, 28]. IL approaches that work fundamentally on algorithmic level can be grouped into regularization and meta-learning based methods. We discuss these two sets of approaches next.
|
| 33 |
+
|
| 34 |
+
Regularization Strategies for Incremental Learning: The regularization based methods impose constraints during learning that seek to retain past knowledge. For example, learning without forgetting [15] adds a distillation loss to preserve the old knowledge while sequentially learning new tasks. Different from the 'task-incremental' setting
|
| 35 |
+
|
| 36 |
+
explored in [15], [23, 2] apply distillation loss in 'class incremental' setting to reduce forgetting. A distillation loss on the attention maps of the deep network is proposed in [5] that minimizes overriding the old-task information. Recently, [30] advocates for a simple bias correction strategy that promotes re-balancing the final classifier layer to give equal importance to current and older classes.
|
| 37 |
+
|
| 38 |
+
A broad set of regularization approaches introduce synaptic intelligence [31, 13, 1] which estimate the importance of each neuron and selectively overwrite the less-important weights as the learning progresses. Lee et al. [14] propose to incrementally learn new tasks by merging the old and new parameters via first and second order moment matching of posterior distributions. Elastic weight consolidation (EWC) [13] computes synaptic importance offline with a Fisher information matrix. It is used to slow down the learning for weights highly relevant to previous tasks. However, EWC can also cause intransigence towards new tasks, for which [3] proposes exemplar rehearsal along with a Riemannian manifold distance measure for regularization.
|
| 39 |
+
|
| 40 |
+
Meta-learning for Incremental Learning: The overarching goal of meta-learning is to learn a model on a series of tasks, such that a new task can be quickly learned with minimal supervision. Meta-learning is thus ideally suited for IL since tasks are progressively introduced. A number of IL methods inspired by meta-learning have recently been proposed. Riemer et al. [24] learn the network updates that are well-aligned and avoid moving in directions that can cause interference. However, [24] uses a fixed loss function to align the gradients, that cannot be used in customized applications. Javed et al. [11] propose a meta-learning approach that disentangles generic representations from task-specific learning. Specifically, as new tasks are introduced, the task head is learned with both the inner and outer (meta) updates, while the representation learning backbone is only adapted with the outer (more-generic) updates. However, [11] assumes the training data is a correlated data stream, and all task samples are concurrently present during inference. Unlike [11], we do not impose such strict constraints. Also, both of these methods [24, 11] update the inner loop by using a single sample at one time, which is not suitable for large-scale IL. Moreover, [17] assumes that the task is known for the data continuum which limits its applicability to practical scenarios. Jamal et al. [10] present a task-agnostic meta-learning approach applicable only to few-shot learning. In contrast, iTAML is task-agnostic and well suited for large-scale settings. Our proposed meta-update is unbiased towards majority class samples and simultaneously minimizes forgetting. At inference, our model automatically adapts to the predicted task and uses task specific weights for class estimates. Besides, for the first time, we show the promise of meta-learning for large-scale incremental object recognition on five popular datasets.
|
| 41 |
+
|
| 42 |
+
# 3. Proposed Method
|
| 43 |
+
|
| 44 |
+
Our proposed $iTAML$ is a class IL approach that is model & task-agnostic (i.e. independent of the network architecture and does not require task information). During training, we find a shared set of parameters that can work well for new tasks with minor local changes. $iTAML$ therefore learns generic meaningful representations that are transferable across tasks. In other words, meta-learning process forces the model to understand the inherent relationship between sequential tasks. At inference, given a data continuum with all samples belonging to the same task, our approach follows a two stage prediction mechanism. First, we predict the task using our generic model, then, we quickly adapt to the predicted task and find the class labels.
|
| 45 |
+
|
| 46 |
+
# 3.1. Incremental Task Agnostic Meta-learning
|
| 47 |
+
|
| 48 |
+
We progressively learn a total of $T$ tasks, with $U$ number of classes per task. Consider a classification model divided into two sub-nets, a feature mapping network $f_{\theta}$ and a classifier $f_{\phi}$ . The function of both networks is given by,
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
f _ {\theta}: \boldsymbol {x} \in \mathbb {R} ^ {C \times H \times W} \mapsto \boldsymbol {v} \in \mathbb {R} ^ {1 \times D}
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
f _ {\phi}: \pmb {v} \in \mathbb {R} ^ {1 \times D} \mapsto \pmb {p} \in \mathbb {R} ^ {1 \times (U T)},
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
where, $f_{\theta}$ maps an input image $\pmb{x}$ to a feature vector $\pmb{v}$ , and $f_{\phi}$ maps $\pmb{v}$ to output predictions $\pmb{p}$ . We start with a set of randomly initialized parameters $\Phi = \{\theta, \phi\}$ , where $\phi = [\phi_1^\top, \dots, \phi_T^\top]^\top$ and $\phi_i \in \mathbb{R}^{U \times D}$ are the task-specific classification weights. Training the first task is straightforward, however, when we get a new task $t \in [1, T]$ , the old parameters $\Phi^{t-1}$ should generalize to all $t$ tasks.
|
| 59 |
+
|
| 60 |
+
Our proposed meta-learning approach (Algorithm 1) involves two updates, an 'inner loop' which generates task-specific models for each task, and an 'outer loop' which combines task-specific models into a final generic model.
|
| 61 |
+
|
| 62 |
+
Inner loop: To train the inner loop, we randomly sample a mini-batch with $K$ triplets $\mathcal{B}_m = \{(x_k,y_k,\ell_k)\}_{k = 1}^K$ from the union set of current task training data $\mathcal{D}(t)$ and the exemplar memory $\mathcal{M}(t - 1)$ containing a small number of samples for old tasks. Here, $x_{k},y_{k}$ and $\ell_{k}$ are the training images, class labels and task labels, respectively. This randomly sampled mini-batch contains training samples from multiple tasks. To train the task-specific model, we first group the training samples according to the tasks to form a micro-batch $\mathcal{B}_{\mu}^{i} = \{(x_{j},y_{j},\ell_{j})'\}_{j = 1}^{J}$ per each task $i\in [1,t]$ , where all $\ell_j$ in a micro-batch are identical. Inner loop parameters $\Phi_i = \{\theta ,\phi_i\}$ are updated such that Binary Cross-entropy (BCE) loss is minimized on each micro-batch. Here, $\theta$ is updated in the inner loop for all tasks, but $\phi_{i}$ is only updated for $i^{th}$ task. Also for each task, $\phi_{i}$ are updated for $r$ iterations using the same micro-batch. This helps in obtaining task-specific models closer to their original task-manifold, thereby providing a better estimate for gradient update in the outer-loop to obtain a generic model.
|
| 63 |
+
|
| 64 |
+

|
| 65 |
+
Figure 2: iTAML Meta-update: Mini-batches are randomly sampled from a union set of new task training data and exemplar memory. Then, we group the samples according to the task, and create micro-batches which are used to generate task-specific models. Finally, in the outer loop all the task-specific models are combined.
|
| 66 |
+
|
| 67 |
+
Outer loop: In the outer loop of $iTAML$ , we combine the task specific models generated during the inner loop to form a more generic model. Let, $\Phi_{base}$ is the model parameter set before inner loop updates. Then, we treat the combined effect of all $(\Phi_{base} - \Phi_i)$ as the gradient update for the outer loop [19]. Simply put, we move the meta-model from $\Phi_{base}$ towards the average direction of all task-specific updates from $\Phi_{base}$ in the inner loop using a dynamic controller $\eta$ ,
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\Phi = \Phi_ {b a s e} - \eta \frac {1}{t} \sum_ {i = 1} ^ {t} (\Phi_ {b a s e} - \Phi_ {i}) = \eta \frac {1}{t} \sum_ {i = 1} ^ {t} \Phi_ {i} + (1 - \eta) \Phi_ {b a s e}.
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
As the training progresses, the model must learn new tasks while simultaneously preserving previous information. In an ideal case, the model should adapt quickly at the early stage of the learning, while during the later tasks, it must avoid any drastic changes since a generic set of features is already learned. To impose this, we use a simple momentum-based dynamic controller $\eta$ , which speeds
|
| 74 |
+
|
| 75 |
+
Algorithm 1 Meta-training in iTAML
|
| 76 |
+
1: Require: $\Phi^{t-1}$ , $\mathcal{D}(t)$ , $\mathcal{M}(t-1)$ , $t$ , $T$ and $U$
|
| 77 |
+
2: $\Phi \gets \Phi^{t-1}$
|
| 78 |
+
3: for e iterations do
|
| 79 |
+
4: $\Phi_{base} \gets \Phi$
|
| 80 |
+
5: $\mathcal{B}_m \sim \{\mathcal{D}(t) \cup \mathcal{M}(t-1)\}$
|
| 81 |
+
6: for $i \in [1, t]$ do
|
| 82 |
+
7: $\Phi_i \gets \{\theta, \phi_i\}$
|
| 83 |
+
8: $\mathcal{B}_\mu^i \gets \text{filter}(\mathcal{B}_m, i)$
|
| 84 |
+
9: for r steps do
|
| 85 |
+
10: $\{\hat{y}_j\}_{j=1}^J \gets \Phi_i(\{\pmb{x}_j\}_{j=1}^J)$
|
| 86 |
+
11: loss $\leftarrow \sum_j \text{BCE}(y_j, \hat{y}_j)$
|
| 87 |
+
12: $\Phi_i \gets \text{Optimizer}(\Phi_i, loss)$
|
| 88 |
+
13: $\eta \gets \exp(-\beta \cdot \frac{i}{t})$
|
| 89 |
+
14: $\Phi \gets \eta \cdot \frac{1}{t} \Sigma_i \Phi_i + (1 - \eta) \cdot \Phi_{base}$
|
| 90 |
+
15: return $\Phi^t \gets \Phi$
|
| 91 |
+
|
| 92 |
+
up the learning at the beginning and slows it down towards the end. This momentum-based controller is given by $\eta = \exp(-\beta \frac{t}{T})$ , where $\beta$ is the decay rate set using a validation set. As an example, in the last task, model parameters move $e^{-\beta}$ times slower than the first task in the outer loop. Controller is similar to having an adaptive learning rate or an adaptive optimizer [19], however, our controller depends on the number of tasks seen previously. This allows us to keep the right balance between plasticity and stability.
|
| 93 |
+
|
| 94 |
+
# 3.2. iTAML vs. Other Meta Algorithms
|
| 95 |
+
|
| 96 |
+
iTAML is close to Reptile [19] meta-learning algorithm. However, iTAML fundamentally differs from Reptile [19] in two aspects. First, our meta-update rule is different from Reptile, and incorporates a balancing factor that stabilizes the contribution from old and new tasks. Further, Reptile requires multiple inner loop updates $(r > 1)$ , whereas iTAML works well for $r \geq 1$ . We elaborate these properties below.
|
| 97 |
+
|
| 98 |
+
Lemma 1. Given a set of feature space parameters $\theta$ and task classification parameters $\phi = \{\phi_1, \phi_2, \ldots, \phi_T\}$ , after $r$ inner loop updates, iTAML's meta-update gradient for task $i$ is given by, $g_{itaml}(i) = g_{i,0} + \dots + g_{i,r-1}$ , where, $g_{i,j}$ is the $j^{th}$ gradient update with respect to $\{\theta, \phi_i\}$ on a single micro-batch. (see proof in the supplementary material)
|
| 99 |
+
|
| 100 |
+
Compared to Reptile algorithm, which favors multiple batches to update inner loop, iTAML requires only one batch through all updates in the inner loop. As mentioned in [19], $g_{\text{reptile}} = g_{i,0}^{(0)} + g_{i,1}^{(1)} + \dots + g_{i,r-1}^{(r-1)}$ . Here, $g_{i,m}^{(m)}$ is the gradient calculated on $m^{th}$ disjoint micro-batch. This differs from our meta-update rule which relies on one micro-batch per task in the inner loop as compared to $r$ disjoint micro-batches per task in Reptile. We empirically found that a Reptile style meta-update is not useful for IL while our proposed update rule helps in finding task-specific weights useful for an optimal outer-loop update. This because, in an exemplar based IL setting, the memory limit per task decreases with new tasks. Hence, in a random sample of a mini-batch, old classes are under-represented compared to the new task. To do multiple micro-batch updates per task as in Reptile, we need to break a micro-batch further, which results in more noisy gradient updates. Therefore, iTAML efficiently uses a single micro-batch per task.
|
| 101 |
+
|
| 102 |
+
Lemma 2. Given a set of feature space parameters $\theta$ and task classification parameters $\phi = \{\phi_1, \phi_2, \ldots, \phi_T\}$ , iTAML allows to keep the number of inner loop updates $r \geq 1$ . (see proof in the supplementary material)
|
| 103 |
+
|
| 104 |
+
The above property shows that a single inner-loop update does not result in normal joint training for iTAML. Thus, unlike Reptile, we can quickly meta-update with $r = 1$ .
|
| 105 |
+
|
| 106 |
+
Since iTAML is task agnostic, even after outer loop update, it can predict tasks without requiring any external in
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 3: An illustration of how iTAML gradient updates move the model parameters. Let $\mathcal{W}_i^*$ , $\mathcal{W}_j^*$ be the optimal set of parameters for tasks $i$ and $j$ . iTAML moves the feature space parameters $\theta$ towards the closet point between two optimal solution manifolds (solid line), while the classification parameters $\phi_i, \phi_j$ move only if $\theta$ moves towards its corresponding manifold (dashed lines). Therefore, the task specific classification parameters stay close to their optimal solution manifolds, which allows the model to predict tasks even without any gradient updates after meta-training.
|
| 110 |
+
|
| 111 |
+
puts. This is in contrast to existing meta-learning algorithms which can not be employed in supervised classification tasks, without requiring at least some fine-tuning. For example, in few-shot learning, meta-model parameters can classify a new task only after they are updated for the given support set. Therefore, for a generalized meta-model, such as Reptile [19] and FOMAML [18], without any task information or support set, the meta-model parameters are less useful. This is because all the model parameters are updated in the inner loop for these methods. In comparison, for the case of joint training, model parameters are optimized using the current data available (i.e., exemplars and new task data) in a normal fashion. In terms of meta-learning, this is equivalent to a single gradient update using all task samples in a mini-batch. In contrast, for our proposed iTAML, the classification parameters $\phi = \{\phi_0,\phi_1,\dots \phi_T\}$ are updated individually in the inner loop per task, and they remain task-specific even after the meta-update. This can be further explained from an optimal solution manifolds perspective (Fig. 3). Reptile and FOMAML move all the parameters towards a point on $\mathcal{W}^*$ which is close to all the task-specific optimal solution manifolds. In contrast, iTAML only moves the feature space parameters $\theta$ towards $\mathcal{W}^*$ and keeps the classification parameters $\phi_t$ close to their corresponding optimal solution manifolds. Further, the fixed-sized exemplar memory results in an imbalanced data distribution. Due to this, Reptile, FOMAML and Joint training methods become more biased towards the later tasks. Since, iTAML updates the classification parameters separately, it inherently overcomes the bias due to imbalance in tasks.
|
| 112 |
+
|
| 113 |
+
The above properties empower iTAML to accurately predict class labels (close to joint training) without requiring any gradient updates at inference. Further, with a given
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
Figure 4: Task and Class prediction: Given the data continuum $\mathcal{C}(p)$ , for all samples the maximum responses per task are accumulated into a task score to get task prediction $t_{pred}$ . For the class prediction, exemplars of task $t_{pred}$ from memory $\mathcal{M}$ are used to update the generic model $\Phi^t$ to task-specific model $\Phi_{new}$ . The data continuum is then fed through the $\Phi_{new}$ to get the sub-class predictions.
|
| 117 |
+
|
| 118 |
+
data continuum, $iTAML$ can predict tasks with up to $100\%$ accuracy. This allows us to design a two-stage classifier, where we first predict the task of the data continuum without any additional external knowledge, and once the task is found, we apply a gradient update to convert the generalized weights to task-specific weights, using a small exemplar set.
|
| 119 |
+
|
| 120 |
+
# 3.3. iTAML Inference
|
| 121 |
+
|
| 122 |
+
At inference time, we receive data as a continuum $\mathcal{C}(p) = \{\pmb{x}_j : \ell_j = m\}_{j=1}^p$ for an unknown task $m$ with $p$ samples. A data continuum is simply a group of samples of an identical task bundled together. Given $\mathcal{C}(p)$ , inference happens in two stages. First, the task is predicted using generalized model parameters, and then these generalized parameters are updated to the task-specific parameters to predict classes belonging to the respective task. Fig. 4 outlines the flow of task and class prediction.
|
| 123 |
+
|
| 124 |
+
Task Prediction: Consider the model $\Phi^t$ trained for $t$ tasks, with $U$ classes in each task. Task prediction is straightforward. First, for each sample in the continuum, we get the final classification layer response. Then, for each response vector, a maximum response per task is recorded. An average of the maximum responses per task is used as the task score. A task with a maximum score is finally predicted $(t_{pred})$ . Algorithm 2 outlines the task prediction steps.
|
| 125 |
+
|
| 126 |
+
Algorithm 2 Task Prediction
|
| 127 |
+
|
| 128 |
+
<table><tr><td>1:</td><td>Require: Φt, C(p) = {xj}p j=1 and U, T</td></tr><tr><td>2:</td><td>S ← [0,0,0,...,0] ▷ initialize scores</td></tr><tr><td>3:</td><td>for j = [1,2,...,p] do</td></tr><tr><td>4:</td><td>ŷj ← Φt(xj)</td></tr><tr><td>5:</td><td>for i = [1,2,...,t] do</td></tr><tr><td>6:</td><td>S[i] ← S[i] + max(ŷj[i·U : (i+1)·U])</td></tr><tr><td>7:</td><td>return tpred ← argmax(S)</td></tr></table>
|
| 129 |
+
|
| 130 |
+
Class Prediction: Class prediction involves updating the generalized parameters $\Phi^t$ using exemplars. To correctly predict the classes in a task, we move the generalized parameters towards task-specific parameters $\Phi_{new}$ . To do so, we select samples from exemplar memory corresponding to classes of the predicted task $t_{pred}$ . We use these labelled samples to do a single gradient update on the generalized parameters, which results in a task-specific parameters set. The data continuum is then fed through these parameters to find the sub-classes of the predicted task. The final class is then derived as $(U \cdot t_{pred}) + \text{subclass}$ . Without losing generality, this can be extended to the case of uneven classes in different tasks. Algorithm 3 summarizes the main steps of the class prediction on data continuum.
|
| 131 |
+
|
| 132 |
+
Algorithm 3 Class Prediction
|
| 133 |
+
1: Require: $\Phi^t, \mathcal{C}(p), t_{pred}$ and memory $\mathcal{M}(t)$
|
| 134 |
+
2: $\widehat{\mathcal{M}}_{t_{pred}} \gets \text{filter}(\mathcal{M}(t), t_{pred})$
|
| 135 |
+
3: $\Phi_{new} \gets \{\theta, \phi_{t_{pred}}\}$
|
| 136 |
+
4: for $b$ iterations do
|
| 137 |
+
5: $\mathcal{B}_m' \sim \widehat{\mathcal{M}}_{t_{pred}} \triangleright$ mini-batch with $Q$ samples
|
| 138 |
+
6: $\{\hat{y}_q\}_{j=1}^Q \gets \Phi_{new}(\mathcal{B}_m')$
|
| 139 |
+
7: loss $\leftarrow \sum_j \text{BCE}(y_j, \hat{y}_j)$
|
| 140 |
+
8: $\Phi_{new} \gets \text{Optimizer}(\Phi_{new}, \text{loss})$
|
| 141 |
+
9: for $j \in [1,p]$ do
|
| 142 |
+
10: $\hat{y}_j \gets \Phi_{new}(\boldsymbol{x}_j)$
|
| 143 |
+
11: subclass $\leftarrow \text{argmax}(\hat{y}_j[U \cdot t_{pred}: U(t_{pred} + 1)])$
|
| 144 |
+
12: $C_{pred}^j \gets t_{pred} \cdot U + \text{subclass}$
|
| 145 |
+
13: return $C_{pred} = \{C_{pred}^j\}_{j=1}^p$
|
| 146 |
+
|
| 147 |
+
# 3.4. Limits on the Data Continuum Size
|
| 148 |
+
|
| 149 |
+
At inference, the model is fed with a data continuum, which is used to identify the task. The model then adapts itself for the predicted task. The number of samples in the continuum plays a key role in task prediction. A higher number of samples attenuates the noisy predictions and results in a higher task accuracy. However, in practical settings, continuum sizes are limited. Therefore, it is necessary to know a lower bound on the continuum size to keep the task prediction accuracy at a certain (desired) level.
|
| 150 |
+
|
| 151 |
+
Let the model's minimum prediction accuracy be $P_0$ after learning $t$ tasks, each with $U$ classes. $P_0$ can be interpreted as, $P_0 = \mathcal{P}(\mathcal{Z} = i|y_{true} = i)$ , where event $\mathcal{Z} = i$ denotes the case when the maximum response occurs at class $i$ , and $y_{true}$ is the true label. If $\bar{\mathcal{Z}} = i$ denotes the event when the maximum response occurs anywhere but at class $i$ , then $\mathcal{P}(\bar{\mathcal{Z}} = i|y_{true} = i) = 1 - P_0$ . Since iTAML promotes a model to be unbiased, we assume that incorrect predictions are uniformly distributed. Thus, the probability that the maximum response happens at the correct task is,
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
\mathcal {P} (\mathcal {Z} = S _ {\ell} | y _ {t r u e} = i) = P _ {0} + \frac {1 - P _ {0}}{U \cdot t - 1} \cdot (U - 1).
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
Here, $S_{\ell}$ is the set containing the classes corresponding to the $\ell^{th}$ task (including class $i$ ), where $\ell = \text{floor}\left(\frac{i}{U}\right)$ . Hence, $\mathcal{P}(\mathcal{Z} = S_{\ell}|y_{true} = i)$ is the probability that the maximum response falls at any class of the corresponding task. Let $\hat{P}_0 = \mathcal{P}(\mathcal{Z} = S_{\ell}|y_{true} = i)$ be the probability of correctly predicting the task. Now, if we have $n$ samples in a continuum then the probability of overall task prediction follows a binomial distribution. In $n$ samples correspond to any one of the $t$ tasks, the random prediction would be $\text{round}\left(\frac{n}{t}\right)$ samples belonging to any single task. Therefore, we require at least $\text{round}\left(\frac{n}{t}\right) + 1$ correctly predicted samples to find the task of a given continuum,
|
| 158 |
+
|
| 159 |
+
$$
|
| 160 |
+
\mathcal {P} (\text {c o r r e c t t a s k}) = \sum_ {k = \operatorname {r o u n d} \left(\frac {n}{t}\right) + 1} ^ {n} \binom {n} {k} (\hat {P _ {0}}) ^ {k} (1 - \hat {P _ {0}}) ^ {n - k}
|
| 161 |
+
$$
|
| 162 |
+
|
| 163 |
+
Our goal is to find a minimum value of $n$ such that, $\mathcal{P}(\text{correct task}) > \gamma$ , where, $\gamma$ is the required task accuracy level. Algorithm 4 explains the main steps of finding minimum value of $n$ . Note that Algorithm 4 can easily be solved using any simple brute-force method.
|
| 164 |
+
|
| 165 |
+
Algorithm 4 Find Lower bound on Data Continuum Size
|
| 166 |
+
1: Require: Minimum class prediction accuracy $P_0$ , required task accuracy $\gamma$ , $U$ and $t$
|
| 167 |
+
2: $N \gets t \cdot U \quad \triangleright$ number of classes seen
|
| 168 |
+
3: $\hat{P}_0 \gets \frac{U - 1}{N - 1} \cdot (1 - P_0)$
|
| 169 |
+
4: $\min(n)$ subject to,
|
| 170 |
+
5: $\sum_{k = \text{round}(\frac{n}{t}) + 1}^{n} \binom{n}{k} (\hat{P}_0)^k (1 - \hat{P}_0)^{n-k} > \gamma$
|
| 171 |
+
6: return $n$
|
| 172 |
+
|
| 173 |
+
# 4. Experiments and Results
|
| 174 |
+
|
| 175 |
+
# 4.1. Implementation Details
|
| 176 |
+
|
| 177 |
+
Datasets: We evaluate our method on a wide spectrum of incremental learning benchmarks. These include small scale datasets i.e., split MNIST [31] and split SVHN, where each task is assigned with two classes. For medium scale datasets, we use CIFAR100 and ImageNet-100, each divided into 10 tasks (with 10 classes per task). For large scale datasets, ImageNet-1K and MS-Celeb-10K with 1000 and 10000 classes respectively are used. MS-Celeb-10K is a subset of MS-Celeb-1M dataset [8]. We consider 10 tasks, each having 100 and 1000 classes per task respectively for ImageNet-1K and Celeb-10K. To be consistent with [9], we keep a randomly sampled exemplar memory of 2000 samples for MNIST, SVHN, CIFAR100 and ImageNet-100, 20K for ImageNet-1K [23] and 50K for Celeb-10K [30].
|
| 178 |
+
|
| 179 |
+
Network Architectures: For Split-MNIST, a simple two layer MLP (400 neurons each) similar to [9] is used. For
|
| 180 |
+
|
| 181 |
+
SVHN and CIFAR100, a reduced version of ResNet-18 (ResNet-18(1/3)) is used, with the number of filters in all layers reduced by three times [17], resulting in 1.25 million parameters. For ImageNet-100 and ImageNet-1K, we use standard ResNet-18. For training, we use RAdam [16] with initial learning rate of 0.01 for 70 epochs. Learning rate is multiplied by $\frac{1}{5}$ after 20, 40 and 60 epochs. All the models are trained on a single Tesla-V100 GPU.
|
| 182 |
+
|
| 183 |
+
# 4.2. Results and Comparisons
|
| 184 |
+
|
| 185 |
+
Comparison with meta-learning Algorithms: Fig. 5 compares different first-order meta-learning algorithms i.e., FOMAML and Reptile with our iTAML and joint training on task-agnostic, task-aware, and no inference-update settings on CIFAR100 for 10 tasks. In the task-agnostic setting, only the data continuum is present at inference, whereas for the task-aware setting, both data continuum and the task label are available. For the task-agnostic settings, the classification accuracy of Reptile and FOMAML drops drastically with more tasks since they are unable to precisely predict the tasks. Apart from that, joint training performance also drops after the first few tasks, mainly caused by highly imbalanced data distribution. However, iTAML is able to consistently predict the tasks with above $95\%$ accuracy, while keeping an average classification accuracy of $77.79\%$ even after 10 tasks. iTAML inherently trains task-agnostic models, thus even after the meta-updates, it can predict the tasks independently. However, other first-order meta-learning algorithms require additional information (e.g. feedback from the task or the task label). Compared with task-agnostic settings, the performance of FOMAML and Reptile improves when the task label is known (task-aware settings). Nevertheless, for the task-aware settings, iTAML still shows $6.9\%$ improvement over Reptile, since it effectively tackles stability-plasticity dilemma and imbalance problem. Fig. 5 also compares different algorithms without performing any task-specific meta-updates. iTAML performs similar to the joint training under these settings.
|
| 186 |
+
|
| 187 |
+
Comparison with existing methods: We extensively compare iTAML with several popular incremental learning methods, including Elastic Weight Consolidation [13], Riemannian Walk (RWalk) [3], Learning without Forgetting (LwF) [15], Synaptic Intelligence (SI) [31], Memory Aware Synapses (MAS) [1], Deep Model Consolidation (DMC) [32], Incremental Classifier and Representation Learning (iCARL) [23], Random Path Selection network (RPS-net) [22] and Bias Correction Method (BiC) [30]. We also compare against Fixed representations (FixedRep) and Fine tuning (FineTune). iTAML achieves state-of-the-art incremental learning performance on the wide range of datasets. For MNIST and SVHN, results in Table 1 show that iTAML achieves classification accuracy of $97.95\%$ and
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
(a) Task Agnostic
|
| 191 |
+
|
| 192 |
+

|
| 193 |
+
(b) Task Aware
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
(c) No Meta Updates
|
| 197 |
+
Figure 5: Comparison between different meta-learning algorithms: a) task-agnostic, b) task-aware, and c) with no inference updates. iTAML performs the best not only in task-agnostic case, but also on task-aware and no meta-update cases.
|
| 198 |
+
|
| 199 |
+
<table><tr><td>Methods</td><td>MNIST(A5)</td><td>SVHN(A5)</td></tr><tr><td>EWC [13]</td><td>19.80%</td><td>18.21%</td></tr><tr><td>Online-EWC [26]</td><td>19.77%</td><td>18.50%</td></tr><tr><td>SI [31]</td><td>19.67%</td><td>17.33%</td></tr><tr><td>MAS [1]</td><td>19.52%</td><td>17.32%</td></tr><tr><td>LwF [15]</td><td>24.17%</td><td>-</td></tr><tr><td>GEM* [17]</td><td>92.20%</td><td>75.61%</td></tr><tr><td>DGR* [27]</td><td>91.24%</td><td>-</td></tr><tr><td>RtF* [29]</td><td>92.56%</td><td>-</td></tr><tr><td>RPS-net* [22]</td><td>96.16%</td><td>88.91%</td></tr><tr><td>Ours*</td><td>97.95%</td><td>93.97%</td></tr></table>
|
| 200 |
+
|
| 201 |
+
Table 1: Comparison on MNIST and SVHN datasets. \* denotes memory based methods. iTAML outperforms stateof-the-art and performs quite close to oracle case.
|
| 202 |
+
|
| 203 |
+
$93.97\%$ respectively. This is an absolute improvement of $1.79\%$ , $5.06\%$ over the second best method.
|
| 204 |
+
|
| 205 |
+
Fig. 6 compares different methods on CIFAR100, for incrementally adding tasks with 10,5 and 20 classes at once, by keeping $p = 20$ . iTAML consistently achieves state-of-the-art results across all settings and outperforms the existing methods by a large margin. For incrementally learning 10 tasks, iTAML surpasses the current state-of-the-art RPS-net [22] by a margin of $21.3\%$ . Similarly, we achieve gains of 23.6 and $18.2\%$ on incrementally learning 5 and 20 classes respectively. Results on large scale datasets are shown in Table 2. For ImageNet-100, ImageNet-1K and MS-Celeb-10K datasets, we keep data continuum size as 50,100 and 20 respectively. We achieve $89.8\%$ on ImageNet-100 and surpass the current best method by a margin of $15.7\%$ . Similarly, on ImageNet-1K, iTAML achieves $63.2\%$ with an absolute gain of $19.1\%$ . On MS-Celeb-10K dataset with 10,000 classes, the proposed iTAML achieves $95.02\%$ accuracy and retains its performance with addition of new classes. These experiments strongly demonstrate the suitability and effectiveness of iTAML for large scale incremental learning tasks.
|
| 206 |
+
|
| 207 |
+
# 4.3. Ablation Analysis
|
| 208 |
+
|
| 209 |
+
We perform extensive ablation studies for different aspects of $iTAML$ using CIFAR100 with 10 tasks.
|
| 210 |
+
|
| 211 |
+
Data Continuum Size $(p)$ : At inference, given a data continuum, iTAML predicts the task, and individual sample class labels. Here, we study the impact of number of samples in the continuum on task prediction accuracy. Fig. 7(a) shows that performance improves with $p$ . This is because, with a higher number of samples, the noise in the average response is attenuated, thereby improving task accuracy. However, the gain in the task prediction accuracy increases logarithmically. Thus, sufficient value for $p$ ranges from 20 for CIFAR100 to as low as 3 for MS-Celeb-10K.
|
| 212 |
+
|
| 213 |
+
Variations in $r$ : For higher number of inner gradient updates $r$ , the model in the inner loop goes close to the task-specific optimal solution manifold, and the meta-model becomes more "diverse". We can see this pattern in Fig. 7(b). With $r = 5$ , iTAML achieves $81.57\%$ while with $r = 1$ , it achieves $77.79\%$ . However, for a model which has seen $T$ tasks, the number of gradient updates in a batch will be $\mathcal{O}(T \cdot r)$ . This slows down the training with new incoming tasks. Therefore, we keep $r = 1$ , as a good trade-off between performance and computational complexity.
|
| 214 |
+
|
| 215 |
+
Variations in $\beta$ : The parameter $\beta$ controls the speed of learning new information i.e., for higher $\beta$ the model does not learn any new information, and with smaller $\beta$ it only learns the new information and forgets the old one. Fig. 7(c) shows that the performance improves as we vary $\beta = 0$ to $\beta = 2$ , since this enhances model's ability to remember old knowledge. However, for larger $\beta$ , the performance drops as model's stability increases and it is unable to learn new knowledge. We keep $\beta = 1$ in our experiments.
|
| 216 |
+
|
| 217 |
+
Lower bound on Data Continuum: We set $\gamma = 95\%$ and find the required value for $n$ in Algorithm 4. This value is used as the data continuum size during inference for task prediction. As shown in Fig. 7(d), all the datasets achieve task accuracy around $95\%$ , varying from $n = 17$ for CIFAR100 to $n = 3$ for MS-Celeb.
|
| 218 |
+
|
| 219 |
+
Figure 6: Classification accuracy on CIFAR100, with 10, 20 and 5 tasks from left to right. iTAML consistently outperforms the existing state-of-the-art across all settings.
|
| 220 |
+

|
| 221 |
+
DMC LwF RWalk SI MAS EWC Finetuning FixedRep iCaRL RPS Ours
|
| 222 |
+
|
| 223 |
+

|
| 224 |
+
|
| 225 |
+

|
| 226 |
+
|
| 227 |
+
<table><tr><td>Datasets</td><td>Methods</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>Final</td></tr><tr><td rowspan="6">ImageNet-100/10</td><td>Finetuning</td><td>99.3</td><td>49.4</td><td>32.6</td><td>24.7</td><td>20.0</td><td>16.7</td><td>13.9</td><td>12.3</td><td>11.1</td><td>9.9</td></tr><tr><td>FixedRep</td><td>99.3</td><td>88.1</td><td>73.7</td><td>62.6</td><td>55.7</td><td>50.2</td><td>42.9</td><td>41.3</td><td>39.2</td><td>35.3</td></tr><tr><td>LwF(TPAMI'18)[15]</td><td>99.3</td><td>95.2</td><td>85.9</td><td>73.9</td><td>63.7</td><td>54.8</td><td>50.1</td><td>44.5</td><td>40.7</td><td>36.7</td></tr><tr><td>iCaRL(CVPR'17)[23]</td><td>99.3</td><td>97.2</td><td>93.5</td><td>91.0</td><td>87.5</td><td>82.1</td><td>77.1</td><td>72.8</td><td>67.1</td><td>63.5</td></tr><tr><td>RPSnet(NeurIPS'19)[22]</td><td>100.0</td><td>97.4</td><td>94.3</td><td>92.7</td><td>89.4</td><td>86.6</td><td>83.9</td><td>82.4</td><td>79.4</td><td>74.1</td></tr><tr><td>Ours</td><td>99.4</td><td>96.4</td><td>94.4</td><td>93.0</td><td>92.4</td><td>90.6</td><td>89.9</td><td>90.3</td><td>90.3</td><td>89.8+15.7</td></tr><tr><td rowspan="5">ImageNet-1K/10</td><td>Finetuning</td><td>90.2</td><td>43.1</td><td>27.9</td><td>18.9</td><td>15.6</td><td>14.0</td><td>11.7</td><td>10.0</td><td>8.9</td><td>8.2</td></tr><tr><td>FixedRep</td><td>90.1</td><td>76.1</td><td>66.9</td><td>58.8</td><td>52.9</td><td>48.9</td><td>46.1</td><td>43.1</td><td>41.2</td><td>38.5</td></tr><tr><td>LwF(TPAMI'18)[15]</td><td>90.2</td><td>77.6</td><td>63.6</td><td>51.6</td><td>42.8</td><td>35.5</td><td>31.5</td><td>28.4</td><td>26.1</td><td>24.2</td></tr><tr><td>iCaRL(CVPR'17)[23]</td><td>90.1</td><td>82.8</td><td>76.1</td><td>69.8</td><td>63.3</td><td>57.2</td><td>53.5</td><td>49.8</td><td>46.7</td><td>44.1</td></tr><tr><td>Ours</td><td>91.5</td><td>89.0</td><td>85.7</td><td>84.0</td><td>80.1</td><td>76.7</td><td>70.2</td><td>71.0</td><td>67.9</td><td>63.2+19.1</td></tr><tr><td rowspan="4">MS-Celeb-10K/10</td><td>iCaRL(CVPR'17)[23]</td><td>94.2</td><td>93.7</td><td>90.8</td><td>86.5</td><td>80.8</td><td>77.2</td><td>74.9</td><td>71.1</td><td>68.5</td><td>65.5</td></tr><tr><td>RPSnet(NeurIPS'19)[22]</td><td>92.8</td><td>92.0</td><td>92.3</td><td>90.8</td><td>86.3</td><td>83.6</td><td>80.0</td><td>76.4</td><td>71.8</td><td>65.0</td></tr><tr><td>BiC(CVPR'19)[30]</td><td>95.7</td><td>96.5</td><td>96.5</td><td>95.7</td><td>95.1</td><td>94.2</td><td>93.2</td><td>91.7</td><td>90.0</td><td>87.6</td></tr><tr><td>Ours</td><td>94.0</td><td>95.6</td><td>96.0</td><td>95.8</td><td>95.5</td><td>95.4</td><td>95.2</td><td>95.1</td><td>95.0</td><td>95.0+7.4</td></tr></table>
|
| 228 |
+
|
| 229 |
+
Table 2: Large-scale experiments on ImageNet-1K and and MS-Celeb-10K show that iTAML outperforms all the state-of-the-art methods by a significant margin. Note that reported task $t$ accuracy is an average of all 1, 2, ..., $t$ tasks.
|
| 230 |
+
|
| 231 |
+

|
| 232 |
+
Figure 7: Ablation studies: We study impact of different settings on iTAML's performance: a) Size of the data continuum at inference time vs task and class accuracies, b) Number of inner loop updates $r$ , c) Variation in hyper parameters $\beta$ , and d) Task and class accuracy of the model on various datasets with a data continuum size taken from Algorithm 4 with $\gamma = 95\%$ .
|
| 233 |
+
|
| 234 |
+

|
| 235 |
+
|
| 236 |
+

|
| 237 |
+
|
| 238 |
+

|
| 239 |
+
|
| 240 |
+
# 5. Conclusion
|
| 241 |
+
|
| 242 |
+
Incremental learning aims to learn a single model that can continuously adapt itself as the new information becomes available, without overriding existing knowledge. To this end, this work proposes to update the model such that a common set of parameters is optimized on all so-far-seen tasks, without being specific to a single learning task. We develop a meta-learning approach to train a generic model
|
| 243 |
+
|
| 244 |
+
that can be fast updated for a specific task. In our design, we ensure a balanced update strategy that keeps an equilibrium between old and new task information. Our approach is task-agnostic, and can automatically detect the task at hand, consequently updating itself to perform well on the given inputs. Our experiments demonstrate consistent improvements across a range of classification datasets including ImageNet, CIFAR100, MNIST, SVHN and MS-Celeb.
|
| 245 |
+
|
| 246 |
+
# References
|
| 247 |
+
|
| 248 |
+
[1] Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars. Memory aware synapses: Learning what (not) to forget. In Proceedings of the European Conference on Computer Vision, 2018. 2, 6, 7
|
| 249 |
+
[2] Francisco M. Castro, Manuel J. Marin-Jimenez, Nicolas Guil, Cordelia Schmid, and Karteek Alahari. End-to-end incremental learning. In Proceedings of the European Conference on Computer Vision, 2018. 2
|
| 250 |
+
[3] Arslan Chaudhry, Puneet K Dokania, Thalaiyasingam Ajthan, and Philip HS Torr. Riemannian walk for incremental learning: Understanding forgetting and intransigence. In Proceedings of the European Conference on Computer Vision, 2018. 2, 6
|
| 251 |
+
[4] Arslan Chaudhry, Marc'Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny. Efficient lifelong learning with a-gem. In Proceedings of the International Conference on Learning Representations, 2019. 2
|
| 252 |
+
[5] Prithviraj Dhar, Rajat Vikram Singh, Kuan-Chuan Peng, Ziyan Wu, and Rama Chellappa. Learning without memorizing. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2
|
| 253 |
+
[6] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of the International Conference on Machine Learning, 2017. 1
|
| 254 |
+
[7] Alexander Gepperth and Cem Karaoguz. A bio-inspired incremental learning architecture for applied perceptual problems. Cognitive Computation, 2016. 2
|
| 255 |
+
[8] Yandong Guo and Lei Zhang. One-shot face recognition by promoting underrepresented classes. arXiv preprint arXiv:1707.05574, 2017. 6
|
| 256 |
+
[9] Yen-Chang Hsu, Yen-Cheng Liu, Anita Ramasamy, and Zsolt Kira. Re-evaluating continual learning scenarios: A categorization and case for strong baselines. NeurIPS Continual learning Workshop, 2018. 6
|
| 257 |
+
[10] Muhammad Abdullah Jamal and Guo-Jun Qi. Task agnostic meta-learning for few-shot learning. In The IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2
|
| 258 |
+
[11] Khurram Javed and Martha White. Meta-learning representations for continual learning. In Proceedings of the Advances in Neural Information Processing Systems, 2019. 2
|
| 259 |
+
[12] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. 12
|
| 260 |
+
[13] James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. In Proceedings of the national academy of sciences. National Acad Sciences, 2017. 2, 6, 7
|
| 261 |
+
[14] Sang-Woo Lee, Jin-Hwa Kim, Jaehyun Jun, Jung-Woo Ha, and Byoung-Tak Zhang. Overcoming catastrophic forgetting by incremental moment matching. In Proceedings of the Advances in neural information processing systems, 2017. 2
|
| 262 |
+
|
| 263 |
+
[15] Zhizhong Li and Derek Hoiem. Learning without forgettin. IEEE transactions on pattern analysis and machine intelligence, 2018. 2, 6, 7, 8
|
| 264 |
+
[16] Liyuan Liu, Haoming Jiang, Pengcheng He, Weizhu Chen, Xiaodong Liu, Jianfeng Gao, and Jiawei Han. On the variance of the adaptive learning rate and beyond. arXiv preprint arXiv:1908.03265, 2019. 6, 12
|
| 265 |
+
[17] David Lopez-Paz et al. Gradient episodic memory for continual learning. In Proceedings of the Advances in Neural Information Processing Systems, 2017. 2, 6, 7
|
| 266 |
+
[18] Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018. 2, 4
|
| 267 |
+
[19] Alex Nichol and John Schulman. Reptile: a scalable metalearning algorithm. arXiv preprint arXiv:1803.02999, 2018. 2, 3, 4, 11
|
| 268 |
+
[20] B Pftlb and A Gepperth. A comprehensive, application-oriented study of catastrophic forgetting in dnns. 2019. 1
|
| 269 |
+
[21] Jathushan Rajasegaran, Munawar Hayat, Salman Khan, Fahad Shahbaz Khan, Ling Shao, and Ming-Hsuan Yang. An adaptive random path selection approach for incremental learning, 2019. 2
|
| 270 |
+
[22] Jathushan Rajasegaran, Munawar Hayat, Salman H Khan, Fahad Shahbaz Khan, and Ling Shao. Random path selection for continual learning. In Proceedings of the Advances in Neural Information Processing Systems, 2019. 2, 6, 7, 8
|
| 271 |
+
[23] Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert. icarl: Incremental classifier and representation learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. 2, 6, 8
|
| 272 |
+
[24] Matthew Riemer, Ignacio Cases, Robert Ajemian, Miao Liu, Irina Rish, Yuhai Tu, , and Gerald Tesauro. Learning to learn without forgetting by maximizing transfer and minimizing interference. In Proceedings of the International Conference on Learning Representations, 2019. 2
|
| 273 |
+
[25] Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016. 2
|
| 274 |
+
[26] Jonathan Schwarz, Jelena Luketina, Wojciech M Czarnecki, Agnieszka Grabska-Barwinska, Yee Whye Teh, Razvan Pascanu, and Raia Hadsell. Progress & compress: A scalable framework for continual learning. arXiv preprint arXiv:1805.06370, 2018. 7
|
| 275 |
+
[27] Hanul Shin, Jung Kwon Lee, Jaehong Kim, and Jiwon Kim. Continual learning with deep generative replay. In Proceedings of the Advances in Neural Information Processing Systems, 2017. 2, 7
|
| 276 |
+
[28] Richard S Sutton. Integrated architectures for learning, planning, and reacting based on approximating dynamic programming. In Machine Learning Proceedings 1990. Elsevier, 1990. 2
|
| 277 |
+
[29] Gido M van de Ven and Andreas S Tolias. Generative replay with feedback connections as a general strategy for continual learning. arXiv preprint arXiv:1809.10635, 2018. 7
|
| 278 |
+
|
| 279 |
+
[30] Yue Wu, Yinpeng Chen, Lijuan Wang, Yuancheng Ye, Zicheng Liu, Yandong Guo, and Yun Fu. Large scale incremental learning. In The IEEE Conference on Computer Vision and Pattern Recognition, 2019. 2, 6, 8
|
| 280 |
+
[31] Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In Proceedings of the International Conference on Machine Learning, 2017. 2, 6, 7
|
| 281 |
+
[32] Junting Zhang, Jie Zhang, Shalini Ghosh, Dawei Li, Serafettin Tasci, Larry Heck, Heming Zhang, and C-C Jay Kuo. Class-incremental learning via deep model consolidation. In Proceedings of the IEEE Winter Conference on Applications of Computer Vision, 2020. 6
|
itamlanincrementaltaskagnosticmetalearningapproach/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4080879591e491c260c038c77e36b61ae6315ad3e163b6c5238ae03b0fd5f921
|
| 3 |
+
size 592200
|
itamlanincrementaltaskagnosticmetalearningapproach/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9927fd47d12df4c45ed0481eff53c42a74c5ed5fbe21490df3be17b09389556e
|
| 3 |
+
size 447774
|
nuscenesamultimodaldatasetforautonomousdriving/b9d1c4e4-0177-4824-9c11-607bb187188e_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c53e6a5f63444c996153bdfa9715f7f36167bf79f8e417b02dbb2a754c156e02
|
| 3 |
+
size 86296
|
nuscenesamultimodaldatasetforautonomousdriving/b9d1c4e4-0177-4824-9c11-607bb187188e_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3139b5dc4dddb7cae6e8afa545e397ad98b12c5e53a087d3b18b6de721c168f1
|
| 3 |
+
size 112660
|
nuscenesamultimodaldatasetforautonomousdriving/b9d1c4e4-0177-4824-9c11-607bb187188e_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb2cd538cde067a8805f4ccd524ddec5ef84030403b5b8705416dfa99f492a1c
|
| 3 |
+
size 1512451
|
nuscenesamultimodaldatasetforautonomousdriving/full.md
ADDED
|
@@ -0,0 +1,320 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# nuScenes: A multimodal dataset for autonomous driving
|
| 2 |
+
|
| 3 |
+
Holger Caesar, Varun Bankiti, Alex H. Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giancarlo Baldan, Oscar Beijbom nuTonomy: an APTIV company
|
| 4 |
+
|
| 5 |
+
nuscenes@nutonomy.com
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Robust detection and tracking of objects is crucial for the deployment of autonomous vehicle technology. Image based benchmark datasets have driven development in computer vision tasks such as object detection, tracking and segmentation of agents in the environment. Most autonomous vehicles, however, carry a combination of cameras and range sensors such as lidar and radar. As machine learning based methods for detection and tracking become more prevalent, there is a need to train and evaluate such methods on datasets containing range sensor data along with images. In this work we present nuTonomy scenes (nuScenes), the first dataset to carry the full autonomous vehicle sensor suite: 6 cameras, 5 radars and 1 lidar, all with full 360 degree field of view. nuScenes comprises 1000 scenes, each 20s long and fully annotated with 3D bounding boxes for 23 classes and 8 attributes. It has $7x$ as many annotations and $100x$ as many images as the pioneering KITTI dataset. We define novel 3D detection and tracking metrics. We also provide careful dataset analysis as well as baselines for lidar and image based detection and tracking. Data, development kit and more information are available online<sup>1</sup>.
|
| 10 |
+
|
| 11 |
+
# 1. Introduction
|
| 12 |
+
|
| 13 |
+
Autonomous driving has the potential to radically change the cityscape and save many human lives [78]. A crucial part of safe navigation is the detection and tracking of agents in the environment surrounding the vehicle. To achieve this, a modern self-driving vehicle deploys several sensors along with sophisticated detection and tracking algorithms. Such algorithms rely increasingly on machine learning, which drives the need for benchmark datasets. While there is a plethora of image datasets for this purpose (Table 1), there is a lack of multimodal datasets that exhibit the full set of challenges associated with building an autonomous driving perception system. We released the nuScenes dataset to address this gap<sup>2</sup>.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
"Ped with pet, bicycle, car makes a u-turn, lane change, peds crossing crosswalk"
|
| 19 |
+
|
| 20 |
+

|
| 21 |
+
Figure 1. An example from the nuScenes dataset. We see 6 different camera views, lidar and radar data, as well as the human annotated semantic map. At the bottom we show the human written scene description.
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
|
| 25 |
+
Multimodal datasets are of particular importance as no single type of sensor is sufficient and the sensor types are complementary. Cameras allow accurate measurements of edges, color and lighting enabling classification and localization on the image plane. However, 3D localization from images is challenging [13, 12, 57, 80, 69, 66, 73]. Lidar pointclouds, on the other hand, contain less semantic information but highly accurate localization in 3D [51]. Furthermore the reflectance of lidar is an important feature [40, 51]. However, lidar data is sparse and the range is typically limited to $50 - 150\mathrm{m}$ . Radar sensors achieve a range of $200 - 300\mathrm{m}$ and measure the object velocity through the Doppler effect. However, the returns are even sparser than lidar and less precise in terms of localization. While radar has been used for decades [1, 3], we are not aware of any autonomous driving datasets that provide radar data.
|
| 26 |
+
|
| 27 |
+
Since the three sensor types have different failure modes during difficult conditions, the joint treatment of sensor data is essential for agent detection and tracking. Literature [46] even suggests that multimodal sensor configurations are not just complementary, but provide redundancy in the face of sabotage, failure, adverse conditions
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 2. Front camera images collected from clear weather (col 1), nighttime (col 2), rain (col 3) and construction zones (col 4).
|
| 31 |
+
|
| 32 |
+
and blind spots. And while there are several works that have proposed fusion methods based on cameras and lidar [48, 14, 64, 52, 81, 75, 29], PointPillars [51] showed a lidar-only method that performed on par with existing fusion based methods. This suggests more work is required to combine multimodal measurements in a principled manner.
|
| 33 |
+
|
| 34 |
+
In order to train deep learning methods, quality data annotations are required. Most datasets provide 2D semantic annotations as boxes or masks (class or instance) [8, 19, 33, 85, 55]. At the time of the initial nuScenes release, only a few datasets annotated objects using 3D boxes [32, 41, 61], and they did not provide the full sensor suite. Following the nuScenes release, there are now several sets which contain the full sensor suite (Table 1). Still, to the best of our knowledge, no other 3D dataset provides attribute annotations, such as pedestrian pose or vehicle state.
|
| 35 |
+
|
| 36 |
+
Existing AV datasets and vehicles are focused on particular operational design domains. More research is required on generalizing to "complex, cluttered and unseen environments" [36]. Hence there is a need to study how detection methods generalize to different countries, lighting (daytime vs. nighttime), driving directions, road markings, vegetation, precipitation and previously unseen object types.
|
| 37 |
+
|
| 38 |
+
Contextual knowledge using semantic maps is also an important prior for scene understanding [82, 2, 35]. For example, one would expect to find cars on the road, but not on the sidewalk or inside buildings. With the notable exception of [45, 10], most AV datasets do not provide semantic maps.
|
| 39 |
+
|
| 40 |
+
# 1.1. Contributions
|
| 41 |
+
|
| 42 |
+
From the complexities of the multimodal 3D detection challenge, and the limitations of current AV datasets, a large-scale multimodal dataset with $360^{\circ}$ coverage across all vision and range sensors collected from diverse situations alongside map information would boost AV scene-understanding research further. nuScenes does just that, and it is the main contribution of this work.
|
| 43 |
+
|
| 44 |
+
nuScenes represents a large leap forward in terms of data volumes and complexities (Table 1), and is the first
|
| 45 |
+
|
| 46 |
+
dataset to provide $360^{\circ}$ sensor coverage from the entire sensor suite. It is also the first AV dataset to include radar data and captured using an AV approved for public roads. It is further the first multimodal dataset that contains data from nighttime and rainy conditions, and with object attributes and scene descriptions in addition to object class and location. Similar to [84], nuScenes is a holistic scene understanding benchmark for AVs. It enables research on multiple tasks such as object detection, tracking and behavior modeling in a range of conditions.
|
| 47 |
+
|
| 48 |
+
Our second contribution is new detection and tracking metrics aimed at the AV application. We train 3D object detectors and trackers as a baseline, including a novel approach of using multiple lidar sweeps to enhance object detection. We also present and analyze the results of the nuScenes object detection and tracking challenges.
|
| 49 |
+
|
| 50 |
+
Third, we publish the devkit, evaluation code, taxonomy, annotator instructions, and database schema for industry-wide standardization. Recently, the Lyft L5 [45] dataset adopted this format to achieve compatibility between the different datasets. The nuScenes data is published under CC BY-NC-SA 4.0 license, which means that anyone can use this dataset for non-commercial research purposes. All data, code, and information is made available online<sup>3</sup>.
|
| 51 |
+
|
| 52 |
+
Since the release, nuScenes has received strong interest from the AV community [90, 70, 50, 91, 9, 5, 68, 28, 49, 86, 89]. Some works extended our dataset to introduce new annotations for natural language object referral [22] and high-level scene understanding [74]. The detection challenge enabled lidar based and camera based detection works such as [90, 70], that improved over the state-of-the-art at the time of initial release [51, 69] by $40\%$ and $81\%$ (Table 4). nuScenes has been used for 3D object detection [83, 60], multi-agent forecasting [9, 68], pedestrian localization [5], weather augmentation [37], and moving pointcloud prediction [27]. Being still the only annotated AV dataset to provide radar data, nuScenes encourages researchers to explore radar and sensor fusion for object detection [27, 42, 72].
|
| 53 |
+
|
| 54 |
+
<table><tr><td>Dataset</td><td>Year</td><td>Scenes</td><td>Size (hr)</td><td>RGB imgs</td><td>PCs lidar††</td><td>PCs radar</td><td>Ann. frames</td><td>3D boxes</td><td>Night / Rain</td><td>Map layers</td><td>Classes</td><td>Locations</td></tr><tr><td>CamVid [8]</td><td>2008</td><td>4</td><td>0.4</td><td>18k</td><td>0</td><td>0</td><td>700</td><td>0</td><td>No/No</td><td>0</td><td>32</td><td>Cambridge</td></tr><tr><td>Cityscapes [19]</td><td>2016</td><td>n/a</td><td>-</td><td>25k</td><td>0</td><td>0</td><td>25k</td><td>0</td><td>No/No</td><td>0</td><td>30</td><td>50 cities</td></tr><tr><td>Vistas [33]</td><td>2017</td><td>n/a</td><td>-</td><td>25k</td><td>0</td><td>0</td><td>25k</td><td>0</td><td>Yes/Yes</td><td>0</td><td>152</td><td>Global</td></tr><tr><td>BDD100K [85]</td><td>2017</td><td>100k</td><td>1k</td><td>100M</td><td>0</td><td>0</td><td>100k</td><td>0</td><td>Yes/Yes</td><td>0</td><td>10</td><td>NY, SF</td></tr><tr><td>ApolloScape [41]</td><td>2018</td><td>-</td><td>100</td><td>144k</td><td>0**</td><td>0</td><td>144k</td><td>70k</td><td>Yes/No</td><td>0</td><td>8-35</td><td>4x China</td></tr><tr><td>D²-City [11]</td><td>2019</td><td>1k†</td><td>-</td><td>700k†</td><td>0</td><td>0</td><td>700k†</td><td>0</td><td>No/Yes</td><td>0</td><td>12</td><td>5x China</td></tr><tr><td>KITTI [32]</td><td>2012</td><td>22</td><td>1.5</td><td>15k</td><td>15k</td><td>0</td><td>15k</td><td>200k</td><td>No/No</td><td>0</td><td>8</td><td>Karlsruhe</td></tr><tr><td>AS lidar [54]</td><td>2018</td><td>-</td><td>2</td><td>0</td><td>20k</td><td>0</td><td>20k</td><td>475k</td><td>-/-</td><td>0</td><td>6</td><td>China</td></tr><tr><td>KAIST [17]</td><td>2018</td><td>-</td><td>-</td><td>8.9k</td><td>8.9k</td><td>0</td><td>8.9k</td><td>0</td><td>Yes/No</td><td>0</td><td>3</td><td>Seoul</td></tr><tr><td>H3D [61]</td><td>2019</td><td>160</td><td>0.77</td><td>83k</td><td>27k</td><td>0</td><td>27k</td><td>1.1M</td><td>No/No</td><td>0</td><td>8</td><td>SF</td></tr><tr><td>nuScenes</td><td>2019</td><td>1k</td><td>5.5</td><td>1.4M</td><td>400k</td><td>1.3M</td><td>40k</td><td>1.4M</td><td>Yes/Yes</td><td>11</td><td>23</td><td>Boston, SG</td></tr><tr><td>Argoverse [10]</td><td>2019</td><td>113†</td><td>0.6†</td><td>490k†</td><td>44k</td><td>0</td><td>22k†</td><td>993k†</td><td>Yes/Yes</td><td>2</td><td>15</td><td>Miami, PT</td></tr><tr><td>Lyft L5 [45]</td><td>2019</td><td>366</td><td>2.5</td><td>323k</td><td>46k</td><td>0</td><td>46k</td><td>1.3M</td><td>No/No</td><td>7</td><td>9</td><td>Palo Alto</td></tr><tr><td>Waymo Open [76]</td><td>2019</td><td>1k</td><td>5.5</td><td>1M</td><td>200k</td><td>0</td><td>200k‡</td><td>12M‡</td><td>Yes/Yes</td><td>0</td><td>4</td><td>3x USA</td></tr><tr><td>A*3D [62]</td><td>2019</td><td>n/a</td><td>55</td><td>39k</td><td>39k</td><td>0</td><td>39k</td><td>230k</td><td>Yes/Yes</td><td>0</td><td>7</td><td>SG</td></tr><tr><td>A2D2 [34]</td><td>2019</td><td>n/a</td><td>-</td><td>-</td><td>-</td><td>0</td><td>12k</td><td>-</td><td>-/-</td><td>0</td><td>14</td><td>3x Germany</td></tr></table>
|
| 55 |
+
|
| 56 |
+
Table 1. AV dataset comparison. The top part of the table indicates datasets without range data. The middle and lower parts indicate datasets (not publications) with range data released until and after the initial release of this dataset. We use bold highlights to indicate the best entries in every column among the datasets with range data. Only datasets which provide annotations for at least car, pedestrian and bicycle are included in this comparison. $(^{\dagger})$ We report numbers only for scenes annotated with cuboids. $(^{\ddagger})$ The current Waymo Open dataset size is comparable to nuScenes, but at a $5\mathrm{x}$ higher annotation frequency. $(^{\dagger\dagger})$ Lidar pointcloud count collected from each lidar. $(^{**})$ [41] provides static depth maps. (-) indicates that no information is provided. SG: Singapore, NY: New York, SF: San Francisco, PT: Pittsburgh, AS: ApolloScape.
|
| 57 |
+
|
| 58 |
+
# 1.2. Related datasets
|
| 59 |
+
|
| 60 |
+
The last decade has seen the release of several driving datasets which have played a huge role in scene-understanding research for AVs. Most datasets have focused on 2D annotations (boxes, masks) for RGB camera images. CamVid [8], Cityscapes [19], Mapillary Vistas [33], $D^2$ -City [11], BDD100k [85] and Apolloscape [41] released ever growing datasets with segmentation masks. Vistas, $D^2$ -City and BDD100k also contain images captured during different weather and illumination settings. Other datasets focus exclusively on pedestrian annotations on images [20, 25, 79, 24, 88, 23, 58]. The ease of capturing and annotating RGB images have made the release of these large image-only datasets possible.
|
| 61 |
+
|
| 62 |
+
On the other hand, multimodal datasets, which are typically comprised of images, range sensor data (lidars, radars), and GPS/IMU data, are expensive to collect and annotate due to the difficulties of integrating, synchronizing, and calibrating multiple sensors. KITTI [32] was the pioneering multimodal dataset providing dense pointclouds from a lidar sensor as well as front-facing stereo images and GPS/IMU data. It provides 200k 3D boxes over 22 scenes which helped advance the state-of-the-art in 3D object detection. The recent H3D dataset [61] includes 160 crowded scenes with a total of 1.1M 3D boxes annotated over 27k frames. The objects are annotated in the full $360^{\circ}$ view, as opposed to KITTI where an object is only annotated if it is present in the frontal view. The KAIST multispectral dataset [17] is a multimodal dataset that consists of RGB and thermal camera, RGB stereo, 3D lidar and GPS/IMU. It provides nighttime data, but the size of the dataset is lim
|
| 63 |
+
|
| 64 |
+
ited and annotations are in 2D. Other notable multimodal datasets include [15] providing driving behavior labels, [43] providing place categorization labels and [6, 55] providing raw data without semantic labels.
|
| 65 |
+
|
| 66 |
+
After the initial nuScenes release, [76, 10, 62, 34, 45] followed to release their own large-scale AV datasets (Table 1). Among these datasets, only the Waymo Open dataset [76] provides significantly more annotations, mostly due to the higher annotation frequency $(10\mathrm{Hz}$ vs. $2\mathrm{Hz})^4$ . A*3D takes an orthogonal approach where a similar number of frames (39k) are selected and annotated from 55 hours of data. The Lyft L5 dataset [45] is most similar to nuScenes. It was released using the nuScenes database schema and can therefore be parsed using the nuScenes devkit.
|
| 67 |
+
|
| 68 |
+
# 2. The nuScenes dataset
|
| 69 |
+
|
| 70 |
+
Here we describe how we plan drives, setup our vehicles, select interesting scenes, annotate the dataset and protect the privacy of third parties.
|
| 71 |
+
|
| 72 |
+
Drive planning. We drive in Boston (Seaport and South Boston) and Singapore (One North, Holland Village and Queenstown), two cities that are known for their dense traffic and highly challenging driving situations. We emphasize the diversity across locations in terms of vegetation, buildings, vehicles, road markings and right versus left-hand traffic. From a large body of training data we manually select 84 logs with $15\mathrm{h}$ of driving data $(242\mathrm{km}$ travelled at an av
|
| 73 |
+
|
| 74 |
+
<table><tr><td>Sensor</td><td>Details</td></tr><tr><td>6x Camera</td><td>RGB, 12Hz capture frequency, 1/1.8" CMOS sensor, 1600 × 900 resolution, auto exposure, JPEG compressed</td></tr><tr><td>1x Lidar</td><td>Spinning, 32 beams, 20Hz capture frequency, 360° horizontal FOV, -30° to 10° vertical FOV, ≤ 70m range, ±2cm accuracy, up to 1.4M points per second.</td></tr><tr><td>5x Radar</td><td>≤ 250m range, 77GHz, FMCW, 13Hz capture frequency, ±0.1km/h vel. accuracy</td></tr><tr><td>GPS & IMU</td><td>GPS, IMU, AHRS. 0.2° heading, 0.1° roll/pitch, 20mm RTK positioning, 1000Hz update rate</td></tr></table>
|
| 75 |
+
|
| 76 |
+
Table 2. Sensor data in nuScenes.
|
| 77 |
+
|
| 78 |
+
erage of $16\mathrm{km / h}$ ). Driving routes are carefully chosen to capture a diverse set of locations (urban, residential, nature and industrial), times (day and night) and weather conditions (sun, rain and clouds).
|
| 79 |
+
|
| 80 |
+
Car setup. We use two Renault Zoe supermini electric cars with an identical sensor layout to drive in Boston and Singapore. See Figure 4 for sensor placements and Table 2 for sensor details. Front and side cameras have a $70^{\circ}$ FOV and are offset by $55^{\circ}$ . The rear camera has a FOV of $110^{\circ}$ .
|
| 81 |
+
|
| 82 |
+
Sensor synchronization. To achieve good cross-modality data alignment between the lidar and the cameras, the exposure of a camera is triggered when the top lidar sweeps across the center of the camera's FOV. The timestamp of the image is the exposure trigger time; and the timestamp of the lidar scan is the time when the full rotation of the current lidar frame is achieved. Given that the camera's exposure time is nearly instantaneous, this method generally yields good data alignment<sup>5</sup>. We perform motion compensation using the localization algorithm described below.
|
| 83 |
+
|
| 84 |
+
Localization. Most existing datasets provide the vehicle location based on GPS and IMU [32, 41, 19, 61]. Such localization systems are vulnerable to GPS outages, as seen on the KITTI dataset [32, 7]. As we operate in dense urban areas, this problem is even more pronounced. To accurately localize our vehicle, we create a detailed HD map of lidar points in an offline step. While collecting data, we use a Monte Carlo Localization scheme from lidar and odometry information [18]. This method is very robust and we achieve localization errors of $\leq 10cm$ . To encourage robotics research, we also provide the raw CAN bus data (e.g. velocities, accelerations, torque, steering angles, wheel speeds) similar to [65].
|
| 85 |
+
|
| 86 |
+
Maps. We provide highly accurate human-annotated semantic maps of the relevant areas. The original rasterized map includes only roads and sidewalks with a resolution of $10\mathrm{px} / \mathrm{m}$ . The vectorized map expansion provides information on 11 semantic classes as shown in Figure 3, making it richer than the semantic maps of other datasets published since the original release [10, 45]. We encourage the use of localization and semantic maps as strong priors for all tasks.
|
| 87 |
+
|
| 88 |
+

|
| 89 |
+
Figure 3. Semantic map of nuScenes with 11 semantic layers in different colors. To show the path of the ego vehicle we plot each keyframe ego pose from scene-0121 with black spheres.
|
| 90 |
+
|
| 91 |
+
Finally, we provide the baseline routes - the idealized path an AV should take, assuming there are no obstacles. This route may assist trajectory prediction [68], as it simplifies the problem by reducing the search space of viable routes.
|
| 92 |
+
|
| 93 |
+
Scene selection. After collecting the raw sensor data, we manually select 1000 interesting scenes of $20s$ duration each. Such scenes include high traffic density (e.g. intersections, construction sites), rare classes (e.g. ambulances, animals), potentially dangerous traffic situations (e.g. jaywalkers, incorrect behavior), maneuvers (e.g. lane change, turning, stopping) and situations that may be difficult for an AV. We also select some scenes to encourage diversity in terms of spatial coverage, different scene types, as well as different weather and lighting conditions. Expert annotators write textual descriptions or captions for each scene (e.g.: "Wait at intersection, peds on sidewalk, bicycle crossing, jaywalker, turn right, parked cars, rain").
|
| 94 |
+
|
| 95 |
+
Data annotation. Having selected the scenes, we sample keyframes (image, lidar, radar) at $2\mathrm{Hz}$ . We annotate each of the 23 object classes in every keyframe with a semantic category, attributes (visibility, activity, and pose) and a cuboid modeled as x, y, z, width, length, height and yaw angle. We annotate objects continuously throughout each scene if they are covered by at least one lidar or radar point. Using expert annotators and multiple validation steps, we achieve highly accurate annotations. We also release intermediate sensor frames, which are important for tracking, prediction and object detection as shown in Section 4.2. At capture frequencies of $12\mathrm{Hz}$ , $13\mathrm{Hz}$ and $20\mathrm{Hz}$ for camera, radar and lidar, this makes our dataset unique. Only the Waymo Open dataset provides a similarly high capture frequency of $10\mathrm{Hz}$ .
|
| 96 |
+
|
| 97 |
+

|
| 98 |
+
Figure 4. Sensor setup for our data collection platform.
|
| 99 |
+
|
| 100 |
+

|
| 101 |
+
Figure 5. Spatial data coverage for two nuScenes locations. Colors indicate the number of keyframes with ego vehicle poses within a $100\mathrm{m}$ radius across all scenes.
|
| 102 |
+
|
| 103 |
+
Annotation statistics. Our dataset has 23 categories including different vehicles, types of pedestrians, mobility devices and other objects (Figure 8-SM). We present statistics on geometry and frequencies of different classes (Figure 9-SM). Per keyframe there are 7 pedestrians and 20 vehicles on average. Moreover, 40k keyframes were taken from four different scene locations (Boston: $55\%$ , SG-OneNorth: $21.5\%$ , SG-Queenstown: $13.5\%$ , SG-HollandVillage: $10\%$ ) with various weather and lighting conditions (rain: $19.4\%$ , night: $11.6\%$ ). Due to the finegrained classes in nuScenes, the dataset shows severe class imbalance with a ratio of 1:10k for the least and most common class annotations (1:36 in KITTI). This encourages the community to explore this long tail problem in more depth.
|
| 104 |
+
|
| 105 |
+
Figure 5 shows spatial coverage across all scenes. We see that most data comes from intersections. Figure 10-SM shows that car annotations are seen at varying distances and as far as $80\mathrm{m}$ from the ego-vehicle. Box orientation is also varying, with the most number in vertical and horizontal angles for cars as expected due to parked cars and cars in the same lane. Lidar and radar points statistics inside each box annotation are shown in Figure 14-SM. Annotated objects contain up to 100 lidar points even at a radial distance of $80\mathrm{m}$ and at most $12\mathrm{k}$ lidar points at $3\mathrm{m}$ . At the same time they contain up to 40 radar returns at $10\mathrm{m}$ and 10 at $50\mathrm{m}$ . The radar range far exceeds the lidar range at up to $200\mathrm{m}$ .
|
| 106 |
+
|
| 107 |
+
# 3. Tasks & Metrics
|
| 108 |
+
|
| 109 |
+
The multimodal nature of nuScenes supports a multitude of tasks including detection, tracking, prediction & localization. Here we present the detection and tracking tasks and metrics. We define the detection task to only operate on sensor data between $[t - 0.5, t]$ seconds for an object at time $t$ , whereas the tracking task operates on data between $[0, t]$ .
|
| 110 |
+
|
| 111 |
+
# 3.1. Detection
|
| 112 |
+
|
| 113 |
+
The nuScenes detection task requires detecting 10 object classes with 3D bounding boxes, attributes (e.g. sitting vs. standing), and velocities. The 10 classes are a subset of all 23 classes annotated in nuScenes (Table 5-SM).
|
| 114 |
+
|
| 115 |
+
Average Precision metric. We use the Average Precision (AP) metric [32, 26], but define a match by thresholding
|
| 116 |
+
|
| 117 |
+
the 2D center distance $d$ on the ground plane instead of intersection over union (IOU). This is done in order to decouple detection from object size and orientation but also because objects with small footprints, like pedestrians and bikes, if detected with a small translation error, give 0 IOU (Figure 7). This makes it hard to compare the performance of vision-only methods which tend to have large localization errors [69].
|
| 118 |
+
|
| 119 |
+
We then calculate AP as the normalized area under the precision recall curve for recall and precision over $10\%$ . Operating points where recall or precision is less than $10\%$ are removed in order to minimize the impact of noise commonly seen in low precision and recall regions. If no operating point in this region is achieved, the AP for that class is set to zero. We then average over matching thresholds of $\mathbb{D} = \{0.5, 1, 2, 4\}$ meters and the set of classes $\mathbb{C}$ :
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\mathrm {m A P} = \frac {1}{| \mathbb {C} | | \mathbb {D} |} \sum_ {c \in \mathbb {C}} \sum_ {d \in \mathbb {D}} \mathrm {A P} _ {c, d} \tag {1}
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
True Positive metrics. In addition to AP, we measure a set of True Positive metrics (TP metrics) for each prediction that was matched with a ground truth box. All TP metrics are calculated using $d = 2\mathrm{m}$ center distance during matching, and they are all designed to be positive scalars. In the proposed metric, the TP metrics are all in native units (see below) which makes the results easy to interpret and compare. Matching and scoring happen independently per class and each metric is the average of the cumulative mean at each achieved recall level above $10\%$ . If $10\%$ recall is not achieved for a particular class, all TP errors for that class are set to 1. The following TP errors are defined:
|
| 126 |
+
|
| 127 |
+
Average Translation Error (ATE) is the Euclidean center distance in 2D (units in meters). Average Scale Error (ASE) is the 3D intersection over union (IOU) after aligning orientation and translation $(1 - IOU)$ . Average Orientation Error (AOE) is the smallest yaw angle difference between prediction and ground truth (radians). All angles are measured on a full $360^{\circ}$ period except for barriers where they are measured on a $180^{\circ}$ period. Average Velocity Error (AVE) is the absolute velocity error as the L2 norm of the velocity differences in 2D $(m / s)$ . Average Attribute Error (AAE) is defined as 1 minus attribute classification accuracy $(1 - acc)$ . For each TP metric we compute the mean TP metric (mTP) over all classes:
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
\mathrm {m T P} = \frac {1}{| \mathbb {C} |} \sum_ {c \in \mathbb {C}} \mathrm {T P} _ {c} \tag {2}
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
We omit measurements for classes where they are not well defined: AVE for cones and barriers since they are stationary; AOE of cones since they do not have a well defined orientation; and AAE for cones and barriers since there are no attributes defined on these classes.
|
| 134 |
+
|
| 135 |
+
nuScenes detection score. mAP with a threshold on IOU is perhaps the most popular metric for object detection [32, 19, 21]. However, this metric can not capture all aspects of the nuScenes detection tasks, like velocity and attribute estimation. Further, it couples location, size and orientation estimates. The ApolloScape [41] 3D car instance challenge disentangles these by defining thresholds for each error type and recall threshold. This results in $10 \times 3$ thresholds, making this approach complex, arbitrary and unintuitive. We propose instead consolidating the different error types into a scalar score: the nuScenes detection score (NDS).
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
\mathrm {N D S} = \frac {1}{1 0} [ 5 \mathrm {m A P} + \sum_ {\mathrm {m T P} \in \mathbb {T P}} (1 - \min (1, \mathrm {m T P})) ] \tag {3}
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
Here mAP is mean Average Precision (1), and $\mathbb{TP}$ the set of the five mean True Positive metrics (2). Half of NDS is thus based on the detection performance while the other half quantifies the quality of the detections in terms of box location, size, orientation, attributes, and velocity. Since mAVE, mAOE and mATE can be larger than 1, we bound each metric between 0 and 1 in (3).
|
| 142 |
+
|
| 143 |
+
# 3.2. Tracking
|
| 144 |
+
|
| 145 |
+
In this section we present the tracking task setup and metrics. The focus of the tracking task is to track all detected objects in a scene. All detection classes defined in Section 3.1 are used, except the static classes: barrier, construction and trafficcone.
|
| 146 |
+
|
| 147 |
+
AMOTA and AMOTP metrics. Weng and Kitani [77] presented a similar 3D MOT benchmark on KITTI [32]. They point out that traditional metrics do not take into account the confidence of a prediction. Thus they develop Average Multi Object Tracking Accuracy (AMOTA) and Average Multi Object Tracking Precision (AMOTP), which average MOTA and MOTP across all recall thresholds. By comparing the KITTI and nuScenes leaderboards for detection and tracking, we find that nuScenes is significantly more difficult. Due to the difficulty of nuScenes, the traditional MOTA metric is often zero. In the updated formulation $\mathrm{sMOTAR}_r[77]^6$ , MOTA is therefore augmented by a term to adjust for the respective recall:
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
s M O T A _ {r} = \max \left(0, 1 - \frac {I D S _ {r} + F P _ {r} + F N _ {r} - (1 - r) P}{r P}\right)
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
This is to guarantee that $\mathrm{sMOTA}_r$ values span the entire $[0,1]$ range. We perform 40-point interpolation in the recall range [0.1, 1] (the recall values are denoted as $\mathcal{R}$ ). The resulting sAMOTA metric is the main metric for the tracking task:
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
s A M O T A = \frac {1}{| \mathcal {R} |} \sum_ {r \in \mathcal {R}} s M O T A _ {r}
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
Traditional metrics. We also use traditional tracking metrics such as MOTA and MOTP [4], false alarms per frame, mostly tracked trajectories, mostly lost trajectories, false positives, false negatives, identity switches, and track fragmentations. Similar to [77], we try all recall thresholds and then use the threshold that achieves highest $\mathrm{sMOTA}_r$ .
|
| 160 |
+
|
| 161 |
+
TID and LGD metrics. In addition, we devise two novel metrics: Track initialization duration (TID) and longest gap duration (LGD). Some trackers require a fixed window of past sensor readings or perform poorly without a good initialization. TID measures the duration from the beginning of the track until the time an object is first detected. LGD computes the longest duration of any detection gap in a track. If an object is not tracked, we assign the entire track duration as TID and LGD. For both metrics, we compute the average over all tracks. These metrics are relevant for AVs as many short-term track fragmentations may be more acceptable than missing an object for several seconds.
|
| 162 |
+
|
| 163 |
+
# 4. Experiments
|
| 164 |
+
|
| 165 |
+
In this section we present object detection and tracking experiments on the nuScenes dataset, analyze their characteristics and suggest avenues for future research.
|
| 166 |
+
|
| 167 |
+
# 4.1. Baselines
|
| 168 |
+
|
| 169 |
+
We present a number of baselines with different modalities for detection and tracking.
|
| 170 |
+
|
| 171 |
+
Lidar detection baseline. To demonstrate the performance of a leading algorithm on nuScenes, we train a lidar-only 3D object detector, PointPillars [51]. We take advantage of temporal data available in nuScenes by accumulating lidar sweeps for a richer pointcloud as input. A single network was trained for all classes. The network was modified to also learn velocities as an additional regression target for each 3D box. We set the box attributes to the most common attribute for each class in the training data.
|
| 172 |
+
|
| 173 |
+
Image detection baseline. To examine image-only 3D object detection, we re-implement the Orthographic Feature Transform (OFT) [69] method. A single OFT network was used for all classes. We modified the original OFT to use a SSD detection head and confirmed that this matched published results on KITTI. The network takes in a single image from which the full $360^{\circ}$ predictions are combined together from all 6 cameras using non-maximum suppression (NMS). We set the box velocity to zero and attributes to the most common attribute for each class in the train data.
|
| 174 |
+
|
| 175 |
+
Detection challenge results. We compare the results of the top submissions to the nuScenes detection challenge 2019. Among all submissions, Megvii [90] gave the best performance. It is a lidar based class-balanced multi-head network with sparse 3D convolutions. Among image-only
|
| 176 |
+
|
| 177 |
+
submissions, MonoDIS [70] was the best, significantly outperforming our image baseline and even some lidar based methods. It uses a novel disentangling 2D and 3D detection loss. Note that the top methods all performed importance sampling, which shows the importance of addressing the class imbalance problem.
|
| 178 |
+
|
| 179 |
+
Tracking baselines. We present several baselines for tracking from camera and lidar data. From the detection challenge, we pick the best performing lidar method (Megvii [90]), the fastest reported method at inference time (PointPillars [51]), as well as the best performing camera method (MonoDIS [70]). Using the detections from each method, we setup baselines using the tracking approach described in [77]. We provide detection and tracking results for each of these methods on the train, val and test splits to facilitate more systematic research. See the Supplementary Material for the results of the 2019 nuScenes tracking challenge.
|
| 180 |
+
|
| 181 |
+
# 4.2. Analysis
|
| 182 |
+
|
| 183 |
+
Here we analyze the properties of the methods presented in Section 4.1, as well as the dataset and matching function.
|
| 184 |
+
|
| 185 |
+
The case for a large benchmark dataset. One of the contributions of nuScenes is the dataset size, and in particular the increase compared to KITTI (Table 1). Here we examine the benefits of the larger dataset size. We train PointPillars [51], OFT [69] and an additional image baseline, SSD+3D, with varying amounts of training data. SSD+3D has the same 3D parametrization as MonoDIS [70], but use a single stage design [53]. For this ablation study we train PointPillars with 6x fewer epochs and a one cycle optimizer schedule [71] to cut down the training time. Our main finding is that the method ordering changes with the amount of data (Figure 6). In particular, PointPillars performs similar to SSD+3D at data volumes commensurate with KITTI, but as more data is used, it is clear that PointPillars is stronger. This suggests that the full potential of complex algorithms can only be verified with a bigger and more diverse training set. A similar conclusion was reached by [56, 59] with [59] suggesting that the KITTI leaderboard reflects the data aug. method rather than the actual algorithms.
|
| 186 |
+
|
| 187 |
+
The importance of the matching function. We compare performance of published methods (Table 4) when using our proposed $2\mathrm{m}$ center-distance matching versus the IOU matching used in KITTI. As expected, when using IOU matching, small objects like pedestrians and bicycles fail to achieve above 0 AP, making ordering impossible (Figure 7). In contrast, center distance matching declares MonoDIS a clear winner. The impact is smaller for the car class, but also in this case it is hard to resolve the difference between MonoDIS and OFT.
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
Figure 6. Amount of training data vs. mean Average Precision (mAP) on the val set of nuScenes. The dashed black line corresponds to the amount of training data in KITTI [32].
|
| 191 |
+
|
| 192 |
+

|
| 193 |
+
Figure 7. Average precision vs. matching function. CD: Center distance. IOU: Intersection over union. We use IOU = 0.7 for car and IOU = 0.5 for pedestrian and bicycle following KITTI [32]. We use CD = 2m for the TP metrics in Section 3.1.
|
| 194 |
+
|
| 195 |
+
The matching function also changes the balance between lidar and image based methods. In fact, the ordering switches when using center distance matching to favour MonoDIS over both lidar based methods on the bicycle class (Figure 7). This makes sense since the thin structures of bicycles make them difficult to detect in lidar. We conclude that center distance matching is more appropriate to rank image based methods alongside lidar based methods.
|
| 196 |
+
|
| 197 |
+
Multiple lidar sweeps improve performance. According to our evaluation protocol (Section 3.1), one is only allowed to use $0.5s$ of previous data to make a detection decision. This corresponds to 10 previous lidar sweeps since the lidar is sampled at $20\mathrm{Hz}$ . We device a simple way of incorporating multiple point clouds into the PointPillars baseline and investigate the performance impact. Accumulation is implemented by moving all point clouds to the coordinate system of the keyframe and appending a scalar time-stamp to each point indicating the time delta in seconds from the keyframe. The encoder includes the time delta as an extra decoration for the lidar points. Aside from the advantage of richer point clouds, this also provides temporal information, which helps the network in localization and enables velocity prediction. We experiment with using 1, 5, and 10 lidar sweeps. The results show that both detection and velocity estimates improve with an increasing number of lidar sweeps but with diminishing rate of return (Table 3).
|
| 198 |
+
|
| 199 |
+
<table><tr><td>Lidar sweeps</td><td>Pretraining</td><td>NDS (%)</td><td>mAP (%)</td><td>mAVE (m/s)</td></tr><tr><td>1</td><td>KITTI</td><td>31.8</td><td>21.9</td><td>1.21</td></tr><tr><td>5</td><td>KITTI</td><td>42.9</td><td>27.7</td><td>0.34</td></tr><tr><td>10</td><td>KITTI</td><td>44.8</td><td>28.8</td><td>0.30</td></tr><tr><td>10</td><td>ImageNet</td><td>44.9</td><td>28.9</td><td>0.31</td></tr><tr><td>10</td><td>None</td><td>44.2</td><td>27.6</td><td>0.33</td></tr></table>
|
| 200 |
+
|
| 201 |
+
Table 3. PointPillars [51] detection performance on the val set. We can see that more lidar sweeps lead to a significant performance increase and that pretraining with ImageNet is on par with KITTI.
|
| 202 |
+
|
| 203 |
+
Which sensor is most important? An important question for AVs is which sensors are required to achieve the best detection performance. Here we compare the performance of leading lidar and image detectors. We focus on these modalities as there are no competitive radar-only methods in the literature and our preliminary study with PointPillars on radar data did not achieve promising results. We compare PointPillars, which is a fast and light lidar detector with MonoDIS, a top image detector (Table 4). The two methods achieve similar mAP (30.5% vs. 30.4%), but PointPillars has higher NDS (45.3% vs. 38.4%). The close mAP is, of itself, notable and speaks to the recent advantage in 3D estimation from monocular vision. However, as discussed above the differences would be larger with an IOU based matching function.
|
| 204 |
+
|
| 205 |
+
Class specific performance is in Table 7-SM. PointPillars was stronger for the two most common classes: cars (68.4% vs. 47.8% AP), and pedestrians (59.7% vs. 37.0% AP). MonoDIS, on the other hand, was stronger for the smaller classes bicycles (24.5% vs. 1.1% AP) and cones (48.7% vs. 30.8% AP). This is expected since 1) bicycles are thin objects with typically few lidar returns and 2) traffic cones are easy to detect in images, but small and easily overlooked in a lidar pointcloud. 3) MonoDIS applied importance sampling during training to boost rare classes. With similar detection performance, why was NDS lower for MonoDIS? The main reasons are the average translation errors (52cm vs. 74cm) and velocity errors (1.55m/s vs. 0.32m/s), both as expected. MonoDIS also had larger scale errors with mean IOU 74% vs. 71% but the difference is small, suggesting the strong ability for image-only methods to infer size from appearance.
|
| 206 |
+
|
| 207 |
+
The importance of pre-training. Using the lidar baseline we examine the importance of pre-training when training a detector on nuScenes. No pretraining means weights are initialized randomly using a uniform distribution as in [38]. ImageNet [21] pretraining [47] uses a backbone that was first trained to accurately classify images. KITTI [32] pretraining uses a backbone that was trained on the lidar point clouds to predict 3D boxes. Interestingly, while the KITTI pretrained network did converge faster, the final performance of the network only marginally varied between different pretrainings (Table 3). One explanation may be that while KITTI is close in domain, the size is not large enough.
|
| 208 |
+
|
| 209 |
+
<table><tr><td rowspan="2">Method</td><td>NDS</td><td>mAP</td><td>mATE</td><td>mASE</td><td>mAOE</td><td>mAVE</td><td>mAAE</td></tr><tr><td>(%)</td><td>(%)</td><td>(m)</td><td>(1-iou)</td><td>(rad)</td><td>(m/s)</td><td>(1-acc)</td></tr><tr><td>OFT [69]†</td><td>21.2</td><td>12.6</td><td>0.82</td><td>0.36</td><td>0.85</td><td>1.73</td><td>0.48</td></tr><tr><td>SSD+3D†</td><td>26.8</td><td>16.4</td><td>0.90</td><td>0.33</td><td>0.62</td><td>1.31</td><td>0.29</td></tr><tr><td>MDIS [70]†</td><td>38.4</td><td>30.4</td><td>0.74</td><td>0.26</td><td>0.55</td><td>1.55</td><td>0.13</td></tr><tr><td>PP [51]</td><td>45.3</td><td>30.5</td><td>0.52</td><td>0.29</td><td>0.50</td><td>0.32</td><td>0.37</td></tr><tr><td>Megvii [90]</td><td>63.3</td><td>52.8</td><td>0.30</td><td>0.25</td><td>0.38</td><td>0.25</td><td>0.14</td></tr></table>
|
| 210 |
+
|
| 211 |
+
Table 4. Object detection results on the test set of nuScenes. PointPillars, OFT and SSD+3D are baselines provided in this paper, other methods are the top submissions to the nuScenes detection challenge leaderboard. $(\dagger)$ use only monocular camera images as input. All other methods use lidar. PP: PointPillars [51], MDIS: MonoDIS [70].
|
| 212 |
+
|
| 213 |
+
Better detection gives better tracking. Weng and Kitani [77] presented a simple baseline that achieved state-of-the-art 3d tracking results using powerful detections on KITTI. Here we analyze whether better detections also imply better tracking performance on nuScenes, using the image and lidar baselines presented in Section 4.1. Megvii, PointPillars and MonoDIS achieve an sAMOTA of $17.9\%$ , $3.5\%$ and $4.5\%$ , and an AMOTP of $1.50m$ , $1.69m$ and $1.79m$ on the val set. Compared to the mAP and NDS detection results in Table 4, the ranking is similar. While the performance is correlated across most metrics, we notice that MonoDIS has the shortest LGD and highest number of track fragmentations. This may indicate that despite the lower performance, image based methods are less likely to miss an object for a protracted period of time.
|
| 214 |
+
|
| 215 |
+
# 5. Conclusion
|
| 216 |
+
|
| 217 |
+
In this paper we present the nuScenes dataset, detection and tracking tasks, metrics, baselines and results. This is the first dataset collected from an AV approved for testing on public roads and that contains the full $360^{\circ}$ sensor suite (lidar, images, and radar). nuScenes has the largest collection of 3D box annotations of any previously released dataset. To spur research on 3D object detection for AVs, we introduce a new detection metric that balances all aspects of detection performance. We demonstrate novel adaptations of leading lidar and image object detectors and trackers on nuScenes. Future work will add image-level and point-level semantic labels and a benchmark for trajectory prediction [63].
|
| 218 |
+
|
| 219 |
+
Acknowledgements. The nuScenes dataset was annotated by Scale.ai and we thank Alexandr Wang and Dave Morse for their support. We thank Sun Li, Serene Chen and Karen Ngo at nuTonomy for data inspection and quality control, Bassam Helou and Thomas Roddick for OFT baseline results, Sergi Widjaja and Kiwoo Shin for the tutorials, and Deshraj Yadav and Rishabh Jain from EvalAI [30] for setting up the nuScenes challenges.
|
| 220 |
+
|
| 221 |
+
# References
|
| 222 |
+
|
| 223 |
+
[1] Giancarlo Alessandretti, Alberto Broggi, and Pietro Cerri. Vehicle and guard rail detection using radar and vision data fusion. IEEE Transactions on Intelligent Transportation Systems, 2007. 1
|
| 224 |
+
[2] Dan Barnes, Will Maddern, and Ingmar Posner. Exploiting 3d semantic scene priors for online traffic light interpretation. In IVS, 2015. 2
|
| 225 |
+
[3] Klaus Bengler, Klaus Dietmayer, Berthold Farber, Markus Maurer, Christoph Stiller, and Hermann Winner. Three decades of driver assistance systems: Review and future perspectives. ITSM, 2014. 1
|
| 226 |
+
[4] Keni Bernstein, Alexander Elbs, and Rainer Stiefelhagen. Multiple object tracking performance metrics and evaluation in a smart room environment. In ECCV Workshop on Visual Surveillance, 2006. 6
|
| 227 |
+
[5] Lorenzo Bertoni, Sven Kreiss, and Alexandre Alahi. Monoloco: Monocular 3d pedestrian localization and uncertainty estimation. In ICCV, 2019. 2
|
| 228 |
+
[6] José-Luis Blanco-Claraco, Francisco-Ángel Moreno-Dueas, and Javier González-Jiménez. The Málaga urban dataset: High-rate stereo and lidar in a realistic urban scenario. *IJRR*, 2014. 3
|
| 229 |
+
[7] Martin Brossard, Axel Barrau, and Silvère Bonnabel. AIIMU Dead-Reckoning. arXiv preprint arXiv:1904.06064, 2019. 4
|
| 230 |
+
[8] Gabriel J. Brostow, Jamie Shotton, Julien Fauqueur, and Roberto Cipolla. Segmentation and recognition using structure from motion point clouds. In ECCV, 2008. 2, 3
|
| 231 |
+
[9] Sergio Casas, Cole Gulino, Renjie Liao, and Raquel Urtasun. Spatially-aware graph neural networks for relational behavior forecasting from sensor data. arXiv preprint arXiv:1910.08233, 2019. 2
|
| 232 |
+
[10] Ming-Fang Chang, John W Lambert, Patsorn Sangkloy, Jagjeet Singh, Slawomir Bak, Andrew Hartnett, De Wang, Peter Carr, Simon Lucey, Deva Ramanan, and James Hays. Argo-verse: 3d tracking and forecasting with rich maps. In CVPR, 2019. 2, 3, 4
|
| 233 |
+
[11] Z. Che, G. Li, T. Li, B. Jiang, X. Shi, X. Zhang, Y. Lu, G. Wu, Y. Liu, and J. Ye. $D^2$ -City: A large-scale dashcam video dataset of diverse traffic scenarios. arXiv:1904.01975, 2019. 3
|
| 234 |
+
[12] 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, 2015. 1
|
| 235 |
+
[13] Xiaozhi Chen, Laustav Kundu, Ziyu Zhang, Huimin Ma, Sanja Fidler, and Raquel Urtasun. Monocular 3d object detection for autonomous driving. In CVPR, 2016. 1
|
| 236 |
+
[14] Xiaozhi Chen, Huimin Ma, Ji Wan, Bo Li, and Tian Xia. Multi-view 3d object detection network for autonomous driving. In CVPR, 2017. 2
|
| 237 |
+
[15] Yiping Chen, Jingkang Wang, Jonathan Li, Cewu Lu, Zhipeng Luo, Han Xue, and Cheng Wang. Lidar-video driving dataset: Learning driving policies effectively. In CVPR, 2018. 3
|
| 238 |
+
|
| 239 |
+
[16] Hsu-kuang Chiu, Antonio Prioletti, Jie Li, and Jeannette Bohg. Probabilistic 3d multi-object tracking for autonomous driving. arXiv preprint arXiv:2001.05673, 2020. 15, 16
|
| 240 |
+
[17] Yukyung Choi, Namil Kim, Soonmin Hwang, Kibaek Park, Jae Shin Yoon, Kyounghwan An, and In So Kweon. KAIST multi-spectral day/night data set for autonomous and assisted driving. IEEE Transactions on Intelligent Transportation Systems, 2017. 3
|
| 241 |
+
[18] Z. J. Chong, B. Qin, T. Bandyopadhyay, M. H. Ang, E. Frazzoli, and D. Rus. Synthetic 2d lidar for precise vehicle localization in 3d urban environment. In ICRA, 2013. 4
|
| 242 |
+
[19] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The Cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 2, 3, 4, 6, 12
|
| 243 |
+
[20] Navneet Dalal and Bill Triggs. Histograms of oriented gradients for human detection. In CVPR, 2005. 3
|
| 244 |
+
[21] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In CVPR, 2009. 6, 8
|
| 245 |
+
[22] Thierry Deruytere, Simon Vandenhende, Dusan Grujicic, Luc Van Gool, and Marie-Francine Moens. Talk2car: Taking control of your self-driving car. arXiv preprint arXiv:1909.10838, 2019. 2
|
| 246 |
+
[23] Piotr Dollar, Christian Wojek, Bernt Schiele, and Pietro Perona. Pedestrian detection: An evaluation of the state of the art. PAMI, 2012. 3
|
| 247 |
+
[24] Markus Enzweiler and Dariu M. Gavrila. Monocular pedestrian detection: Survey and experiments. PAMI, 2009. 3
|
| 248 |
+
[25] Andreas Ess, Bastian Leibe, Konrad Schindler, and Luc Van Gool. A mobile vision system for robust multi-person tracking. In CVPR, 2008. 3
|
| 249 |
+
[26] 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, 2010. 5
|
| 250 |
+
[27] Hehe Fan and Yi Yang. PointRNN: Point recurrent neural network for moving point cloud processing. arXiv preprint arXiv:1910.08287, 2019. 2
|
| 251 |
+
[28] Di Feng, Christian Haase-Schuetz, Lars Rosenbaum, Heinz Hertlein, Fabian Duffhauss, Claudius Glaeser, Werner Wiesbeck, and Klaus Dietmayer. Deep multi-modal object detection and semantic segmentation for autonomous driving: Datasets, methods, and challenges. arXiv preprint arXiv:1902.07830, 2019. 2
|
| 252 |
+
[29] D. Feng, C. Haase-Schuetz, L. Rosenbaum, H. Hertlein, C. Glaeser, F. Timm, W. Wiesbeck, and K. Dietmayer. Deep multi-modal object detection and semantic segmentation for autonomous driving: Datasets, methods, and challenges. arXiv:1902.07830, 2019. 2
|
| 253 |
+
[30] EvalAI: Towards Better Evaluation Systems for AI Agents. D. yadav and r. jain and h. agrawal and p. Chattopadhyay and t. singh and a. jain and s. b. singh and s. lee and d. batra. arXiv:1902.03570, 2019. 8
|
| 254 |
+
[31] Andrea Frome, German Cheung, Ahmad Abdulkader, Marco Zennaro, Bo Wu, Alessandro Bissacco, Hartwig Adam,
|
| 255 |
+
|
| 256 |
+
Hartmut Neven, and Luc Vincent. Large-scale privacy protection in google street view. In ICCV, 2009. 12
|
| 257 |
+
[32] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the KITTI vision benchmark suite. In CVPR, 2012. 2, 3, 4, 5, 6, 7, 8, 12
|
| 258 |
+
[33] Neuhold Gerhard, Tobias Ollmann, Samuel Rota Bulo, and Peter Kontschieder. The Mapillary Vistas dataset for semantic understanding of street scenes. In ICCV, 2017. 2, 3
|
| 259 |
+
[34] Jakob Geyer, Yohannes Kassahun, Mentar Mahmudi, Xavier Ricou, Rupesh Durgesh, Andrew S. Chung, Lorenz Hauswald, Viet Hoang Pham, Maximilian Mhlegg, Sebastian Dorn, Tiffany Fernandez, Martin Jnicke, Sudesh Mirashi, Chiragkumar Savani, Martin Sturm, Oleksandr Vorobiov, and Peter Schuberth. A2D2: AEV autonomous driving dataset. http://www.a2d2.audi, 2019. 3
|
| 260 |
+
[35] Hugo Grimmett, Mathias Buerki, Lina Paz, Pedro Pinies, Paul Furgale, Ingmar Posner, and Paul Newman. Integrating metric and semantic maps for vision-only automated parking. In ICRA, 2015. 2
|
| 261 |
+
[36] Junyao Guo, Unmesh Kurup, and Mohak Shah. Is it safe to drive? an overview of factors, challenges, and datasets for driveability assessment in autonomous driving. arXiv:1811.11277, 2018. 2
|
| 262 |
+
[37] Shirsendu Sukanta Halder, Jean-Francois Lalonde, and Raoul de Charette. Physics-based rendering for improving robustness to rain. In ICCV, 2019. 2
|
| 263 |
+
[38] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Delving deep into rectifiers: Surpassing human-level performance onImagenet classification. In ICCV, 2015. 8
|
| 264 |
+
[39] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 12, 15
|
| 265 |
+
[40] Namdar Homayounfar, Wei-Chiu Ma, Shrinidhi Kowshika Lakshmikanth, and Raquel Urtasun. Hierarchical recurrent attention networks for structured online maps. In CVPR, 2018. 1
|
| 266 |
+
[41] Xinyu Huang, Peng Wang, Xinjing Cheng, Dingfu Zhou, Qichuan Geng, and Ruigang Yang. The apolloscape open dataset for autonomous driving and its application. arXiv:1803.06184, 2018. 2, 3, 4, 6, 12
|
| 267 |
+
[42] Vijay John and Seiichi Mita. Rvnet: Deep sensor fusion of monocular camera and radar for image-based obstacle detection in challenging environments, 2019. 2
|
| 268 |
+
[43] Hojung Jung, Yuki Oto, Oscar M. Mozos, Yumi Iwashita, and Ryo Kurazume. Multi-modal panoramic 3d outdoor datasets for place categorization. In IROS, 2016. 3
|
| 269 |
+
[44] Rudolph Emil Kalman. A new approach to linear filtering and prediction problems. Transactions of the ASME-Journal of Basic Engineering, 82(Series D):35-45, 1960. 16
|
| 270 |
+
[45] R. Kesten, M. Usman, J. Houston, T. Pandya, K. Nadhamuni, A. Ferreira, M. Yuan, B. Low, A. Jain, P. Ondruska, S. Omari, S. Shah, A. Kulkarni, A. Kazakova, C. Tao, L. Platinsky, W. Jiang, and V. Shet. Lyft Level 5 AV Dataset 2019. https://level5.lyft.com/dataset/, 2019.2,3, 4
|
| 271 |
+
[46] Jaekyum Kim, Jaehyung Choi, Yechol Kim, Junho Koh, Chung Choo Chung, and Jun Won Choi. Robust camera lidar
|
| 272 |
+
|
| 273 |
+
sensor fusion via deep gated information fusion network. In IVS, 2018. 1
|
| 274 |
+
[47] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, 2012. 8
|
| 275 |
+
[48] Jason Ku, Melissa Mozifian, Jungwook Lee, Ali Harakeh, and Steven Waslander. Joint 3d proposal generation and object detection from view aggregation. In IROS, 2018. 2
|
| 276 |
+
[49] Charles-Éric Noel Laflamme, François Pomerleau, and Philippe Giguère. Driving datasets literature review. arXiv preprint arXiv:1910.11968, 2019. 2
|
| 277 |
+
[50] Nitheesh Lakshminarayana. Large scale multimodal data capture, evaluation and maintenance framework for autonomous driving datasets. In ICCVW, 2019. 2
|
| 278 |
+
[51] Alex H. Lang, Sourabh Vora, Holger Caesar, Lubing Zhou, Jiong Yang, and Oscar Beijbom. Pointpillars: Fast encoders for object detection from point clouds. In CVPR, 2019. 1, 2, 6, 7, 8, 14, 15, 16
|
| 279 |
+
[52] Ming Liang, Bin Yang, Shenlong Wang, and Raquel Urtasun. Deep continuous fusion for multi-sensor 3d object detection. In ECCV, 2018. 2
|
| 280 |
+
[53] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. SSD: Single shot multibox detector. In ECCV, 2016. 7
|
| 281 |
+
[54] Yuexin Ma, Xinge Zhu, Sibo Zhang, Ruigang Yang, Wenping Wang, and Dinesh Manocha. Trafficpredict: Trajectory prediction for heterogeneous traffic-agents http://apolloscape.auto/tracking.html. In AAAI, 2019.3
|
| 282 |
+
[55] Will Maddern, Geoffrey Pascoe, Chris Linegar, and Paul Newman. 1 year, $1000\mathrm{km}$ : The oxford robotcar dataset. *IJRR*, 2017. 2, 3
|
| 283 |
+
[56] 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 CVPR, 2019. 7
|
| 284 |
+
[57] Arsalan Mousavian, Dragomir Anguelov, John Flynn, and Jana Kosecka. 3d bounding box estimation using deep learning and geometry. In CVPR, 2017. 1
|
| 285 |
+
[58] Luk Neumann, Michelle Karg, Shanshan Zhang, Christian Scharfenberger, Ericiegert, Sarah Mistr, Olga Prokofyeva, Robert Thiel, Andrea Vedaldi, Andrew Zisserman, and Bernt Schiele. Nightowls: A pedestrians at night dataset. In ACCV, 2018. 3
|
| 286 |
+
[59] 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. arXiv preprint arXiv:1908.11069, 2019. 7
|
| 287 |
+
[60] Farzan Erlik Nowruzi, Prince Kapoor, Dhanvin Kolhatkar, Fahed Al Hassanat, Robert Laganiere, and Julien Rebut. How much real data do we actually need: Analyzing object detection performance using synthetic and real data. In ICML Workshop on AI for Autonomous Driving, 2019. 2
|
| 288 |
+
|
| 289 |
+
[61] Abhishek Patil, Srikanth Malla, Haiming Gang, and Yi-Ting Chen. The H3D dataset for full-surround 3d multi-object detection and tracking in crowded urban scenes. In ICRA, 2019. 2, 3, 4, 12
|
| 290 |
+
[62] Quang-Hieu Pham, Pierre Sevestre, Ramanpreet Singh Pahwa, Huijing Zhan, Chun Ho Pang, Yuda Chen, Armin Mustafa, Vijay Chandrasekhar, and Jie Lin. A*3D Dataset: Towards autonomous driving in challenging environments. arXiv:1909.07541, 2019. 3
|
| 291 |
+
[63] Tung Phan-Minh, Elena Corina Grigore, Freddy A. Boulton, Oscar Beijbom, and Eric M. Wolff. Covernet: Multimodal behavior prediction using trajectory sets. In CVPR, 2020. 8
|
| 292 |
+
[64] 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. 2
|
| 293 |
+
[65] Vasili Ramanishka, Yi-Ting Chen, Teruhisa Mitsu, and Kate Saenko. Toward driving scene understanding: A dataset for learning driver behavior and causal reasoning. In CVPR, 2018. 4
|
| 294 |
+
[66] Akshay Rangesh and Mohan M. Trivedi. Ground plane polling for 6 dof pose estimation of objects on the road. In arXiv:1811.06666, 2018. 1
|
| 295 |
+
[67] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In NIPS, 2015. 12
|
| 296 |
+
[68] Nicholas Rhinehart, Rowan McAllister, Kris M. Kitani, and Sergey Levine. PRECOG: Predictions conditioned on goals in visual multi-agent scenarios. In ICCV, 2019. 2, 4
|
| 297 |
+
[69] Thomas Roddick, Alex Kendall, and Roberto Cipolla. Orthographic feature transform for monocular 3d object detection. In BMVC, 2019. 1, 2, 5, 6, 7, 8, 14, 15
|
| 298 |
+
[70] Andrea Simonelli, Samuel Rota Bulo, Lorenzo Porzi, Manuel Lopez-Antequera, and Peter Kontschieder. Disentangling monocular 3d object detection. ICCV, 2019. 2, 7, 8, 15, 16
|
| 299 |
+
[71] Leslie N. Smith. A disciplined approach to neural network hyper-parameters: Part 1 – learning rate, batch size, momentum, and weight decay. arXiv preprint arXiv:1803.09820, 2018. 7
|
| 300 |
+
[72] Sourabh Vora, Alex H Lang, Bassam Helou, and Oscar Bei-jbom. Pointpainting: Sequential fusion for 3d object detection. In CVPR, 2020. 2
|
| 301 |
+
[73] 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, 2019. 1
|
| 302 |
+
[74] Ziyan Wang, Buyu Liu, Samuel Schulter, and Manmohan Chandraker. Dataset for high-level 3d scene understanding of complex road scenes in the top-view. In CVPRW, 2019. 2
|
| 303 |
+
[75] Zining Wang, Wei Zhan, and Masayoshi Tomizuka. Fusing bird's eye view lidar point cloud and front view camera image for 3d object detection. In IVS, 2018. 2
|
| 304 |
+
[76] Waymo. Waymo Open Dataset: An autonomous driving dataset, 2019. 3
|
| 305 |
+
[77] Xinshuo Weng and Kris Kitani. A baseline for 3d multi-object tracking. arXiv preprint arXiv:1907.03961, 2019. 6, 7, 8, 16
|
| 306 |
+
|
| 307 |
+
[78] L. Woensel and G. Archer. Ten technologies which could change our lives. European Parliamentary Research Service, 2015. 1
|
| 308 |
+
[79] Christian Wojek, Stefan Walk, and Bernt Schiele. Multi-cue onboard pedestrian detection. In CVPR, 2009. 3
|
| 309 |
+
[80] Bin Xu and Zhenzhong Chen. Multi-level fusion based 3d object detection from monocular images. In CVPR, 2018. 1
|
| 310 |
+
[81] Danfei Xu, Dragomir Anguelov, and Ashesh Jain. Pointfusion: Deep sensor fusion for 3d bounding box estimation. In CVPR, 2018. 2
|
| 311 |
+
[82] Bin Yang, Ming Liang, and Raquel Urtasun. HDNET: Exploiting HD maps for 3d object detection. In CoRL, 2018. 2
|
| 312 |
+
[83] Yangyang Ye, Chi Zhang, Xiaoli Hao, Houjin Chen, and Zhaoxiang Zhang. SARPNET: Shape attention regional proposal network for lidar-based 3d object detection. Neurocomputing, 2019. 2
|
| 313 |
+
[84] Senthil Yogamani, Ciarán Hughes, Jonathan Horgan, Ganesh Sistu, Padraig Varley, Derek O'Dea, Michal Uricár, Stefan Milz, Martin Simon, Karl Amende, et al. Woodscape: A multi-task, multi-camera fisheye dataset for autonomous driving. In ICCV, 2019. 2
|
| 314 |
+
[85] Fisher Yu, Wenqi Xian, Yingying Chen, Fangchen Liu, Mike Liao, Vashisht Madhavan, and Trevor Darrell. BDD100K: A diverse driving video database with scalable annotation tooling. arXiv:1805.04687, 2018. 2, 3
|
| 315 |
+
[86] Ekim Yurtsever, Jacob Lambert, Alexander Carballo, and Kazuya Takeda. A survey of autonomous driving: Common practices and emerging technologies. arXiv preprint arXiv:1906.05113, 2019. 2
|
| 316 |
+
[87] Kaipeng Zhang, Zhanpeng Zhang, Zhifeng Li, and Yu Qiao. Joint face detection and alignment using multitask cascaded convolutional networks. SPL, 23(10), 2016. 12
|
| 317 |
+
[88] Shanshan Zhang, Rodrigo Benenson, and Bernt Schiele. Citypersons: A diverse dataset for pedestrian detection. In CVPR, 2017. 3
|
| 318 |
+
[89] Hao Zhou and Jorge Laval. Longitudinal motion planning for autonomous vehicles and its impact on congestion: A survey. arXiv preprint arXiv:1910.06070, 2019. 2
|
| 319 |
+
[90] Benjin Zhu, Zhengkai Jiang, Xiangxin Zhou, Zeming Li, and Gang Yu. Class-balanced grouping and sampling for point cloud 3d object detection. arXiv:1908.09492, 2019. 2, 6, 7, 8, 16
|
| 320 |
+
[91] Jing Zhu and Yi Fang. Learning object-specific distance from a monocular image. In ICCV, 2019. 2
|
nuscenesamultimodaldatasetforautonomousdriving/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d1b1c469fabd0cbbe4353a4766e1bb4990f4e60bc1eaa10fff43076de7d6f8e
|
| 3 |
+
size 505613
|
nuscenesamultimodaldatasetforautonomousdriving/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b50ecf086f24a820f1f04e542bdce660be437337519081adddad9c95ab0b1bf7
|
| 3 |
+
size 434196
|
xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/f0ff7f4c-a799-410c-a8fe-ee33130929bf_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3fb19f7a4f34e6c8bd860434be5d358bcaf5ca732d036573e810f02e4f7fec9a
|
| 3 |
+
size 68275
|
xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/f0ff7f4c-a799-410c-a8fe-ee33130929bf_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b48fc7dc7538d27d88a3186b89c7a7351bfac7b436d132a35e2b6b34c30cac9f
|
| 3 |
+
size 83428
|
xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/f0ff7f4c-a799-410c-a8fe-ee33130929bf_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0358f71f66f91bc9df80e43f9bb2eac90cf8f871f99c04f2768653d1bf182ba3
|
| 3 |
+
size 1975653
|
xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/full.md
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# xMUDA: Cross-Modal Unsupervised Domain Adaptation for 3D Semantic Segmentation
|
| 2 |
+
|
| 3 |
+
Maximilian Jaritz<sup>1,2,3</sup>, Tuan-Hung Vu<sup>3</sup>, Raoul de Charette<sup>1</sup>, Émilie Wirbel<sup>2,3</sup>, Patrick Pérez<sup>3</sup>
|
| 4 |
+
<sup>1</sup>Inria, <sup>2</sup>Valeo DAR, <sup>3</sup>Valeo.ai
|
| 5 |
+
|
| 6 |
+

|
| 7 |
+
Figure 1: Advantages of cross-modal UDA (xMUDA) in presence of domain gap (day-to-night). On this 3D semantic segmentation example, the UDA Baseline [16] prediction from 2D camera image does not detect the car on the right due to the day/night domain shift. With xMUDA, 2D learns the appearance of cars in the dark from information exchange with the 3D LiDAR point cloud, and 3D learns to reduce false predictions.
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Unsupervised Domain Adaptation (UDA) is crucial to tackle the lack of annotations in a new domain. There are many multi-modal datasets, but most UDA approaches are uni-modal. In this work, we explore how to learn from multi-modality and propose cross-modal UDA (xMUDA) where we assume the presence of 2D images and 3D point clouds for 3D semantic segmentation. This is challenging as the two input spaces are heterogeneous and can be impacted differently by domain shift. In xMUDA, modalities learn from each other through mutual mimicking, disentangled from the segmentation objective, to prevent the stronger modality from adopting false predictions from the weaker one. We evaluate on new UDA scenarios including day-to-night, country-to-country and dataset-to-dataset, leveraging recent autonomous driving datasets. xMUDA brings large improvements over uni-modal UDA on all tested scenarios, and is complementary to state-of-the-art UDA techniques. Code is available at https://github.com/valeoai/xmuda.
|
| 12 |
+
|
| 13 |
+
# 1. Introduction
|
| 14 |
+
|
| 15 |
+
Three-dimensional scene understanding is required in numerous applications, in particular robotics, autonomous driving and virtual reality. Among the different tasks under concern, 3D semantic segmentation is gaining more and more traction as new datasets are being released [1, 5, 6]. Like other perception tasks, 3D semantic segmentation can encounter the problem of domain shift between supervised training and test time, for example between day and night, different countries or datasets. Domain adaptation aims at addressing this gap, but existing work concerns mostly 2D semantic segmentation [11, 16, 28, 34] and rarely 3D [32]. We also observe that previous domain adaptation work focuses on single modality, whereas 3D datasets are often multi-modal, consisting of 3D point clouds and 2D images. While the complementarity between these two modalities is already exploited by both human annotators and learned models to localize objects in 3D scenes [18, 21], we consider it through a new angle, asking the question: If 3D and 2D data are available in the source and target domain, can we capitalize on multi-modality to address Unsupervised Domain Adaptation (UDA)?
|
| 16 |
+
|
| 17 |
+
We coin our method cross-modal UDA, 'xMUDA' in short, and consider 3 real-to-real adaptation scenarios with different lighting conditions (day-to-night), environments (country-to-country) and sensor setup (dataset-to-dataset). It is a challenging task for various reasons. The heterogeneous input spaces (2D and 3D) make the pipeline complex as it implies to work with heterogeneous network architectures and 2D-3D projections. In fusion, if two sensors register the same scene, there is shared information between both, but each sensor also has private (or exclusive) information. Thanks to the latter, one modality can be stronger than the other in a certain case, but it can be the other way around in another, depending on class, context, resolution, etc. This makes selecting the "best" sensor based on prior knowledge unfeasible. Additionally, each modality can be affected differently by the domain shift. For example, camera is deeply impacted by the day-to-night domain change, while LiDAR is relatively robust to it, as shown in Fig. 1.
|
| 18 |
+
|
| 19 |
+
In order to address these challenges, we propose a cross-modal UDA ('xMUDA') framework where information can be exchanged between 2D and 3D in order to learn from each other for UDA (see right side of Fig. 1). We use a disentangled 2-stream architecture to address the domain gap individually in each modality. Our learning scheme allows robust balancing of the cross-modal and segmentation objective. In addition, xMUDA can be combined with existing uni-modal UDA techniques. In this work, we showcase complementarity to self-training with pseudo-labels. Finally, it is common practice in supervised learning to use feature fusion (e.g., early or late fusion) when multiple modalities are available [8, 18, 27]: our framework can be extended to fusion while maintaining a disentangled cross-modal objective.
|
| 20 |
+
|
| 21 |
+
Our contributions can be summarized as follows:
|
| 22 |
+
|
| 23 |
+
- We define new UDA scenarios and propose corresponding splits on recently published 2D-3D datasets.
|
| 24 |
+
- We design an architecture that enables cross-modal learning by disentangling private and shared information in 2D and 3D.
|
| 25 |
+
- We propose a novel UDA learning scheme where modalities can learn from each other in balance with the main objective. It can be applied on top of state-of-the-art self-training techniques to boost performance.
|
| 26 |
+
- We showcase how our framework can be extended to late fusion and produce superior results.
|
| 27 |
+
|
| 28 |
+
On the different proposed benchmarks we outperform the single-modality state-of-the-art UDA techniques by a significant margin. Thereby, we show that the exploitation of multi-modality for UDA is a powerful tool that can benefit a wide range of multi-sensor applications.
|
| 29 |
+
|
| 30 |
+
# 2. Related Work
|
| 31 |
+
|
| 32 |
+
In this section, rather than thoroughly going through the literature, we review representative works for each focus.
|
| 33 |
+
|
| 34 |
+
Unsupervised Domain Adaptation. The past few years have seen an increasing interest in unsupervised domain adaptation techniques for complex perception tasks like object detection and semantic segmentation. Under the hood of such methods lies the same spirit of learning domain-invariant representations, i.e., features coming from different domains should introduce insignificant discrepancy. Some works promote adversarial training to minimize source-target distribution shift, either on pixel- [11], feature- [12] or output-space [26, 28]. Revisited from semi-supervised learning [14], self-training with pseudo-labels has also been recently proven effective for UDA [16, 34].
|
| 35 |
+
|
| 36 |
+
While most existing works consider UDA in the 2D world, very few tackle the 3D counterpart. Wu et al. [32] adopted activation correlation alignment [20] for UDA in 3D segmentation from LiDAR point clouds. In this work, we investigate the same task, but differently: our system operates on multi-modal input data, i.e., RGB + LiDAR.
|
| 37 |
+
|
| 38 |
+
To the best of our knowledge, there are no previous UDA works in 2D/3D semantic segmentation for multi-modal scenarios. Only some consider the extra modality, e.g. depth, solely available at training time on source domain and leverage such privileged information to boost adaptation performance [15, 29]. Otherwise, we here assume all modalities are available at train and test time on both source and target domains.
|
| 39 |
+
|
| 40 |
+
Multi-Modality Learning. In a supervised setting, performance can naturally be improved by fusing features from multiple sources. The geometrically simplest case is RGB-Depth fusion with dense pixel-to-pixel correspondence for 2D segmentation [8, 27]. It is harder to fuse a 3D point cloud with a 2D image, because they live in different metric spaces. One solution is to project 2D and 3D features into a 'bird eye view' [17, 18] or 'LiDAR front view' [19] for the task of object detection. Another possibility is to lift 2D features from multi-view images to the 3D point cloud to enable joint 2D-3D processing for 3D semantic segmentation [3, 13, 24]. We are closer to the last series of works: we share the same goal of 3D semantic segmentation. However, we focus on how to exploit multi-modality for UDA instead of supervised learning and only use single view images and their corresponding point clouds.
|
| 41 |
+
|
| 42 |
+
3D networks for semantic segmentation. While images are dense tensors, 3D point clouds can be represented in multiple ways which leads to competing network families that evolve in parallel. Voxels are very similar to pixels, but very memory intense as most of them are empty. Graham et al. [7] and similar implementation [4] address this
|
| 43 |
+
|
| 44 |
+

|
| 45 |
+
Figure 2: Overview of our xMUDA framework for 3D semantic segmentation. The architecture comprises a 2D stream which takes an image as input and uses a U-Net-style 2D ConvNet [23], and a 3D stream which takes the point cloud as input and uses a U-Net-Style 3D SparseConvNet [7]. Feature outputs of both streams have same length $N$ , equal to the number of 3D points. To achieve that, we project the 3D points into the image and sample the 2D features at the corresponding pixel locations. The 4 segmentation outputs consist of the main predictions $P_{\mathrm{2D}}$ , $P_{\mathrm{3D}}$ and the mimicry predictions $P_{\mathrm{2D} \to \mathrm{3D}}$ , $P_{\mathrm{3D} \to \mathrm{2D}}$ . We transfer knowledge across modalities using KL divergence, $D_{\mathrm{KL}}(P_{\mathrm{3D}}||P_{\mathrm{2D} \to \mathrm{3D}})$ , where the objective of the 2D mimicry head is to estimate the main 3D output and vice versa, $D_{\mathrm{KL}}(P_{\mathrm{2D}}||P_{\mathrm{3D} \to \mathrm{2D}})$ .
|
| 46 |
+
|
| 47 |
+
problem by using hash tables to convolve only on active voxels. This allows for very high resolution with typically only one point per voxel. Point-based networks perform computation in continuous 3D space and can thus directly accept point clouds as input. PointNet++ [22] uses pointwise convolution, max-pooling to compute global features and local neighborhood aggregation for hierarchical learning akin to CNNs. Many improvements have been proposed in this direction, such as continuous convolutions [30] and deformable kernels [25]. Graph-based networks convolve on the edges of a point point cloud [31]. In this work, we select SparseConvNet [7] as 3D network which is the state-of-the-art on the ScanNet benchmark [5].
|
| 48 |
+
|
| 49 |
+
# 3. xMUDA
|
| 50 |
+
|
| 51 |
+
The aim of cross-modal UDA (xMUDA) is to exploit multi-modality by enabling controlled information exchange between modalities so that they can learn from each other. This is achieved through letting them mutually mimic each other's outputs, so that they can both benefit from their counterpart's strengths.
|
| 52 |
+
|
| 53 |
+
Specifically, we investigate xMUDA using point cloud (3D modality) and image (2D modality) on the task of 3D semantic segmentation. An overview is depicted in Fig. 2. We first describe the architecture in Sec. 3.1, our learning scheme in Sec. 3.2, and later showcase its extension to the
|
| 54 |
+
|
| 55 |
+
special case of fusion.
|
| 56 |
+
|
| 57 |
+
In the following, we consider a source dataset $S$ , where each sample consists of 2D image $\boldsymbol{x}_s^{2D}$ , 3D point cloud $\boldsymbol{x}_s^{3D}$ and 3D segmentation labels $\boldsymbol{y}_s^{3D}$ as well as a target dataset $\mathcal{T}$ , lacking annotations, where each sample only consists of image $\boldsymbol{x}_t^{2D}$ and point cloud $\boldsymbol{x}_t^{3D}$ . Images $\boldsymbol{x}^{2D}$ are of spatial size $(H, W, 3)$ and point clouds $\boldsymbol{x}^{3D}$ of spatial size $(N, 3)$ , with $N$ the number of 3D points in the camera field of view.
|
| 58 |
+
|
| 59 |
+
# 3.1. Architecture
|
| 60 |
+
|
| 61 |
+
To allow cross-modal learning, it is crucial to extract features specific to each modality. Opposed to 2D-3D architectures where 2D features are lifted to 3D [18], we use a 2-stream architecture with independent 2D and 3D branches that do not share features (see Fig. 2).
|
| 62 |
+
|
| 63 |
+
We use SparseConvNet [7] for 3D and a modified version of U-Net [23] with ResNet34 [9] for 2D. Even though each stream has a specific network architecture, it is important that the outputs are of same size to allow cross-modal learning. Implementation details are provided in Sec. 4.2.
|
| 64 |
+
|
| 65 |
+
Dual Segmentation Head. We call segmentation head the last linear layer in the network that transforms the output features into logits followed by a softmax function to produce the class probabilities. For xMUDA, we establish a link between 2D and 3D with a 'mimicry' loss between the
|
| 66 |
+
|
| 67 |
+
output probabilities, i.e., each modality should predict the other modality's output. This allows us to explicitly control the cross-modal learning.
|
| 68 |
+
|
| 69 |
+
In a naive approach, each modality has a single segmentation head and a cross-modal optimization objective aligns the outputs of both modalities. Unfortunately, this leads to only using information that is shared between the two modalities, while discarding private information that is exclusive to each sensor (more details in the ablation study in Sec. 5.1). This is an important limitation, as we want to leverage both private and shared information, in order to obtain the best possible performance.
|
| 70 |
+
|
| 71 |
+
To preserve private information while benefiting from shared knowledge, we introduce an additional segmentation head to uncouple the mimicry objective from the main segmentation objective. This means that the 2D and 3D streams both have two segmentation heads: one main head for the best possible prediction, and one mimicry head to estimate the other modality's output.
|
| 72 |
+
|
| 73 |
+
The outputs of the 4 segmentation heads (see Fig. 2) are of size $(N, C)$ , where $C$ is equal to the number of classes such that we obtain a vector of class probabilities for each 3D point. The two main heads produce the best possible predictions, $P_{\mathrm{2D}}$ and $P_{\mathrm{3D}}$ respectively for each branch. The two mimicry heads estimate the other modality's output: 2D estimates 3D $(P_{\mathrm{2D} \rightarrow \mathrm{3D}})$ and 3D estimates 2D $(P_{\mathrm{3D} \rightarrow \mathrm{2D}})$ .
|
| 74 |
+
|
| 75 |
+
# 3.2. Learning Scheme
|
| 76 |
+
|
| 77 |
+
The goal of our cross-modal learning scheme is to exchange information between the modalities in a controlled manner to teach them to be aware of each other. This auxiliary objective can effectively improve the performance of each modality and does not require any annotations which enables its use for UDA on target dataset $\mathcal{T}$ . In the following we define the basic supervised learning setup, our cross-modal loss $\mathcal{L}_{\mathrm{xM}}$ , and the additional pseudo-label learning method. The loss flows are depicted in Fig. 3a.
|
| 78 |
+
|
| 79 |
+
Supervised Learning. The main goal of 3D segmentation is learned through cross-entropy in a classical supervised fashion on the source data. We can write the segmentation loss $\mathcal{L}_{\mathrm{seg}}$ for each network stream (2D and 3D) as:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\mathcal {L} _ {\mathrm {s e g}} \left(\boldsymbol {x} _ {s}, \boldsymbol {y} _ {s} ^ {\mathrm {3 D}}\right) = - \frac {1}{N} \sum_ {n = 1} ^ {N} \sum_ {c = 1} ^ {C} \boldsymbol {y} _ {s} ^ {(n, c)} \log \boldsymbol {P} _ {\boldsymbol {x} _ {s}} ^ {(n, c)}, \tag {1}
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
where $\pmb{x}_s$ is either $\pmb{x}_s^{2\mathrm{D}}$ or $\pmb{x}_s^{3\mathrm{D}}$ .
|
| 86 |
+
|
| 87 |
+
Cross-Modal Learning. The objective of unsupervised learning across modalities is twofold. Firstly, we want to transfer knowledge from one modality to the other on the target dataset. For example, let one modality be sensitive
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
(a) Proposed UDA training setup
|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
(b) UDA on multi-modal data
|
| 94 |
+
Figure 3: Details of proposed cross-modal training with adaptation. (a) xMUDA learns from supervision on the source domain (plain lines) and self-supervision on the target domain (dashed lines), while benefiting from the cross-modal predictions of 2D/3D. (b) We consider four data subsets: Source 2D, Target 2D, Source 3D and Target 3D. In contrast to existing techniques, xMUDA introduces a cross-modal self-training mechanism for UDA.
|
| 95 |
+
|
| 96 |
+
and the other more robust to the domain shift, then the robust modality should teach the sensitive modality the correct class in the target domain where no labels are available. Secondly, we want to design an auxiliary objective on source and target, where the task is to estimate the other modality's prediction. By mimicking not only the class with maximum probability, but the whole distribution, more information is exchanged, leading to softer labels.
|
| 97 |
+
|
| 98 |
+
We choose KL divergence for the cross-modal loss $\mathcal{L}_{\mathrm{xM}}$ and define it as follows:
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\begin{array}{l} \mathcal {L} _ {\mathrm {x M}} (\boldsymbol {x}) = \boldsymbol {D} _ {\mathrm {K L}} \left(\boldsymbol {P} _ {\boldsymbol {x}} ^ {(n, c)} \| \boldsymbol {Q} _ {\boldsymbol {x}} ^ {(n, c)}\right) (2) \\ = - \frac {1}{N} \sum_ {n = 1} ^ {N} \sum_ {c = 1} ^ {C} P _ {\boldsymbol {x}} ^ {(n, c)} \log \frac {P _ {\boldsymbol {x}} ^ {(n , c)}}{Q _ {\boldsymbol {x}} ^ {(n , c)}}, (3) \\ \end{array}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
with $(P,Q)\in \{(P_{\mathrm{2D}},P_{\mathrm{3D}\to 2\mathrm{D}}),(P_{\mathrm{3D}},P_{\mathrm{2D}\to 3\mathrm{D}})\}$ where $P$ is the target distribution from the main prediction which is to be estimated by the mimicking prediction $Q$ . This loss is applied on the source and the target domain as it does not require ground truth labels and is the key to our proposed domain adaptation framework. For source, $\mathcal{L}_{\mathrm{xM}}$ can be seen as an auxiliary mimicry loss in addition to the main segmentation loss $\mathcal{L}_{\mathrm{seg}}$ .
|
| 105 |
+
|
| 106 |
+
The complete objective for each network stream (2D and 3D) is the combination of the segmentation loss $\mathcal{L}_{\mathrm{seg}}$ on source and the cross-modal loss $\mathcal{L}_{\mathrm{xM}}$ on source and target:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\begin{array}{l} \min _ {\theta} \left[ \frac {1}{| \mathcal {S} |} \sum_ {\boldsymbol {x} _ {s} \in \mathcal {S}} \left(\mathcal {L} _ {\mathrm {s e g}} \left(\boldsymbol {x} _ {s}, \boldsymbol {y} _ {s} ^ {\mathrm {3 D}}\right) + \lambda_ {s} \mathcal {L} _ {\mathrm {x M}} \left(\boldsymbol {x} _ {s}\right)\right) \right. \\ \left. + \frac {1}{| \mathcal {T} |} \sum_ {\boldsymbol {x} _ {t} \in \mathcal {T}} \lambda_ {t} \mathcal {L} _ {\mathrm {X M}} \left(\boldsymbol {x} _ {t}\right) \right], \tag {4} \\ \end{array}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $\lambda_s, \lambda_t$ are hyperparameters to weight $\mathcal{L}_{\mathrm{xM}}$ on source and target respectively and $\theta$ are the network weights of either the 2D or the 3D stream.
|
| 113 |
+
|
| 114 |
+
There are parallels between the cross-modal learning and model distillation which also adopts KL divergence as mimicry loss, but with the goal to transfer knowledge from a large network to a smaller one in a supervised setting [10]. Recently Zhang et al. introduced Deep Mutual Learning [33] where an ensemble of uni-modal networks are jointly trained to learn from each other in collaboration. Though to some extent, our cross-modal learning is of similar nature to those strategies, we tackle a different distillation angle, i.e. across modalities (2D/3D) and not in the supervised, but in the UDA setting.
|
| 115 |
+
|
| 116 |
+
Additional self-training with Pseudo-Labels. Cross-modal learning is complementary to pseudo-labeling [14] used originally in semi-supervised learning and recently in UDA [16, 34]. In details, once having optimized a model with Eq. 4, we extract pseudo-labels offline, selecting highly confident labels based on the predicted class probability. Then, we train again from scratch using the produced pseudo-labels for an additional segmentation loss on the target training set. The optimization problem writes:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\begin{array}{l} \min _ {\theta} \left[ \frac {1}{| \mathcal {S} |} \sum_ {\boldsymbol {x} _ {s}} \left(\mathcal {L} _ {\mathrm {s e g}} (\boldsymbol {x} _ {s}, \boldsymbol {y} _ {s} ^ {\mathrm {3 D}}) + \lambda_ {s} \mathcal {L} _ {\mathrm {x M}} (\boldsymbol {x} _ {s})\right) \right. \\ \left. + \frac {1}{| \mathcal {T} |} \sum_ {\boldsymbol {x} _ {t}} \left(\lambda_ {\mathrm {P L}} \mathcal {L} _ {\mathrm {s e g}} \left(\boldsymbol {x} _ {t}, \hat {\boldsymbol {y}} ^ {\mathrm {3 D}}\right) + \lambda_ {t} \mathcal {L} _ {\mathrm {x M}} \left(\boldsymbol {x} _ {t}\right)\right) \right], \tag {5} \\ \end{array}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
where $\lambda_{\mathrm{PL}}$ is weighting the pseudo-label segmentation loss and $\hat{\pmb{y}}^{3\mathrm{D}}$ are the pseudo-labels. For clarity, we will refer to the xMUDA variant that uses additional self-training with pseudo-labels as xMUDA $_{\mathrm{PL}}$ .
|
| 123 |
+
|
| 124 |
+
# 3.3. Discussion
|
| 125 |
+
|
| 126 |
+
A central contribution of our work is the formulation of cross-modal learning via KL-divergence minimization in multi-modal scenarios which helps us not only to benefit from multiple sensors but also to mitigate domain shift. Indeed, as computing KL-divergence between 2D and 3D predictions does not require ground-truth, our learning scheme allows extra regularization on the target set – bringing adaptation effects. Fig. 3b visualizes the 4 data subsets considered in our task and shows which dimension different UDA
|
| 127 |
+
|
| 128 |
+
techniques operate on. Opposed to previous UDA methods which only act on a single modality, xMUDA introduces a new way of cross-modal self-training and is thus orthogonal and complementary to existing adaptation techniques.
|
| 129 |
+
|
| 130 |
+
# 4. Experiments
|
| 131 |
+
|
| 132 |
+
# 4.1. Datasets
|
| 133 |
+
|
| 134 |
+
To evaluate xMUDA, we identified 3 real-to-real adaptation scenarios. In the day-to-night case, LiDAR has a small domain gap, as it is an active sensor sending out laser beams which are mostly invariant to lighting conditions. In contrast, camera has a large domain gap as its passive sensing suffers from lack of light sources, leading to drastic changes in object appearance. The second scenario is country-to-country adaptation, where the domain gap can be larger for LiDAR or camera: for some classes the 3D shape might change more than the visual appearance or vice versa. The third scenario, dataset-to-dataset, comprises changes in the sensor setup, such as camera optics, but most importantly a higher LiDAR resolution on target. 3D networks are sensitive to varying point cloud density and the image could help to guide and stabilize adaptation.
|
| 135 |
+
|
| 136 |
+
We leverage recently published autonomous driving datasets nuScenes [2], A2D2 [6] and SemanticKITTI [1] in which LiDAR and camera are synchronized and calibrated allowing to compute the projection between a 3D point and its corresponding 2D image pixel. The chosen datasets contain 3D annotations. For simplicity and consistency across datasets, we only use the front camera image and the LiDAR points that project into it.
|
| 137 |
+
|
| 138 |
+
For nuScenes, the annotations are 3D bounding boxes and we obtain the point-wise labels for 3D semantic segmentation by assigning the corresponding object label if a point lies inside a 3D box; otherwise the point is labeled as background. We use the meta data to generate the splits for two UDA scenarios: Day/Night and USA/Singapore.
|
| 139 |
+
|
| 140 |
+
A2D2 and SemanticKITTI provide segmentation labels. For UDA, we define 10 shared classes between the two datasets. The LiDAR setup is the main difference: in A2D2, there are 3 LiDARs with 16 layers which generate a rather sparse point cloud and in SemanticKITTI, there is one high-resolution LiDAR with 64 layers.
|
| 141 |
+
|
| 142 |
+
We provide the data split details in the supplementary.
|
| 143 |
+
|
| 144 |
+
# 4.2. Implementation Details
|
| 145 |
+
|
| 146 |
+
2D Network. We use a modified version of U-Net [23] with a ResNet34 [9] encoder where we add dropout after the 3rd and 4th layer and initialize with ImageNet pretrained weights provided by PyTorch. In the decoder, each layer consists of a transposed convolution, concatenation with encoder features of same resolution (skip connection) and another convolution to mix the features. The network takes
|
| 147 |
+
|
| 148 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">USA/Singapore</td><td colspan="3">Day/Night</td><td colspan="3">A2D2/SemanticKITTI</td></tr><tr><td>2D</td><td>3D</td><td>softmax avg</td><td>2D</td><td>3D</td><td>softmax avg</td><td>2D</td><td>3D</td><td>softmax avg</td></tr><tr><td>Baseline (source only)</td><td>53.4</td><td>46.5</td><td>61.3</td><td>42.2</td><td>41.2</td><td>47.8</td><td>36.0</td><td>36.6</td><td>41.8</td></tr><tr><td>Deep logCORAL [20]</td><td>52.6</td><td>47.1</td><td>59.1</td><td>41.4</td><td>42.8</td><td>51.8</td><td>35.8*</td><td>39.3</td><td>40.3</td></tr><tr><td>MinEnt [28]</td><td>53.4</td><td>47.0</td><td>59.7</td><td>44.9</td><td>43.5</td><td>51.3</td><td>38.8</td><td>38.0</td><td>42.7</td></tr><tr><td>PL [16]</td><td>55.5</td><td>51.8</td><td>61.5</td><td>43.7</td><td>45.1</td><td>48.6</td><td>37.4</td><td>44.8</td><td>47.7</td></tr><tr><td>xMUDA</td><td>59.3</td><td>52.0</td><td>62.7</td><td>46.2</td><td>44.2</td><td>50.0</td><td>36.8</td><td>43.3</td><td>42.9</td></tr><tr><td>xMUDApl</td><td>61.1</td><td>54.1</td><td>63.2</td><td>47.1</td><td>46.7</td><td>50.8</td><td>43.7</td><td>48.5</td><td>49.1</td></tr><tr><td>Oracle</td><td>66.4</td><td>63.8</td><td>71.6</td><td>48.6</td><td>47.1</td><td>55.2</td><td>58.3</td><td>71.0</td><td>73.7</td></tr></table>
|
| 149 |
+
|
| 150 |
+
* Trained with batch size 6 instead of 8 to fit into GPU memory.
|
| 151 |
+
|
| 152 |
+
Table 1: mIoU on the respective target sets for 3D semantic segmentation in different cross-modal UDA scenarios. We report the result for each network stream (2D and 3D) as well as the ensembling result ('softmax avg').
|
| 153 |
+
|
| 154 |
+
an image $\pmb{x}^{2\mathrm{D}}$ as input and produces an output feature map with equal spatial dimensions $(H, W, F_{2\mathrm{D}})$ , where $F_{2\mathrm{D}}$ is the number of feature channels. In order to lift the 2D features to 3D, we sample them at sparse pixel locations where the 3D points project into the feature map, and obtain the final two-dimensional feature matrix $(N, F_{2\mathrm{D}})$ .
|
| 155 |
+
|
| 156 |
+
3D Network. For SparseConvNet [7] we leverage the official PyTorch implementation and a U-Net architecture with 6 times downsampling. We use a voxel size of $5\mathrm{cm}$ which is small enough to only have one 3D point per voxel.
|
| 157 |
+
|
| 158 |
+
Training. For data augmentation we employ horizontal flipping and color jitter in 2D, and x-axis flipping, scaling and rotation in 3D. Due to the wide angle image in SemanticKITTI, we crop a fixed size rectangle randomly on the horizontal image axis to reduce memory during training. Log-smoothed class weights are used in all experiments to address class imbalance. For the KL divergence for the cross-modal loss in PyTorch, we detach the target variable to only backpropagate in either the 2D or the 3D network. We use a batch size of 8, the Adam optimizer with $\beta_{1} = 0.9$ , $\beta_{2} = 0.999$ , and an iteration based learning schedule where the learning rate of 0.001 is divided by 10 at 80k and 90k iterations; the training finishes at 100k. We jointly train the 2D and 3D stream and at each iteration, accumulate gradients computed on source and target batch. All trainings fit into a single GPU with 11GB RAM.
|
| 159 |
+
|
| 160 |
+
For xMUDA, we train with Eq. 4, where we apply the segmentation loss using ground truth labels on source and cross-modal loss on source and target. For $\mathrm{xMUDA}_{\mathrm{PL}}$ , we generate pseudo-labels offline as in [16] with the previously trained xMUDA model and train again from scratch, now with additional segmentation loss on target with pseudolabels (Eq. 5). Note, that we do not select the best weights on the validation set, but rather use the last checkpoint to generate the pseudo-labels in order to prevent any supervised learning signal. The 2D and 3D network are trained jointly and optimized on source and target at each iteration.
|
| 161 |
+
|
| 162 |
+
# 4.3. Main Experiments
|
| 163 |
+
|
| 164 |
+
We evaluate our method on the 3 proposed cross-modal UDA scenarios and compare against uni-modal UDA methods: Deep logCORAL [20], entropy minimization (MinEnt) [28] and pseudo-labeling (PL) [16]. Regarding PL, we apply [16] as follows: we generate pseudo-labels offline with a first training without UDA, and discard unconfident labels through class-wise thresholding. Then, we run a second training from scratch adding PL loss on target. The image-2-image translation part was excluded due to its instability, high training complexity and incompatibility with LiDAR data, thus limiting reproducibility. Regarding the two other uni-modal techniques, we adapt the published implementations to our settings. For all, we searched for the best respective hyperparameters.
|
| 165 |
+
|
| 166 |
+
We report mean Intersection over Union (mIoU) results for 3D segmentation in Tab. 1 on the target test set for the 3 UDA scenarios. We evaluate on the test set using the checkpoint that achieved the best score on the validation set. In addition to the scores of the 2D and 3D model, we show the ensembling result ('softmax avg') which is obtained by taking the mean of the predicted 2D and 3D probabilities after softmax. The baseline is trained on source only and the oracle on target only, except the Day/Night oracle, where we used batches of $50\% / 50\%$ Day/Night to prevent overfitting. The uni-modal UDA baselines [16, 20, 28] are applied separately on each modality.
|
| 167 |
+
|
| 168 |
+
xMUDA – using the cross-modal loss but not PL – brings a significant adaptation effect on all 3 UDA scenarios compared to ‘Baseline (source only)’ and often outperforms the uni-modal UDA baselines. We observe, that xMUDA consistently improves both modalities (2D and 3D), i.e. even the strong modality can learn from the weaker one. $\mathrm{xMUDA}_{\mathrm{PL}}$ achieves the best score everywhere with the only exception of Day/Night softmax avg. Further, cross-modal learning and self-training with pseudo-labels (PL) are complementary as their combination in xMUDA_{PL} consistently
|
| 169 |
+
|
| 170 |
+

|
| 171 |
+
(a) Vanilla Fusion
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
(b) xMUDA Fusion
|
| 175 |
+
|
| 176 |
+
yields a higher score than each separate technique.
|
| 177 |
+
|
| 178 |
+
Qualitative results are presented in Fig. 6 and show the versatility of xMUDA across all proposed UDA scenarios. We provide additional qualitative results in the supplementary and a video of the A2D2 to SemanticKITTI scenario at http://tiny.cc/xmuda.
|
| 179 |
+
|
| 180 |
+
# 4.4. Extension to Fusion
|
| 181 |
+
|
| 182 |
+
In Sec. 4.3 we show how each 2D and 3D modality can be improved with xMUDA. However, can we obtain even better results with fusion?
|
| 183 |
+
|
| 184 |
+
A common fusion architecture is late fusion where the features from different sources are concatenated (see Fig. 4a). However, when merging the main 2D/3D branches into a unique fused head, we can no longer apply cross-modal learning (as in Fig. 5a). To address this problem, we propose 'xMUDA Fusion' where we add an additional segmentation head to both 2D and 3D network streams prior to the fusion layer, with the purpose of mimicking the central fusion head (see Fig. 4b). Note that this idea could also be applied on top of other fusion architectures.
|
| 185 |
+
|
| 186 |
+
In Tab. 2 we show results for different fusion approaches where we specify which architecture was used (Vanilla late fusion from Fig. 4a or xMUDA Fusion from Fig. 4b). While 'xMUDApl Fusion' outperforms all other uni-modal baselines, 'xMUDA Fusion' already achieves better performances than 'Deep logCORAL' and 'MinEnt'.
|
| 187 |
+
|
| 188 |
+
# 5. Ablation Studies
|
| 189 |
+
|
| 190 |
+
# 5.1. Segmentation Heads
|
| 191 |
+
|
| 192 |
+
In the following we justify our design choice of two segmentation heads per modality stream as opposed to a single
|
| 193 |
+
|
| 194 |
+
<table><tr><td></td><td>Architecture</td><td>mIoU</td></tr><tr><td>Baseline (source only)</td><td>Vanilla</td><td>59.9</td></tr><tr><td>Deep logCORAL [20]</td><td>Vanilla</td><td>58.2</td></tr><tr><td>MinEnt [28]</td><td>Vanilla</td><td>60.8</td></tr><tr><td>PL [16]</td><td>Vanilla</td><td>65.2</td></tr><tr><td>Distillation</td><td>Vanilla</td><td>65.8</td></tr><tr><td>xMUDA Fusion</td><td>xMUDA</td><td>61.9</td></tr><tr><td>xMUDAPL Fusion</td><td>xMUDA</td><td>66.6</td></tr><tr><td>Oracle</td><td>xMUDA</td><td>72.2</td></tr></table>
|
| 195 |
+
|
| 196 |
+
Table 2: mIoU for fusion methods, USA/Singapore scenario. In 'Distillation' we use the xMUDA<sub>PL</sub> model of the main experiments reported in Tab. 1 to generate pseudolabels from the softmax average and use those to train the Vanilla Fusion network.
|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
Figure 4: Architectures for fusion. (a) In Vanilla Fusion the 2D and 3D features are concatenated, fed into a linear layer with ReLU to mix the features and followed by another linear layer and softmax to obtain a fused prediction $P_{\text{fuse}}$ . (b) In xMUDA Fusion, we add two uni-modal outputs $P_{2\mathrm{D} \rightarrow \text{fuse}}$ and $P_{3\mathrm{D} \rightarrow \text{fuse}}$ that are used to mimic the fusion output $P_{\text{fuse}}$ .
|
| 200 |
+
(a) Single head architecture
|
| 201 |
+
Figure 5: Single vs. Dual segmentation head. (a) Main and mimicry prediction are not uncoupled as in xMUDA of Fig. 2. (b) Curves of mIoU w.r.t. $\lambda_{t}$ of single- vs. dual-head architectures. USA/Singapore scenario.
|
| 202 |
+
|
| 203 |
+

|
| 204 |
+
(b) $\lambda_{s} = 1.0$ , varying $\lambda_{t}$
|
| 205 |
+
|
| 206 |
+
one in a naive approach (see Fig. 5a). In the single head architecture the mimicking objective is directly applied between the 2 main predictions. There is shared information between 2D/3D, but also private information in each modality. An unwanted solution to reduce the cross-modal loss $\mathcal{L}_{\mathrm{xM}}$ is that the networks discard private information, so that they both only use shared information, making it easier to align their outputs. However, we conjecture that best performance can be achieved if private information is also used. By separating the main from the mimicking prediction with dual segmentation heads, we can effectively decouple the two optimization objectives: The main head outputs the best possible prediction to optimize the segmentation loss, while the mimicking head can align with the other modality.
|
| 207 |
+
|
| 208 |
+
To benchmark single vs. dual segmentation head architectures, we apply cross-modal loss $\mathcal{L}_{\mathrm{xM}}$ only, excluding PL as it does not depend on the dual head approach. We fix $\mathcal{L}_{\mathrm{xM}}$ loss weight on source to $\lambda_{s} = 1.0$ and vary target $\lambda_{t}$ . The hyperparameter $\lambda_{t}$ is at the focus of this analysis because it controls modality alignment on the target set, the main driver for UDA. In Fig. 5b, we show that best performance is achieved with the dual head architecture of xMUDA, while the single head architecture drops drastically in performance for high $\lambda_{t}$ . We hypothesize that dual
|
| 209 |
+
|
| 210 |
+

|
| 211 |
+
Figure 6: Qualitative results on the 3 proposed splits. We show the ensembling result obtained from averaging the softmax output of 2D and 3D on the UDA Baseline (PL) and xMUDA<sub>PL</sub>.
|
| 212 |
+
|
| 213 |
+
A2D2/SemanticKITTI: xMUDA<sub>PL</sub> helps to stabilize and refine segmentation performance when there are sensor changes (3x16 layer LiDAR with different angles to 64 layer LiDAR).
|
| 214 |
+
|
| 215 |
+
USA/Singapore: Delivery motorcycles with a storage box on the back are common in Singapore, but not in USA. The 3D shape might resemble a vehicle. However, 2D appearance information is leveraged in xMUDApl to improve the recognition. Day/Night: The visual appearance of a car at night with headlights turned on is very different than during day. The uni-modal UDA baseline is not able to learn this new appearance. However, if information between camera and robust-at-night LiDAR is exchanged in xMUDApl, it is possible to detect the car correctly at night.
|
| 216 |
+
|
| 217 |
+
head is more robust because it disentangles the segmentation from the mimicking objective.
|
| 218 |
+
|
| 219 |
+
# 5.2. Cross-Modal Learning on Source
|
| 220 |
+
|
| 221 |
+
In (4), cross-modal loss $\mathcal{L}_{\mathrm{xM}}$ is applied on source and target, although we already have supervised segmentation loss $\mathcal{L}_{\mathrm{seg}}$ on source. We observe a gain of $4.8\mathrm{mIoU}$ on 2D and 4.4 on 3D when adding $\mathcal{L}_{\mathrm{xM}}$ on source as opposed to applying it on target only. This shows that it is important to train the mimicking head on source, stabilizing the predictions, which can be exploited during adaptation on target.
|
| 222 |
+
|
| 223 |
+
# 5.3. Cross-Modal Learning for Oracle Training
|
| 224 |
+
|
| 225 |
+
We have shown that cross-modal learning is very effective for UDA. However, it can also be used in a purely supervised setting. When training the oracle with cross-modal loss $\mathcal{L}_{\mathrm{xM}}$ , we can improve over the baseline, see Tab. 3. We conjecture that $\mathcal{L}_{\mathrm{xM}}$ is a beneficial auxiliary loss and can help to regularize training and prevent overfitting.
|
| 226 |
+
|
| 227 |
+
# 6. Conclusion
|
| 228 |
+
|
| 229 |
+
We propose xMUDA, Cross-Modal Unsupervised Domain Adaptation, where modalities learn from each other
|
| 230 |
+
|
| 231 |
+
<table><tr><td>Method</td><td>2D</td><td>3D</td><td>softmax avg</td><td>Method</td><td>fusion</td></tr><tr><td>w/o LxM</td><td>65.8</td><td>63.2</td><td>71.1</td><td>Vanilla Fusion</td><td>71.0</td></tr><tr><td>with LxM</td><td>66.4</td><td>63.8</td><td>71.6</td><td>Fusion + LxM</td><td>72.2</td></tr></table>
|
| 232 |
+
|
| 233 |
+
Table 3: Cross-modal loss in supervised setting for oracle training. mIoU on USA/Singapore.
|
| 234 |
+
|
| 235 |
+
to improve performance on the target domain. For cross-modal learning we introduce mutual mimicking between the modalities, achieved through KL divergence. We design an architecture with separate main and mimicking head to disentangle the segmentation from the cross-modal learning objective. Experiments on 3D semantic segmentation on new UDA scenarios using 2D/3D datasets, show that xMUDA largely outperforms uni-modal UDA and is complementary to the pseudo-label strategy. An analog performance boost is observed on fusion.
|
| 236 |
+
|
| 237 |
+
We think that cross-modal learning could be useful in a wide variety of settings and tasks, not limited to UDA. Particularly, it should be beneficial for supervised learning and other modalities than image and point cloud.
|
| 238 |
+
|
| 239 |
+
# References
|
| 240 |
+
|
| 241 |
+
[1] J. Behley, M. Garbade, A. Milioto, J. Quenzel, S. Behnke, C. Stachniss, and J. Gall. SemanticKITTI: A dataset for semantic scene understanding of LiDAR sequences. In ICCV, 2019. 1, 5
|
| 242 |
+
[2] 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. 5
|
| 243 |
+
[3] Hung-Yueh Chiang, Yen-Liang Lin, Yueh-Cheng Liu, and Winston H Hsu. A unified point-based framework for 3d segmentation. In 3DV, 2019. 2
|
| 244 |
+
[4] Christopher Choy, JunYoung Gwak, and Silvio Savarese. 4d spatio temporal convnet: Minkowski convolutional neural networks. In CVPR, 2019. 2
|
| 245 |
+
[5] Angela Dai, Angel X. Chang, Manolis Savva, Maciej Halber, Thomas Funkhouser, and Matthias Nießner. Scannet: Richly-annotated 3d reconstructions of indoor scenes. In CVPR, 2017. 1, 3
|
| 246 |
+
[6] Jakob Geyer, Yohannes Kassahun, Mentar Mahmudi, Xavier Ricou, Rupesh Durgesh, Andrew S. Chung, Lorenz Hauswald, Viet Hoang Pham, Maximilian Muhlegg, Sebastian Dorn, Tiffany Fernandez, Martin Janicke, Sudesh Mirashi, Chiragkumar Savani, Martin Sturm, Oleksandr Vorobiov, and Peter Schuberth. A2D2: AEV autonomous driving dataset. http://www.a2d2.audi, 2019. 1, 5
|
| 247 |
+
[7] Benjamin Graham, Martin Engelcke, and Laurens van der Maaten. 3d semantic segmentation with submanifold sparse convolutional networks. In CVPR, 2018. 2, 3, 6
|
| 248 |
+
[8] Caner Hazirbas, Lingni Ma, Csaba Domokos, and Daniel Cremers. Fusenet: Incorporating depth into semantic segmentation via fusion-based cnn architecture. In ACCV, 2016. 2
|
| 249 |
+
[9] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016. 3, 5
|
| 250 |
+
[10] Geoffrey Hinton, Oriol Vinyls, and Jeff Dean. Distilling the knowledge in a neural network. In NIPS Workshops, 2014. 5
|
| 251 |
+
[11] 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. 1, 2
|
| 252 |
+
[12] Judy Hoffman, Dequan Wang, Fisher Yu, and Trevor Darell. FCNs in the wild: Pixel-level adversarial and constraint-based adaptation. arXiv:1612.02649, 2016. 2
|
| 253 |
+
[13] Maximilian Jaritz, Jiayuan Gu, and Hao Su. Multi-view pointnet for 3d scene understanding. In ICCV Workshops, 2019. 2
|
| 254 |
+
[14] Dong-Hyun Lee. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In ICML Workshops, 2013. 2, 5
|
| 255 |
+
[15] Kuan-Hui Lee, German Ros, Jie Li, and Adrien Gaidon. Spigan: Privileged adversarial learning from simulation. In ICLR, 2019. 2
|
| 256 |
+
|
| 257 |
+
[16] Yunsheng Li, Lu Yuan, and Nuno Vasconcelos. Bidirectional learning for domain adaptation of semantic segmentation. In CVPR, 2019. 1, 2, 5, 6, 7
|
| 258 |
+
[17] Ming Liang, Bin Yang, Yun Chen, Rui Hu, and Raquel Urtasun. Multi-task multi-sensor fusion for 3D object detection. In CVPR, 2019. 2
|
| 259 |
+
[18] Ming Liang, Bin Yang, Shenlong Wang, and Raquel Urtasun. Deep continuous fusion for multi-sensor 3d object detection. In ECCV, 2018. 1, 2, 3
|
| 260 |
+
[19] Gregory P Meyer, Jake Charland, Darshan Hegde, Ankit Laddha, and Carlos Vallespi-Gonzalez. Sensor fusion for joint 3d object detection and semantic segmentation. In CVPR Workshops, 2019. 2
|
| 261 |
+
[20] Pietro Morerio, Jacopo Cavazza, and Vittorio Murino. Minimal-entropy correlation alignment for unsupervised deep domain adaptation. In ICLR, 2018. 2, 6, 7
|
| 262 |
+
[21] 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. 1
|
| 263 |
+
[22] 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 NeurIPS, 2017. 3
|
| 264 |
+
[23] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In MICCAI, 2015. 3, 5
|
| 265 |
+
[24] Hang Su, Varun Jampani, Deqing Sun, Subhransu Maji, Evangelos Kalogerakis, Ming-Hsuan Yang, and Jan Kautz. Splatnet: Sparse lattice networks for point cloud processing. In CVPR, 2018. 2
|
| 266 |
+
[25] Hugues Thomas, Charles R. Qi, Jean-Emmanuel Deschaud, Beatrix Marcotegui, François Goulette, and Leonidas J. Guibas. Kpconv: Flexible and deformable convolution for point clouds. In ICCV, 2019. 3
|
| 267 |
+
[26] 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, 2018. 2
|
| 268 |
+
[27] Abhinav Valada, Rohit Mohan, and Wolfram Burgard. Self-supervised model adaptation for multimodal semantic segmentation. IJCV, 2019. 2
|
| 269 |
+
[28] 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, 2019. 1, 2, 6, 7
|
| 270 |
+
[29] Tuan-Hung Vu, Himalaya Jain, Maxime Bucher, Matthieu Cord, and Patrick Pérez. Dada: Depth-aware domain adaptation in semantic segmentation. In ICCV, 2019. 2
|
| 271 |
+
[30] Shenlong Wang, Simon Suo, Wei-Chiu Ma, Andrei Pokrovsky, and Raquel Urtasun. Deep parametric continuous convolutional neural networks. In CVPR, 2018. 3
|
| 272 |
+
[31] 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 TOG, 2019. 3
|
| 273 |
+
[32] Bichen Wu, Xuanyu Zhou, Sicheng Zhao, Xiangyu Yue, and Kurt Keutzer. Squeezesegv2: Improved model structure and unsupervised domain adaptation for road-object segmentation from a lidar point cloud. In ICRA, 2019. 1, 2
|
| 274 |
+
|
| 275 |
+
[33] Ying Zhang, Tao Xiang, Timothy M Hospedales, and Huchuan Lu. Deep mutual learning. In CVPR, 2018. 5
|
| 276 |
+
[34] Yang Zou, Zhiding Yu, Xiaofeng Liu, B.V.K. Vijaya Kumar,
|
| 277 |
+
|
| 278 |
+
and Jinsong Wang. Confidence regularized self-training. In ICCV, 2019. 1, 2, 5
|
xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a91fbf9ab88e1bf6d1a4f778c16b684263f82d6a5adaec642aa004ce820a8f9
|
| 3 |
+
size 547990
|
xmudacrossmodalunsuperviseddomainadaptationfor3dsemanticsegmentation/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:81f56cfb5d4d8e3b036a1cc6790532917a0b4718fad617ab79c606ff4322e315
|
| 3 |
+
size 328825
|
you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/4ef69657-ae4f-459e-99d0-31167a2dc3d4_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e8c849f902b94acc2b78abc5ea8470abde9c11404fd906e6df66e3dd39a10a6
|
| 3 |
+
size 82936
|
you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/4ef69657-ae4f-459e-99d0-31167a2dc3d4_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c22b782dfb51630afe38466d8289c05afc87706dfc89e4c64c6090101443fd7
|
| 3 |
+
size 106045
|
you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/4ef69657-ae4f-459e-99d0-31167a2dc3d4_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c7703da84f66ce1bea98175f48fb928d5f60bfd84eba46bb62b3977c60aecb03
|
| 3 |
+
size 1380276
|
you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/full.md
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# You2Me: Inferring Body Pose in Egocentric Video via First and Second Person Interactions
|
| 2 |
+
|
| 3 |
+
Evonne $\mathrm{Ng}^{1,2}$
|
| 4 |
+
|
| 5 |
+
evonne.ng@berkeley.edu
|
| 6 |
+
|
| 7 |
+
Donglai Xiang<sup>3</sup>
|
| 8 |
+
|
| 9 |
+
donglaix@cs.cmu.edu
|
| 10 |
+
|
| 11 |
+
Hanbyul Joo
|
| 12 |
+
|
| 13 |
+
hjoo@fb.com
|
| 14 |
+
|
| 15 |
+
Kristen Grauman2,4
|
| 16 |
+
|
| 17 |
+
grauman@cs.utexas.edu
|
| 18 |
+
|
| 19 |
+
$^{1}$ UC Berkeley
|
| 20 |
+
|
| 21 |
+
$^{2}$ UT Austin
|
| 22 |
+
|
| 23 |
+
$^{3}$ Carnegie Mellon University
|
| 24 |
+
|
| 25 |
+
Facebook AI Research
|
| 26 |
+
|
| 27 |
+
# Abstract
|
| 28 |
+
|
| 29 |
+
The body pose of a person wearing a camera is of great interest for applications in augmented reality, healthcare, and robotics, yet much of the person's body is out of view for a typical wearable camera. We propose a learning-based approach to estimate the camera wearer's 3D body pose from egocentric video sequences. Our key insight is to leverage interactions with another person—whose body pose we can directly observe—as a signal inherently linked to the body pose of the first-person subject. We show that since interactions between individuals often induce a well-ordered series of back-and-forth responses, it is possible to learn a temporal model of the interlinked poses even though one party is largely out of view. We demonstrate our idea on a variety of domains with dyadic interaction and show the substantial impact on egocentric body pose estimation, which improves the state of the art.
|
| 30 |
+
|
| 31 |
+
# 1. Introduction
|
| 32 |
+
|
| 33 |
+
Wearable cameras are becoming an increasingly viable platform for entertainment and productivity. In augmented reality (AR), wearable headsets will let users blend useful information from the virtual world together with their real first-person visual experience to access information in a timely manner or interact with games. In healthcare, wearables can open up new forms of remote therapy for rehabilitating patients trying to improve their body's physical function in their own home. In robotics, wearables could simplify video-based learning from demonstration.
|
| 34 |
+
|
| 35 |
+
In all such cases and many more, the camera receives a first-person or "egocentric" perspective of the surrounding visual world. A vision system analyzing the egocentric video stream should not only extract high-level information about the visible surroundings (object, scenes, events), but also the current state of the person wearing the camera. In particular, the body pose of the camera wearer is of great interest, since it reveals his/her physical activity,
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 1. Inter-person interactions are common in daily activity and offer rich signals for perception. Our work considers how interactions viewed from a first-person wearable camera can facilitate egocentric 3D body pose estimation.
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
|
| 44 |
+
postures, and gestures. Unfortunately, the camera wearer's body is often largely out of the camera's field of view. While this makes state-of-the-art third-person pose methods poorly suited [63, 45, 58, 34, 24, 10], recent work suggests that an ego-video stream nonetheless offers implicit cues for first-person body pose [26, 69, 70]. However, prior work restricts the task to static environments devoid of inter-person interactions, forcing the algorithms to rely on low-level cues like apparent camera motion or coarse scene layout.
|
| 45 |
+
|
| 46 |
+
Our idea is to facilitate the recovery of 3D body pose for the camera wearer (or "ego-pose" for short) by paying attention to the interactions between the first and second person as observed in a first-person video stream. Inter-person interactions are extremely common and occupy a large part of any individual's day-to-day activities. As is well-known in cognitive science [47, 60, 8], human body pose is largely influenced by an inherent synchronization between interacting individuals. For instance, a person who sees someone reaching out their hand for a handshake will most likely respond by also reaching out their hand; a person animatedly gesturing while telling a story may see their interacting partner nod in response; children playing may interact closely with their body motions. See Figure 1.
|
| 47 |
+
|
| 48 |
+
To that end, we introduce "You2Me": an approach for ego-pose estimation that explicitly captures the interplay between the first and second person body poses. Our model uses a recurrent neural network to incorporate cues from
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 2. Our goal is to infer the full 3D body pose sequence of a person from their egocentric video captured by a single chest-mounted camera. Our model focuses on interaction dynamics to predict the wearer's pose as a function of the interactee's pose, which is visible from the ego-view. The figure shows the input video with the interactee's (second-person) pose highlighted, and the output 3D joint predictions of the wearer's pose with corresponding pictures of the camera wearer. Note that our approach sees only the egocentric video (top); it does not see the bottom row of images showing the "first person" behind the camera.
|
| 52 |
+
|
| 53 |
+
the observed second-person pose together with the camera motion and scene appearance to infer the latent ego-pose across an entire video sequence. See Figure 2.
|
| 54 |
+
|
| 55 |
+
To our knowledge, no prior work models interactions for ego-posed. Our key contribution is to leverage the actionreaction dynamics in dyadic interactions to estimate egopose from a monocular wearable video camera.
|
| 56 |
+
|
| 57 |
+
We validate our You2Me ego-pose approach on two forms of ground-truth capture—from Kinect sensors and a Panoptic Studio [28]—on video data spanning 10 subjects and several interaction domains (conversation, sports, hand games, and ball tossing). Our results demonstrate that even though the first-person's body is largely out of view, the inferred second-person pose provides a useful prior on likely interactions, significantly boosting the estimates possible from camera motion and scene context alone. Furthermore, our You2Me approach outperforms the state-of-the-art approach for ego-pose as well as a current standard deep third-person pose method when adapted to our setting.
|
| 58 |
+
|
| 59 |
+
# 2. Related work
|
| 60 |
+
|
| 61 |
+
Third-person body pose and interactions There is extensive literature on human body pose estimation from the traditional third-person viewpoint, where the person is entirely visible [53, 50, 64, 13]. Recent approaches explore novel CNN-based methods, which have substantially improved the detection of visible body poses in images and video [10, 65, 71, 11, 34, 24, 18, 58, 36, 35, 30]. Our approach instead estimates the largely "invisible" first-person pose. Multi-person pose tracking investigates structure in human motion and inter-person interactions to limit potential pose trajectories [25, 10]. Beyond body pose, there is
|
| 62 |
+
|
| 63 |
+
a growing interest in modeling human-human interactions [57, 23, 40] to predict pedestrian trajectories [1, 43, 2], analyze social behavior and group activities [43, 59, 6, 15, 23], and understand human-object interactions [61, 19, 12]. Our method also capitalizes on the structure in inter-person interactions. However, whereas these existing methods assume that all people are fully within view of the camera, our approach addresses interactions between an individual interview and an individual out-of-view, i.e., the camera wearer.
|
| 64 |
+
|
| 65 |
+
Egocentric video Recent egocentric vision work focuses primarily on recognizing objects [14], activities [44, 16, 39, 56, 46, 37, 52, 51, 68], visible hand and arm pose [7, 31, 32, 49, 48], eye gaze [33], or anticipating future camera trajectories [41, 9]. In contrast, we explore 3D pose estimation for the camera wearer's full body, and unlike any of the above, we show that the inferred body pose of another individual directly benefits the pose estimates.
|
| 66 |
+
|
| 67 |
+
First-person body pose from video Egocentric 3D full body pose estimation has received only limited attention [26, 55, 69]. The first attempt to the problem is the geometry-based "inside-out mocap" approach [55], which uses structure from motion (SfM) to reconstruct the 3D location of 16 body mounted cameras placed on a person's joints. In contrast, we propose a learning-based solution, and it requires only a single chest-mounted camera, which makes it more suitable and comfortable for daily activity.
|
| 68 |
+
|
| 69 |
+
Limited recent work extracts ego-pose from monocular first-person video [26, 69]. The method in [26] infers the poses of a camera wearer by optimizing an implicit motion graph with an array of hand-crafted cost functions, including a sit/stand classifier. In contrast, we propose an end-to-end learning method, which learns from the full visual frame. The method in [69] uses a humanoid simulator in a control-based approach to recover the sequence of actions affecting pose, and is evaluated quantitatively only on synthetic sequences. Whereas both prior learning-based methods focus on sweeping motions that induce notable camera movements (like bending, sitting, walking), our approach improves the prediction of upper-body joint locations during sequences when the camera has only subtle motions (like handshakes and other conversational gestures). Furthermore, unlike [69], our method does not require a simulator and does all its learning directly from video accompanied by ground truth ego-poses. Most importantly, unlike any of the existing methods [26, 55, 69], our approach discovers the connection between the dynamics in inter-person interactions and egocentric body poses.
|
| 70 |
+
|
| 71 |
+
Social signals in first-person video Being person-centric by definition, first-person video is naturally a rich source of social information. Prior work exploring social signals focuses on detecting social groups [3, 4, 17] and mutual gaze [66, 67] or shared gaze [42] from ego-video. More relevant
|
| 72 |
+
|
| 73 |
+
to our work, the activity recognition method of [68] uses paired egocentric videos to learn gestures and micro-actions in dyadic interactions. That approach captures the correlations among inter-person actions (e.g., pointing, passing item) in two synchronized video clips to better classify them. However, whereas [68] requires two egocentric videos at test time, our approach relies only on a single egovie. While eliminating the second camera introduces new technical challenges (since we cannot view both the action and response), it offers greater flexibility. Furthermore, we infer body pose, whereas [68] classifies actions.
|
| 74 |
+
|
| 75 |
+
# 3. Our approach
|
| 76 |
+
|
| 77 |
+
The goal is to take a single first-person video as input, and estimate the camera wearer's 3D body pose sequence as output. Our main insight is to leverage not only the appearance and motion evident in the first-person video, but also an estimate of the second-person's body poses.
|
| 78 |
+
|
| 79 |
+
In this section, we present a model that uses first- and second-person features—both extracted from monocular egocentric video—to predict the 3D joints of the camera wearer. We first define the pose encoding (Sec 3.1) and the three inputs to our network (Sec 3.2 to 3.4), followed by the recurrent long short-term memory (LSTM) network that uses them to make pose predictions for a video (Sec 3.5).
|
| 80 |
+
|
| 81 |
+
# 3.1. Problem formulation
|
| 82 |
+
|
| 83 |
+
Given $N$ video frames from a chest-mounted camera, we estimate a corresponding sequence of $N$ 3D human poses. Each output pose $p_t \in \mathbb{R}^{3J}$ is a stick figure skeleton of 3D points consisting of $J$ joint positions for the predicted body pose of the camera wearer at frame $t$ . Note that our goal is to infer articulated pose as opposed to recognizing an action.
|
| 84 |
+
|
| 85 |
+
Each predicted 3D body joint is positioned in a person-centric coordinate system with its origin at the camera on the wearer's chest. The first axis is parallel to the ground and points towards the direction in which the wearer is facing. The second axis is parallel to the ground and lies along the same plane as the shoulder line. The third axis is perpendicular to the ground plane. To account for people of varying sizes, we normalize each skeleton for scale based on the shoulder width of the individual.
|
| 86 |
+
|
| 87 |
+
# 3.2. Dynamic first-person motion features
|
| 88 |
+
|
| 89 |
+
Motion patterns observed from a first-person camera offer a strong scene-independent cue about the camera wearer's body articulations, despite the limbs themselves largely being out of the field of view. For example, a sudden drop in elevation can indicate movement towards a sitting posture, or a counterclockwise rotation can indicate shoulders tilting to the left.
|
| 90 |
+
|
| 91 |
+
To capture these patterns, we construct scene-invariant dynamic features by extracting a sequence of homogra-
|
| 92 |
+
|
| 93 |
+
phies between each successive video frame, following [26]. While a homography is only strictly scene invariant when the camera is purely rotating, the egocentric camera translates very little between successive frames when the frame rate is high. These homographies facilitate generalization to novel environments, since the motion signals are independent of the exact appearance of the scene.
|
| 94 |
+
|
| 95 |
+
We estimate the homography from flow correspondences by solving a homogeneous linear equation via SVD [22]. Each element in the resulting $3 \times 3$ homography matrix is then normalized by the top-left corner element. The stack of normalized homographies over a given duration is used to represent the global camera movement within the interval. For frame $f_{t}$ at timestep $t$ in a given video, the motion representation is constructed by calculating the homographies between successive frames within the interval $[f_{t-15}, f_{t}]$ . We then vectorize the homographies and combine them into a $m_{t} \in \mathbb{R}^{135}$ vector, which represents a half-second interval of camera movements preceding frame $f_{t}$ (for 30 fps video).
|
| 96 |
+
|
| 97 |
+
# 3.3. Static first-person scene features
|
| 98 |
+
|
| 99 |
+
While the dynamic features reveal important cues for sweeping actions that induce notable camera movements, such as running or sitting, they are more ambiguous for sequences with little motion in the egocentric video. To account for this, our second feature attends to the appearance of the surrounding scene. In everyday life, many static scene structures are heavily associated with certain poses. For example, if the camera wearer leans forward to touch his/her toes, the egocentric camera may see the floor; if the camera wearer stands while looking at a computer monitor, the egocentric camera will see a different image than if the camera wearer sits while looking at the same monitor. As with the dynamic features above, the surrounding scene provides cues about ego-pose without the camera wearer's body being visible.
|
| 100 |
+
|
| 101 |
+
To obtain static first-person scene features, we use a ResNet-152 model pre-trained on ImageNet. Dropping the last fully connected layer on the pre-trained model, we treat the rest of the ResNet-152 as a fixed feature extractor for video frames. Given frame $f_{t}$ , we run the image through the modified ResNet-152, which outputs $s_t \in \mathbb{R}^{2048}$ . Whereas the ego-pose method of [26] relies on a standing vs. sitting image classifier to capture static context, we find our full visual encoding of the scene contributes to more accurate pose learning. Note that this feature by default also captures elements of the second-person pose; however, without extracting the pose explicitly it would be much more data inefficient to learn it simply from ResNet features, as we will see in results.
|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
Figure 3. Visualization of features extracted from ego-video frames. The ResNet Grad-CAM [54] heatmaps suggest that when a person is further away, the focus is on static objects in the room (couch, bike, wall rug) which help capture coarse posture, but when the interactee is closer, the focus is more on the person, which influences finer details. While the flow/homography does especially well capturing motion from the camera wearer's hands, many sequences lack global motion and produce flows similar to the bottom row example. OpenPose [10] generates a 2D representation of the interactee's pose even with slight occlusions.
|
| 105 |
+
|
| 106 |
+
# 3.4. Second-person body pose interaction features
|
| 107 |
+
|
| 108 |
+
Our third and most important input consists of the "second-person" pose of the person with whom the camera wearer is interacting. Whereas both the dynamic and static features help capture poses that come from larger common actions, we propose to incorporate second-person pose to explicitly account for the interaction dynamics that influence gestures and micro-actions performed in sequence between two people engaged in an interaction.
|
| 109 |
+
|
| 110 |
+
In human-human interactions, there is a great deal of symbiosis between both actors. Specific actions elicit certain reactions, which in turn influence the body pose of the individual. For example, if we see an individual windup to throw a ball, our natural response is to raise our arms to catch the ball. Or more subtly, if we see a person turn to look at a passerby, we may turn to follow their gaze. By understanding this dynamic, we can gather important ego-pose information for the camera wearer by simply observing the visible pose of the person with whom he/she interacts.
|
| 111 |
+
|
| 112 |
+
Thus, our third feature records the interactee's inferred pose. Still using the egocentric video, we estimate the pose of the interactee in each frame. Here we can leverage recent successes for pose estimation from a third-person perspective: unlike the camera wearer, the second person is visible, i.e., the ego-camera footage gives a third-person view of the interactee. We use OpenPose [10] to infer interactee poses due to its efficiency and accuracy, though other third-person methods can also be employed. OpenPose provides real-time multi-person keypoint detection: given a stack of frames, it returns a corresponding stack of normalized 25
|
| 113 |
+
|
| 114 |
+
2D keypoint joint estimations (see Supp. file). For each frame $f_{t}$ , we flatten the output 25 keypoint estimates into a vector $o_{t} \in \mathbb{R}^{50}$ (denoted $o_{t}$ for "other"). We set missing or occluded joints in $o_{t}$ to zeros, which can provide its own signal about the wearer's proximity to the interactee (e.g., no legs visible when he/she is closer).
|
| 115 |
+
|
| 116 |
+
Note that our learning approach is flexible to the exact encodings of the ego- and second-person poses. Using normalized 2D keypoints for the second-person pose is compatible with using person-centric 3D coordinates for the egopose (cf. Sec. 3.1); whereas it would be problematic for a purely geometric method relying on spatial registration, for a learning-based approach mixing 2D and 3D in this way is consistent. Furthermore, while perfect 3D second-person poses would offer the most complete information, e.g., avoiding foreshortening, we find that state-of-the-art 3D methods [29, 62, 71] fail on our data due to extensive occlusions from the wearer's hands. See Sec. 5 for experiments that concretely justify this design choice.
|
| 117 |
+
|
| 118 |
+
Figure 3 illustrates the complete set of features.
|
| 119 |
+
|
| 120 |
+
# 3.5. Recurrent neural network for pose inference
|
| 121 |
+
|
| 122 |
+
All three video-based cues defined above serve as input to a recurrent neural network to perform pose estimation for the full sequence. In particular, we define a Long Short-Term Memory (LSTM) network [20, 21] for our task. The LSTM learns the current state of the camera wearer, scene, and interactee, and uses this encoding to infer the camera wearer's next poses. The LSTM's hidden state captures the sequential patterns of linked body poses that result from inter-person back-and-forth responses.
|
| 123 |
+
|
| 124 |
+
While the LSTM can be trained to perform regression on the real-valued coordinates of the body pose, we found a fine-grained classification task to train more robustly, as often reported in the literature (see last row of Table 1). Hence, we first quantize the space of training body poses into a large number of fine-grained poses using $K$ -means (details below). Now the task is to map to the closest possible quantized pose at each time step.
|
| 125 |
+
|
| 126 |
+
Given a hidden state dimension of $D$ , the hidden state vector $h_t \in \mathbb{R}^D$ of the LSTM at time $t$ captures the cumulative latent representation of the camera wearer's pose at that instant in the video. For each frame $f_t$ , we extract the homography matrix $m_t$ , the ResNet-152 scene feature vector $s_t$ , and the second-person joint position vector $o_t$ . To provide a more compact representation of the scene to the LSTM (useful to conserve GPU memory), we project $s_t$ to a lower-dimensional embedding $x_t \in \mathbb{R}^E$ :
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
x _ {t} = \phi_ {x} \left(s _ {t}; W _ {x}\right), \tag {1}
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
where $W_{x}$ is of size $E \times 2048$ and consists of the embedding weights for $\phi_{x}(.)$ . The embedding is then passed through a batch normalization layer.
|
| 133 |
+
|
| 134 |
+

|
| 135 |
+
Figure 4. Network architecture for our You2Me approach. (a) For each video frame, we extract three features. ResNet provides static visual cues about the scene. Stacked homographies for the past 15 frames provide motion cues for the ego-camera. Finally, we extract the inferred 2D pose of the visible interactee with OpenPose [10]. All three features are concatenated $(\oplus)$ and fed into the LSTM. (b) illustrates our LSTM, which takes as input the feature vector from (a) and an embedding of the camera wearer's pose estimated from the previous frame. Outputs from the LSTM produce ego-pose predictions, assigning one of the fine-grained quantized body poses to each frame.
|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
|
| 139 |
+
The LSTM uses the wearer's pose in the previous frame $p_{t-1}$ as input for the current frame. Let $p_{t-1}$ be a $K$ -dimensional one-hot vector indicating the pose for the camera wearer at the previous frame $t-1$ (initialized at $t = 0$ as the average training pose). We learn a linear embedding for the pose indicator to map it to vector $z_t$ :
|
| 140 |
+
|
| 141 |
+
$$
|
| 142 |
+
z _ {t} = \phi_ {z} \left(p _ {t - 1}; W _ {z}\right), \tag {2}
|
| 143 |
+
$$
|
| 144 |
+
|
| 145 |
+
where $W_{z}$ is of size $E\times K$ and consists of the learned embedding weights for $\phi_z(.)$ .
|
| 146 |
+
|
| 147 |
+
All the features are concatenated (indicated by the operation $\oplus$ ) into a single vector $b_{t} \in \mathbb{R}^{135 + 50 + 2E}$ :
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
b _ {t} = m _ {t} \oplus o _ {t} \oplus x _ {t} \oplus z _ {t}, \tag {3}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
which is then used as input to the LSTM cell for the corresponding prediction at time $t$ . This introduces the following recurrence for the hidden state vector:
|
| 154 |
+
|
| 155 |
+
$$
|
| 156 |
+
h _ {t} = \operatorname {L S T M} \left(h _ {t - 1}, b _ {t}; \theta_ {l}\right), \tag {4}
|
| 157 |
+
$$
|
| 158 |
+
|
| 159 |
+
where $\theta_{l}$ denotes the LSTM parameters.
|
| 160 |
+
|
| 161 |
+
We define the loss for the network as the cross entropy loss across an entire sequence for predicting the correct (quantized) pose in each frame. Specifically, the loss $\mathcal{L}$ for a video of length $N$ is:
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
\mathcal {L} \left(W _ {x}, W _ {z}, W _ {p}, \theta_ {l}\right) = - \sum_ {t} ^ {N} \log \left(\sigma_ {P} \left(W _ {p} h _ {t}\right)\right), \tag {5}
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
where $\sigma_{P}(\cdot)$ is the softmax probability of the correct pose "class", and $W_{p}$ is the linear classifier layer of dimension $K\times D$ . Recall that the quantization is fine-grained, such that each per-frame estimate is quite specific; on average the nearest quantized pose in the codebook is just $0.27~\mathrm{cm}$
|
| 168 |
+
|
| 169 |
+
away per joint (see Supp. file). The inferred pose ID at time $t$ (i.e., the arg max over the pose posteriors at that timestep) is taken as the input for $z_{t+1}$ for the subsequent frame.
|
| 170 |
+
|
| 171 |
+
Rather than uniformly quantize all $J$ joints, we perform a mixed granularity clustering to account for the more subtle pose changes concentrated on the upper body. Lower body poses across frames exhibit less variance, but upper body poses have more fine-grained important differences (e.g., from arm gestures). Hence, we use a sparser $K$ -means clustering ( $K_{bot} = 100$ ) for the lower body joints and denser ( $K_{upp} = 700$ ) for the upper body. Any given pose is thus coded in terms of a 2D cluster ID.
|
| 172 |
+
|
| 173 |
+
At test time, we use the trained LSTM to predict the pose sequence. From time $t - 1$ to $t$ , we use the predicted cluster $\hat{p}_{t-1}$ from the previous LSTM cell in Eq. 2. Figure 4 overviews the model; see Supp. for architecture details.
|
| 174 |
+
|
| 175 |
+
# 4. You2Me Video Datasets
|
| 176 |
+
|
| 177 |
+
We present a first-person interaction dataset consisting of 42 two-minute sequences from one-on-one interactions between 10 individuals. We ask each individual (in turn) to wear a chest mounted GoPro camera and perform various interactive activities with another individual. We collect their egocentric video then synchronize it with the bodypose ground truth for both the camera wearer and the individual standing in front of the camera. The dataset captures four classes of activities: hand games, tossing and catching, sports, and conversation. The classes are broad enough such that intra-class variation exists. For example, the sports category contains instances of (reenacted) basketball, tennis, boxing, etc.; the conversation category contains individuals playing charades, selling a product, negotiating, etc. In about $50\%$ of the frames, no first-person body parts are visible. To ensure that our approach is generalizable, we employ two methods of capture, as detailed next.
|
| 178 |
+
|
| 179 |
+
Panoptic Studio capture Our first capture mode uses a Panoptic Studio dome, following [28]. The studio capture consists of 14 sequences recorded in $1920 \times 1080$ resolution at 30 fps using the GoPro Hero3 chest mounted camera on the medium field of view setting. The ground truth skeletons of the camera wearer and the interactee are then reconstructed at 30 fps, matching the ego-video frame rate. Each skeleton is parameterized by $J = 19$ 3D joint positions obtained using the method of [28]. Capturing video in the dome offers extremely accurate ground truth, at the expense of a more constrained background environment. A total of six participants of different height, body shape, and gender enacted sequences from each of the four activity classes.
|
| 180 |
+
|
| 181 |
+
Kinect capture Our second capture mode uses Kinect sensors for ground truth poses. The Kinect capture consists of 28 sequences also recorded in $1920 \times 1080$ resolution at 30 fps. We use the GoPro Hero4 chest mounted camera on wide field of view setting. Both people's ground truth skeleton poses are captured at 30 fps using the Kinect V2 sensor. The pose is represented by $J = 25$ 3D joint positions defined in the MS Kinect SDK. Given the greater mobility of the Kinect in contrast to the Panoptic Studio, we ask four participants to enact sequences from each of the activity classes in various places such as offices, labs, and apartment rooms. The videos from this dataset are taken in unconstrained environments but are all indoors due to limitations of the Kinect V2 sensor. While Kinect-sensed ground truth poses are noisier than those captured in the Panoptic Studio, prior work demonstrates that overall the Kinect poses are well aligned with human judgment of pose [26].
|
| 182 |
+
|
| 183 |
+
We stress that our method uses only the egocentric camera video as input at test time for both datasets. Further, we emphasize that no existing dataset is suitable for our task. Existing pose detection and tracking datasets (e.g., [5, 27]) are captured in the third-person viewpoint. Existing egocentric datasets are either limited to visible hands and arms [32, 44], contain only single-person sequences [26, 5, 27], consist of synthetic test data [69], or lack body-pose joint labels [68]. All our data is publicly available. See Supp video for examples.
|
| 184 |
+
|
| 185 |
+
# 5. Experiments
|
| 186 |
+
|
| 187 |
+
We evaluate our approach on both the Panoptic Studio and Kinect captures. Our method is trained and tested in an activity-agnostic setting: the training and test sets are split such that each set contains roughly an equal number of sequences from each activity domain (conversation, sports, etc.). For the Panoptic Studio, we train on 7 sequences and test on 7. For the Kinect set, we train on 18 sequences and test on 10 that are recorded at locations not seen in the train-
|
| 188 |
+
|
| 189 |
+
ing set. For both, we ensure that the people appearing in test clips do not appear in the training set.
|
| 190 |
+
|
| 191 |
+
Implementation details We generate training data by creating sliding windows of size 512 frames with an overlap of 32 frames for each sequence in the training set. This yields 3.2K training sequences and 2.3K test sequences. For the LSTM, we use an embedding dimension of $E = 256$ , fixed hidden state dimension of $D = 512$ , and batch size of 32. Learning rate is 0.001 for the first 10 epochs then decreased to 0.0001. In initial experiments, we found results relatively insensitive to values of $K_{upp}$ from 500 to 900 and $K_{bot}$ from 70 to 120, and fixed $K_{upp} = 700$ and $K_{bot} = 100$ for all results. Training time is 18 hours on a single GPU for 20 epochs; test time is 36 fps. See Supp.
|
| 192 |
+
|
| 193 |
+
Baselines We compare to the following methods:
|
| 194 |
+
|
| 195 |
+
- Ego-pose motion graph (MotionGraph) [26]: the current state-of-the-art method for predicting body pose from real egocentric video [26]. We use the authors' code<sup>3</sup> and retrain their model on our dataset. This method also outputs quantized poses; we find their method performs best on our data for $K = 500$ .
|
| 196 |
+
- Third-person pose deconv network (DeconvNet) [63]: We adapt the human pose estimation baseline of [63] to our task. Their approach adds deconvolutional layers to ResNet, and achieves the state-of-the-art on the 2017 COCO keypoint challenge. We use the same network structure presented in the baseline, but retrain it on our egocentric dataset, altering the output space for 3D joints. While this network is intended for detecting visible poses in third-person images, it is useful to gauge how well an extremely effective off-the-shelf deep pose method can learn from ego-video.
|
| 197 |
+
- Ours without pose information (Ours $w / o_{o_t}$ ): This is a simplified version of our model in which we do not feed the second-person 2D joints to the LSTM. The remaining network is unchanged and takes as input the extracted image features and homographies. This ablation isolates the impact of modeling interactee poses versus all remaining design choices in our method.
|
| 198 |
+
- Always standing (Stand) and Always sitting (Sit): a simple guessing method (stronger than a truly random guess) that exploits the prior that most poses are somewhere near a standing or a sitting pose. The standing and sitting poses are averaged over the training sequences.
|
| 199 |
+
|
| 200 |
+
Evaluation metric We rotate each skeleton so the shoulder is parallel to the yz plane and the body center is at the origin, then calculate error as the Euclidean distance between the predicted 3D joints and the ground truth, averaged
|
| 201 |
+
|
| 202 |
+
<table><tr><td></td><td colspan="3">Kinect</td><td colspan="3">Panoptic</td></tr><tr><td></td><td>Upp</td><td>Bot</td><td>All</td><td>Upp</td><td>Bot</td><td>All</td></tr><tr><td>Ours</td><td>15.3</td><td>12.9</td><td>14.3</td><td>6.5</td><td>12.0</td><td>8.6</td></tr><tr><td>Ours w/o o_t</td><td>19.4</td><td>15.6</td><td>18.0</td><td>11.2</td><td>15.4</td><td>12.8</td></tr><tr><td>MotionGraph [26]</td><td>24.4</td><td>15.7</td><td>21.2</td><td>11.9</td><td>20.7</td><td>15.2</td></tr><tr><td>DeconvNet [63]</td><td>26.0</td><td>20.3</td><td>23.3</td><td>18.3</td><td>21.2</td><td>19.4</td></tr><tr><td>Stand</td><td>27.8</td><td>23.1</td><td>25.4</td><td>10.6</td><td>18.5</td><td>13.5</td></tr><tr><td>Sit</td><td>21.8</td><td>43.3</td><td>28.5</td><td>17.3</td><td>28.9</td><td>21.6</td></tr><tr><td>Ours as Regression</td><td>22.9</td><td>20.0</td><td>20.9</td><td>12.3</td><td>16.8</td><td>14.6</td></tr></table>
|
| 203 |
+
|
| 204 |
+
Table 1. Average joint error (cm) for all methods on the two dataset captures. Our approach is stronger than the existing methods, and the second-person pose is crucial to its performance.
|
| 205 |
+
|
| 206 |
+
<table><tr><td>o t-1</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ˆp t</td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 207 |
+
|
| 208 |
+
Figure 5. Most common second-person 2D poses (top) seen immediately preceding a given predicted 3D pose cluster (bottom) for test sequences. You2Me captures useful interaction links like mutual reaches or tied conversation gestures.
|
| 209 |
+
|
| 210 |
+
over the sequence and scaled to centimeters (cm) based on a reference shoulder distance of $30~\mathrm{cm}$ . Note that we judge accuracy against the exact continuous ground truth poses—not whether we infer the right pose cluster. While the predicted joints are a cluster center, the quantization is so fine-grained that on average the best discrete pose is only $0.70~\mathrm{cm}$ from the continuous pose.
|
| 211 |
+
|
| 212 |
+
Results Table 1 shows that the proposed method consistently gives better results than all of the competing methods. We show errors averaged over all $J$ joints, and separately for the upper body joints which have the highest variance in everyday activity (head, elbow, wrists, hands) and the lower body joints (hips, knees, ankles, foot). See Supp. file for per-joint errors. Our approach outperforms MotionGraph [26] and Ours w/o $o_t$ . This result supports our key technical novelty of modeling mutual pose interactions between the first and second person. Our method's improvement is even more significant in the upper body joints, which agrees with the fact that the most highly correlated inter-person poses occur with gestural motions of the head and arms. The results show that the information provided by the pose of the interactee is essential for deriving accurate body pose estimates for the camera wearer.
|
| 213 |
+
|
| 214 |
+
We find our method's impact is greatest on conversation sequences, and lowest on sports sequences (see Supp. file). This suggests that during conversation sequences which involve less global motion, second-person pose provides essential information for more accurate upper body ego-pose predictions. In sports sequences, on the other hand, the in
|
| 215 |
+
|
| 216 |
+
<table><tr><td></td><td colspan="3">Kinect</td><td colspan="3">Panoptic</td></tr><tr><td></td><td>Upp</td><td>Bot</td><td>All</td><td>Upp</td><td>Bot</td><td>All</td></tr><tr><td>Ours</td><td>15.3</td><td>12.9</td><td>14.3</td><td>6.5</td><td>12.0</td><td>8.6</td></tr><tr><td>w/o xt</td><td>16.1</td><td>13.8</td><td>15.3</td><td>7.0</td><td>13.3</td><td>9.4</td></tr><tr><td>w/o ot</td><td>19.4</td><td>15.6</td><td>18.0</td><td>11.2</td><td>15.4</td><td>12.8</td></tr><tr><td>w/o both</td><td>20.0</td><td>16.9</td><td>18.8</td><td>10.2</td><td>15.3</td><td>12.1</td></tr></table>
|
| 217 |
+
|
| 218 |
+
Table 2. Ablation study to gauge the importance of the second-person pose features $o_t$ and scene features $x_t$ . Error in cm.
|
| 219 |
+
|
| 220 |
+
teractee often moves out of view for long periods, explaining our method's lower degree of impact for sports.
|
| 221 |
+
|
| 222 |
+
While Sit and Stand offer a reasonable prior for most test frames, our method still makes significant gains on them, showing the ability to make more informed estimates on the limbs (e.g., $10\mathrm{cm}$ better on average for the upper body keypoints). Stand outperforms other baselines but not our method. This is a well-known issue in motion forecasting: doing "nothing" can be better than doing something, since the average standing pose is in-between many test poses, representing a "safe" estimate [38]. Our method also outperforms DeconvNet [63], which suggests that approaches for detecting poses from a third-person point of view do not easily adapt to handle the first-person pose task. Replacing our model's classification objective with regression is significantly weaker, supporting our design choice (see last row Table 1).
|
| 223 |
+
|
| 224 |
+
Figure 5 shows examples of the linked poses our method benefits from. We display the second-person pose estimates immediately preceding various ego-pose estimates for cases where our method improves over the Ours w/o $o_t$ baseline. Intuitively, gains happen for interactions with good body language links, such as mutually extending hands or smaller conversational gestures.
|
| 225 |
+
|
| 226 |
+
Figures 6 and 7 show example success and failure cases for our approach, respectively. In Figure 6, our method outperforms MotionGraph [26] in predicting upper body movements of the camera wearer, e.g., better capturing the swing of an arm before catching a ball or reaching out to grab an object during a conversation. The failures in Figure 7 show the importance of the second-person pose to our approach. Analyzing the frames with the highest errors, we find failure cases occur primarily when the camera wearer is crouched over, the camera is pointed towards the floor, or the view of the interactee is obstructed. While our model has enough priors to continue to accurately predict poses for a few frames without the interactee pose, absent second person poses over extended periods are detrimental.
|
| 227 |
+
|
| 228 |
+
Table 2 shows an ablation study, where we add or remove features from our model to quantify the impact of the second-person pose. Recall that $o_{t}$ is the second-person pose and $x_{t}$ is the ResNet scene feature. The results indicate that Ours and the w/o $x_{t}$ model, which both use the second-person pose (OpenPose estimates), consistently outperform
|
| 229 |
+
|
| 230 |
+
<table><tr><td></td><td colspan="3">Hand games</td><td colspan="3">Conversation</td><td colspan="3">Catch</td></tr><tr><td>Ego-view(with OpenPose overlay)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Ground truth(with visualization of interaction with second person)</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Ours</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>MotionGraph [Jiang et.al. 2017]</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 231 |
+
|
| 232 |
+

|
| 233 |
+
Figure 6. Example inferred poses for three different activity domains trained in a domain-agnostic setting. Row 1: ego-video view with OpenPose overlay (input to our method is only the raw frame). Row 2: 3D ground truth poses in multicolor, displayed as interacting with the 2D OpenPose skeletons in yellow. Note: for ease of viewing, we show them side by side. Row 3: results from our approach. Row 4: MotionGraph [26] results. In the last column, the interactee is fully occluded in the ego-view, but our predicted pose is still accurate.
|
| 234 |
+
Figure 7. Example failure cases. Typical failure cases are when the ego-view points at the ground or at feet, lacking the interactee's pose for a long duration.
|
| 235 |
+
|
| 236 |
+
<table><tr><td></td><td colspan="3">Kinect</td><td colspan="3">Panoptic</td></tr><tr><td></td><td>Upp</td><td>Bot</td><td>All</td><td>Upp</td><td>Bot</td><td>All</td></tr><tr><td>\( o_t \)</td><td>15.3</td><td>12.9</td><td>14.3</td><td>6.5</td><td>12.0</td><td>8.6</td></tr><tr><td>GT 3D</td><td>13.8</td><td>12.3</td><td>13.2</td><td>6.0</td><td>8.7</td><td>6.9</td></tr><tr><td>Still</td><td>20.5</td><td>15.6</td><td>18.7</td><td>11.7</td><td>16.0</td><td>13.1</td></tr><tr><td>Zero</td><td>21.0</td><td>16.1</td><td>19.1</td><td>11.5</td><td>16.8</td><td>13.3</td></tr><tr><td>Random</td><td>22.4</td><td>16.6</td><td>20.4</td><td>11.8</td><td>17.7</td><td>14.3</td></tr><tr><td>Predicted 3D</td><td>19.3</td><td>15.2</td><td>17.8</td><td>11.0</td><td>16.8</td><td>13.0</td></tr></table>
|
| 237 |
+
|
| 238 |
+
Table 3. Effects of second-person pose source. Error in cm.
|
| 239 |
+
|
| 240 |
+
the $\mathbf{w} / \mathbf{o}$ $o_t$ and $\mathbf{w} / \mathbf{o}$ both models that lack the second-person pose estimate. Moreover, the results show that the addition of $o_t$ most significantly improves upper body predictions. The features of the interactee captured by the ResNet ( $\mathbf{w} / \mathbf{o}$ $o_t$ ) do not sufficiently capture the information encoded in the explicit pose estimate.
|
| 241 |
+
|
| 242 |
+
Table 3 analyzes how the source of the second-person pose estimates affects our results. First, we substitute in for $o_{t}$ the 3D ground truth (GT) skeleton of the interactee, i.e., the true pose for the second person as given by the Panoptic Studio or Kinect. We see that more accurate second-person poses can further improve results, though the mar
|
| 243 |
+
|
| 244 |
+
gins are smaller than those separating our method from the baselines. Using 2D OpenPose for $o_t$ is better than using predicted 3D poses [71]; 3D pose from monocular data remains challenging. This justifies our use of 2D for $o_t$ . Next, to confirm our network properly learns a correlative function between the interactee pose and the ego-pose, we feed incorrect values for $o_t$ : either the average standing pose (Still), empty poses (Zero), or random poses from another sequence of another class (Random). In all cases, the network produces poorer results, showing that our method is indeed leveraging the true structure in interactions.
|
| 245 |
+
|
| 246 |
+
Please see Supp. file for videos, per-joint and per-activity error breakdowns, depiction of the fine-grained quantization, impact of quantization on approach, and additional architecture details.
|
| 247 |
+
|
| 248 |
+
# 6. Conclusions
|
| 249 |
+
|
| 250 |
+
We presented the You2Me approach to predict a camera wearer's pose given video from a single chest-mounted camera. Our key insight is to capture the ties in interaction between the first (unobserved) and second (observed) person poses. Our results on two capture scenarios from several different activity domains demonstrate the promise of our idea, and we obtain state-of-the-art results for ego-pose.
|
| 251 |
+
|
| 252 |
+
Future work will include reasoning about the absence of second-person poses when interactions are not taking place, extending to sequences with multiple "second people", and exploring how ego-pose estimates might reciprocate to boost second-person pose estimates.
|
| 253 |
+
|
| 254 |
+
Acknowledgements: We thank Hao Jiang for helpful discussions. UT Austin is supported in part by ONR PECASE and NSF IIS-1514118.
|
| 255 |
+
|
| 256 |
+
# References
|
| 257 |
+
|
| 258 |
+
[1] A. Alahi, K. Goel, V. Ramanathan, A. Robicquet, L. Fei-Fei, and S. Savarese. Social lstm: Human trajectory prediction in crowded spaces. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2
|
| 259 |
+
[2] A. Alahi, V. Ramanathan, and L. Fei-Fei. Socially-aware large-scale crowd forecasting. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. 2
|
| 260 |
+
[3] S. Alletto, G. Serra, S. Calderara, and R. Cucchiara. Understanding social relationships in egocentric vision. Pattern Recognition, 2015. 2
|
| 261 |
+
[4] S. Alletto, G. Serra, S. Calderara, F. Solera, and R. Cucchiara. From ego to nos-vision: Detecting social relationships in first-person views. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, 2014. 2
|
| 262 |
+
[5] M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 2d human pose estimation: New benchmark and state of the art analysis. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. 6
|
| 263 |
+
[6] T. Bagautdinov, A. Alahi, F. Fleuret, P. Fua, and S. Savarese. Social scene understanding: End-to-end multi-person action localization and collective activity recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2
|
| 264 |
+
[7] S. Bambach, S. Lee, D. J. Crandall, and C. Yu. Lending a hand: Detecting hands and recognizing activities in complex egocentric interactions. In International Conference on Computer Vision (ICCV), 2015. 2
|
| 265 |
+
[8] F. J. Bernieri, J. S. Reznick, and R. Rosenthal. Synchrony, pseudosynchrony, and dissynchrony: Measuring the entrainment process in mother-infant interactions. Journal of personality and social psychology, 1988. 1
|
| 266 |
+
[9] G. Bertasius, A. Chan, and J. Shi. Egocentric basketball motion planning from a single first-person image. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2
|
| 267 |
+
[10] Z. Cao, G. Hidalgo, T. Simon, S.-E. Wei, and Y. Sheikh. OpenPose: realtime multi-person 2D pose estimation using Part Affinity Fields. 2018. 1, 2, 4, 5
|
| 268 |
+
[11] J. Carreira, P. Agrawal, K. Fragkiadaki, and J. Malik. Human pose estimation with iterative error feedback. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2
|
| 269 |
+
[12] Y.-W. Chao, Z. W. Y. He, J. Wang, and J. Deng. Hico: A benchmark for recognizing human-object interactions in images. In IEEE International Conference on Computer Vision (ICCV), 2015. 2
|
| 270 |
+
[13] G. Chéron, I. Laptev, and C. Schmid. P-cnn: Pose-based cnn features for action recognition. In IEEE International Conference on Computer Vision (ICCV), 2015. 2
|
| 271 |
+
[14] D. Damen, T. Leelasawassuk, O. Haines, A. Calway, and W. W. Mayol-Cuevas. You-do, i-learn: Discovering task relevant objects and their modes of interaction from multi-user egocentric video. In British Machine Vision Conference (BMVC), 2014. 2
|
| 272 |
+
[15] Z. Deng, A. Vahdat, H. Hu, and G. Mori. Structure inference machines: Recurrent neural networks for analyzing relations
|
| 273 |
+
|
| 274 |
+
in group activity recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2
|
| 275 |
+
[16] A. Fathi, A. Farhadi, and J. M. Rehg. Understanding egocentric activities. In International Conference on Computer Vision (ICCV), 2011. 2
|
| 276 |
+
[17] A. Fathi, J. K. Hodgins, and J. M. Rehg. Social interactions: A first-person perspective. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2012. 2
|
| 277 |
+
[18] R. Girdhar, G. Gkioxari, L. Torresani, M. Paluri, and D. Tran. Detect-and-track: Efficient pose estimation in videos. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2
|
| 278 |
+
[19] G. Gkioxari, R. Girshick, P. Dollár, and K. He. Detecting and recognizing human-object interactions. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 2
|
| 279 |
+
[20] A. Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. 4
|
| 280 |
+
[21] A. Graves and N. Jaitly. Towards end-to-end speech recognition with recurrent neural networks. In International Conference on Machine Learning (ICML), 2014. 4
|
| 281 |
+
[22] R. Hartley and A. Zisserman. Multiple view geometry in computer vision. Cambridge university press, 2003. 3
|
| 282 |
+
[23] D.-A. Huang and K. M. Kitani. Action-reaction: Forecasting the dynamics of human interaction. In European Conference on Computer Vision (ECCV), 2014. 2
|
| 283 |
+
[24] E. Insafutdinov, L. Pishchulin, B. Andres, M. Andriluka, and B. Schiele. Deepercut: A deeper, stronger, and faster multiperson pose estimation model. In European Conference on Computer Vision (ECCV), 2016. 1, 2
|
| 284 |
+
[25] U. Iqbal, A. Milan, and J. Gall. Posetrack: Joint multi-person pose estimation and tracking. In IEEE Conference on Computer Vision and Pattern Recognition (ICCV), 2017. 2
|
| 285 |
+
[26] H. Jiang and K. Grauman. Seeing invisible poses: Estimating 3d body pose from egocentric video. In 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 1, 2, 3, 6, 7, 8
|
| 286 |
+
[27] S. Johnson and M. Everingham. Clustered pose and nonlinear appearance models for human pose estimation. In *British Machine Vision Conference (BMVC)*, 2010. 6
|
| 287 |
+
[28] H. Joo, H. Liu, L. Tan, L. Gui, B. Nabbe, I. Matthews, T. Kanade, S. Nobuhara, and Y. Sheikh. Panoptic studio: A massively multiview system for social motion capture. In IEEE International Conference on Computer Vision (ICCV), 2015. 2, 6
|
| 288 |
+
[29] A. Kanazawa, M. J. Black, D. W. Jacobs, and J. Malik. End-to-end recovery of human shape and pose. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018. 4
|
| 289 |
+
[30] Y. Lao, O. Ait-Aider, and A. Bartoli. Rolling shutter pose and ego-motion estimation using shape-from-template. In European Conference on Computer Vision (ECCV), 2018. 2
|
| 290 |
+
[31] C. Li and K. M. Kitani. Model recommendation with virtual probes for egocentric hand detection. In IEEE International Conference on Computer Vision (ICCV), 2013. 2
|
| 291 |
+
[32] C. Li and K. M. Kitani. Pixel-level hand detection in egocentric videos. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2013. 2, 6
|
| 292 |
+
|
| 293 |
+
[33] Y. Li, A. Fathi, and J. M. Rehg. Learning to predict gaze in egocentric video. In IEEE International Conference on Computer Vision (ICCV), 2013. 2
|
| 294 |
+
[34] I. Lifshitz, E. Fetaya, and S. Ullman. Human pose estimation using deep consensus voting. In European Conference on Computer Vision (ECCV), 2016. 1, 2
|
| 295 |
+
[35] S.-Y. Lin, Y.-Y. Lin, C.-S. Chen, and Y.-P. Hung. Recognizing human actions with outlier frames by observation filtering and completion. ACM Transactions on Multimedia Computing, Communications, and Applications (TOMM), 2017. 2
|
| 296 |
+
[36] J. Liu, A. Shahroudy, G. Wang, L.-Y. Duan, and A. K. Chichung. Skeleton-based online action prediction using scale selection network. IEEE transactions on pattern analysis and machine intelligence, 2019. 2
|
| 297 |
+
[37] M. Ma, H. Fan, and K. M. Kitani. Going deeper into first-person activity recognition. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2
|
| 298 |
+
[38] J. Martinez, R. Hossain, J. Romero, and J. J. Little. A simple yet effective baseline for 3d human pose estimation. In IEEE International Conference on Computer Vision (ICCV), 2017. 7
|
| 299 |
+
[39] T. McCandless and K. Grauman. Object-centric spatiotemporal pyramids for egocentric activity recognition. In British Machine Vision Conference (BMVC), 2013. 2
|
| 300 |
+
[40] L.-P. Morency. Modeling human communication dynamics [social sciences]. IEEE Signal Processing Magazine, 2010. 2
|
| 301 |
+
[41] H. S. Park, J.-J. Hwang, Y. Niu, and J. Shi. Egocentric future localization. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2
|
| 302 |
+
[42] H. S. Park and J. Shi. Social saliency prediction. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 2
|
| 303 |
+
[43] S. Pellegrini, A. Ess, and L. Van Gool. Improving data association by joint modeling of pedestrian trajectories and groupings. In European Conference on Computer Vision (ECCV), 2010. 2
|
| 304 |
+
[44] H. Piriavash and D. Ramanan. Detecting activities of daily living in first-person camera views. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2012. 2, 6
|
| 305 |
+
[45] L. Pishchulin, E. Insafutdinov, S. Tang, B. Andres, M. Andriluka, P. V. Gehler, and B. Schiele. Deepcut: Joint subset partition and labeling for multi person pose estimation. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 1
|
| 306 |
+
[46] Y. Poleg, A. Ephrat, S. Peleg, and C. Arora. Compact cnn for indexing egocentric videos. In IEEE Winter Conference on Applications of Computer Vision (WACV), 2016. 2
|
| 307 |
+
[47] G. A. Ramirez, T. Baltrusaitis, and L.-P. Morency. Modeling latent discriminative dynamic of multi-dimensional affective signals. In International Conference on Affective Computing and Intelligent Interaction (ACII), 2011. 1
|
| 308 |
+
[48] H. Rhodin, C. Richardt, D. Casas, E. Insafutdinov, M. Shafiei, H.-P. Seidel, B. Schiele, and C. Theobalt. Egocap: egocentric marker-less motion capture with two fisheye cameras. ACM Transactions on Graphics (TOG), 2016. 2
|
| 309 |
+
|
| 310 |
+
[49] G. Rogez, J. S. Supancic, and D. Ramanan. First-person pose recognition using egocentric workspaces. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 2
|
| 311 |
+
[50] G. Rogez, P. Weinzaepfel, and C. Schmid. Lcr-net: Localization-classification-regression for human pose. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017. 2
|
| 312 |
+
[51] M. S. Ryoo and L. Matthies. First-person activity recognition: What are they doing to me? In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2013. 2
|
| 313 |
+
[52] M. S. Ryoo, B. Rothrock, and L. Matthies. Pooled motion features for first-person videos. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 2
|
| 314 |
+
[53] N. Sarafianos, B. Boteanu, B. Ionescu, and I. A. Kakadiaris. 3d human pose estimation: A review of the literature and analysis of covariates. Computer Vision and Image Understanding, 2016. 2
|
| 315 |
+
[54] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, and D. Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In IEEE International Conference on Computer Vision (ICCV), 2017. 4
|
| 316 |
+
[55] T. Shiratori, H. S. Park, L. Sigal, Y. Sheikh, and J. K. Hodgins. Motion capture from body-mounted cameras. In ACM Transactions on Graphics (TOG), 2011. 2
|
| 317 |
+
[56] E. H. Spriggs, F. De La Torre, and M. Hebert. Temporal segmentation and activity classification from first-person sensing. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR) Workshops, 2009. 2
|
| 318 |
+
[57] A. Stergiou and R. Poppe. Understanding human-human interactions: a survey. arXiv preprint arXiv:1808.00022, 2018. 2
|
| 319 |
+
[58] A. Toshev and C. Szegedy. DeepPose: Human pose estimation via deep neural networks. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014. 1, 2
|
| 320 |
+
[59] A. Treuille, S. Cooper, and Z. Popovic. Continuum crowds. 2006. 2
|
| 321 |
+
[60] A. Vinciarelli, H. Salamin, A. Polychroniou, G. Mohammadi, and A. Origlia. From nonverbal cues to perception: personality and social attractiveness. In Cognitive Behavioural Systems. 2012. 1
|
| 322 |
+
[61] Y. Wang, J. Song, L. Wang, L. Van Gool, and O. Hilliges. Two-stream sr-cnns for action recognition in videos. In British Machine Vision Conference (BMVC), 2016. 2
|
| 323 |
+
[62] D. Xiang, H. Joo, and Y. Sheikh. Monocular total capture: Posing face, body, and hands in the wild. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019. 4
|
| 324 |
+
[63] B. Xiao, H. Wu, and Y. Wei. Simple baselines for human pose estimation and tracking. In European Conference on Computer Vision (ECCV), 2018. 1, 6, 7
|
| 325 |
+
[64] B. Xiaohan Nie, C. Xiong, and S.-C. Zhu. Joint action recognition and pose estimation from video. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 2
|
| 326 |
+
|
| 327 |
+
[65] W. Yang, S. Li, W. Ouyang, H. Li, and X. Wang. Learning feature pyramids for human pose estimation. In IEEE International Conference on Computer Vision (ICCV), 2017. 2
|
| 328 |
+
[66] Z. Ye, Y. Li, A. Fathi, Y. Han, A. Rozga, G. D. Abowd, and J. M. Rehg. Detecting eye contact using wearable eyetracking glasses. In ACM Conference on Ubiquitous Computing (UbiComp), 2012. 2
|
| 329 |
+
[67] Z. Ye, Y. Li, Y. Liu, C. Bridges, A. Rozga, and J. M. Rehg. Detecting bids for eye contact using a wearable camera. In IEEE International Conference and Workshops on Automatic Face & Gesture Recognition (FG 2015), 2015. 2
|
| 330 |
+
[68] R. Yonetani, K. M. Kitani, and Y. Sato. Recognizing microactions and reactions from paired egocentric videos. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016. 2, 3, 6
|
| 331 |
+
[69] Y. Yuan and K. Kitani. 3d ego-pose estimation via imitation learning. In European Conference on Computer Vision (ECCV), 2018. 1, 2, 6
|
| 332 |
+
[70] Y. Yuan and K. Kitani. Ego-pose estimation and forecasting as real-time pd control. In ICCV, 2019. 1
|
| 333 |
+
[71] X. Zhou, Q. Huang, X. Sun, X. Xue, and Y. Wei. Towards 3d human pose estimation in the wild: a weakly-supervised approach. In IEEE International Conference on Computer Vision (ICCV), 2017. 2, 4, 8
|
you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3bf37c4486fba6f24c43d07c7e4ae1d8d3cb585414aaabbc0f4f83cdea43b461
|
| 3 |
+
size 394535
|
you2meinferringbodyposeinegocentricvideoviafirstandsecondpersoninteractions/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19bea64e4eb8b1650f4cb054511c43c3fa9a220850b4c6e9cec6ab5d95cbd271
|
| 3 |
+
size 418588
|
yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/3ecf9bf3-c417-45b3-bbd4-bb24516d409f_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c887ad06c1cddef22b29ed36a7c8f297160c9a4ddf9211f42a48a2a646fc0d1b
|
| 3 |
+
size 69171
|
yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/3ecf9bf3-c417-45b3-bbd4-bb24516d409f_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:00d8a12b31ba4959ad24556c9b20288c9a66bed903c4883e62012165625424f7
|
| 3 |
+
size 84165
|
yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/3ecf9bf3-c417-45b3-bbd4-bb24516d409f_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d1b21383a94016ac1ec6f89e63e38bb914e0fc229488f762b015ebefbd50d32d
|
| 3 |
+
size 6196596
|
yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/full.md
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Your Local GAN: Designing Two Dimensional Local Attention Mechanisms for Generative Models
|
| 2 |
+
|
| 3 |
+
Giannis Daras
|
| 4 |
+
|
| 5 |
+
National Technical University of Athens
|
| 6 |
+
|
| 7 |
+
daras.giannhs@gmail.com
|
| 8 |
+
|
| 9 |
+
Augustus Odena
|
| 10 |
+
|
| 11 |
+
Google Brain
|
| 12 |
+
|
| 13 |
+
augustusodena@google.com
|
| 14 |
+
|
| 15 |
+
Han Zhang
|
| 16 |
+
|
| 17 |
+
Google Brain
|
| 18 |
+
|
| 19 |
+
zhanghan@google.com
|
| 20 |
+
|
| 21 |
+
Alexandros G. Dimakis
|
| 22 |
+
|
| 23 |
+
UT Austin
|
| 24 |
+
|
| 25 |
+
dimakis@austin.utexas.edu
|
| 26 |
+
|
| 27 |
+
# Abstract
|
| 28 |
+
|
| 29 |
+
We introduce a new local sparse attention layer that preserves two-dimensional geometry and locality. We show that by just replacing the dense attention layer of SAGAN with our construction, we obtain very significant FID, Inception score and pure visual improvements. FID score is improved from 18.65 to 15.94 on ImageNet, keeping all other parameters the same. The sparse attention patterns that we propose for our new layer are designed using a novel information theoretic criterion that uses information flow graphs.
|
| 30 |
+
|
| 31 |
+
We also present a novel way to invert Generative Adversarial Networks with attention. Our method uses the attention layer of the discriminator to create an innovative loss function. This allows us to visualize the newly introduced attention heads and show that they indeed capture interesting aspects of two-dimensional geometry of real images.
|
| 32 |
+
|
| 33 |
+
# 1. Introduction
|
| 34 |
+
|
| 35 |
+
Generative Adversarial Networks [10] are making significant progress on modeling and generating natural images [25, 3]. Transposed convolutional layers are a fundamental architectural component since they capture spatial invariance, a key property of natural images [18, 15, 26]. The central limitation (e.g. as argued in [25]) is that convolutions fail to model complex geometries and long-distance dependencies – the canonical example is generating dogs with fewer or more than four legs.
|
| 36 |
+
|
| 37 |
+
To compensate for this limitation, attention layers [24] have been introduced in deep generative models [25, 3]. Attention enables the modeling of long range spatial dependencies in a single layer which automatically finds correlated parts of the image even if they are far apart. First
|
| 38 |
+
|
| 39 |
+
introduced in SAGAN [25] and further improved in BigGAN [3], attention layers have led to some of the best known GANs currently available.
|
| 40 |
+
|
| 41 |
+
Attention layers have a few limitations. The first is that they are computationally inefficient: Standard dense attention requires memory and time complexity that scales quadratically in the size of the input. Second, dense attention layers are statistically inefficient: A significant number of training samples is required to train attention layers, a problem that becomes more pronounced when multiple attention heads or layers are introduced [5]. Statistical inefficiency also stems from the fact that dense attention does not benefit from locality, since most dependencies in images relate to nearby neighborhoods of pixels. Recent work indicates that most attention layer heads learn to attend mainly to local neighborhoods [23].
|
| 42 |
+
|
| 43 |
+
To mitigate these limitations, sparse attention layers were recently introduced in Sparse Transformers [5]. In that paper, different types of sparse attention kernels were introduced and used to obtain excellent results for images, text and audio data. They key observation we make is that the patterns that were introduced in Sparse Transformers are actually designed for one-dimensional data, such as text-sequences. Sparse Transformers [5] were applied to images by reshaping tensors in a way that significantly distorts distances of the two-dimensional grid of image pixels. Therefore, local sparse attention kernels introduced in Sparse Transformers fail to capture image locality.
|
| 44 |
+
|
| 45 |
+
# Our Contributions:
|
| 46 |
+
|
| 47 |
+
- We introduce a new local sparse attention layer that preserves two-dimensional image locality and can support good information flow through attention steps.
|
| 48 |
+
- To design our attention patterns we use the information theoretic framework of Information Flow 3 Graphs [8]. This quantifies how information can flow through mul
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
Figure 1: Samples generated by our model YLG-SAGAN after training on ImageNet. The images are visually significantly better compared to the SAGAN baseline, as also supported by FID and Inception score metrics.
|
| 52 |
+
|
| 53 |
+
tiple steps and preserve two-dimensional locality. We visualize learned attention maps and show that different heads indeed learn different aspects of the geometry of generated images.
|
| 54 |
+
|
| 55 |
+
- We modify SAGAN [25] using our new two-dimensional sparse attention layers to introduce Your Local GAN (YLG) - SAGAN. We empirically show that this change yields significant benefits. We train on ImageNet-128 and we achieve $14.53\%$ improvement to the FID score of SAGAN and $8.95\%$ improvement in Inception score, by only changing the attention layer while maintaining all other parameters of the architecture. Our ablation study shows that indeed the benefits come from two dimensional inductive bias and not from introducing multiple heads. Furthermore, YLG-SAGAN achieves this performance in $800k$ training steps as opposed to $1300k$ for SAGAN and hence reduces the training time by approximately $40\%$ .
|
| 56 |
+
- To visualize our attention maps on natural images, we came across the problem of inverting a generator: given an image $x$ , how to find a latent code $z$ so that $G(z)$ is as close as possible to $x$ . The natural inversion process of performing gradient descent on this loss works in small GANs [2, 20, 19, 14] but has been notoriously failing in bigger models with attention like SAGAN<sup>1</sup>. We present a solution to the GAN inversion problem: We use the attention layer of the discriminator to obtain a weighting on the loss function that subsequently we use to invert with gradient descent. We empirically show excellent inversion results for cases where standard gradient descent inversion fails.
|
| 57 |
+
|
| 58 |
+
We open-source our code and pre-trained models to encourage further research in this area: https://github.com/giannisdaras/ylg².
|
| 59 |
+
|
| 60 |
+
# 2. Background
|
| 61 |
+
|
| 62 |
+
Dense Attention Given matrices $X \in \mathbb{R}^{N_X \times E_X}$ , $Y \in \mathbb{R}^{N_Y \times E_Y}$ , attention of $X$ to $Y$ , updates the vector representation of $X$ by integrating the vector representation of $Y$ . In this paper, $X, Y$ are intermediate image representations. More specifically, attention of $X$ to $Y$ associates the following matrices with the inputs: The key matrix $Y_K = Y \cdot W_K$ , the query matrix $X_Q = X \cdot W_Q$ and the value matrix $Y_V = Y \cdot W_V$ where $W_K \in \mathbb{R}^{E_Y \times E}$ , $W_Q \in \mathbb{R}^{E_X \times E}$ , $W_V \in \mathbb{R}^{E_Y \times E_V}$ are learnable weight matrices. Intuitively, queries are compared with keys and values translate the result of this comparison to a new vector representation of $X$ that integrates information from $Y$ . Mathematically, the output of the attention is the matrix: $O = \sigma(X_Q \cdot Y_K^T) \cdot Y_V$ .
|
| 63 |
+
|
| 64 |
+
Sparsified Attention. The quadratic complexity of attention to the size of the input is due to the calculation of the matrix $A_{X,Y} = X_Q \cdot Y_K^T$ , $\in \mathbb{R}^{N_X \times N_Y}$ . Instead of performing this calculation jointly, we can split attention in multiple steps. At each step $i$ , we attend to a subset of input positions, specified by a binary mask $M_i \in \{0,1\}^{N_X \times N_Y}$ . Mathematically, at step $i$ we calculate matrix $A_{X,Y}^i$ where: $A_{X,Y}^i[a,b] = \begin{cases} A_{X,Y}[a,b], & M^i[a,b] = 1 \\ -\infty, & M^i[a,b] = 0 \end{cases}$ . In this expression, $-\infty$ means that after the softmax, this position will be zeroed and thus not contribute to the calculation of the output matrix. The design of the masks $\{M^i\}$ is key in reducing the number of positions attended.
|
| 65 |
+
|
| 66 |
+
There are several ways to perform multi-step attention [5] in practice. The simplest is to have separate heads [24] calculating matrices $\{A_{X,Y}^i\}$ in parallel and then concatenate along the feature dimension. We follow this approach (more details included in the Supplementary Material).
|
| 67 |
+
|
| 68 |
+
# 3. Your Local GAN
|
| 69 |
+
|
| 70 |
+
# 3.1. Full Information Attention Sparsification
|
| 71 |
+
|
| 72 |
+
As explained, an attention sparsification in $p$ steps is described by binary masks $\{M^1, \dots, M^p\}$ . The question is how to design a good set of masks for these steps. We introduce a tool from information theory to guide this design.
|
| 73 |
+
|
| 74 |
+
Information Flow Graphs are directed acyclic graphs introduced in [8] to model distributed storage systems through network information flow [1]. For our problem, this graph models how information flows across attention steps. For a given set of masks $\{M^1,\dots,M^p\}$ , we create a multi-partite graph $G(V = \{V^0,V^1,\dots,V^p\},E)$ where directed connections between $V^{i},V^{i + 1}$ are determined by mask $M^i$ . Each group of vertices in partition $V^i$ corresponds to attention tokens of step $i$ .
|
| 75 |
+
|
| 76 |
+
We say that an attention sparsification has Full Information if its corresponding Information Flow Graph has a directed path from every node $a \in V^0$ to every node $b \in V^p$ . Please note that the Fixed pattern [5] shown in sub-figure 2a does not have Full Information: there is no path from node 2 of $V^0$ to node 1 of $V^2$ .
|
| 77 |
+
|
| 78 |
+
Sparse attention is usually considered as a way to reduce the computational overhead of dense attention at a hopefully small performance loss. However, we show that attention masks chosen with a bias toward two-dimensional locality, can surprisingly outperform dense attention layers (compare the second and the third row of Table 1). This is an example of what we call the statistical inefficiency of dense attention. Sparse attention layers with locality create better inductive bias and hence can perform better in the finite sample regime. In the limit of infinite data, dense attention can always simulate sparse attention or perform better, in the same way that a fully connected layer can simulate a convolutional layer for a possible selection of weights.
|
| 79 |
+
|
| 80 |
+
We design the sparse patterns of YLG as the natural extensions of the patterns of [5] while ensuring that the corresponding Information Flow Graph supports Full Information. The first pattern, which we call Left to Right (LTR), extends the pattern of [5] to a bi-directional context. The second pattern, which we call Right to Left (RTL), is a transposed version of LTR. The corresponding $9 \times 9$ masks and associated Information Flow Graphs are presented in sub-figures 2b, 2e (LTR) and 2c, 2f (RTL). These patterns allow attention only to $n\sqrt{n}$ positions, significantly reducing the quadratic complexity of dense attention. It is possible to create very sparse Full Information graphs using multiple attention steps, but designing them and training them remains open for future work; in this paper we focus on two-step factorizations. We include more details about information flow graphs in Supplementary Material.
|
| 81 |
+
|
| 82 |
+
# 3.2. Two-Dimensional Locality
|
| 83 |
+
|
| 84 |
+
The factorization patterns of Sparse Transformers [5] and their Full Information extensions illustrated in Figure 2 are fundamentally matched to one-dimensional data, such as text-sequences.
|
| 85 |
+
|
| 86 |
+
The standard way to apply these layers on images is to reshape the three dimensional image tensors (having three color channels) to a two-dimensional tensor $X \in R^{N \times C}$ that enters attention. This corresponds to $N$ tokens, each containing a $C$ -dimensional representation of a region of the input image. This reshape arranges these $N$ tokens linearly, significantly distorting which parts of the image are nearby in two dimensions. This behavior is illustrated in the sub-figure at the left of Figure 3.
|
| 87 |
+
|
| 88 |
+
We argue that this is the reason that one-dimensional sparsifications are not ideal for images. In fact, the authors of [5] mention that the Fixed Pattern (Figure 2a) was designed for text-sequences and not for images. Our central finding is that these patterns can work very well for images, if their two dimensional structure is considered. The question is therefore how to take two-dimensional locality into account. We could create two-dimensional patterns directly on a grid but this would have significant computational overhead and also prevent us from extending one dimensional sparsifications that are known to work well [12, 5]. Instead, we modify one dimensional sparsifications to become aware of two-dimensional locality with the following trick: (i) we enumerate pixels of the image based on their Manhattan distance from location $(0,0)$ (breaking ties using row priority), (ii) shift the indices of any given one-dimensional sparsification to match the Manhattan distance enumeration instead of the reshape enumeration, and (iii) apply this new one dimensional sparsification pattern, that respects two-dimensional locality, to the one-dimensional reshaped version of the image. We call this procedure ESA (Enumerate, Shift, Apply) and illustrate it in Figure 3.
|
| 89 |
+
|
| 90 |
+
The ESA trick introduces some distortion compared to a true two-dimensional distance. We found however that this was not too limiting, at least for $128 \times 128$ resolution. Also, ESA offers an important implementation advantage: it theoretically allows the use of one-dimensional block-sparse kernels [11]. Currently these kernels exist only for GPUs, but making them work for TPU's is still under development.
|
| 91 |
+
|
| 92 |
+
# 4. Experimental Validation
|
| 93 |
+
|
| 94 |
+
We conduct experiments on the ImageNet [21] dataset. We choose SAGAN [25] as the baseline for our models because, unlike BigGAN [3] it has official open-source Tensorflow code. BigGAN is not open-source and therefore training or modifying this architecture was not possible<sup>3</sup>.
|
| 95 |
+
|
| 96 |
+

|
| 97 |
+
(a) Attention masks for Fixed Pattern [5].
|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
(b) Attention masks for Left To Right (LTR) pattern.
|
| 105 |
+
(d) Information Flow Graph associated with Fixed Pattern. This pattern does not have Full Information, i.e. there are dependencies between nodes that the attention layer cannot model. For example, there is no path from node 2 of $V^0$ to node 1 of $V^2$ .
|
| 106 |
+
|
| 107 |
+

|
| 108 |
+
(c) Attention masks for Right To Left (RTL) pattern.
|
| 109 |
+
(e) Information Flow Graph associated with LTR. This pattern has Full Information, i.e. there is a path between any node of $V^0$ and any node of $V^2$ . Note that the number of edges is only increased by a constant compared to the Fixed Attention Pattern [5], illustrated in 2d.
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
(f) Information Flow Graph associated with RTL. This pattern also has Full Information. RTL is a "transposed" version of LTR, so that local context at the right of each node is attended at the first step.
|
| 113 |
+
Figure 2: This Figure illustrates the different 2-step sparsifications of the attention layer we examine in this paper. First row demonstrates the different boolean masks that we apply to each of the two steps. Color of cell [i. j] indicates whether node i can attend to node j. With dark blue we indicate the attended positions in both steps. With light blue the positions of the first mask and with green the positions of the second mask. The yellow cells correspond to positions that we do not attend to any step (sparsity). The second row illustrates Information Flow Graph associated with the aforementioned attention masks. An Information Flow Graph visualizes how information "flows" in the attention layer. Intuitively, it visualizes how our model can use the 2-step factorization to find dependencies between image pixels. At each multipartite graph, the nodes of the first vertex set correspond to the image pixels, just before the attention. An edge from a node of the first vertex set, $V^0$ , to a node of the second vertex set, $V^1$ , means that the node of $V^0$ can attend to node of $V^1$ at the first attention step. Edges between $V^1$ , $V^2$ illustrate the second attention step.
|
| 114 |
+
|
| 115 |
+
In all our experiments, we change only the attention layer of SAGAN, keeping all the other hyper-parameters unchanged (the number of parameters is not affected). We trained all models for up to 1,500,000 steps on an individual Cloud TPU v3 devices $(\mathrm{v}3 - 8)^4$ using a $1e^{-4}$ learning rate for generator and $4e^{-4}$ for the discriminator. For all
|
| 116 |
+
|
| 117 |
+
the models we report the best performance obtained, even if it was obtained at an earlier point during training.
|
| 118 |
+
|
| 119 |
+
Attention Mechanism We start with the Fixed Pattern (Figure 2a) and modify it: First, we create Full Information extensions (Section 3.1), yielding the patterns Left-To-Right (LTR) and Right-To-Left (RTL) (Figures 2b and 2c respectively). We implement multi-step attention in parallel using different heads. Since each pattern is a two-step sparsification, this yields 4 attention heads. To encourage diversity of learned patterns, we use each pattern twice, so
|
| 120 |
+
|
| 121 |
+

|
| 122 |
+
Figure 3: Reshape and ESA enumerations of the cells of an image grid that show how image grid is projected into a line. (Left) Enumeration of pixels of an $8 \times 8$ image using a standard reshape. This projection maintains locality only in rows. (Right) Enumeration of pixels of an $8 \times 8$ image, using the ESA framework. We use the Manhattan distance from the start $(0,0)$ as a criterion for enumeration. Although there is some distortion due to the projection into 1-D, locality is mostly maintained.
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
|
| 126 |
+
the total number of heads in our new attention layer is 8. We use our ESA procedure (Section 3.2) to render these patterns aware of two dimensional geometry.
|
| 127 |
+
|
| 128 |
+
Non-Square Attention In SAGAN, the query image and the key image in the attention layer have different dimensions. This complicates things, because the sparsification patterns we discuss are designed for self-attention, where the number of query and key nodes is the same. Specifically, for SAGAN the query image is $32 \times 32$ and the key image is $16 \times 16$ . We deal with this in the simplest possible way: we create masks for the $16 \times 16$ image and we shift these masks to cover the area of the $32 \times 32$ image. Thus every $16 \times 16$ block of the $32 \times 32$ query image attends with full information to the $16 \times 16$ key image.
|
| 129 |
+
|
| 130 |
+
<table><tr><td></td><td># Heads</td><td>FID</td><td>Inception</td></tr><tr><td>SAGAN</td><td>1</td><td>18.65</td><td>52.52</td></tr><tr><td>SAGAN</td><td>8</td><td>20.09</td><td>46.01</td></tr><tr><td>YLG-SAGAN</td><td>8</td><td>15.94</td><td>57.22</td></tr><tr><td>YLG - No ESA</td><td>8</td><td>17.47</td><td>51.09</td></tr><tr><td>YLG - Strided</td><td>8</td><td>16.64</td><td>55.21</td></tr></table>
|
| 131 |
+
|
| 132 |
+
Table 1: Table of results after training SAGAN and YLG-SAGAN on ImageNet. Table also includes Ablation Studies (SAGAN 8 heads, YLG - No ESA, YLG - Strided). Our best model, YLG, achieves 15.94 FID and 57.22 Inception score. Our scores correspond to $14.53\%$ and $8.95\%$ improvement to FID and Inception respectively. We emphasize that these benefits are obtained by only one layer change to SAGAN, replacing dense attention with the local sparse attention layer that we introduce.
|
| 133 |
+
|
| 134 |
+
Results: As shown in Table 1, YLG-SAGAN (3rd row) outperforms SAGAN by a large margin measured by both FID and Inception score. Specifically, YLG-SAGAN increases Inception score to 57.22 (8.95% improvement) and im
|
| 135 |
+
|
| 136 |
+
proves FID to 15.94 (14.53% improvement). Qualitatively, we observe really good-looking samples for categories with simple geometries and homogeneity. Intuitively, a two-dimensional locality can benefit importantly categories such as valleys or mountains, because usually the image transitions for these categories are smoother compared to others and thus the dependencies are mostly local.
|
| 137 |
+
|
| 138 |
+
Additionally to the significantly improved scores, one important benefit of using YLG sparse layer instead of a dense attention layer, is that we observe significant reduction of the training time needed for the model to reach it's optimal performance. SAGAN reached its best FID score after more than 1.3 million training steps while YLG-SAGAN reaches its' optimal score after only 865,000 steps $(\approx 40\%$ reduction to the training time). Figure 4 illustrates SAGAN and YLG-SAGAN FID and Inception score as a function of the training time.
|
| 139 |
+
|
| 140 |
+
We create two collages to display samples from our YLG version of SAGAN. At the Upper Panel of Figure 7, we show dogs of different breeds generated by our YLG-SAN. At the Lower Panel, we use YLG-SAGAN to generate samples from randomly chosen classes of the ImageNet dataset.
|
| 141 |
+
|
| 142 |
+
# 4.1. Ablation Studies
|
| 143 |
+
|
| 144 |
+
Number of Attention Heads The original SAGAN implementation used a single-headed attention mechanism. In YLG, we use multiple heads to perform parallel multi-step sparse attention. Previous work has shown that multiple heads increased performance for Natural Language Processing tasks [24]. To understand how multiple heads affect SAGAN performance, we train an 8 head version of SAGAN. The results are reported in the second row of Table 1. Multiple heads actually worsen significantly the performance of the original SAGAN, reducing Inception score from 52.52 to 46.01. We provide a post-hoc interpretation of this result. The image embedding of the query vector of SAGAN has only 32 vector positions. By using 8 heads, each head gets only 4 positions for its' vector representation. Our intuition is that a 4-positions vector representation is not sufficient for effective encoding of the image information for a dense head and that accounts for the decrease in performance. It is important to note that YLG-SAGAN does not suffer from this problem. The reason is that each head is sparse, which means that only attends to a percentage of the positions that dense head attends to. Thus, a smaller vector representation does not worsen performance. Having multiple divergent sparse heads allows YLG layer to discover complex dependencies in the image space throughout the multi-step attention.
|
| 145 |
+
|
| 146 |
+
Two-Dimensional Locality As described in Section 3.2 YLG uses the ESA procedure, to adapt 1-D sparse patterns to data with 2-D structure. Our motivation was that grid-
|
| 147 |
+
|
| 148 |
+

|
| 149 |
+
Figure 4: Training comparison for YLG-SAGAN and SAGAN. We plot every 200k steps the Inception score (a) and the FID (b) of both YLG-SAGAN and SAGAN, up to 1M training steps on ImageNet. As it can be seen, YLG-SAGAN converges much faster compared to the baseline. Specifically, we obtain our best FID at step 865k, while SAGAN requires over 1.3M steps to reach its FID performance peak. Comparing peak performance for both models, we obtain an improvement from 18.65 to 15.94 FID, by only changing the attention layer.
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
|
| 153 |
+
locality could help our sparse attention layer to better model local regions. In order to validate this experimentally, we trained a version of YLG without the ESA procedure. We call this model YLG - No ESA. The results are shown in 4th row of Table 1: without the ESA procedure, the performance of YLG is about the same with the original SAGAN. This experiment indicates that ESA trick is essential for using 1-D sparse patterns for grid-structured data. With ESA, FID improves from 17.47 to 15.94 and Inception score from 51.09 to 57.22, without any other difference in the architecture. Thus, ESA is a plug-and-play framework that achieves great performance boosts to both FID and Inception score metrics. ESA allows the utilization of fast sparse 1-D patterns that were found to work well for text-sequences to be adapted to images, with great performance benefits. In section 5.1, we visualize attention maps to showcase how our model utilizes ESA framework in practice.
|
| 154 |
+
|
| 155 |
+
Sparse Patterns Our YLG layer uses the LTR and RTL patterns (Figures 2b and 2c respectively). Our intuition is that using multiple patterns at the same time increases performance because the model will be able to discover dependencies using multiple different paths. To test this intuition, we ran an experiment using the Full Information extension of the Strided [5] pattern. We choose this pattern because it was found to be effective for modeling images [5] due to its' periodic structure. As with LTR and RTL patterns, we extend the Strided pattern so that it has Full Information. We refer to the YLG model that instead of LTR and RTL patterns, has 8 heads implementing the Strided pattern as YLG - Strided. For our experiment, we use again the ESA trick. We report the results on the 5th row of Table 1. YLG - Strided importantly surpasses SAGAN both in FID and Inception score, however, it is still behind YLG. Although in
|
| 156 |
+
|
| 157 |
+
the Sparse Transformers [5] it has been claimed that strided pattern is more suitable for images than the patterns we use in YLG, this experiment strongly suggests that it is the grid-locality which makes the difference, as both models are far better than SAGAN. Also, this experiment indicates that multiple sparse patterns can boost performance compared to using a single sparse pattern. To be noted, using multiple different patterns at the same attention layer requires scaling the number of heads as well. Although YLG variations of SAGAN were not impacted negatively by the increase of attention heads, more severe up-scaling of the number of heads could potentially harm performance, similarly to how 8 heads harmed performance of SAGAN.
|
| 158 |
+
|
| 159 |
+
# 5. Inverting Generative Models with Attention
|
| 160 |
+
|
| 161 |
+
We are interested in visualizing our sparse attention on real images, not just generated ones. This leads naturally to the problem of projecting an image on the range of a generator, also called inversion. Given a real image $x \in \mathbb{R}^n$ and a generator $G(z)$ , inversion corresponds to finding a latent variable $z^{*} \in \mathbb{R}^{k}$ , so that $G(z^{*}) \in \mathbb{R}^{n}$ approximates the given image $x$ as well as possible. One approach is to try to solve the following non-convex optimization problem:
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
\underset {z ^ {*}} {\operatorname {a r g m i n}} \left\{\| G (z ^ {*}) - x \| ^ {2} \right\}. \tag {1}
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
To solve this optimization problem, we can perform gradient descent from a random initialization $z_0$ to minimize this projection distance in the latent space. This approach was introduced independently in several papers [16, 2, 20] and further generalized to solve inverse problems beyond inversion [2, 20, 19, 14]. Recent research [13, 22] demonstrated that for fully connected generators with random weights and sufficient layer expansion, gradient descent will provably converge to the correct optimal inversion.
|
| 168 |
+
|
| 169 |
+
Unfortunately, this theory does not apply for generators that have attention layers. Even empirically, inversion by gradient descent fails for bigger generative models like SAGAN and YLG-SAGAN. As we show in our experiments the optimizer gets trapped in local minimima producing reconstructions that only vaguely resemble the target image. Other approaches for inversion have been tried in the literature, like training jointly an encoder [9] but none of these methods have been known to successfully invert complex generative models with attention layers.
|
| 170 |
+
|
| 171 |
+
We propose a novel inversion method that uses the discriminator to solve the minimization problem in an different representation space. Interestingly, the discriminator yields representations with a smoother loss landscape, especially if we use the attention layer in a special way. In more detail: We begin with a random latent variable $z$ and a given real image $x$ . We denote with $D^0$ the Discriminator network up to, but not including, the attention layer and obtain the representations $D^0(G(z))$ and $D^0(x)$ . We could perform gradient descent to minimize the distance of these discriminator representations:
|
| 172 |
+
|
| 173 |
+
$$
|
| 174 |
+
\| D ^ {0} (G (z)) - D ^ {0} (x) \| ^ {2}.
|
| 175 |
+
$$
|
| 176 |
+
|
| 177 |
+
We found, however, that we can use the attention map of the real image to further enhance inversion. We will use the example of the SAGAN architecture to illustrate this. Inside the SAGAN Discriminator's attention, a map $M \in \mathbb{R}^{32 \times 32 \times 16 \times 16}$ is calculated. For each pixel of the $32 \times 32$ image, this attention map is a distribution over the pixels of the $16 \times 16$ image. We can use this attention map to extract a saliency map. For each pixel of the $16 \times 16$ image, we can average the probabilities from all the pixels of the $32 \times 32$ image and create a distribution $S$ of shape $16 \times 16$ . Intuitively, this distribution represents how important each pixel of the image is to the discriminator.
|
| 178 |
+
|
| 179 |
+
Our proposed inversion algorithm is to perform gradient descent to minimize the discriminator embedding distance, weighted by these saliency maps:
|
| 180 |
+
|
| 181 |
+
$$
|
| 182 |
+
\left\| \left(D ^ {0} (G (z)) - D ^ {0} (x)\right) \cdot S ^ {\prime} \right\| ^ {2}, \tag {2}
|
| 183 |
+
$$
|
| 184 |
+
|
| 185 |
+
where $S'$ is a projected version of saliency map $S$ to the dimensions of $D^0(x)$ . We actually calculate one saliency map $S'$ per head and use their sum as the final loss function that we optimize for inversion. More details are included in the Supplementary Material.
|
| 186 |
+
|
| 187 |
+
# 5.1. Inversion as lens to attention
|
| 188 |
+
|
| 189 |
+
Given an arbitrary real image, we can now solve for a $z$ yielding a similar generated image from the generator, and visualize the attention maps.
|
| 190 |
+
|
| 191 |
+
We explain our approach using an example of a real image of a redshank (Figure 5a). Figure 5b shows how the
|
| 192 |
+
|
| 193 |
+
standard method for inverting generators [2] fails: the beak, legs, and rocks are missing. Figure 5c shows the result of our method. Using the $z$ that we found using inversion, we can project maps of the attention layer back to the original image to get valuable insight into how the YLG layers work.
|
| 194 |
+
|
| 195 |
+
First, we analyze the differences between the YLG-SAGAN attention heads. For each attention head of the generator, we create a saliency map as described above and use these maps to analyze the attention mechanism. As shown in Figure 5d, the head-7 in the generator is mostly ignoring background focusing on the bird. Other heads function differently: The saliency map of head-2 (Figure 5e) shows that this head attends globally. We also find that there are heads that attend quite sparsely, for example, head-5 attends only to 5-6 background pixels.
|
| 196 |
+
|
| 197 |
+
We present a second inversion, this time an indigo bird (Figure 6a). Figure 6b shows how the standard method [2] for inverting fails: the head of the bird and the branch are not reconstructed. We also illustrate where specific query points attend to. We first illustrate that the model exploited the local bias of ESA: We plot the attention map for query point $(0,0)$ for generator-head-0. This point, indicated with a blue dot, is part of the background. We clearly see a local bias in the positions this point attends to. Another example of two-dimensional local attention is shown in Figure 6e. This figure illustrates the attention map of generator-head-4 for a query point on the body of the bird (blue dot). This point attends to the edges of the bird body and to the bird head.
|
| 198 |
+
|
| 199 |
+
Finally, Figure 6f shows that there are query points that attend to long-distance, demonstrating that the attention mechanism is capable of exploiting both locality and long-distance relationships when these appear in the image.
|
| 200 |
+
|
| 201 |
+
# 6. Related Work
|
| 202 |
+
|
| 203 |
+
There has been a flourishing of novel ideas on making attention mechanisms more efficient. Dai et al. [7] separate inputs into chunks and associate a state vector with previous chunks of the input. Attention is performed per chunk, but information exchange between chunks is possible via the state vector. Guo et al. [12] show that a star-shaped topology can reduce attention cost from $O(n^{2})$ to $O(n)$ in text sequences. Interestingly, this topology does have full information, under our framework. Sukhbaatar et al. [23] introduced the idea of a learnable adaptive span for each attention layer. The idea of learnable patterns is also explored by Correia et. al [6]. Calian et al. [4] proposed a fast randomized algorithm that exploits spatial coherence and sparsity to design sparse approximations. We believe that all these methods can be possibly combined with YLG, but so far nothing has been demonstrated to improve generative models in a plug-and-play way that this work shows.
|
| 204 |
+
|
| 205 |
+
There is also prior work on using attention mechanisms
|
| 206 |
+
|
| 207 |
+

|
| 208 |
+
(a)
|
| 209 |
+
|
| 210 |
+

|
| 211 |
+
(b)
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
(c)
|
| 215 |
+
|
| 216 |
+

|
| 217 |
+
(d)
|
| 218 |
+
|
| 219 |
+

|
| 220 |
+
(e)
|
| 221 |
+
|
| 222 |
+

|
| 223 |
+
Figure 5: Inversion and Saliency maps for different heads of the Generator network. We emphasize that this image of a redshank bird was not in the training set, it is rather obtained by a Google image search. Saliency is extracted by averaging the attention each pixel of the key image gets from the query image. We use the same trick to enhance inversion. (a) A real image of a redshank. (b) A demonstration of how the standard inversion method [2] fails. (c) The inverted image for this redshank, using our technique. (d) Saliency map for head 7. Attention is mostly applied to the bird body. (e) Saliency map for head 2. This head attends almost everywhere in the image.
|
| 224 |
+
(a)
|
| 225 |
+
Figure 6: Inverted image of an indigo bird and visualization of the attention maps for specific query points. (a) The original image. Again, this was obtained with a Google image search and was not in the training set. (b) Shows how previous inversion methods fail to reconstruct the head of the bird and the branch. (c) A successful inversion using our method. (d) Specifically, 6d shows how attention uses our ESA trick to model background, homogeneous areas. (e) Attention applied to the bird. (f) Attention applied with a query on the branch. Notice how attention is non-local and captures the full branch.
|
| 226 |
+
|
| 227 |
+

|
| 228 |
+
(b)
|
| 229 |
+
|
| 230 |
+

|
| 231 |
+
(c)
|
| 232 |
+
|
| 233 |
+

|
| 234 |
+
(d)
|
| 235 |
+
|
| 236 |
+

|
| 237 |
+
(e)
|
| 238 |
+
|
| 239 |
+

|
| 240 |
+
(f)
|
| 241 |
+
|
| 242 |
+
to model images: One notable example is Zhang et al. [25], which we have discussed extensively and which adds a self-attention mechanism to GANs. See also Parmar et al. [17], which uses local-attention that is not multi-step.
|
| 243 |
+
|
| 244 |
+
# 7. Conclusions and Future Work
|
| 245 |
+
|
| 246 |
+
We introduced a new type of local sparse attention layer designed for two-dimensional data. We believe that our layer will be widely applicable for any model with attention that works on two-dimensional data. An interesting future direction is the design of attention layers, thought of as multi-step networks with connections that can either be manually chosen or learned. The two conflicting objectives are to make these networks as sparse as possible (for computational and statistical efficiency) but also support good information flow. We introduced information flow graphs as a mathematical abstraction and proposed full information as a desired criterion for such networks.
|
| 247 |
+
|
| 248 |
+
Finally, we presented a novel way to solve the inversion problem for GANs. Our technique uses the discriminator in two ways: First, using its attention to obtain pixel importance and second, as a smoothing representation of the inversion loss landscape. This new inversion method allowed us to visualize our network on approximations of real images and also to test how good a generative model is in this important coverage task. We believe that this is the first key
|
| 249 |
+
|
| 250 |
+
step towards using generative models for inverse problems.
|
| 251 |
+
|
| 252 |
+

|
| 253 |
+
Figure 7: Upper Panel: YLG conditional image generation on different dog breeds from ImageNet dataset. From up to down: eskimo husky, siberian husky, saint bernard, maltese. Lower Panel: Random generated samples from YLG-SAGAN.
|
| 254 |
+
|
| 255 |
+
# References
|
| 256 |
+
|
| 257 |
+
[1] Rudolf Ahlswede, Ning Cai, S-YR Li, and Raymond W Yeung. Network information flow. IEEE Transactions on information theory, 46(4):1204-1216, 2000. 3
|
| 258 |
+
[2] 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. 2, 6, 7, 8
|
| 259 |
+
[3] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large Scale GAN Training for High Fidelity Natural Image Synthesis. arXiv e-prints, page arXiv:1809.11096, Sep 2018. 1, 3
|
| 260 |
+
[4] Dan A. Calian, Peter Roelants, Jacques Cali, Ben Carr, Krishna Dubba, John E. Reid, and Dell Zhang. SCRAM: Spatially Coherent Randomized Attention Maps. arXiv e-prints, page arXiv:1905.10308, May 2019. 7
|
| 261 |
+
[5] Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019. 1, 2, 3, 4, 6
|
| 262 |
+
[6] Gonçalo M. Correia, Vlad Niculae, and André F. T. Martins. Adaptively sparse transformers. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), 2019. 7
|
| 263 |
+
[7] Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V. Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context. arXiv e-prints, page arXiv:1901.02860, Jan 2019. 7
|
| 264 |
+
[8] Alexandros G Dimakis, P Brighten Godfrey, Yunnan Wu, Martin J Wainwright, and Kannan Ramchandran. Network coding for distributed storage systems. IEEE transactions on information theory, 56(9):4539-4551, 2010. 1, 3
|
| 265 |
+
[9] Jeff Donahue, Philipp Krahenbuhl, and Trevor Darrell. Adversarial feature learning. arXiv preprint arXiv:1605.09782, 2016. 7
|
| 266 |
+
[10] Ian J. Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative Adversarial Networks. arXiv eprints, page arXiv:1406.2661, Jun 2014. 1
|
| 267 |
+
[11] Scott Gray, Alec Radford, and Diederik P Kingma. GPU kernels for block-sparse weights. arXiv preprint arXiv:1711.09224, 2017. 3
|
| 268 |
+
[12] Qipeng Guo, Xipeng Qiu, Pengfei Liu, Yunfan Shao, Xi-angyang Xue, and Zheng Zhang. Star-Transformer. arXiv e-prints, page arXiv:1902.09113, Feb 2019. 3, 7
|
| 269 |
+
[13] Paul Hand and Vladislav Voroninski. Global guarantees for enforcing deep generative priors by empirical risk. IEEE Transactions on Information Theory, 2019. 6
|
| 270 |
+
[14] Maya Kabbak, Pouya Samangouei, and Rama Chellappa. Task-aware compressed sensing with generative adversarial networks. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. 2, 6
|
| 271 |
+
|
| 272 |
+
[15] Tero Karras, Samuli Laine, and Timo Aila. A Style-Based Generator Architecture for Generative Adversarial Networks. arXiv e-prints, page arXiv:1812.04948, Dec 2018. 1
|
| 273 |
+
[16] Zachary C Lipton and Subarna Tripathi. Precise recovery of latent vectors from generative adversarial networks. arXiv preprint arXiv:1702.04782, 2017. 6
|
| 274 |
+
[17] Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. arXiv preprint arXiv:1802.05751, 2018. 8
|
| 275 |
+
[18] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks. arXiv e-prints, page arXiv:1511.06434, Nov 2015. 1
|
| 276 |
+
[19] Ankit Raj, Yuqi Li, and Yoram Bresler. Gan-based projector for faster recovery with convergence guarantees in linear inverse problems. In Proceedings of the IEEE International Conference on Computer Vision, pages 5602-5611, 2019. 2, 6
|
| 277 |
+
[20] JH Rick Chang, Chun-Liang Li, Barnabas Poczos, BVK Vijaya Kumar, and Aswin C Sankaranarayanan. One network to solve them all-solving linear inverse problems using deep projection models. In Proceedings of the IEEE International Conference on Computer Vision, pages 5888-5897, 2017. 2, 6
|
| 278 |
+
[21] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211-252, 2015. 3
|
| 279 |
+
[22] Ganlin Song, Zhou Fan, and John Lafferty. Surfing: Iterative optimization over incrementally trained deep networks. arXiv preprint arXiv:1907.08653, 2019. 6
|
| 280 |
+
[23] Sainbayar Sukhbaatar, Edouard Grave, Piotr Bojanowski, and Armand Joulin. Adaptive Attention Span in Transformers. arXiv e-prints, page arXiv:1905.07799, May 2019. 1, 7
|
| 281 |
+
[24] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention Is All You Need. arXiv e-prints, page arXiv:1706.03762, Jun 2017. 1, 2, 5
|
| 282 |
+
[25] Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. 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 7354–7363, Long Beach, California, USA, 09–15 Jun 2019. PMLR. 1, 2, 3, 8
|
| 283 |
+
[26] Han Zhang, Tao Xu, Hongsheng Li, Shaoting Zhang, Xiaogang Wang, Xiaolei Huang, and Dimitris Metaxas. StackGAN: Text to Photo-realistic Image Synthesis with Stacked Generative Adversarial Networks. arXiv e-prints, page arXiv:1612.03242, Dec 2016. 1
|
yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c24a586249425d15150423158752dc68b56d3fe07a53eac6ece34db7cf8f3f0
|
| 3 |
+
size 399900
|
yourlocalgandesigningtwodimensionallocalattentionmechanismsforgenerativemodels/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8dc7bb1c1f31bcaf29ee0a3874a8927e70704a0b2c42d756eda5db581aed882f
|
| 3 |
+
size 378120
|
zeroassignmentconstraintforgraphmatchingwithoutliers/94f0b4fa-1c58-41d2-a067-7fe27ff363db_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4af7d8d46837e3653c5bb1032c31a8d4c86af0711a8a29da957e3ef5ae36da67
|
| 3 |
+
size 94844
|
zeroassignmentconstraintforgraphmatchingwithoutliers/94f0b4fa-1c58-41d2-a067-7fe27ff363db_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4fd968b6e3c870c411f00c062c90793a4ee46e957912fcbeb3e238a397c36422
|
| 3 |
+
size 115534
|
zeroassignmentconstraintforgraphmatchingwithoutliers/94f0b4fa-1c58-41d2-a067-7fe27ff363db_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f82a84a8dfb2b26fb750fd9b4b8476029f1f07b7679e820c3111c10b531afcc7
|
| 3 |
+
size 855866
|
zeroassignmentconstraintforgraphmatchingwithoutliers/full.md
ADDED
|
@@ -0,0 +1,491 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Zero-Assignment Constraint for Graph Matching with Outliers
|
| 2 |
+
|
| 3 |
+
Fudong Wang $^{1}$ , Nan Xue $^{1}$ , Jin-Gang Yu $^{2}$ , Gui-Song Xia $^{1*}$ $^{1}$ Wuhan University, China
|
| 4 |
+
|
| 5 |
+
{fudong-wang, xuanan, guisong.xia}@whu.edu.cn
|
| 6 |
+
|
| 7 |
+
$^{2}$ South China University of Technology, China
|
| 8 |
+
|
| 9 |
+
jingangyu@scut.edu.cn
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
Graph matching (GM), as a longstanding problem in computer vision and pattern recognition, still suffers from numerous cluttered outliers in practical applications. To address this issue, we present the zero-assignment constraint (ZAC) for approaching the graph matching problem in the presence of outliers. The underlying idea is to suppress the matchings of outliers by assigning zero-valued vectors to the potential outliers in the obtained optimal correspondence matrix. We provide elaborate theoretical analysis to the problem, i.e., GM with ZAC, and figure out that the GM problem with and without outliers are intrinsically different, which enables us to put forward a sufficient condition to construct valid and reasonable objective function. Consequently, we design an efficient outlier-robust algorithm to significantly reduce the incorrect or redundant matchings caused by numerous outliers. Extensive experiments demonstrate that our method can achieve the state-of-the-art performance in terms of accuracy and efficiency, especially in the presence of numerous outliers.
|
| 14 |
+
|
| 15 |
+
# 1. Introduction
|
| 16 |
+
|
| 17 |
+
In many real applications of computer vision and pattern recognition, the feature sets of interest represented as graphs are usually cluttered with numerous outliers [3, 42, 38, 30], which often reduce the accuracy of GM. Although recent works on GM [7, 11, 21, 22, 34, 44] can achieve satisfactory results for simple graphs that consist of only inliers or a few outliers, they still lack of ability to tolerate numerous outliers arising in complicated graphs. Empirically, the inliers in one graph are nodes that have highly-similar corresponding nodes in the other graph, while the outliers do not. Based on the empirical criterion, the aforementioned methods hope to match inliers to inliers correctly and force outliers to only match outliers. However, due to the com
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
(a) Left: incorrect/redundant matchings (lines in red) caused by outliers. Right: generated (yellow) v.s. the ideal (red) correspondence matrix.
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
(b) Left: our graph matching result. Right: our correspondence matrix with zero-assignment constraint of outliers.
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
|
| 33 |
+
Figure 1: ZAC for graph matching in the presence of outliers. To suppress the undesired matchings of outliers in (a), we aim to assign the potential outliers with zero-valued vectors in our optimal correspondence matrix in (b), based on which we can both establish a theoretical foundation for graph matching with outliers and put forward an outlier identification approach that can significantly reduce incorrect or redundant matches caused by outliers in practice.
|
| 34 |
+
|
| 35 |
+
plicated mutual relationships between inliers and outliers, they usually result in incorrect matchings between inliers or redundant matchings between outliers (e.g., Fig. 1 (a)).
|
| 36 |
+
|
| 37 |
+
In this paper, we are motivated to address this challenge by introducing the zero-assignment constraint for outliers: unlike the previous methods that hope to match outliers only to outliers, it's more reasonable to suppress the matchings of outliers. Equivalently, we try to assign each potential outlier with a zero-valued vector (i.e., the zero-assignment constraint for outliers) in the solution of our objective function (e.g., the correspondence matrix in Fig. 1 (b)).
|
| 38 |
+
|
| 39 |
+
To make our idea more reasonable and practical, we try our efforts in two aspects. First, based on the zero-assignment constraint, we establish the theoretical bases including the formulation of inliers and outliers and the quantitative distinguishability between them, and then find out a
|
| 40 |
+
|
| 41 |
+
sufficient condition such that the proposed objective function can only achieve its minimum at the ideal matching. Moreover, it also helps to demonstrate the intrinsic differences between GM with and without numerous outliers. Second, we propose an efficient GM algorithm consisting of fast optimization and explicit outlier identification. The optimization algorithm is modified based on the Frank-Wolfe method [18] combined with the k-cardinality linear assignment problem [10] and has low space and time complexity. And then, the zero-assignment vectors in the optimal solution of our objective function can be used to assign the nodes in two graphs with joint probabilities, which measure whether the nodes are inliers or outliers and help to identify and remove the potential outliers in practice.
|
| 42 |
+
|
| 43 |
+
Our main contributions are summarized as follows:
|
| 44 |
+
|
| 45 |
+
- We establish the theoretical foundations for GM problem with outliers based on the zero-assignment constraint and elaborate quantitative analyses of inliers and outliers, on which bases we can theoretically put forward a sufficient condition to guide us how to construct valid and reasonable objective function.
|
| 46 |
+
- We present an efficient GM algorithm with low space and time complexity by avoiding using the costly affinity matrix and designing fast optimization algorithm. Combined with our outlier identification approach, we can achieve state-of-the-art performance for complicated graphs cluttered with numerous outliers.
|
| 47 |
+
|
| 48 |
+
# 2. Related Work
|
| 49 |
+
|
| 50 |
+
Known to be NP-complete [12, 16, 20], the GM problem can only be solved in polynomial time with approximate solutions. Over the past decades, a myriad of literature have been extensively studied (see [9, 37] for surveys), we discuss the most related works in the following aspects.
|
| 51 |
+
|
| 52 |
+
Robustness to outliers. The dual decomposition approach [31] constructed a penalty potential in the objective function for unmatched features. The max-pooling-based method [8] was proposed to avoid the adverse effect of false matches of outliers. A domain adaptation-based outlier-removal strategy proposed in [34] aimed to remove outliers as a pre-processing step. However, they directly rely on empirical criterions of outliers and can not deal with complicated situations. In our work, we both explain theoretical analyses of outliers and present an efficient outlier identification approach, by which we can achieve much better matching accuracy in complicated applications.
|
| 53 |
+
|
| 54 |
+
Interpretability for graph matching. The probability-based works [41, 11] formulated GM from the maximum-likelihood estimation perspective. A random walk view [7] was introduced by simulating random walks with reweighting jumps for GM. Some machine learning-based works [6, 25] went further to adjust attributes of graphs or
|
| 55 |
+
|
| 56 |
+
improve the affinity matrix $\mathbf{K}$ (in Eq. (1)) based on priors learned from real data. A functional representation framework [34] was proposed to give geometric insights for both general and Euclidean GM. The pioneering works [39, 35] presented an end-to-end deep learning framework for GM. Our work aims to establish the mathematical foundation for GM with outliers and enhance its theoretical rationality.
|
| 57 |
+
|
| 58 |
+
Computational efficiency. Some existing works aimed to reduce the costly space complexity caused by $\mathbf{K}$ in Eq. (1). A typical work was the factorized graph matching [44], which factorized $\mathbf{K}$ as Kronecker product of several smaller matrices. However, it is highly time-consuming in practice due to the verbose iterations during optimization. Some methods like the graduated assignment method [13] and the integer-projected fixed point algorithm [24] proposed specific fast approximations while ended with unsatisfactory matching results. As comparison, our method has low space and time complexity and achieves better trade-off between time consumption and matching accuracy.
|
| 59 |
+
|
| 60 |
+
# 3. Graph matching with outliers
|
| 61 |
+
|
| 62 |
+
This section revisits the general formulation of GM and presents the theoretical foundation for GM with outliers.
|
| 63 |
+
|
| 64 |
+
# 3.1. General formulation of graph matching
|
| 65 |
+
|
| 66 |
+
Given two attributed graphs $\mathcal{G} = \{\mathcal{V},\mathcal{E}\}$ , $\mathcal{G}' = \{\mathcal{V}',\mathcal{E}'\}$ where $\mathcal{V} = \{V_i\}_{i=1}^m$ and $\mathcal{V}' = \{V_a'\}_{a=1}^n$ represent the node sets (assume $m \leq n$ ), $\mathcal{E} \subseteq \mathcal{V} \times \mathcal{V}$ and $\mathcal{E}' \subseteq \mathcal{V}' \times \mathcal{V}'$ denote the edge sets. Generally, for each graph, e.g., $\mathcal{G}$ , the edges are represented by a (weighted) adjacency matrix $\mathcal{E} \in \mathbb{R}^{m \times m}$ , where $\mathcal{E}_{ij} > 0$ if there is an edge $(V_i, V_j)$ , and $\mathcal{E}_{ij} = 0$ otherwise. In practice, graph $\mathcal{G}$ is usually associated with node attribute $\mathbf{v}_i \in \mathbb{R}^{d_v}$ of node $V_i$ and edge attribute $\mathbf{A}_{ij} \in \mathbb{R}^{d_e}$ of edge $\mathcal{E}_{ij}$ ; the same to graph $\mathcal{G}'$ .
|
| 67 |
+
|
| 68 |
+
Solving GM problem is to find an optimal binary correspondence $\mathbf{P} \in \{0,1\}^{m \times n}$ , where $\mathbf{P}_{ia} = 1$ when the nodes $V_{i} \in \mathcal{V}$ and $V_{a}^{\prime} \in \mathcal{V}^{\prime}$ are matched, and $\mathbf{P}_{ia} = 0$ otherwise. To find such an optimal correspondence, GM methods generally minimize or maximize an objective function that measures the mutual (dis-)similarity between graphs.
|
| 69 |
+
|
| 70 |
+
As a typical Quadratic Assignment Problem (QAP), GM formulated as Lawler's QAP [20, 23, 24, 7, 44] has been favored to maximize the sum of node and edge similarities
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\max _ {\mathbf {P} \in \mathcal {P}} \mathbf {P} _ {v} ^ {\mathrm {T}} \mathbf {K P} _ {v} = \sum_ {i, a} \mathbf {P} _ {i a} \mathbf {K} _ {i a; i a} + \sum_ {(i, j), (a, b)} \mathbf {P} _ {i a} \mathbf {K} _ {i j; a b} \mathbf {P} _ {j b}, \tag {1}
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $\mathbf{P}_v$ is the columnwise vectorized replica of $\mathbf{P}$ . The affinity matrix $\mathbf{K} \in \mathbb{R}^{mn \times mn}$ has diagonal element $\mathbf{K}_{ia;ia}$ measuring the node affinity calculated with node attributes $(\mathbf{v}_i, \mathbf{v}_a')$ and non-diagonal element $\mathbf{K}_{ia;jb}$ measuring the edge affinity calculated with edge attributes $(\mathbf{A}_{ij}, \mathbf{B}_{ab})$ .
|
| 77 |
+
|
| 78 |
+
Another famous formulation is Koopmans-Beckmann's QAP [16, 32, 1, 40], which maximizes a trace-form objec
|
| 79 |
+
|
| 80 |
+
tive function measuring the node and edge similarities
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\max _ {\mathbf {P} \in \mathcal {P}} \operatorname {t r} \left(\mathbf {U} ^ {\mathrm {T}} \mathbf {P}\right) + \lambda \operatorname {t r} \left(\mathcal {E} \mathbf {P} \mathcal {E} ^ {\prime} \mathbf {P} ^ {\mathrm {T}}\right), \tag {2}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
where $\{\mathbf{U}_{ia}\} \in \mathbb{R}^{m\times n}$ measures the node similarity between $V_{i}$ and $V_{a}^{\prime}$ and $\lambda \geq 0$ is a weight.
|
| 87 |
+
|
| 88 |
+
Generally, GM methods impose the one-to-(at most)-one constraint, i.e., the feasible field $\mathcal{P}$ can be defined as
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\mathcal {P} \triangleq \left\{\mathbf {P} \in \{0, 1 \} ^ {m \times n}; \mathbf {P} \mathbf {1} = \mathbf {1}, \mathbf {P} ^ {\mathrm {T}} \mathbf {1} \leq \mathbf {1} \right\}, \tag {3}
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where $\mathbf{1}$ is a columnwise unit vector. In fact, Eq. (3) means that both inliers and outliers are equally treated to find their correspondences. Some methods like [6, 31] replace $\mathbf{P1} = \mathbf{1}$ by $\mathbf{P1} \leq \mathbf{1}$ to relax the one-to-(at most)-one constraint. However, they still lack of intrinsic theoretical analyses for the numerous outliers arising in both graphs.
|
| 95 |
+
|
| 96 |
+
# 3.2. Zero-assignment constraint for outliers
|
| 97 |
+
|
| 98 |
+
As stated previously in Sec. 1, we aim to only match inliers to inliers and suppress the matchings of outliers. To achieve our goal, we present the zero-assignment constraint for outliers in this section. Denoting the number of inliers in $\mathcal{G}'$ and $\mathcal{G}$ as $k$ ( $0 < k \leq m \leq n$ ), for better understanding, we first introduce some basic definitions in the following.
|
| 99 |
+
|
| 100 |
+
Definition 3.1. Denote $\mathcal{A} = \{1,2,\dots,m\}$ as the index set of nodes in graph $\mathcal{G}$ . The index sets of inliers and outliers of $\mathcal{G}$ are respectively defined as,
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\mathcal {A} _ {I} \triangleq \{i \in \{1, 2, \dots , m \}; \mathcal {V} _ {i} \text {i s a n i n l i e r o f} \mathcal {G} \}, \tag {4}
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\mathscr {A} _ {O} \triangleq \{o \in \{1, 2, \dots , m \}; \mathcal {V} _ {o} \text {i s a n o u t l i e r o f} \mathcal {G} \}. \tag {5}
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
The index sets $\mathcal{B} = \{1,2,\dots,n\}$ , $\mathcal{B}_I$ and $\mathcal{B}_O$ are similarly defined for graph $\mathcal{G}'$ . Obviously, we have $|\mathcal{A}_I| = |\mathcal{B}_I| = k$ . The inliers and outliers sets are complementary and disjoint.
|
| 111 |
+
|
| 112 |
+
# Proposition 1.
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\mathscr {A} _ {I} \cup \mathscr {A} _ {O} = \mathscr {A}, \quad \mathscr {A} _ {I} \cap \mathscr {A} _ {O} = \varnothing , \tag {6}
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\mathcal {B} _ {I} \cup \mathcal {B} _ {O} = \mathcal {B}, \quad \mathcal {B} _ {I} \cap \mathcal {B} _ {O} = \varnothing . \tag {7}
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
where $\varnothing$ denotes the empty set.
|
| 123 |
+
|
| 124 |
+
Next, we derive the zero-assignment constraint for outliers. Mathematically, the matching between $\mathcal{G}$ and $\mathcal{G}'$ consisting of inliers and outliers can be defined by a partial permutation $\tau$ and a partial permutation matrix $\mathbf{P}$ as follows.
|
| 125 |
+
|
| 126 |
+
Definition 3.2. The partial permutation $\tau$ between $\mathcal{G}$ and $\mathcal{G}'$ is defined as $\tau : \mathcal{A} \to \mathcal{B}$ ,
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
i \mapsto a = \tau (i) \in \mathcal {B} _ {I} \text {i f} i \in \mathcal {A} _ {I}; a = \varnothing \text {i f} i \in \mathcal {A} _ {O}. \tag {8}
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
And the inverse of $\tau$ can also be defined as $\tau^{-1}:\mathcal{B}\to \mathcal{A}$
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
a \mapsto i = \tau^ {- 1} (a) \in \mathcal {A} _ {I} \text {i f} a \in \mathcal {B} _ {I}; i = \varnothing \text {i f} a \in \mathcal {B} _ {O}. \tag {9}
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
Given $\tau$ , the matching (or correspondence) between $\mathcal{G}$ and $\mathcal{G}'$ can be equivalently expressed by the partial permutation matrix $\mathbf{P} \in \{0,1\}^{m \times n}$ compatible with $\tau$ as
|
| 139 |
+
|
| 140 |
+
Definition 3.3. For $\mathbf{P} \in \{0,1\}^{m \times n}$ compatible with $\tau$ ,
|
| 141 |
+
|
| 142 |
+
- One-to-one constraint for inliers: $\forall i\in \mathcal{A}_I$
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
\mathbf {P} _ {i, a = \tau (i)} = 1, \mathbf {P} _ {i, a \neq \tau (i)} = 0, a \in \mathcal {B} _ {I}. \tag {10}
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
- Zero-assignment constraint for outliers:
|
| 149 |
+
|
| 150 |
+
$$
|
| 151 |
+
\mathbf {P} _ {i,:} \equiv \mathbf {0} ^ {\mathrm {T}}, \forall i \in \mathscr {A} _ {O} \text {a n d} \mathbf {P} _ {:, a} \equiv \mathbf {0}, \forall a \in \mathscr {B} _ {O}. \tag {11}
|
| 152 |
+
$$
|
| 153 |
+
|
| 154 |
+
where $\mathbf{P}_{i,:}$ (or $\mathbf{P}_{\vdots ,a}$ ) is a row (or column) vector of $\mathbf{P}$ , and $\mathbf{0}$ is a columnwise zero vector.
|
| 155 |
+
|
| 156 |
+
By this means, the feasible filed $\mathcal{P}_k$ can be redefined as
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
\left\{\mathbf {P} \in \{0, 1 \} ^ {m \times n}; \mathbf {P} \mathbf {1} \leq \mathbf {1}, \mathbf {P} ^ {\mathrm {T}} \mathbf {1} \leq \mathbf {1}, \mathbf {1} ^ {\mathrm {T}} \mathbf {P} \mathbf {1} = k \right\}. \tag {12}
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
The explicit equation constraint $\mathbf{1}^{\mathrm{T}}\mathbf{P}\mathbf{1} = k$ will be used to both present a proof for the rationality of our proposed objective function in Sec. 3.4 and design an efficient optimization algorithm in Sec. 4.1.
|
| 163 |
+
|
| 164 |
+
# 3.3. Consistency and distinguishability
|
| 165 |
+
|
| 166 |
+
Empirically, the GM methods assume that the unary and pairwise attributes of inlier $i \in \mathcal{A}_I$ and edge $(i,j) \in \mathcal{A}_I \times \mathcal{A}_I$ are consistent with those of the ideal matchings $a \in \mathcal{B}_I$ and $(a,b) \in \mathcal{B}_I \times \mathcal{B}_I$ , while the outliers are on the contrary. Based on this empirical criterion, we furthermore elaborate a quantitative consistency of inliers and distinguishability between inliers and outliers, on which bases the rationality of our objective function can be guaranteed.
|
| 167 |
+
|
| 168 |
+
Denote $\{\mathbf{D}_{ia}\}_{ia}$ as the dissimilarity between nodes $V_{i} \in \mathcal{V}$ and $V_{a}^{\prime} \in \mathcal{V}^{\prime}$ , $\{\mathbf{A}_{ij}\}_{ij}$ and $\{\mathbf{B}_{ab}\}_{ab}$ are the edge attributes of edges $(V_{i}, V_{j}) \in \mathcal{E}$ and $(V_{a}^{\prime}, V_{b}^{\prime}) \in \mathcal{E}^{\prime}$ . Meanwhile, denote $\{\tau^{*}, \mathbf{P}^{*} \in \mathcal{P}_{k}\}$ as the ideal matching between $\mathcal{G}$ and $\mathcal{G}^{\prime}$ . Consequently, beyond the empirical criterion, we can induce the consistency of inliers and distinguishability between inliers and outliers by $\{\tau^{*}, \mathbf{P}^{*} \in \mathcal{P}_{k}\}$ as follows.
|
| 169 |
+
|
| 170 |
+
# Proposition 2. Consistency between inliers.
|
| 171 |
+
|
| 172 |
+
- Unary consistency: $\forall i\in \mathcal{A}_I,\forall a\in \mathcal{B}_I$
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\mathbf {D} _ {i a ^ {\prime}} = \min \left\{\mathbf {D} _ {i a}, a \in \mathcal {B} \right\} \Leftrightarrow a ^ {\prime} = \tau^ {*} (i), \tag {13}
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
$$
|
| 179 |
+
\mathbf {D} _ {i ^ {\prime} a} = \min \left\{\mathbf {D} _ {i a}, i \in \mathcal {A} \right\} \Leftrightarrow i ^ {\prime} = \tau^ {* - 1} (a). \tag {14}
|
| 180 |
+
$$
|
| 181 |
+
|
| 182 |
+
- Pairwise consistency: $\forall i, j \in \mathcal{A}_I, \forall a, b \in \mathcal{B}_I$ ,
|
| 183 |
+
|
| 184 |
+
$$
|
| 185 |
+
\begin{array}{l} \left| \left| \mathbf {A} _ {i j} - \mathbf {B} _ {a ^ {\prime} b ^ {\prime}} \right| \right| = \min \left\{\left| \left| \mathbf {A} _ {i j} - \mathbf {B} _ {a b} \right| \right|, a, b \in \mathcal {B} \right\} \\ \Leftrightarrow a ^ {\prime} = \tau^ {*} (i), b ^ {\prime} = \tau^ {*} (j), \tag {15} \\ \end{array}
|
| 186 |
+
$$
|
| 187 |
+
|
| 188 |
+
$$
|
| 189 |
+
\begin{array}{l} \left| \left| \mathbf {B} _ {a b} - \mathbf {A} _ {i ^ {\prime} j ^ {\prime}} \right| \right| = \min \left\{\left| \left| \mathbf {B} _ {a b} - \mathbf {A} _ {i j} \right| \right|, i, j \in \mathscr {A} \right\} \\ \Leftrightarrow i ^ {\prime} = \tau^ {* - 1} (a), j ^ {\prime} = \tau^ {* - 1} (b). \tag {16} \\ \end{array}
|
| 190 |
+
$$
|
| 191 |
+
|
| 192 |
+
Proposition 3. Distinguishability between inliers and outliers.
|
| 193 |
+
|
| 194 |
+
- Unary distinguishability: $\forall (i,a)\in \mathcal{A}_O\times \mathcal{B}$ or $\mathcal{A}\times$ $\mathcal{B}_O$
|
| 195 |
+
|
| 196 |
+
$$
|
| 197 |
+
\mathbf {D} _ {i a} \geq \max \left\{\mathbf {D} _ {i ^ {\prime} \tau^ {*} (i ^ {\prime})}, i ^ {\prime} \in \mathcal {A} _ {I} \right\}. \tag {17}
|
| 198 |
+
$$
|
| 199 |
+
|
| 200 |
+
- Pairwise distinguishability: $\forall (i,a),(j,b)\in \mathcal{A}_O\times \mathcal{B}$ or $\mathcal{A}\times \mathcal{B}_O$
|
| 201 |
+
|
| 202 |
+
$$
|
| 203 |
+
\begin{array}{l} \left| \left| \mathbf {A} _ {i j} - \mathbf {B} _ {a b} \right| \right| \geq \max \left\{\left| \left| \mathbf {A} _ {i ^ {\prime} j ^ {\prime}} - \mathbf {B} _ {\tau^ {*} (i ^ {\prime}) \tau^ {*} (j ^ {\prime})} \right| \right| \right. \\ , i ^ {\prime}, j ^ {\prime} \in \mathcal {A} _ {I} \}, \tag {18} \\ \end{array}
|
| 204 |
+
$$
|
| 205 |
+
|
| 206 |
+
$$
|
| 207 |
+
\begin{array}{l} \left| \left| \mathbf {B} _ {a b} - \mathbf {A} _ {i j} \right| \right| \geq \max \left\{\left| \left| \mathbf {B} _ {a ^ {\prime} b ^ {\prime}} - \mathbf {A} _ {\tau^ {* - 1} (a ^ {\prime}) \tau^ {* - 1} (b ^ {\prime})} \right| \right. \right. \\ , a ^ {\prime}, b ^ {\prime} \in \mathcal {B} _ {I} \}. \tag {19} \\ \end{array}
|
| 208 |
+
$$
|
| 209 |
+
|
| 210 |
+
where $||\cdot ||$ is an Euclidean norm.
|
| 211 |
+
|
| 212 |
+
By this means, we present a quantitative mathematical criteria of the local characteristics and mutual relationships of inliers and outliers, which is more concise and clear than empirical criteria. More importantly, the propositions above inspire us how to construct a reasonable objective function and find out a sufficient condition for proving the rationality.
|
| 213 |
+
|
| 214 |
+
# 3.4. Objective function with sufficient condition
|
| 215 |
+
|
| 216 |
+
A reasonable objective function $F(\mathbf{P})$ should satisfy two main properties: (1) preserve the unary and pairwise consistencies between the matched nodes (or edges) of two graphs and (2) achieve its optimum only at the ideal matching $\mathbf{P}^*$ . Overall, our objective function is defined as
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
\min _ {\mathbf {P} \in \mathcal {P} _ {k}} F (\mathbf {P}) = \lambda_ {1} F _ {u} (\mathbf {P}) + \lambda_ {2} F _ {p} (\mathbf {P}), \tag {20}
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
where $F_{u}(\mathbf{P})$ and $F_{p}(\mathbf{P})$ are the unary and pairwise potentials. Precisely, we set $F_{u}(\mathbf{P}) = \sum_{ia}\mathbf{D}_{ia}\mathbf{P}_{ia}$ and
|
| 223 |
+
|
| 224 |
+
$$
|
| 225 |
+
\begin{array}{l} F _ {p} (\mathbf {P}) \triangleq F _ {p _ {1}} (\mathbf {P}) + F _ {p _ {2}} (\mathbf {P}) (21) \\ \triangleq \sum_ {i j} \mathcal {E} _ {i j} | | \mathbf {A} _ {i j} - \sum_ {a, b} \mathbf {P} _ {i a} \mathbf {B} _ {a b} \mathbf {P} _ {j b} | | ^ {2} \\ + \sum_ {a b} \mathcal {E} _ {a b} ^ {\prime} \left\| \mathbf {B} _ {a b} - \sum_ {i, j} \mathbf {P} _ {i a} \mathbf {A} _ {i j} \mathbf {P} _ {j b} \right\| ^ {2} (22) \\ \triangleq \left\| \mathbf {A} - \mathbf {P B P} ^ {\mathrm {T}} \right\| _ {\varepsilon} ^ {2} + \left\| \mathbf {B} - \mathbf {P} ^ {\mathrm {T}} \mathbf {A P} \right\| _ {\varepsilon^ {\prime}} ^ {2}. (23) \\ \end{array}
|
| 226 |
+
$$
|
| 227 |
+
|
| 228 |
+
The property (1) is guaranteed since the minimization of $F(\mathbf{P})$ tends to find the minimizer $\hat{\mathbf{P}}$ that matches the nodes and edges in $\mathcal{G}$ (or $\mathcal{G}'$ ) to the mostly-consistent nodes and edges in $\mathcal{G}'$ (or $\mathcal{G}$ ). Next, we should make sure that it also satisfies the property (2). However, due to the cluttered outliers arising in both graphs, it may not hold for any arbitrarily given weighted adjacency matrices $\mathcal{E}, \mathcal{E}'$ or edge attributes A, B. Furthermore, we put forward a sufficient condition to support it.
|
| 229 |
+
|
| 230 |
+
Proposition 4. Sufficient condition for objective function. Assume that the weighted adjacency matrices $\mathcal{E},\mathcal{E}^{\prime}$ and edge attributes A,B satisfy that
|
| 231 |
+
|
| 232 |
+
$$
|
| 233 |
+
\mathcal {E} _ {i \in \mathcal {A} _ {I}, j \in \mathcal {A} _ {I}} \geq \mathcal {E} _ {i \in \mathcal {A}, j \in \mathcal {A} _ {O}}, \mathcal {E} _ {i \in \mathcal {A} _ {O}, j \in \mathcal {A}}, \tag {24}
|
| 234 |
+
$$
|
| 235 |
+
|
| 236 |
+
$$
|
| 237 |
+
\left\| \left. \mathbf {A} _ {i \in \mathcal {A} _ {I}, j \in \mathcal {A} _ {I}} \right\rangle \right\| \geq \left\| \left. \mathbf {A} _ {i \in \mathcal {A}, j \in \mathcal {A} _ {O}} \right\rangle \right\|, \left\| \left. \mathbf {A} _ {i \in \mathcal {A} _ {O}, j \in \mathcal {A}} \right\rangle \right\|, \tag {25}
|
| 238 |
+
$$
|
| 239 |
+
|
| 240 |
+
and the same to $\mathcal{E}'$ and $\mathbf{B}$ . Then, it's sufficient to prove that
|
| 241 |
+
|
| 242 |
+
$$
|
| 243 |
+
\forall \mathbf {P} \in \mathcal {P} _ {k}, F (\mathbf {P}) \geq F \left(\mathbf {P} ^ {*}\right), \tag {26}
|
| 244 |
+
$$
|
| 245 |
+
|
| 246 |
+
the equation holds if and only if $\mathbf{P} = \mathbf{P}^{*}$
|
| 247 |
+
|
| 248 |
+
Proof. Due to the over-length of the entire proof, we give the details in our supplementary materials, which also demonstrate the intrinsic differences between GM on simple graphs and on complicated graphs. $\square$
|
| 249 |
+
|
| 250 |
+
Note that, the Eq. (24) and (25) tell us how to calculate proper $\{\mathcal{E}_{ij}\}$ , $\{\mathbf{A}_{ij}\}$ (or $\{\mathcal{E}_{ab}^{\prime}\}$ , $\{\mathbf{B}_{ab}\}$ ): we should compute $\mathcal{E}_{ij}$ and $\mathbf{A}_{ij}$ to measure the similarities between the two end-nodes in edge $(i,j)$ such that edges linked by two inliers have higher similarities than the edges linked by inlier-outlier or outlier-outlier. It will be followed and validated in the experiments section Sec. 5.
|
| 251 |
+
|
| 252 |
+
# 4. Outlier-robust graph matching algorithm
|
| 253 |
+
|
| 254 |
+
In this section, we propose an efficient algorithm to solve Eq. (20) and then design an outlier identification approach.
|
| 255 |
+
|
| 256 |
+
# 4.1. Optimization algorithm
|
| 257 |
+
|
| 258 |
+
Our optimization algorithm is based on the Frank-Wolfe method [18, 19], which is widely used for convex or nonconvex optimization and achieve at least sub-linear convergence rate. Since it is a continuous line-search-based method, we should relax the discrete $\mathcal{P}_k$ into the continuous $\hat{\mathcal{P}}_k$ by relaxing $\mathbf{P}_{ia} \in \{0,1\}$ into $\mathbf{P}_{ia} \in [0,1]$ . Given $F(\mathbf{P})$ is differentiable and $\hat{\mathcal{P}}_k$ is convex, the Frank-Wolfe method iterates the following steps till it converges:
|
| 259 |
+
|
| 260 |
+
$$
|
| 261 |
+
\tilde {\mathbf {P}} ^ {(t + 1)} \in \underset {\mathbf {P} \in \hat {\mathcal {P}} _ {k}} {\operatorname {a r g m i n}} \triangleq \left\langle \nabla F \left(\mathbf {P} ^ {(t)}\right), \mathbf {P} \right\rangle , \tag {27}
|
| 262 |
+
$$
|
| 263 |
+
|
| 264 |
+
$$
|
| 265 |
+
\mathbf {P} ^ {(t + 1)} = \mathbf {P} ^ {(t)} + \alpha^ {(t)} \left(\tilde {\mathbf {P}} ^ {(t + 1)} - \mathbf {P} ^ {(t)}\right), \tag {28}
|
| 266 |
+
$$
|
| 267 |
+
|
| 268 |
+
where $\nabla F(\mathbf{P}^{(t)})$ is the gradient of $F(\mathbf{P})$ at $\mathbf{P}^{(t)}$ and $\alpha^{(t)}$ is the step size obtained by exact or inexact line search [14].
|
| 269 |
+
|
| 270 |
+
Gradient computation. The gradient $\nabla F(\mathbf{P})$ can be efficiently calculated by matrix operations as follows,
|
| 271 |
+
|
| 272 |
+
$$
|
| 273 |
+
\mathbf {W} _ {1} \triangleq 4 | | \mathbf {P B P} ^ {\mathrm {T}} - \mathbf {A} | | \otimes \operatorname {s i g n} (\mathbf {P B P} ^ {\mathrm {T}} - \mathbf {A}) \otimes \mathcal {E}, \tag {29}
|
| 274 |
+
$$
|
| 275 |
+
|
| 276 |
+
$$
|
| 277 |
+
\mathbf {W} _ {2} \triangleq 4 | | \mathbf {P} ^ {\mathrm {T}} \mathbf {A} \mathbf {P} - \mathbf {B} | | \otimes \operatorname {s i g n} \left(\mathbf {P} ^ {\mathrm {T}} \mathbf {A} \mathbf {P} - \mathbf {B}\right) \otimes \mathcal {E} ^ {\prime}, \tag {30}
|
| 278 |
+
$$
|
| 279 |
+
|
| 280 |
+
$$
|
| 281 |
+
\nabla F (\mathbf {P}) = \lambda_ {1} \mathbf {D} + \lambda_ {2} \left[ \mathbf {W} _ {1} \mathbf {P} \mathbf {B} ^ {\mathrm {T}} + \mathbf {A P W} _ {2} ^ {\mathrm {T}} \right], \tag {31}
|
| 282 |
+
$$
|
| 283 |
+
|
| 284 |
+
where $\otimes$ is the pointwise multiplication and $\mathrm{sign}(\cdot)$ is the sign function.
|
| 285 |
+
|
| 286 |
+
The k-cardinality LAP. Eq. (27) plays a key role of the optimization. It is a linear programming (LP) problem that can be solved by LP algorithms like interior point method [29]. However, such methods have costly time complexity $O(m^{3}n^{3} / \ln (\mathrm{mn}))$ [2]. Fortunately, one can prove that $\tilde{\mathbf{P}}^{(t + 1)}$ is an extreme point [4] of $\hat{\mathcal{P}}_k$ , thus, $\tilde{\mathbf{P}}^{(t + 1)}\in \mathcal{P}_k$ . Therefore, Eq. (27) boils down to a k-cardinality linear assignment problem (kLAP) [10]. We can adopt the approach [33] by which the kLAP is transformed into a standard LAP that can be efficiently solved by the Hungarian [17] or LAPJV [15] algorithm with much less time complexity $O(n^3)$ .
|
| 287 |
+
|
| 288 |
+
Regularization. Someone may doubt that the explicit equation constraint $\mathbf{1}^{\mathrm{T}}\mathbf{P}\mathbf{1} = k$ in the feasible filed is too strong. We can replace it with an implicit regularization term $(\mathbf{1}^{\mathrm{T}}\mathbf{P}\mathbf{1} - k)^{2}$ and obtain a new objective function as
|
| 289 |
+
|
| 290 |
+
$$
|
| 291 |
+
\min _ {\mathbf {P}} F _ {r} (\mathbf {P}, k) = F (\mathbf {P}) + \lambda_ {0} \left(\mathbf {1} ^ {\mathrm {T}} \mathbf {P} \mathbf {1} - k\right) ^ {2}. \tag {32}
|
| 292 |
+
$$
|
| 293 |
+
|
| 294 |
+
We set $\lambda_0 = 1$ is this paper. To solve Eq. (32), we can adopt the alternating optimization strategy: alternatively find the minimizer $\hat{\mathbf{P}}$ of Eq. (32) by Frank-Wolfe method with fixed $k$ and then update $k = \mathbf{1}^{\mathrm{T}}\hat{\mathbf{P}}\mathbf{1}$ . Note that, in this case, Eq. (27) is solved by LP algorithms (interior point method in this paper) rather than the kLAP solvers since the constraint $\mathbf{1}^{\mathrm{T}}\mathbf{P}\mathbf{1} = k$ dose not hold during solving Eq. (27).
|
| 295 |
+
|
| 296 |
+
Computational complexity. Since we do not use the affinity matrix $\mathbf{K}$ , the space complexity is only $O(n^{2})$ . In optimization, each iteration takes time complexity $O(n^{3})$ to solve the k-LAP or $O(m^{3}n^{3}/\ln(\mathrm{mn}))$ to solve the LP, and $O(m^{2}n + mn^{2})$ to compute the values and gradients of objective function. We are advised to adopt the kLAP-based approach based on the experimental analyses in Sec. 5.
|
| 297 |
+
|
| 298 |
+
# 4.2. Outlier identification and removal
|
| 299 |
+
|
| 300 |
+
After minimizing $F(\mathbf{P})$ or $F_{r}(\mathbf{P},k)$ , we obtain an optimal correspondence matrix $\hat{\mathbf{P}}$ that has two advantages beneficial to outlier identification: (1) $\hat{\mathbf{P}}$ optimally preserves the structural alignments between the two matched graphs. (2) The nearly zero-valued vectors $\hat{\mathbf{P}}_{i,:}\approx \mathbf{0}^{\mathrm{T}}$ or $\hat{\mathbf{P}}_{:,a}\approx \mathbf{0}$ indicate that the node $V_{i}\in \mathcal{G}$ or $V_{a}^{\prime}\in \mathcal{G}^{\prime}$ can be identified as outliers, as an example shown in Fig. 2 (a).
|
| 301 |
+
|
| 302 |
+
An outlier removal approach is proposed based on this outlier identification criterion. Given $\hat{\mathbf{P}}$ , we first calculate two vectors as $\hat{\mathbf{P}}\mathbf{1} = \{\hat{\mathbf{P}}_{i,:}\mathbf{1}\}_{i=1}^{m}$ and $\mathbf{1}^{\mathrm{T}}\hat{\mathbf{P}} = \{\mathbf{1}^{\mathrm{T}}\hat{\mathbf{P}}_{:,a}\}_{a=1}^{n}$ , whose components with smaller values are more likely to be outliers. Then, $\hat{\mathbf{P}}\mathbf{1}$ and $\mathbf{1}^{\mathrm{T}}\hat{\mathbf{P}}$ form the 2-dimensional coordinates of coupled nodes $\{(V_i,V_a')\}_{i,a}$ in the joint probability space, where the inliers and outliers can be significantly separated and clustered (e.g., by k-means) into two classes, see an example in Fig. 2 (b). Assume that $m', n'$ nodes of the two graphs are clustered as inliers by the clustering step, if $m' < k$ or $n' < k$ , we pick out $k - m'$ or $k - n'$
|
| 303 |
+
|
| 304 |
+

|
| 305 |
+
Figure 2: An example of the outlier identification and removal w.r.t. Fig. 1 (b). Left: the last row and column show the sums of column and row vectors of the optimal correspondence matrix $\hat{\mathbf{P}}$ . Right: the inliers (green dots) and outliers (red signs) can be significantly separated and clustered into two classes. Note that, there is one outlier in each graph clustered as inlier due to its high similarity with the other inliers (see the matching result in Fig. 1 (b)).
|
| 306 |
+
|
| 307 |
+

|
| 308 |
+
|
| 309 |
+
nodes left with higher component values and put them back into inliers. If $m' > k$ or $n' > k$ , the nodes with component values less than 0.5 will also be chosen as outliers. We iteratively execute this outlier removal procedure and then refine the inliers of two graphs till the enumerations of inliers keep unchanged. At last, the optimal solution solved w.r.t the refined graphs is our final matching result.
|
| 310 |
+
|
| 311 |
+
# 5. Experimental analysis
|
| 312 |
+
|
| 313 |
+
In this section, we evaluate and compare our methods (denoted as ZAC w.r.t. Eq. (20) and ZACR w.r.t Eq. (32)) with state-of-the-art graph matching methods including GA [13], RRWM [7], MPM [8], FGMD [44], BPFG [36] and FRGM [34] on widely used complicated datasets in terms of matching accuracy and time consumption. The codes of the compared methods are downloaded from the author's websites. Our code is available at https://github.com/wangfudong/ZAC_GM. For better evaluation of graph matching in the presence of outliers, we compute the commonly used indicators called $recall = \frac{\# \{ correct \, matching \}}{\# \{ groundtruth \, matching \}}$ , precision = $\frac{\# \{ correct \, matching \}}{\# \{ total \, matching \}}$ and $F-measure = 2 \frac{recall:precision}{recall + precision}$ .
|
| 314 |
+
|
| 315 |
+
# 5.1. Results on PASCAL dataset
|
| 316 |
+
|
| 317 |
+
We first conducted experiments on graphs in PASCAL dataset [25], which consists of 30 and 20 pairs of car and motorbike images (e.g., Fig. 1), respectively. Each pair contains both inliers with known correspondence and randomly marked dozens of outliers. To generate graphs with outliers, we randomly selected 0, 4, ..., 20 outliers to both graphs, respectively. To generate the edges, our methods and FRGM applied complete graphs, while the others connected edges by Delaunay Triangulation, on which they achieved better performance than on complete graphs.
|
| 318 |
+
|
| 319 |
+
Similar with [44, 34], we set $\mathbf{K}_{ia;ia} = \exp(-d(\mathbf{v}_i - \mathbf{v}_i))$ .
|
| 320 |
+
|
| 321 |
+

|
| 322 |
+
(a) Car
|
| 323 |
+
|
| 324 |
+

|
| 325 |
+
(b) Motorbike
|
| 326 |
+
Figure 3: Statistical verification of the minimum values of our objective function Eq. (20).
|
| 327 |
+
|
| 328 |
+

|
| 329 |
+
(a) Car
|
| 330 |
+
Figure 4: Average F-measure $(\%)$ w.r.t. number of outliers.
|
| 331 |
+
|
| 332 |
+

|
| 333 |
+
(b) Motorbike
|
| 334 |
+
|
| 335 |
+
$\mathbf{v}_a^{\prime}$ ), and $\mathbf{K}_{ia;jb} = \exp \left(-\frac{1}{2} (|\mathbf{E}_{ij} - \mathbf{E}_{ab}^{\prime}| + |\Theta_{ij} - \Theta_{ab}^{\prime}|)\right)$ , where $\mathbf{v}_i, \mathbf{v}_a^\prime$ were shape contexts [3], $d(\mathbf{v}_i - \mathbf{v}_a^\prime)$ was the cost computed as $\chi^2$ test statistic [3], $\mathbf{E}_{ij}, \mathbf{E}_{ab}^{\prime}$ were distance matrices between nodes, $\Theta_{ij}, \Theta_{ab}^{\prime}$ were the angles between the edges and the horizontal line. For our methods, we calculated $\mathbf{D}_{ia} = d(\mathbf{v}_i - \mathbf{v}_a^\prime)$ to measure the node dissimilarity. For the weighted adjacency matrices $\mathcal{E}, \mathcal{E}^{\prime}$ and edge attributes $\mathbf{A}_{ij}, \mathbf{B}_{ab}$ , in order to honor the proposition 4, we set $\mathcal{E} = 1 \oslash \mathbf{E}, \mathcal{E}^{\prime} = 1 \oslash \mathbf{E}^{\prime}$ and $\mathbf{A} = \exp (-\mathbf{E}^{2} / \sigma_{1}^{2}), \mathbf{B} = \exp (-\mathbf{E}^{\prime 2} / \sigma_{2}^{2})$ with $\sigma_1, \sigma_2$ were the standard deviations of $\mathbf{E}, \mathbf{E}^{\prime}$ . The weights in Eq. (20) were $\lambda_1 = \lambda_2 = 1$ .
|
| 336 |
+
|
| 337 |
+
First, we presented a statistical verification for proposition 4. For each graph pair with outliers, we randomly disturbed the ideal correspondences between inliers by forcing $0,1,\ldots,20$ inliers to be incorrectly matched. Then, we applied our optimization algorithm to minimize the objective function Eq. (20) under the mismatching constraints. We reported the series of obtained minimum values of objective function in Fig. 3. It shows that, with increasing number of disturbed matchings of inliers, the minimum values of objective function become higher. Only with no mismatches (i.e., the ideal ground-truth $\mathbf{P}^*$ ), the objective function achieves the lower limit of the series of minimum values. Namely, the proposition 4 can be guaranteed with our settings and optimization algorithm in practical cases.
|
| 338 |
+
|
| 339 |
+
Next, we compared all the methods in terms of matching accuracy and time consumption. For overall comparisons, we set a series of numbers $k = \lfloor \text{ratio} \cdot \min \{m, n\} \rfloor$ ( $\text{ratio} = 0.3, 0.35, \ldots, 1$ such that $k \geq 5$ since $m, n \in [15, 75]$ ) in feasible fields $\hat{\mathcal{P}}_k$ for our method. And then, we also ran the compared methods with their soft-assignment
|
| 340 |
+
|
| 341 |
+

|
| 342 |
+
(a) Car
|
| 343 |
+
Figure 5: The average recall $(\%)$ and precision $(\%)$ w.r.t varying ratio $= 0.3, 0.35, \ldots, 1$ on PASCAL dataset.
|
| 344 |
+
|
| 345 |
+

|
| 346 |
+
(b) Motorbike
|
| 347 |
+
|
| 348 |
+
<table><tr><td>#Outliers Methods</td><td>0</td><td>4</td><td>8</td><td>12</td><td>16</td><td>20</td></tr><tr><td>GA [13]</td><td>0.31</td><td>0.80</td><td>1.21</td><td>1.74</td><td>2.29</td><td>2.78</td></tr><tr><td>RRWM [7]</td><td>0.04</td><td>0.07</td><td>0.12</td><td>0.18</td><td>0.24</td><td>0.31</td></tr><tr><td>MPM [8]</td><td>0.35</td><td>0.61</td><td>0.94</td><td>1.40</td><td>2.06</td><td>3.05</td></tr><tr><td>FRGM [34]</td><td>0.44</td><td>0.61</td><td>0.78</td><td>0.96</td><td>1.14</td><td>1.36</td></tr><tr><td>BPFG [36]</td><td>1.07</td><td>23.84</td><td>37.79</td><td>61.04</td><td>83.41</td><td>122.59</td></tr><tr><td>FGMD [44]</td><td>0.68</td><td>10.01</td><td>12.67</td><td>15.44</td><td>19.47</td><td>24.21</td></tr><tr><td>ZAC</td><td>0.18</td><td>0.25</td><td>0.32</td><td>0.39</td><td>0.47</td><td>0.56</td></tr><tr><td>ZACR</td><td>0.53</td><td>0.75</td><td>0.89</td><td>1.05</td><td>1.20</td><td>1.36</td></tr></table>
|
| 349 |
+
|
| 350 |
+
Table 1: Average running time (s) w.r.t. number of outliers.
|
| 351 |
+
|
| 352 |
+
matrix and evaluated their matching accuracy with the top $k$ matchings. Note that, since the methods FGMD [44] and BPFG [36] only obtain binary correspondences, we can only compute their matching accuracy with top $k = 1 \cdot \min \{m, n\}$ matchings.
|
| 353 |
+
|
| 354 |
+
Fig. 4 shows the highest average F-measure of all methods w.r.t the numbers of outliers. We can see that our methods ZAC and ZACR are more robust to outliers. Particularly, as shown in Fig. 5, with a wide range of ratio, our methods achieve much higher precision, which means that the proposed outlier identification and removal approach can efficiently reduce incorrect or redundant matchings. Tab. 1 reports the average time consumption, our methods take acceptable and intermediate time. Since the regularization term in Eq. (32) is more flexible than the equation constraint $\mathbf{1}^{\mathrm{T}}\mathbf{P}\mathbf{1} = k$ , ZACR has a little higher accuracy than ZAC. However, as mentioned in Sec. 4.1, since ZAC solves kLAP while ZACR uses LP solver, ZAC runs much faster than ZACR. Overall, ZAC achieves better trade-off between matching accuracy and time consumption than ZACR.
|
| 355 |
+
|
| 356 |
+
# 5.2. Results on VGG dataset
|
| 357 |
+
|
| 358 |
+
As the example shown in Fig. 1, graph pairs in PASCAL dataset are generated with similar shapes. Thus, the experiments above evaluate the performance of all the methods in terms of shape consistency. Furthermore, we conducted experiments on more practical dataset to evaluate all the GM methods with more complicated graphs under varying geo
|
| 359 |
+
|
| 360 |
+

|
| 361 |
+
|
| 362 |
+

|
| 363 |
+
(a) Pair 1-2
|
| 364 |
+
|
| 365 |
+

|
| 366 |
+
(b) Pair 1-3
|
| 367 |
+
Figure 6: Average recall $(\%)$ and precision $(\%)$ of all the methods with ratio $= 0.1, 0.15, \ldots, 1$ . From pair 1-2 to 1-6, the graph pairs become more challenging for graph matching.
|
| 368 |
+
|
| 369 |
+

|
| 370 |
+
(c) Pair 1-4
|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
(d) Pair 1-5
|
| 374 |
+
|
| 375 |
+

|
| 376 |
+
(e) Pair 1-6
|
| 377 |
+
|
| 378 |
+

|
| 379 |
+
(a) Average recall and precision
|
| 380 |
+
Figure 7: Average recall $(\%)$ , precision $(\%)$ and time consumption (s) of all the methods on VGG dataset.
|
| 381 |
+
|
| 382 |
+

|
| 383 |
+
(b) Time consumption
|
| 384 |
+
|
| 385 |
+
metric or physical factors.
|
| 386 |
+
|
| 387 |
+
We adopted the widely used VGG dataset that consists of 8 groups of images (with sizes near $1000 \times 1000$ ) and each group has 6 images with varying blurring, viewpoint, rotation, light, zoom and JPEG compression (see examples in supplementary material). For each group, there exist 5 affine matrices $\mathbf{H}_{1s} \in \mathbb{R}^{3 \times 3}$ , $s = 2, \dots, 6$ that represent the ground-truth affine transformation from image 1 to images 2-6, respectively. We first formed graph pairs $\mathcal{G}, \mathcal{G}'$ between image 1 and images 2-6 in each group. Then, we utilized feature detector SIFT [26] to generate nodes of graphs. Note that, since the compared methods FGMD, BPFG and MPM were highly time consuming with large-scale complete graphs, we adjusted the threshold of SIFT such that the numbers of output features were around 100 and neglected repeated features. We computed the settings as the same as in PASCAL dataset except that $\{\mathbf{v}, \mathbf{v}_a'\}$ were SIFT features and set $\lambda_1 = 10$ , $\lambda_2 = 1$ .
|
| 388 |
+
|
| 389 |
+
An output matching result was evaluated as follows: for each node $V_{i}\in \mathcal{G}$ matched with $V_{a_i}'\in \mathcal{G}'$ , we calculated its correct correspondence $V_{\sigma_i}' = \mathbf{H}_{1s}V_i$ using the groundtruth affine matrix $\mathbf{H}_{1s}$ . Then, if the distance $\left||V_{a_i}' - V_{\sigma_i}'\right|$ was less than 10 pixels, the matching between $V_{i}$ and $V_{a_i}'$ was accepted as a correct matching. We set $k$ with varying ratio $= 0.1,0.15,\ldots ,1$ for the evaluation of recall and precision. Moreover, we also evaluated our time consumption w.r.t the varying ratio, since the number of nodes in
|
| 390 |
+
|
| 391 |
+
refined graphs obtained by our outlier identification and removal approach will be influenced by ratio. Note that, the time consumption of the other methods will not be affected by ratio since they match all the nodes in graphs.
|
| 392 |
+
|
| 393 |
+
As shown in Fig. 6, under the varying geometric or physical conditions, our methods ZAC and ZACR can achieve much higher recall and precision. Fig. 7 (a) shows the overall average matching accuracy and time consumption w.r.t. varying ratio, our method ZAC and ZACR have much better matching accuracy within much less time consumption, even though on complicated graphs with numerous outliers and varying geometric or physical factors in practice.
|
| 394 |
+
|
| 395 |
+
# 5.3. Deformable graph matching
|
| 396 |
+
|
| 397 |
+
Deformable graph matching (DGM) [5, 43, 44, 34] is an important subproblem of GM, which focuses on incorporating rigid or non-rigid deformations between graphs. The main idea is to estimate both the correspondence $\mathbf{P}$ and deformation parameters $\tau$ by minimizing the sum of residuals
|
| 398 |
+
|
| 399 |
+
$$
|
| 400 |
+
\min _ {\mathbf {P}, \tau} J (\mathbf {P}, \tau) = \sum_ {i, a} \mathbf {P} _ {i a} \| V _ {a} ^ {\prime} - \tau (V _ {i}) \| ^ {2} + \lambda_ {r} \Upsilon (\tau), \tag {33}
|
| 401 |
+
$$
|
| 402 |
+
|
| 403 |
+
where $V_{i}, V_{a}^{\prime} \in \mathbb{R}^{d}$ are the nodes in $\mathcal{V}, \mathcal{V}^{\prime}$ , and $\Upsilon(\cdot)$ is a regularization term. Generally, the rigid or non-rigid deformation is parameterized as $\tau(\mathcal{V}) = s\mathcal{V}\mathbf{R} + t$ or $\tau(\mathcal{V}) = \mathcal{V} + \mathbf{W}\mathbf{G}$ . See [44, 34] for more comprehensive reviews.
|
| 404 |
+
|
| 405 |
+

|
| 406 |
+
(a) Rigid deformation
|
| 407 |
+
|
| 408 |
+

|
| 409 |
+
(b) Non-rigid deformation
|
| 410 |
+
Figure 8: Examples of deformable graph matching results of our method ZAC on the graphs under geometric deformations, to which the noises and outliers are also added.
|
| 411 |
+
|
| 412 |
+
Finding correct correspondence $\mathbf{P}$ plays the central role for solving Eq. (33). Once $\mathbf{P}$ is well-estimated, the geometric parameter $\tau$ can be solved with closed form [44, 34].
|
| 413 |
+
|
| 414 |
+

|
| 415 |
+
Figure 9: Average errors w.r.t. varying rotations.
|
| 416 |
+
|
| 417 |
+

|
| 418 |
+
Figure 10: Average errors and time consumptions (s) w.r.t. varying outliers.
|
| 419 |
+
|
| 420 |
+
In this section, we applied all the GM methods with $k = 0.5 \times \min \{m, n\}$ to find $\mathbf{P}$ and then computed $\tau$ . We iteratively executed this procedure till it converges. All the GM methods applied the same settings used in Sec. 5.2 except that the node attributes $\mathbf{v}_i, \mathbf{v}_a'$ were shape context here.
|
| 421 |
+
|
| 422 |
+
We adopted the widely used 2D shape templates in [28, 27, 44, 34] for evaluation and comparison. We uniformly sampled $50\%$ points of the shape template as inliers of $\mathcal{G}$ and $\mathcal{G}'$ . And slight noises with uniform distribution $U(0,0.01)$ were also added to $\mathcal{G}$ and $\mathcal{G}'$ .
|
| 423 |
+
|
| 424 |
+
In this section, we conducted two series of experiments on graphs with varying deformations and outliers. First, we measured the robustness of each algorithm to rotations in rigid deformation. We rotated $\mathcal{G}'$ with varying degrees in $[- \pi, \pi]$ and then randomly added 10-50 outliers with Gaussian distribution $N(0, 0.5)$ to both $\mathcal{G}$ and $\mathcal{G}'$ . Second, we evaluated the robustness to outliers. For the rigid deformation, we randomly rotated $\mathcal{G}'$ with degrees in $[-0.1\pi, 0.1\pi]$ . For the non-rigid deformation, we deformed $\mathcal{G}'$ following the settings in [44, 34] by weight matrices $\mathbf{W}$ with Gaussian distribution $N(0, 0.5)$ . And then, we incrementally added $\{0\%, 20\%, \dots, 100\% \}$ · #inliers numbers of outliers with Gaussian distribution $N(0, 0.5)$ to $\mathcal{G}$ and $\mathcal{G}'$ . See examples in Fig. 8. For all GM methods, we adopted the rotation-invariant shape context advised by [27, 34] for rigid deformations. For evaluation, we computed the average error between the transformed inliers $\{\tau(V_i)\}$ and their ground-truth matching point $\{V_{\delta_i}'\}$ , i.e., $\frac{1}{\#inliers} \sum_i ||\tau(V_i) - V_{\delta_i}'||$ .
|
| 425 |
+
|
| 426 |
+
Fig. 9 shows the average errors of all the methods w.r.t. varying rotations. We can see that our methods ZAC and ZACR can nearly perfectly recover and match all the graphs across all the rotations. Fig. 10 reports the average errors
|
| 427 |
+
|
| 428 |
+
and time consumptions on graphs with rigid and nonrigid deformations. Our methods have much less average error than all the other methods and runs faster than most of them. Note that, we did not compare BPFG due to its extremely unacceptable time consumption (more than 5 hours to match only one pair of graphs) in this experiment.
|
| 429 |
+
|
| 430 |
+
For more comprehensive evaluation, we also compared with two efficient point registration algorithms GLS [27] and CPD [28], which can address the deformable graph matching problem from the perspective of point registration. The comparison results are shown in Tab. 2, our methods ZAC and ZACR achieve comparable results with GLS and CPD for graphs without outliers, and have less average errors for complicated graphs with numerous outliers.
|
| 431 |
+
|
| 432 |
+
<table><tr><td>#Outliers Methods</td><td>0%</td><td>20%</td><td>40%</td><td>60%</td><td>80%</td><td>100%</td><td></td></tr><tr><td>GLS [27]</td><td>0.005</td><td>0.006</td><td>0.011</td><td>0.021</td><td>0.030</td><td>0.044</td><td rowspan="4">Rigid</td></tr><tr><td>CPD [28]</td><td>0.005</td><td>0.052</td><td>0.085</td><td>0.112</td><td>0.124</td><td>0.135</td></tr><tr><td>ZAC</td><td>0.005</td><td>0.005</td><td>0.005</td><td>0.005</td><td>0.006</td><td>0.006</td></tr><tr><td>ZACR</td><td>0.009</td><td>0.005</td><td>0.006</td><td>0.005</td><td>0.006</td><td>0.006</td></tr><tr><td>GLS [27]</td><td>0.010</td><td>0.014</td><td>0.043</td><td>0.050</td><td>0.064</td><td>0.092</td><td rowspan="4">Non-rigid</td></tr><tr><td>CPD [28]</td><td>0.006</td><td>0.015</td><td>0.042</td><td>0.065</td><td>0.069</td><td>0.083</td></tr><tr><td>ZAC</td><td>0.006</td><td>0.016</td><td>0.021</td><td>0.022</td><td>0.028</td><td>0.032</td></tr><tr><td>ZACR</td><td>0.006</td><td>0.014</td><td>0.021</td><td>0.021</td><td>0.025</td><td>0.032</td></tr></table>
|
| 433 |
+
|
| 434 |
+
Table 2: Average errors w.r.t. varying outliers on graphs with rigid and non-rigid deformations.
|
| 435 |
+
|
| 436 |
+
# 6. Conclusion
|
| 437 |
+
|
| 438 |
+
This paper presents the zero-assignment constraint to address the problem of graph matching in the presence of outliers. Beyond the empirical criterion, we propose both theoretical foundations and quantitative analyses for this problem, on which bases we are inspired to construct reasonable objective function and find out the sufficient condition for its rationality. Moreover, we propose an efficient algorithm consisting of fast optimization and outlier identification, which ensures us to handle complicated graphs with numerous cluttered outliers in practice and achieve state-of-the-art performance in terms of accuracy and efficiency. In future work, we will go further to consolidate the theoretical foundation of graph matching problem with outliers by extending the zero-assignment constraint to the famous QAP formulations of graph matching in Eq. (1) and Eq. (2).
|
| 439 |
+
|
| 440 |
+
# Acknowledgement
|
| 441 |
+
|
| 442 |
+
This work was supported by the National Natural Science Foundation of China under Grant 61771350 and Grant 61922065.
|
| 443 |
+
|
| 444 |
+
# References
|
| 445 |
+
|
| 446 |
+
[1] HA Al-Mohamad and Salih o. Duffuaa. A linear programming approach for the weighted graph matching problem. IEEE TPAMI, 15(5):522-525, 1993.
|
| 447 |
+
[2] Kurt M. Anstreicher. Linear programming in $\mathrm{O}(n^3 / \ln nL)$ operations. SIAM Journal on Optimization, 9(4):803-812, 1999.
|
| 448 |
+
[3] Serge Belongie, Jitendra Malik, and Jan Puzicha. Shape matching and object recognition using shape contexts. IEEE TPAMI, 24(4):509-522, 2002.
|
| 449 |
+
[4] Harold P. Benson. Concave minimization: Theory, applications and algorithms. 1995.
|
| 450 |
+
[5] Tiberio S. Caetano, Terry Caelli, Dale Schuurmans, and Dante Barone. Graphical models and point pattern matching. IEEE TPAMI, 28(10):1646-1663, 2006.
|
| 451 |
+
[6] Tiberio S. Caetano, Li Cheng, Quoc V. Le, and Alex J. Smola. Learning graph matching. IEEE TPAMI, 31(6):1048-1058, 2009.
|
| 452 |
+
[7] Minsu Cho, Jungmin Lee, and Kyoung Mu Lee. Reweighted random walks for graph matching. In ECCV, 2010.
|
| 453 |
+
[8] Minsu Cho, Jian Sun, Olivier Duchenne, and Jean Ponce. Finding matches in a haystack: A max-pooling strategy for graph matching in the presence of outliers. In CVPR, 2014.
|
| 454 |
+
[9] Donatello Conte, Pasquale Foggia, Carlo Sansone, and Mario Vento. Thirty years of graph matching in pattern recognition. Int'l J. Pattern Recognition and Artificial Intelligence, 18(3):265-298, 2004.
|
| 455 |
+
[10] Mauro Dell'Amico and Silvano Martello. The k-cardinality assignment problem. Discrete Applied Mathematics, 76(1-3):103-121, 1997.
|
| 456 |
+
[11] Amir Egozi, Yosi Keller, and Hugo Guterman. A probabilistic approach to spectral graph matching. IEEE TPAMI, 35(1):18-27, 2013.
|
| 457 |
+
[12] Michael R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman, 1979.
|
| 458 |
+
[13] Steven Gold and Anand Rangarajan. A graduated assignment algorithm for graph matching. IEEE TPAMI, 18(4):377-388, 1996.
|
| 459 |
+
[14] Allen A. Goldstein. On steepest descent. SIAM J. Control and Optimization, 3(1):147-151, 1965.
|
| 460 |
+
[15] Roy Jonker and A. Volgenant. A shortest augmenting path algorithm for dense and sparse linear assignment problems. Computing, 38(4):325-340, 1987.
|
| 461 |
+
[16] Tjalling C. Koopmans and Martin Beckmann. Assignment problems and the location of economic activities. Econometrica: J. the Econometric Society, pages 53-76, 1957.
|
| 462 |
+
|
| 463 |
+
[17] Harold W. Kuhn. The hungarian method for the assignment problem. In 50 Years of Integer Programming 1958-2008 - From the Early Years to the State-of-the-Art, pages 29-47. Springer, 2010.
|
| 464 |
+
[18] Simon Lacoste-Julien and Martin Jaggi. On the global linear convergence of frank-wolfe optimization variants. In NeurIPS, 2015.
|
| 465 |
+
[19] Jean Lafond, Hoi-To Wai, and Eric Moulines. Nonconvex optimization with frank-wolfe algorithm and its variants. In NeurIPS 2016 Workshop on Nonconvex Optimization for Machine Learning: Theory and Practice, 2016.
|
| 466 |
+
[20] Eugene L. Lawler. The quadratic assignment problem. Management Science, pages 586-599, 1963.
|
| 467 |
+
[21] D. Khue Lé-Huu and Nikos Paragios. Alternating direction graph matching. In CVPR, 2017.
|
| 468 |
+
[22] Jungmin Lee, Minsu Cho, and Kyoung Mu Lee. Hyper-graph matching via reweighted random walks. In CVPR, 2011.
|
| 469 |
+
[23] Marius Leordeanu and Martial Hebert. A spectral technique for correspondence problems using pairwise constraints. In ICCV, 2005.
|
| 470 |
+
[24] Marius Leordeanu, Martial Hebert, and Rahul Sukthankar. An integer projected fixed point method for graph matching and map inference. In NeurIPS. 2009.
|
| 471 |
+
[25] Marius Leordeanu, Rahul Sukthankar, and Martial Hebert. Unsupervised learning for graph matching. IJCV, 96(1):28-45, 2012.
|
| 472 |
+
[26] David G. Lowe. Distinctive image features from scale-invariant keypoints. IJCV, 60(2):91-110, 2004.
|
| 473 |
+
[27] Jiayi Ma, Ji Zhao, and Alan L. Yuille. Non-rigid point set registration by preserving global and local structures. IEEE TIP, 25(1):53-64, 2016.
|
| 474 |
+
[28] Andriy Myronenko and Xubo Song. Point set registration: Coherent point drift. IEEE TPAMI, 32(12):2262-2275, 2010.
|
| 475 |
+
[29] Yurii Nesterov and Arkadii Nemirovskii. Interior-Point Polynomial Algorithms in Convex Programming. Society for Industrial and Applied Mathematics, 1994.
|
| 476 |
+
[30] Tianwei Shen, Siyu Zhu, Tian Fang, Runze Zhang, and Long Quan. Graph-based consistent matching for structure-from-motion. In ECCV, 2016.
|
| 477 |
+
[31] Lorenzo Torresani, Vladimir Kolmogorov, and Carsten Rother. A dual decomposition approach to feature correspondence. IEEE TPAMI, 35(2):259-271, 2013.
|
| 478 |
+
[32] Shinji Umeyama. An eigendecomposition approach to weighted graph matching problems. IEEE TPAMI, 10(5):695-703, 1988.
|
| 479 |
+
|
| 480 |
+
[33] A. Volgenant. Solving the k-cardinality assignment problem by transformation. European Journal of Operational Research, 157(2):322-331, 2004.
|
| 481 |
+
[34] Fu-Dong Wang, Gui-Song Xia, Nan Xue, Yipeng Zhang, and Marcello Pelillo. A functional representation for graph matching. IEEE TPAMI, early access, 2019.
|
| 482 |
+
[35] Runzhong Wang, Junchi Yan, and Xiaokang Yang. Learning combinatorial embedding networks for deep graph matching. In ICCV, 2019.
|
| 483 |
+
[36] Tao Wang, Haibin Ling, Congyan Lang, , and Songhe Feng. Graph matching with adaptive and branching path following. IEEE TPAMI, 40(12):2853-2867, 2018.
|
| 484 |
+
[37] Junchi Yan, Xu-Cheng Yin, Weiyao Lin, Cheng Deng, Hongyuan Zha, and Xiaokang Yang. A short survey of recent advances in graph matching. In ICMR, 2016.
|
| 485 |
+
[38] Bangpeng Yao and Fei-Fei Li. Action recognition with exemplar based 2.5D graph matching. In ECCV, 2012.
|
| 486 |
+
[39] Andrei Zanfir and Cristian Sminchisescu. Deep learning of graph matching. In CVPR, 2018.
|
| 487 |
+
[40] Mikhail Zaslavskiy, Francis Bach, and Jean-Philippe Vert. A path following algorithm for the graph matching problem. IEEE TPAMI, 31(12):2227-2242, 2009.
|
| 488 |
+
[41] Ron Zass and Amnon Shashua. Probabilistic graph and hypergraph matching. In CVPR, 2008.
|
| 489 |
+
[42] Yun Zeng, Chaohui Wang, Yang Wang, Xianfeng Gu, Dimitris Samaras, and Nikos Paragios. Dense non-rigid surface registration using high-order graph matching. In CVPR, 2010.
|
| 490 |
+
[43] Yefeng Zheng and David Doermann. Robust point matching for nonrigid shapes by preserving local neighborhood structures. IEEE TPAMI, 28(4):643-649, 2006.
|
| 491 |
+
[44] Feng Zhou and Fernando De la Torre. Factorized graph matching. IEEE TPAMI, 38(9):1774-1789, 2016.
|
zeroassignmentconstraintforgraphmatchingwithoutliers/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4fae5508467f8a8e75309e8c4b63998b8b70d9227d79472865ae32b00866bd89
|
| 3 |
+
size 554078
|
zeroassignmentconstraintforgraphmatchingwithoutliers/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9c53dfeb318cac1b19e1adff2238f5b47333f112b6bd8cfd7e17abdbf42c0b1a
|
| 3 |
+
size 634219
|
zeroqanovelzeroshotquantizationframework/8eb9862e-76c1-48f0-95df-88fcdac5f982_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eda83528f8e66249ea3d7a926ff9658d302f9fb490116d586821ce91eac64208
|
| 3 |
+
size 72564
|
zeroqanovelzeroshotquantizationframework/8eb9862e-76c1-48f0-95df-88fcdac5f982_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eedda486decf93086425e7b2a5d1b137b9a2b6b1a07ead15f6e59bebec5b4ce7
|
| 3 |
+
size 89234
|
zeroqanovelzeroshotquantizationframework/8eb9862e-76c1-48f0-95df-88fcdac5f982_origin.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4537ff679b4166a8c1e7991fbd3115c390313e72ff27b1062771e9c7d8019a97
|
| 3 |
+
size 4673225
|
zeroqanovelzeroshotquantizationframework/full.md
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ZeroQ: A Novel Zero Shot Quantization Framework
|
| 2 |
+
|
| 3 |
+
Yaohui Cai\*,1, Zhewei Yao\*,2, Zhen Dong\*,2,
|
| 4 |
+
|
| 5 |
+
Amir Gholami $^{2}$ , Michael W. Mahoney $^{2}$ , Kurt Keutzer $^{2}$
|
| 6 |
+
|
| 7 |
+
<sup>1</sup>Peking University; <sup>2</sup>University of California, Berkeley
|
| 8 |
+
|
| 9 |
+
caiyaohui@pku.edu.cn {zheweiy, zhendong, amirgh, mahoneymw, and keutzer} @berkeley.edu
|
| 10 |
+
|
| 11 |
+
# Abstract
|
| 12 |
+
|
| 13 |
+
Quantization is a promising approach for reducing the inference time and memory footprint of neural networks. However, most existing quantization methods require access to the original training dataset for retraining during quantization. This is often not possible for applications with sensitive or proprietary data, e.g., due to privacy and security concerns. Existing zero-shot quantization methods use different heuristics to address this, but they result in poor performance, especially when quantizing to ultralow precision. Here, we propose ZEROQ, a novel zero-shot quantization framework to address this. ZEROQ enables mixed-precision quantization without any access to the training or validation data. This is achieved by optimizing for a Distilled Dataset, which is engineered to match the statistics of batch normalization across different layers of the network. ZEROQ supports both uniform and mixed-precision quantization. For the latter, we introduce a novel Pareto frontier based method to automatically determine the mixed-precision bit setting for all layers, with no manual search involved. We extensively test our proposed method on a diverse set of models, including ResNet18/50/152, MobileNetV2, ShuffleNet, SqueezeNext, and InceptionV3 on ImageNet, as well as RetinaNet-ResNet50 on the Microsoft COCO dataset. In particular, we show that ZEROQ can achieve $1.71\%$ higher accuracy on MobileNetV2, as compared to the recently proposed DFQ [32] method. Importantly, ZEROQ has a very low computational overhead, and it can finish the entire quantization process in less than 30s (0.5% of one epoch training time of ResNet50 on ImageNet). We have open-sourced the ZEROQ framework<sup>1</sup>.
|
| 14 |
+
|
| 15 |
+
# 1. Introduction
|
| 16 |
+
|
| 17 |
+
Despite the great success of deep Neural Network (NN) models in various domains, the deployment of modern NN models at the edge has been challenging due to their pro
|
| 18 |
+
|
| 19 |
+
Equal contribution.
|
| 20 |
+
|
| 21 |
+
1https://github.com/amirgholami/ZeroQ
|
| 22 |
+
|
| 23 |
+
hibitive memory footprint, inference time, and/or energy consumption. With the current hardware support for low-precision computations, quantization has become a popular procedure to address these challenges. By quantizing the floating point values of weights and/or activations in a NN to integers, the model size can be shrunk significantly, without any modification to the architecture. This also allows one to use reduced-precision Arithmetic Logic Units (ALUs) which are faster and more power-efficient, as compared to floating point ALUs. More importantly, quantization reduces memory traffic volume, which is a significant source of energy consumption [15].
|
| 24 |
+
|
| 25 |
+
However, quantizing a model from single precision to low-precision often results in significant accuracy degradation. One way to alleviate this is to perform the so-called quantization-aware fine-tuning [46, 34, 5, 42, 45, 18] to reduce the performance gap between the original model and the quantized model. Basically, this is a retraining procedure that is performed for a few epochs to adjust the NN parameters to reduce accuracy drop. However, quantization-aware fine-tuning can be computationally expensive and time-consuming. For example, in online learning situations, where a model needs to be constantly updated on new data and deployed every few hours, there may not be enough time for the fine-tuning procedure to finish. More importantly, in many real-world scenarios, the training dataset is sensitive or proprietary, meaning that it is not possible to access the dataset that was used to train the model. Good examples are medical data, bio-metric data, or user data used in recommendation systems.
|
| 26 |
+
|
| 27 |
+
To address this, recent work has proposed post-training quantization [19, 32, 44, 3], which directly quantizes NN models without fine-tuning. However, as mentioned above, these methods result in non-trivial performance degradation, especially for low-precision quantization. Furthermore, previous post-training quantization methods usually require limited (unlabeled) data to assist the post-training quantization. However, for cases such as MLaaS (e.g., Amazon AWS and Google Cloud), it may not be possible to access any of the training data from users. An example application case is health care information which can
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 1: Illustration of sensitivity computation for ResNet18 on ImageNet. The figure shows how we compute the sensitivity of the 8-th layer when quantized to 4-bit $(\Omega_8(4))$ according to Eq. 2. We feed Distilled Data into the full-precision ResNet18 (top), and the same model except quantizing the 8-th layer to 4-bit (bottom) receptively. The sensitivity of the 8-th layer when quantized to 4-bit $\Omega_8(4)$ is defined as the KL-divergence between the output of these two models. For simplicity, we omit the residual connections here, although the same analysis is applied to the residual connections in ZEROQ.
|
| 31 |
+
|
| 32 |
+
not be uploaded to the cloud due to various privacy issues and/or regulatory constraints. Another shortcoming is that often post-quantization methods [30, 44, 3] only focus on standard NNs such as ResNet [13] and InceptionV3 [38] for image classification, and they do not consider more demanding tasks such as object detection.
|
| 33 |
+
|
| 34 |
+
In this work, we propose ZEROQ, a novel zero-shot quantization scheme to overcome the issues mentioned above. In particular, ZEROQ allows quantization of NN models, without any access to any training/validation data. It uses a novel approach to automatically compute a mixed-precision configuration without any expensive search. In particular, our contributions are as follows.
|
| 35 |
+
|
| 36 |
+
- We propose an optimization formulation to generate Distilled Data, i.e., synthetic data engineered to match the statistics of batch normalization layers. This reconstruction has a small computational overhead. For example, it only takes 3s (0.05% of one epoch training time) to generate 32 images for ResNet50 on ImageNet on an 8-V100 system.
|
| 37 |
+
- We use the above reconstruction framework to perform sensitivity analysis between the quantized and the original model. We show that the Distilled Data matches the sensitivity of the original training data (see Figure 1 and Table 7 for details). We then use the Distilled Data, instead of original/real data, to perform post-training quantization. The entire sensitivity computation here only costs 12s (0.2% of one epoch training time) in to
|
| 38 |
+
|
| 39 |
+
tal for ResNet50. Importantly, we never use any training/validation data for the entire process.
|
| 40 |
+
|
| 41 |
+
- Our framework supports both uniform and mixed-precision quantization. For the latter, we propose a novel automatic precision selection method based on a Pareto frontier optimization (see Figure 4 for illustration). This is achieved by computing the quantization sensitivity based on the Distilled Data with small computational overhead. For example, we are able to determine automatically the mixed-precision setting in under 14s for ResNet50.
|
| 42 |
+
|
| 43 |
+
We extensively test our proposed ZEROQ framework on a wide range of NNs for image classification and object detection tasks, achieving state-of-the-art quantization results in all tests. In particular, we present quantization results for both standard models (e.g., ResNet18/50/152 and InceptionV3) and efficient/compact models (e.g., MobileNetV2, ShuffleNet, and SqueezeNext) for image classification task. Importantly, we also test ZEROQ for object detection on Microsoft COCO dataset [28] with RetinaNet [27]. Among other things, we show that ZEROQ achieves $1.71\%$ higher accuracy on MobileNetV2 as compared to the recently proposed DFQ [32] method.
|
| 44 |
+
|
| 45 |
+
# 2. Related work
|
| 46 |
+
|
| 47 |
+
Here we provide a brief (and by no means extensive) review of the related work in literature. There is a wide range of methods besides quantization which have been proposed
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Figure 2: (Left) Sensitivity of each layer in ResNet50 when quantized to 4-bit weights, measured with different kinds of data (red for Gaussian, blue for Distilled Data, and black for training data). (Right) Sensitivity of ResNet50 when quantized to 2/4/8-bit weight precision (measured with Distilled Data).
|
| 51 |
+
|
| 52 |
+

|
| 53 |
+
|
| 54 |
+
to address the prohibitive memory footprint and inference latency/power of modern NN architectures. These methods are typically orthogonal to quantization, and they include efficient neural architecture design [17, 9, 16, 36, 43], knowledge distillation [14, 35], model pruning [11, 29, 24], and hardware and NN co-design [9, 21]. Here we focus on quantization [2, 6, 34, 41, 23, 48, 45, 46, 5, 8, 42], which compresses the model by reducing the bit precision used to represent parameters and/or activations. An important challenge with quantization is that it can lead to significant performance degradation, especially in ultra-low bit precision settings. To address this, existing methods propose quantization-aware fine-tuning to recover lost performance [20, 18, 4]. Importantly, this requires access to the full dataset that was used to train the original model. Not only can this be very time-consuming, but often access to training data is not possible.
|
| 55 |
+
|
| 56 |
+
To address this, several papers focused on developing post-training quantization methods (also referred to as post-quantization), without any fine-tuning/training. In particular, [19] proposes the OMSE method to optimize the $L_{2}$ distance between the quantized tensor and the original tensor. Moreover, [3] proposed the so-called ACIQ method to analytically compute the clipping range, as well as the per-channel bit allocation for NNs, and it achieves relatively good testing performance. However, they use per-channel quantization for activations, which is difficult for efficient hardware implementation in practice. In addition, [44] proposes an outlier channel splitting (OCS) method to solve the outlier channel problem. However, these methods require access to limited data to reduce the performance drop [19, 3, 44, 30, 22].
|
| 57 |
+
|
| 58 |
+
The recent work of [32] proposed Data Free Quantization (DFQ). It further pushes post-quantization to zero
|
| 59 |
+
|
| 60 |
+
shot scenarios, where neither training nor testing data are accessible during quantization. The work of [32] uses a weight equalization scheme [30] to remove outliers in both weights and activations, and they achieve similar results with layer-wise quantization, as compared to previous post-quantization work with channel-wise quantization [20]. However, [32] their performance significantly degrades when NNs are quantized to 6-bit or lower.
|
| 61 |
+
|
| 62 |
+
A recent concurrent paper to ours independently proposed to use Batch Normalization statistics to reconstruct input data [12]. They propose a knowledge-distillation based method to boost the accuracy further, by generating input data that is similar to the original training dataset, using the so-called Inceptionism [31]. However, it is not clear how the latter approach can be used for tasks such as object detection or image segmentation. Furthermore, this knowledge-distillation process adds to the computational time required for zero-shot quantization. As we will show in our work, it is possible to use batch norm statistics combined with mixed-precision quantization to achieve state-of-the-art accuracy, and importantly this approach is not limited to image classification task. In particular, we will present results on object detection using RetinaNet-ResNet50, besides testing ZEROQ on a wide range of models for image classification (using ResNet18/50/152, MobileNetV2, ShuffleNet, SqueezeNext, and InceptionV3). We show that for all of these cases ZEROQ exceeds state-of-the-art quantization performance. Importantly, our approach has a very small computational overhead. For example, we can finish ResNet50 quantization in under 30 seconds on an 8 V-100 system (corresponding to $0.5\%$ of one epoch training time of ResNet50 on ImageNet).
|
| 63 |
+
|
| 64 |
+
Directly quantizing all NN layers to low precision can lead to significant accuracy degradation. A promising ap-
|
| 65 |
+
|
| 66 |
+
proach to address this is to perform mixed-precision quantization [8, 7, 40, 47, 39], where different bit-precision is used for different layers. The key idea behind mixed-precision quantization is that not all layers of a convolutional network are equally "sensitive" to quantization. A naive mixed-precision quantization method can be computationally expensive, as the search space for determining the precision of each layer is exponential in the number of layers. To address this, [39] uses NAS/RL-based search algorithm to explore the configuration space. However, these searching methods can be expensive and are often sensitive to the hyperparameters and the initialization of the RL based algorithm. Alternatively, the recent work of [8, 37, 7] introduces a Hessian based method, where the bit precision setting is based on the second-order sensitivity of each layer. However, this approach does require access to the original training set, a limitation which we address in ZEROQ.
|
| 67 |
+
|
| 68 |
+
# 3. Methodology
|
| 69 |
+
|
| 70 |
+
For a typical supervised computer vision task, we seek to minimize the empirical risk loss, i.e.,
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\min _ {\theta} \mathcal {L} (\theta) = \frac {1}{N} \sum_ {i = 1} ^ {N} f \left(\mathcal {M} \left(\theta ; x _ {i}\right), y _ {i}\right), \tag {1}
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $\theta \in \mathbb{R}^n$ is the learnable parameter, $f(\cdot ,\cdot)$ is the loss function (typically cross-entropy loss), $(x_{i},y_{i})$ is the training input/label pair, $\mathcal{M}$ is the NN model with $L$ layers, and $N$ is the total number of training data points. Here, we assume that the input data goes through standard preprocessing normalization of zero mean $(\mu_0 = 0)$ and unit variance $(\sigma_0 = 1)$ . Moreover, we assume that the model has $L$ BN layers denoted as $BN_{1},BN_{2},\ldots ,BN_{L}$ . We denote the activations before the i-th BN layer with $z_{i}$ (in other words $z_{i}$ is the output of the i-th convolutional layer). During inference, $z_{i}$ is normalized by the running mean $(\mu_{i})$ and variance $(\sigma_i^2)$ of parameters in the i-th BN layer $(BN_{i})$ , which is pre-computed during the training process. Typically BN layers also include scaling and bias correction, which we denote as $\gamma_{i}$ and $\beta_{i}$ , respectively.
|
| 77 |
+
|
| 78 |
+
We assume that before quantization, all the NN parameters and activations are stored in 32-bit precision and that we have no access to the training/validation datasets. To quantize a tensor (either weights or activations), we clip the parameters to a range of $[a,b] (a,b\in \mathbb{R})$ , and we uniformly discretize the space to $2^{k} - 1$ even intervals using asymmetric quantization. That is, the length of each interval will be $\Delta = \frac{b - a}{2^k - 1}$ . As a result, the original 32-bit single-precision values are mapped to unsigned integers within the range of $[0,2^k -1]$ . Some work has proposed non-uniform quantization schemes which can capture finer details of weight/activation distribution [33, 10, 42]. However, we only use asymmetric uniform quantization, as the non-uniform methods are typically not suitable for efficient hardware execution.
|
| 79 |
+
|
| 80 |
+
The ZEROQ framework supports both fixed-precision and mixed-precision quantization. In the latter scheme, different layers of the model could have different bit precisions (different $k$ ). The main idea behind mixed-precision quantization is to keep more sensitive layers at higher precision, and more aggressively quantize less sensitive layers, without increasing overall model size. As we will show later, this mixed-precision quantization is key to achieving high accuracy for ultra-low precision settings such as 4-bit quantization. Typical choices for $k$ for each layer are $\{2, 4, 8\}$ bit. Note that this mixed-precision quantization leads to exponentially large search space, as every layer could have one of these bit precision settings. It is possible to avoid this prohibitive search space if we could measure the sensitivity of the model to the quantization of each layer [8, 37, 7]. For the case of post-training quantization (i.e. without finetuning), a good sensitivity metric is to use Kullback-Leibler (KL) divergence between the original model and the quantized model, defined as:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\Omega_ {i} (k) = \frac {1}{N} \sum_ {j = 1} ^ {N _ {\text {d i s t}}} \mathrm {K L} (\mathcal {M} (\theta ; x _ {j}), \mathcal {M} (\tilde {\theta} _ {i} (k - b i t); x _ {j})). \tag {2}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
where $\Omega_{i}(k)$ measures how sensitive the $i$ -th layer is when quantized to $k$ -bit, and $\tilde{\theta}_{i}(k$ -bit) refers to quantized model parameters in the $i$ -th layer with $k$ -bit precision. If $\Omega_{i}(k)$ is small, the output of the quantized model will not significantly deviate from the output of the full precision model when quantizing the $i$ -th layer to $k$ -bits, and thus the $i$ -th layer is relatively insensitive to $k$ -bit quantization, and vice versa. This process is schematically shown in Figure 1 for ResNet18. However, an important problem is that for zero-shot quantization we do not have access to the original training dataset $x_{j}$ in Eq. 2. We address this by "distilling" a synthetic input data to match the statistics of the original training dataset, which we refer to as Distilled Data. We obtain the Distilled Data by solely analyzing the trained model itself, as described below.
|
| 87 |
+
|
| 88 |
+
# 3.1. Distilled Data
|
| 89 |
+
|
| 90 |
+
For zero-shot quantization, we do not have access to any of the training/validation data. This poses two challenges. First, we need to know the range of values for activations of each layer so that we can clip the range for quantization (the $[a,b]$ range mentioned above). However, we cannot determine this range without access to the training dataset. This is a problem for both uniform and mixed-precision quantization. Second, another challenge is that for mixed-precision quantization, we need to compute $\Omega_{i}$ in Eq. 2, but we do not have access to training data $x_{j}$ . A very naive method to address these challenges is to create a random input data drawn from a Gaussian distribution with zero mean and unit variance and feed it into the model. However, this approach cannot capture the correct statistics of the activation data corresponding to the original training dataset. This is illustrated in Figure 2 (left), where we plot the sensitiv
|
| 91 |
+
|
| 92 |
+
ity of each layer of ResNet50 on ImageNet measured with the original training dataset (shown in black) and Gaussian based input data (shown in red). As one can see, the Gaussian data clearly does not capture the correct sensitivity of the model. For instance, for the first three layers, the sensitivity order of the red line is actually the opposite of the original training data.
|
| 93 |
+
|
| 94 |
+

|
| 95 |
+
Figure 3: Visualization of Gaussian data (left) and Distilled Data (right). More local structure can be seen in our Distilled Data that is generated according to Algorithm 1.
|
| 96 |
+
|
| 97 |
+

|
| 98 |
+
|
| 99 |
+
To address this problem, we propose a novel method to "distill" input data from the NN model itself, i.e., to generate synthetic data carefully engineered based on the properties of the NN. In particular, we solve a distillation optimization problem, in order to learn an input data distribution that best matches the statistics encoded in the BN layer of the model. In more detail, we solve the following optimization problem:
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\min _ {x ^ {r}} \sum_ {i = 0} ^ {L} \| \tilde {\mu} _ {i} ^ {r} - \mu_ {i} \| _ {2} ^ {2} + \| \tilde {\sigma} _ {i} ^ {r} - \sigma_ {i} \| _ {2} ^ {2}, \tag {3}
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
where $x^{r}$ is the reconstructed (distilled) input data, and $\mu_{i}^{r} / \sigma_{i}^{r}$ are the mean/standard deviation of the Distilled Data's distribution at layer $i$ , and $\mu_{i} / \sigma_{i}$ are the corresponding mean/standard deviation parameters stored in the BN layer at layer $i$ . In other words, after solving this optimization problem, we can distill an input data which, when fed into the network, can have a statistical distribution that closely matches the original model. Please see Algorithm 1 for a description. This Distilled Data can then be used to address the two challenges described earlier. First, we can use the Distilled Data's activation range to determine quantization clipping parameters (the $[a,b]$ range mentioned above). Note that some prior work [3, 22, 44] address this by using limited (unlabeled) data to determine the activation range. However, this contradicts the assumptions of zero-shot quantization, and may not be applicable for certain applications. Second, we can use the Distilled Data and feed it in Eq. 2 to determine the quantization sensitivity $(\Omega_{i})$ . The latter is plotted for ResNet50 in Figure 2 (left) shown in solid blue color. As one can see, the Distilled Data
|
| 106 |
+
|
| 107 |
+
Algorithm 1: Generation of Distilled Data
|
| 108 |
+
Input: Model: $\mathcal{M}$ with $L$ Batch Normalization layers
|
| 109 |
+
Output: A batch of distilled data: $x^r$
|
| 110 |
+
Generate random data from Gaussian: $x^r$
|
| 111 |
+
Get $\mu_i, \sigma_i$ from Batch Normalization layers of $\mathcal{M}$ , $i \in \{0, 1, \ldots, L\}$ // Note that $\mu_0 = 0$ , $\sigma_0 = 1$
|
| 112 |
+
for $j = 1, 2, \ldots$ do
|
| 113 |
+
Forward propagate $\mathcal{M}(x^r)$ and gather intermediate activations
|
| 114 |
+
Get $\tilde{\mu}_i$ and $\tilde{\sigma}_i$ from intermediate activations, $i \in \{1, \ldots, n\}$
|
| 115 |
+
Compute $\tilde{\mu}_0$ and $\tilde{\sigma}_0$ of $x^r$
|
| 116 |
+
Compute the loss based on Eq. 3
|
| 117 |
+
Backward propagate and update $x^r$
|
| 118 |
+
|
| 119 |
+
closely matches the sensitivity of the model as compared to using Gaussian input data (shown in red). We show a visualization of the random Gaussian data as well as the Distilled Data for ResNet50 in Figure 3. We can see that the Distilled Data can capture fine-grained local structures.
|
| 120 |
+
|
| 121 |
+
# 3.2. Pareto Frontier
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 4: The Pareto frontier of ResNet50 on ImageNet. Each point shows a mixed-precision bit setting. The x-axis shows the resulting model size for each configuration, and the y-axis shows the resulting sensitivity. In practice, a constraint for model size is set. Then the Pareto frontier method chooses a bit-precision configuration that results in minimal perturbation. We show two examples for 4 and 6-bit mixed precision configuration shown in red and orange. The corresponding results are presented in Table 1a.
|
| 125 |
+
|
| 126 |
+
As mentioned before, the main challenge for mixed-
|
| 127 |
+
|
| 128 |
+
precision quantization is to determine the exact bit precision configuration for the entire NN. For an L-layer model with $m$ possible precision options, the mixed-precision search space, denoted as $S$ , has an exponential size of $m^L$ . For example for ResNet50 with just three bit precision of $\{2, 4, 8\}$ (i.e., $m = 3$ ), the search space contains $7.2 \times 10^{23}$ configurations. However, we can use the sensitivity metric in Eq. 2 to reduce this search space. The main idea is to use higher bit precision for layers that are more sensitive, and lower bit precision for layers that are less sensitive. This gives us a relative ordering on the number of bits. To compute the precise bit precision setting, we propose a Pareto frontier approach similar to the method used in [7].
|
| 129 |
+
|
| 130 |
+
The Pareto frontier method works as follows. For a target quantized model size of $S_{\text{target}}$ , we measure the overall sensitivity of the model for each bit precision configuration that results in the $S_{\text{target}}$ model size. We choose the bit-precision setting that corresponds to the minimum overall sensitivity. In more detail, we solve the following optimization problem:
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\min _ {\left\{k _ {i} \right\} _ {i = 1} ^ {L}} \Omega_ {s u m} = \sum_ {i = 1} ^ {L} \Omega_ {i} \left(k _ {i}\right) s. t. \sum_ {i = 1} ^ {L} P _ {i} * k _ {i} \leq S _ {t a r g e t}, \tag {4}
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
where $k_{i}$ is the quantization precision of the i-th layer, and $P_{i}$ is the parameter size for the $i$ -th layer. Note that here we make the simplifying assumption that the sensitivity of different layers are independent of the choice of bits for other layers (hence $\Omega_{i}$ only depends on the bit precision for the $i$ -th layer). Using a dynamic programming method we can solve the best setting with different $S_{target}$ together, and then we plot the Pareto frontier. An example is shown in Figure 4 for ResNet50 model, where the x-axis is the model size for each bit precision configuration, and the y-axis is the overall model perturbation/sensitivity. Each blue dot in the figure represents a mixed-precision configuration. In ZEROQ, we choose the bit precision setting that has the smallest perturbation with a specific model size constraint.
|
| 137 |
+
|
| 138 |
+
Importantly, note that the computational overhead of computing the Pareto frontier is $\mathcal{O}(mL)$ . This is because we compute the sensitivity of each layer separately from other layers. That is, we compute sensitivity $\Omega_{i}$ ( $i = 1,2,\dots,L$ ) with respect to all $m$ different precision options, which leads to the $\mathcal{O}(mL)$ computational complexity. We should note that this Pareto Frontier approach (including the Dynamic Programming optimizer), is not theoretically guaranteed to result in the best possible configuration, out of all possibilities in the exponentially large search space. However, our results show that the final mixed-precision configuration achieves state-of-the-art accuracy with small performance loss, as compared to the original model in single precision.
|
| 139 |
+
|
| 140 |
+
2Please see Section A where we describe how we relax this assumption without having to perform an exponentially large computation for the sensitivity for each bit precision setting.
|
| 141 |
+
|
| 142 |
+
Table 1: Quantization results of ResNet50, MobileNetV2, and ShuffleNet on ImageNet. We abbreviate quantization bits used for weights as "W-bit" (for activations as "A-bit"), top-1 test accuracy as "Top-1." Here, "MP" refers to mixed-precision quantization, "No D" means that none of the data is used to assist quantization, and "No FT" stands for no fine-tuning (re-training). Compared to post-quantization methods OCS [44], OMSE [19], and DFQ [32], ZEROQ achieves better accuracy. ZEROQ† means using percentile for quantization.
|
| 143 |
+
|
| 144 |
+
(a) ResNet50
|
| 145 |
+
|
| 146 |
+
<table><tr><td>Method</td><td>No D</td><td>No FT</td><td>W-bit</td><td>A-bit</td><td>Size (MB)</td><td>Top-1</td></tr><tr><td>Baseline</td><td>-</td><td>-</td><td>32</td><td>32</td><td>97.49</td><td>77.72</td></tr><tr><td>OMSE [19]</td><td>✓</td><td>✓</td><td>4</td><td>32</td><td>12.28</td><td>70.06</td></tr><tr><td>OMSE [19]</td><td>X</td><td>✓</td><td>4</td><td>32</td><td>12.28</td><td>74.98</td></tr><tr><td>PACT [5]</td><td>X</td><td>X</td><td>4</td><td>4</td><td>12.19</td><td>76.50</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>MP</td><td>8</td><td>12.17</td><td>75.80</td></tr><tr><td>ZEROQ†</td><td>✓</td><td>✓</td><td>MP</td><td>8</td><td>12.17</td><td>76.08</td></tr><tr><td>OCS [44]</td><td>X</td><td>✓</td><td>6</td><td>8</td><td>18.46</td><td>74.80</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>MP</td><td>6</td><td>18.27</td><td>77.43</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>8</td><td>8</td><td>24.37</td><td>77.67</td></tr></table>
|
| 147 |
+
|
| 148 |
+
(b) MobileNetV2
|
| 149 |
+
|
| 150 |
+
<table><tr><td>Method</td><td>No D</td><td>No FT</td><td>W-bit</td><td>A-bit</td><td>Size (MB)</td><td>Top-1</td></tr><tr><td>Baseline</td><td>-</td><td>-</td><td>32</td><td>32</td><td>13.37</td><td>73.03</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>MP</td><td>8</td><td>1.67</td><td>68.83</td></tr><tr><td>ZEROQ†</td><td>✓</td><td>✓</td><td>MP</td><td>8</td><td>1.67</td><td>69.44</td></tr><tr><td>Integer-Only [18]</td><td>X</td><td>X</td><td>6</td><td>6</td><td>2.50</td><td>70.90</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>MP</td><td>6</td><td>2.50</td><td>72.85</td></tr><tr><td>RVQuant [33]</td><td>X</td><td>X</td><td>8</td><td>8</td><td>3.34</td><td>70.29</td></tr><tr><td>DFQ [32]</td><td>✓</td><td>✓</td><td>8</td><td>8</td><td>3.34</td><td>71.20</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>8</td><td>8</td><td>3.34</td><td>72.91</td></tr></table>
|
| 151 |
+
|
| 152 |
+
(c) ShuffleNet
|
| 153 |
+
|
| 154 |
+
<table><tr><td>Method</td><td>No D</td><td>No FT</td><td>W-bit</td><td>A-bit</td><td>Size (MB)</td><td>Top-1</td></tr><tr><td>Baseline</td><td>-</td><td>-</td><td>32</td><td>32</td><td>5.94</td><td>65.07</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>MP</td><td>8</td><td>0.74</td><td>58.96</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>MP</td><td>6</td><td>1.11</td><td>62.90</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>8</td><td>8</td><td>1.49</td><td>64.94</td></tr></table>
|
| 155 |
+
|
| 156 |
+
# 4. Results
|
| 157 |
+
|
| 158 |
+
In this section, we extensively test ZEROQ on a wide range of models and datasets. We first start by discussing the zero-shot quantization of ResNet18/50, MobileNetV2, and ShuffleNet on ImageNet in Section 4.1. Additional results for quantizing ResNet152, InceptionV3, and
|
| 159 |
+
|
| 160 |
+
SqueezeNext on ImageNet, as well as ResNet20 on Cifar10 are provided in Appendix C. We also present results for object detection using RetinaNet tested on Microsoft COCO dataset in Section 4.2. We emphasize that all of the results achieved by ZEROQ are $100\%$ zero-shot without any need for fine-tuning.
|
| 161 |
+
|
| 162 |
+
We also emphasize that we used exactly the same hyperparameters (e.g., the number of iterations to generate Distilled Data) for all experiments, including the results on Microsoft COCO dataset.
|
| 163 |
+
|
| 164 |
+
# 4.1. ImageNet
|
| 165 |
+
|
| 166 |
+
We start by discussing the results on the ImageNet dataset. For each model, after generating Distilled Data based on Eq. 3, we compute the sensitivity of each layer using Eq. 2 for different bit precision. Next, we use Eq. 4 and the Pareto frontier introduced in Section 3.2 to get the best bit-precision configuration based on the overall sensitivity for a given model size constraint. We denote the quantized results as WwAh where w and h denote the bit precision used for weights and activations of the NN model.
|
| 167 |
+
|
| 168 |
+
We present zero-shot quantization results for ResNet50 in Table 1a. As one can see, for W8A8 (i.e., 8-bit quantization for both weights and activations), ZEROQ results in only $0.05\%$ accuracy degradation. Further quantizing the model to W6A6, ZEROQ achieves $77.43\%$ accuracy, which is $2.63\%$ higher than OCS [44], even though our model is slightly smaller (18.27MB as compared to 18.46MB for OCS).<sup>3</sup> We show that we can further quantize ResNet50 down to just 12.17MB with mixed precision quantization, and we obtain $75.80\%$ accuracy. Note that this is $0.82\%$ higher than OMSE [19] with access to training data and $5.74\%$ higher than zero-shot version of OMSE. Importantly, note that OMSE keeps activation bits at 32-bits, while for this comparison our results use 8-bits for the activation (i.e., $4\times$ smaller activation memory footprint than OMSE). For comparison, we include results for PACT [5], a standard quantization method that requires access to training data and also requires fine-tuning.
|
| 169 |
+
|
| 170 |
+
An important feature of the ZEROQ framework is that it can perform the quantization with very low computational overhead. For example, the end-to-end quantization of ResNet50 takes less than 30 seconds on an 8 Tesla V100 GPUs (one epoch training time on this system takes 100 minutes). In terms of timing breakdown, it takes 3s to generate the Distilled Data, 12s to compute the sensitivity for all layers of ResNet50, and 14s to perform Pareto Frontier optimization.
|
| 171 |
+
|
| 172 |
+
We also show ZEROQ results on MobileNetV2 and compare it with both DFQ [32] and fine-tuning based meth
|
| 173 |
+
|
| 174 |
+
3Importantly note that OCS requires access to the training data to do activation quantization while requires no data for weight activation only. ZEROQ does not use any training/validation data for both weight and activation quantization.
|
| 175 |
+
|
| 176 |
+
ods [33, 18], as shown in Table 1b. For W8A8, ZEROQ has less than $0.12\%$ accuracy drop as compared to baseline, and it achieves $1.71\%$ higher accuracy as compared to DFQ method.
|
| 177 |
+
|
| 178 |
+
Further compressing the model to W6A6 with mixed-precision quantization for weights, ZEROQ can still outperform Integer-Only [18] by $1.95\%$ accuracy, even though ZEROQ does not use any data or fine-tuning. ZEROQ can achieve $68.83\%$ accuracy even when the weight compression is $8\times$ , which corresponds to using 4-bit quantization for weights on average.
|
| 179 |
+
|
| 180 |
+
We also experimented with percentile based clipping to determine the quantization range [25] (please see Section D for details). The results corresponding to percentile based clipping are denoted as $ZeroQ^{\dagger}$ and reported in Table 1. We found that using percentile based clipping is helpful for low precision quantization. Other choices for clipping methods have been proposed in the literature. Here we note that our approach is orthogonal to these improvements and that ZERQOQ could be combined with these methods.
|
| 181 |
+
|
| 182 |
+
We also apply ZEROQ to quantize efficient and highly compact models such as ShuffleNet, whose model size is only 5.94MB. To the best of our knowledge, there exists no prior zero-shot quantization results for this model. ZEROQ achieves a small accuracy drop of $0.13\%$ for W8A8. We can further quantize the model down to an average of 4-bits for weights, which achieves a model size of only 0.73MB, with an accuracy of $58.96\%$ .
|
| 183 |
+
|
| 184 |
+
Table 2: Object detection on Microsoft COCO using RetinaNet. By keeping activations to be 8-bit, our 4-bit weight result is comparable with recently proposed method FQN [25], which relies on fine-tuning. (Note that FQN uses 4-bit activations and the baseline used in [25] is $35.6\mathrm{mAP}$ ).
|
| 185 |
+
|
| 186 |
+
<table><tr><td>Method</td><td>No D</td><td>No FT</td><td>W-bit</td><td>A-bit</td><td>Size (MB)</td><td>mAP</td></tr><tr><td>Baseline</td><td>✓</td><td>✓</td><td>32</td><td>32</td><td>145.10</td><td>36.4</td></tr><tr><td>FQN [25]</td><td>X</td><td>X</td><td>4</td><td>4</td><td>18.13</td><td>32.5</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>MP</td><td>8</td><td>18.13</td><td>33.7</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>MP</td><td>6</td><td>24.17</td><td>35.9</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>8</td><td>8</td><td>36.25</td><td>36.4</td></tr></table>
|
| 187 |
+
|
| 188 |
+
We also compare with the recent Data-Free Compression (DFC) [12] method. There are two main differences between ZEROQ and DFC. First, DFC proposes a fine-tuning method to recover accuracy for ultra-low precision cases. This can be time-consuming and as we show it is not necessary. In particular, we show that with mixed-precision quantization one can actually achieve higher accuracy without any need for fine-tuning. This is shown in Table 3 for ResNet18 quantization on ImageNet. In particular, note the results for W4A4, where the DFC method without fine
|
| 189 |
+
|
| 190 |
+
tuning results in more than $15\%$ accuracy drop with a final accuracy of $55.49\%$ . For this reason, the authors propose a method with post quantization training, which can boost the accuracy to $68.05\%$ using W4A4 for intermediate layers, and 8-bits for the first and last layers. In contrast, ZEROQ achieves a higher accuracy of $69.05\%$ without any need for fine-tuning. Furthermore, the end-to-end zero-shot quantization of ResNet18 takes only 12s on an 8-V100 system (equivalent to $0.4\%$ of the 45 minutes time for one epoch training of ResNet18 on ImageNet). Secondly, DFC method uses Inceptionism [31] to facilitate the generation of data with random labels, but it is hard to extend this for object detection and image segmentation tasks.
|
| 191 |
+
|
| 192 |
+
Table 3: Uniform post-quantization on ImageNet with ResNet18. We use percentile clipping for W4A4 and W4A8 settings. $ZERO^{\dagger}$ means using percentile for quantization.
|
| 193 |
+
|
| 194 |
+
<table><tr><td>Method</td><td>No D</td><td>No FT</td><td>W-bit</td><td>A-bit</td><td>Size (MB)</td><td>Top-1</td></tr><tr><td>Baseline</td><td>-</td><td>-</td><td>32</td><td>32</td><td>44.59</td><td>71.47</td></tr><tr><td>PACT [5]</td><td>X</td><td>X</td><td>4</td><td>4</td><td>5.57</td><td>69.20</td></tr><tr><td>DFC [12]</td><td>✓</td><td>✓</td><td>4</td><td>4</td><td>5.58</td><td>55.49</td></tr><tr><td>DFC [12]</td><td>✓</td><td>X</td><td>4</td><td>4</td><td>5.58</td><td>68.06</td></tr><tr><td>ZEROQ†</td><td>✓</td><td>✓</td><td>MP</td><td>4</td><td>5.57</td><td>69.05</td></tr><tr><td>Integer-Only[18]</td><td>X</td><td>X</td><td>6</td><td>6</td><td>8.36</td><td>67.30</td></tr><tr><td>DFQ [32]</td><td>✓</td><td>✓</td><td>6</td><td>6</td><td>8.36</td><td>66.30</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>MP</td><td>6</td><td>8.35</td><td>71.30</td></tr><tr><td>RVQuant [33]</td><td>X</td><td>X</td><td>8</td><td>8</td><td>11.15</td><td>70.01</td></tr><tr><td>DFQ [32]</td><td>✓</td><td>✓</td><td>8</td><td>8</td><td>11.15</td><td>69.70</td></tr><tr><td>DFC [12]</td><td>✓</td><td>X</td><td>8</td><td>8</td><td>11.15</td><td>69.57</td></tr><tr><td>ZEROQ</td><td>✓</td><td>✓</td><td>8</td><td>8</td><td>11.15</td><td>71.43</td></tr></table>
|
| 195 |
+
|
| 196 |
+
We include additional results of quantized ResNet152, InceptionV3, and SqueezeNext on ImageNet, as well as ResNet20 on CIFar10, in Appendix C.
|
| 197 |
+
|
| 198 |
+
# 4.2. Microsoft COCO
|
| 199 |
+
|
| 200 |
+
Object detection is often much more complicated than ImageNet classification. To demonstrate the flexibility of our approach we also test ZEROQ on an object detection task on Microsoft COCO dataset. RetinaNet [27] is a state-of-the-art single-stage detector, and we use the pretrained model with ResNet50 as the backbone, which can achieve $36.4\mathrm{mAP}$ .
|
| 201 |
+
|
| 202 |
+
One of the main difference of RetinaNet with previous NNs we tested on ImageNet is that some convolutional layers in RetinaNet are not followed by BN layers. This is because of the presence of a feature pyramid network (FPN) [26], and it means that the number of BN layers is slightly smaller than that of convolutional layers. However, this is not a limitation and the ZEROQ framework still
|
| 203 |
+
|
| 204 |
+
works well. Specifically, we extract the backbone of RetinaNet and create Distilled Data. Afterwards, we feed the Distilled Data into RetinaNet to measure the sensitivity as well as to determine the activation range for the entire NN. This is followed by optimizing for the Pareto Frontier, discussed earlier.
|
| 205 |
+
|
| 206 |
+
The results are presented in Table 2. We can see that for W8A8 ZEROQ has no performance degradation. For W6A6, ZEROQ achieves $35.9\mathrm{mAP}$ . Further quantizing the model to an average of 4-bits for the weights, ZEROQ achieves $33.7\mathrm{mAP}$ . Our results are comparable to the recent results of FQN [25], even though it is not a zero-shot quantization method (i.e., it uses the full training dataset and requires fine-tuning). However, it should be mentioned that ZEROQ keeps the activations to be 8-bits, while FQN uses 4-bit activations.
|
| 207 |
+
|
| 208 |
+
# 5. Conclusions
|
| 209 |
+
|
| 210 |
+
We have introduced ZEROQ, a novel post-training quantization method that does not require any access to the training/validation data. Our approach uses a novel method to distill an input data distribution to match the statistics in the batch normalization layers of the model. We show that this Distilled Data is very effective in capturing the sensitivity of different layers of the network. Furthermore, we present a Pareto frontier method to select automatically the bit-precision configuration for mixed-precision settings. An important aspect of ZEROQ is its low computational overhead. For example, the end-to-end zero-shot quantization time of ResNet50 is less than 30 seconds on an 8-V100 GPU system. We extensively test ZEROQ on various datasets and models. This includes various ResNets, InceptionV3, MobileNetV2, ShuffleNet, and SqueezeNext on ImageNet, ResNet20 on Cifar10, and even RetinaNet for object detection on Microsoft COCO dataset. We consistently achieve higher accuracy with the same or smaller model size compared to previous post-training quantization methods. All results show that ZEROQ could exceed previous zero-shot quantization methods. We have open sourced ZEROQ framework [1].
|
| 211 |
+
|
| 212 |
+
# References
|
| 213 |
+
|
| 214 |
+
[1] https://github.com/amirgholami/zeroq.git, Dec. 2019.
|
| 215 |
+
[2] Krste Asanovic and Nelson Morgan. Experimental determination of precision requirements for back-propagation training of artificial neural networks. International Computer Science Institute, 1991.
|
| 216 |
+
[3] Ron Banner, Yury Nahshan, Elad Hoffer, and Daniel Soudry. Post training 4-bit quantization of convolution networks for rapid-deployment. CoRR, abs/1810.05723, 1(2), 2018.
|
| 217 |
+
[4] Chaim Baskin, Brian Chmiel, Evgenii Zheltonozhskii, Ron Banner, Alex M Bronstein, and Avi Mendelson. Cat: Compression-aware training for bandwidth reduction. arXiv preprint arXiv:1909.11481, 2019.
|
| 218 |
+
[5] Jungwook Choi, Zhuo Wang, Swagath Venkataramani, Pierce I-Jen Chuang, Vijayalakshmi Srinivasan, and Kailash Gopalakrishnan. Pact: Parameterized clipping activation for quantized neural networks. arXiv preprint arXiv:1805.06085, 2018.
|
| 219 |
+
[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.
|
| 220 |
+
[7] Zhen Dong, Zhewei Yao, Yaohui Cai, Daiyaan Arfeen, Amir Gholami, Michael W Mahoney, and Kurt Keutzer. Hawqv2: Hessian aware trace-weighted quantization of neural networks. arXiv preprint arXiv:1911.03852, 2019.
|
| 221 |
+
[8] Zhen Dong, Zhewei Yao, Amir Gholami, Michael Mahoney, and Kurt Keutzer. Hawq: Hessian aware quantization of neural networks with mixed-precision. ICCV, 2019.
|
| 222 |
+
[9] Amir Gholami, Kiseok Kwon, Bichen Wu, Zizheng Tai, Xiangyu Yue, Peter Jin, Sicheng Zhao, and Kurt Keutzer. Squeezeonext: Hardware-aware neural network design. Workshop paper in CVPR, 2018.
|
| 223 |
+
[10] Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. International Conference on Learning Representations, 2016.
|
| 224 |
+
[11] Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. In Advances in neural information processing systems, pages 1135-1143, 2015.
|
| 225 |
+
[12] Matan Haroush, Itay Hubara, Elad Hoffer, and Daniel Soudry. The knowledge within: Methods for data-free model compression. arXiv preprint arXiv: 1912.01274, 2019.
|
| 226 |
+
[13] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770-778, 2016.
|
| 227 |
+
[14] Geoffrey Hinton, Oriol Vinyls, and Jeff Dean. Distilling the knowledge in a neural network. Workshop paper in NIPS, 2014.
|
| 228 |
+
[15] Mark Horowitz. Computing's energy problem (and what we can do about it). In 2014 IEEE International Solid-State Circuits Conference Digest of Technical Papers (ISSCC), pages 10-14. IEEE, 2014.
|
| 229 |
+
[16] Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco An
|
| 230 |
+
|
| 231 |
+
dreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017.
|
| 232 |
+
[17] Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. SqueezeNet: Alexnet-level accuracy with 50x fewer parameters and $< 0.5$ MB model size. arXiv preprint arXiv:1602.07360, 2016.
|
| 233 |
+
[18] Benoit Jacob, Skirmantas Kligys, Bo Chen, Menglong Zhu, Matthew Tang, Andrew Howard, Hartwig Adam, and Dmitry Kalenichenko. Quantization and training of neural networks for efficient integer-arithmetic-only inference. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2704-2713, 2018.
|
| 234 |
+
[19] Eli Kravchik, Fan Yang, Pavel Kisilev, and Yoni Choukroun. Low-bit quantization of neural networks for efficient inference. In The IEEE International Conference on Computer Vision (ICCV) Workshops, Oct 2019.
|
| 235 |
+
[20] Raghuraman Krishnamoorthi. Quantizing deep convolutional networks for efficient inference: A whitepaper. arXiv preprint arXiv:1806.08342, 2018.
|
| 236 |
+
[21] Kiseok Kwon, Alon Amid, Amir Gholami, Bichen Wu, Krste Asanovic, and Kurt Keutzer. Co-design of deep neural nets and neural net accelerators for embedded vision applications. In 2018 55th ACM/ESDA/IEEE Design Automation Conference (DAC), pages 1-6. IEEE, 2018.
|
| 237 |
+
[22] Jun Haeng Lee, Sangwon Ha, Saerom Choi, Won-Jo Lee, and Seungwon Lee. Quantization for rapid deployment of deep neural networks. arXiv preprint arXiv:1810.05488, 2018.
|
| 238 |
+
[23] Fengfu Li, Bo Zhang, and Bin Liu. Ternary weight networks. arXiv preprint arXiv:1605.04711, 2016.
|
| 239 |
+
[24] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016.
|
| 240 |
+
[25] Rundong Li, Yan Wang, Feng Liang, Hongwei Qin, Junjie Yan, and Rui Fan. Fully quantized network for object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2810-2819, 2019.
|
| 241 |
+
[26] Tsung-Yi Lin, Piotr Dólar, Ross B. Girshick, Kaiming He, Bharath Hariharan, and Serge J. Belongie. Feature pyramid networks for object detection. CoRR, abs/1612.03144, 2016.
|
| 242 |
+
[27] 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.
|
| 243 |
+
[28] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dálár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740-755. Springer, 2014.
|
| 244 |
+
[29] Huizi Mao, Song Han, Jeff Pool, Wenshuo Li, Xingyu Liu, Yu Wang, and William J Dally. Exploring the regularity of sparse structure in convolutional neural networks. Workshop paper in CVPR, 2017.
|
| 245 |
+
[30] Eldad Meller, Alexander Finkelstein, Uri Almog, and Mark Grobman. Same, same but different-recovering neural network quantization error through weight factorization. arXiv preprint arXiv:1902.01917, 2019.
|
| 246 |
+
|
| 247 |
+
[31] Alexander Mordvintsev, Christopher Olah, and Mike Tyka. Inceptionism: Going deeper into neural networks. 2015.
|
| 248 |
+
[32] Markus Nagel, Mart van Baalen, Tijmen Blankevoort, and Max Welling. Data-free quantization through weight equalization and bias correction. ICCV, 2019.
|
| 249 |
+
[33] Eunhyeok Park, Sungjoo Yoo, and Peter Vajda. Value-aware quantization for training and inference of neural networks. In Proceedings of the European Conference on Computer Vision (ECCV), pages 580-595, 2018.
|
| 250 |
+
[34] Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pages 525-542. Springer, 2016.
|
| 251 |
+
[35] 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.
|
| 252 |
+
[36] 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.
|
| 253 |
+
[37] Sheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma, Zhewei Yao, Amir Gholami, Michael W Mahoney, and Kurt Keutzer. Qbert: Hessian based ultra low precision quantization of bert. arXiv preprint arXiv:1909.05840, 2019.
|
| 254 |
+
[38] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2818-2826, 2016.
|
| 255 |
+
[39] Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. HAQ: Hardware-aware automated quantization. In Proceedings of the IEEE conference on computer vision and pattern recognition, 2019.
|
| 256 |
+
[40] Bichen Wu, Yanghan Wang, Peizhao Zhang, Yuandong Tian, Peter Vajda, and Kurt Keutzer. Mixed precision quantization of convnets via differentiable neural architecture search. arXiv preprint arXiv:1812.00090, 2018.
|
| 257 |
+
[41] Jiaxiang Wu, Cong Leng, Yuhang Wang, Qinghao Hu, and Jian Cheng. Quantized convolutional neural networks for mobile devices. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4820-4828, 2016.
|
| 258 |
+
[42] Dongqing Zhang, Jiaolong Yang, Dongqiangzi Ye, and Gang Hua. LQ-Nets: Learned quantization for highly accurate and compact deep neural networks. In The European Conference on Computer Vision (ECCV), September 2018.
|
| 259 |
+
[43] Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 6848-6856, 2018.
|
| 260 |
+
[44] Ritchie Zhao, Yuwei Hu, Jordan Dotzel, Chris De Sa, and Zhiru Zhang. Improving neural network quantization without retraining using outlier channel splitting. In Proceedings of the 36th International Conference on Machine Learning, pages 7543-7552, 2019.
|
| 261 |
+
|
| 262 |
+
[45] Aojun Zhou, Anbang Yao, Yiwen Guo, Lin Xu, and Yurong Chen. Incremental network quantization: Towards lossless cnns with low-precision weights. International Conference on Learning Representations, 2017.
|
| 263 |
+
[46] Shuchang Zhou, Yuxin Wu, Zekun Ni, Xinyu Zhou, He Wen, and Yuheng Zou. Dorefa-net: Training low bitwidth convolutional neural networks with low bitwidth gradients. arXiv preprint arXiv:1606.06160, 2016.
|
| 264 |
+
[47] Yiren Zhou, Seyed-Mohsen Moosavi-Dezfooli, Ngai-Man Cheung, and Pascal Frossard. Adaptive quantization for deep neural network. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 265 |
+
[48] Chenzhuo Zhu, Song Han, Huizi Mao, and William J Dally. Trained ternary quantization. International Conference on Learning Representations (ICLR), 2017.
|
zeroqanovelzeroshotquantizationframework/images.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b79e8a7b963bee827e773cc30fece4a26e92e17df0319d8deea63618ded8cfb2
|
| 3 |
+
size 511890
|
zeroqanovelzeroshotquantizationframework/layout.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:610e78a79aaa96754fb52fcefd0b786911c9891305f634e4678554611f719381
|
| 3 |
+
size 371502
|
zeroreferencedeepcurveestimationforlowlightimageenhancement/004320b3-6cfa-499c-a573-94a92570c5c8_content_list.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1665747cd41f501cfe68f81bae9ab12083f097528214bf3180ed76f30462146f
|
| 3 |
+
size 77558
|
zeroreferencedeepcurveestimationforlowlightimageenhancement/004320b3-6cfa-499c-a573-94a92570c5c8_model.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7e5e3f9bac8e532f72aa514df7a5e92de1c2b6370c6dc78f4e67643315483625
|
| 3 |
+
size 97945
|