CVPR 2022

UKPGAN

A General Self-Supervised Keypoint Detector

Yang YouWenhai LiuYanjie ZeYong-Lu LiWeiming Wang✉Cewu Lu✉
Shanghai Jiao Tong University · ✉ corresponding authors
Overview

Keypoints are the points that rebuild the shape

What makes a point a keypoint? UKPGAN treats it as information compression: a good set of keypoints should be enough to reconstruct the whole object. The detector scores every point, a GAN keeps the scores sparse, and a decoder has to rebuild the point cloud from what the high-scoring points carry. No labels are used, yet the keypoints match human annotations, follow human bodies through poses, survive arbitrary rotations, and carry over from synthetic shapes to real scans.

66.6% IoU

keypoint consistency on SMPL bodies across poses, vs 23.9% for USIP, the next best detector

>90%

repeatability under arbitrary rotations with only four keypoints, near 100% with more

74.2%

feature-matching recall on real 3DMatch scans with only 100 keypoints, vs at most 53.5% for ISS, SIFT-3D and random

0labels

self-supervised, and trained on synthetic shapes only

Left: UKPGAN keypoints in red on office chairs and on a human body in three poses. Right: keypoints on two partial scans of a real room, used for geometric registration.
Keypoints (red) on chairs and on a human body in different poses, and on real room scans, where they serve geometric registration.
Explore in 3D

Look at the keypoints yourself

UKPGAN's keypoints on ShapeNet objects, SMPL human bodies and real 3DMatch scans. Each object has 2,048 points; the detector gives each one a keypoint probability. Switch between the keypoints left after non-maximum suppression and every point with probability above 0.5, and drag to turn the object.

Drag to rotate

Data

Object

Keypoints

keypointother point

NMS keeps the most probable point within a radius, which leaves the sparse, distinct corners and tips.

Method

Compress the shape into a few points

A rectangle can be rebuilt from its four corners; the points between them add little. UKPGAN learns this trade-off with an encoder that scores points and a decoder that reconstructs the shape from the scored points.

  1. Rotation-invariant local featuresEach point's neighbourhood is aligned to a local reference frame and voxelized into a smoothed density grid, then refined by 3D convolutions.
  2. Probability and embeddingTwo heads give every point a keypoint probability Φ(x) and a 128-d embedding h(x).
  3. GAN sparsity controlA WGAN-GP critic pushes each object's probabilities toward a U-shaped Beta prior: most near 0, a few near 1.
  4. Salient information distillationA channel-wise max over Φ(x)·h(x) feeds a TopNet decoder that must reconstruct the point cloud (Chamfer loss).
Pipeline: from the input point cloud, local volumetric descriptors and point-wise 3D convolutions give point-wise features; MLPs output embeddings h(x) and keypoint probabilities Phi(x); GAN-based sparsity control matches Phi to a Beta distribution; salient information distillation takes the max of Phi times h; a tree decoder reconstructs the point cloud; a reconstruction loss and an optional symmetry regularization train the model.
Probabilities and embeddings are computed from rotation-invariant local features; the GAN keeps probabilities sparse, and the max over Φ·h is all the decoder gets to rebuild the shape. A symmetry regularizer is used in training only.

Why the max, and why a GAN

The decoder only sees the channel-wise maximum of Φ(x)·h(x), so a point contributes only if it is both probable and distinctive; points with ordinary, repeated context get suppressed. An L1 penalty on Φ would just push all scores down; matching a Beta prior through the GAN instead lets scores pile up at both 0 and 1, and its two parameters set how many keypoints come out.

The same sofa with keypoints at p greater than 0.5 for two Beta priors: with alpha 0.1 and beta 0.01 only corners and feet are red; with alpha 0.03 and beta 0.01 edges are red too.
Changing the Beta prior changes the keypoint budget: corners first, then edges (supplementary).
Human labels

Close to what people mark

On ShapeNet chairs with expert keypoints and on airplanes, chairs and tables from KeypointNet, a detected keypoint counts as correct if it lies within a geodesic distance of a human-marked one. Above the smallest thresholds, UKPGAN's keypoints overlap human annotations more than those of the learned detectors USIP and D3Feat and the hand-crafted Harris-3D, ISS and SIFT-3D.

Plot of IoU against geodesic threshold on ShapeNet chairs: UKPGAN's curve is highest, reaching about 23% at 0.1, ahead of D3Feat, USIP and the hand-crafted detectors.
ShapeNet chairs (expert keypoints).
Plot of IoU against geodesic threshold on KeypointNet: UKPGAN's curve is highest, reaching about 47% at 0.1, ahead of D3Feat, USIP and the hand-crafted detectors.
KeypointNet (airplanes, chairs, tables).
Keypoints from UKPGAN, USIP, D3Feat, Harris-3D, ISS and SIFT-3D and human annotations on two airplanes, two chairs and two tables: UKPGAN's sit on wing tips, legs and corners like the human ones.
Keypoints from six detectors and from people. UKPGAN's land on wing tips, leg ends and corners, like the human ones.
A single model for 11 more categories
Keypoints from one universal model on a motorbike, a car, a gun, a guitar, a knife and a mug.
One universal model trained on many ShapeNet categories.
IoU against geodesic threshold for 11 ShapeNet categories with the universal model.
IoU with KeypointNet labels for 11 categories.
Human bodies

The same keypoints as the body moves

SMPL gives point-to-point correspondences between human bodies in different poses, so we can check whether a keypoint on one pose is also detected at the same place on another (IoU), and how far apart the corresponding detections are (consistency loss). UKPGAN finds hands, feet and the head in every pose.

Keypoints on SMPL bodies in three poses from UKPGAN, USIP, ISS and Harris-3D: UKPGAN marks hands, feet and arms consistently; the others scatter points over the torso.
Keypoints with p > 0.5 in three poses. Other detectors scatter points over the torso.
Ten keypoints after NMS on three SMPL poses: head, hands, elbows, feet and knees.
With NMS and a budget of 10: head, hands, elbows, knees and feet.
Fixed budgets of 10, 20 and 40 keypoints
SMPL bodies with a fixed budget of 10, 20 or 40 keypoints after NMS (supplementary). UKPGAN is best in every column.
DetectorIoU (%) ↑Consistency loss (×10⁻²) ↓
102040102040
USIP2.02.42.113.912.512.7
D3Feat1.61.81.915.814.111.6
HARRIS-3D0.40.50.921.515.110.4
ISS1.00.91.220.814.810.3
SIFT-3D0.10.41.021.914.910.4
UKPGAN (ours)7.27.59.29.27.95.9
Real scans

Trained on shapes, used on real scans

Registration first picks keypoints, then matches their descriptors. We keep two state-of-the-art descriptors, PerfectMatch and D3Feat, and swap the detector, giving each a budget from 2,500 down to 100 points per fragment. UKPGAN is trained only on synthetic ShapeNet models; the scans come from 3DMatch (indoor) and ETH (outdoor).

With few keypoints, where a detector matters most, UKPGAN with PerfectMatch beats ISS, SIFT-3D and random sampling by a wide margin. With the D3Feat descriptor, D3Feat's own detector, trained jointly with the descriptor on real scans, stays best, and UKPGAN is second.

Keypoints on the same 3DMatch scan from UKPGAN, D3Feat, random sampling and ISS: UKPGAN's concentrate on corners and object edges.
Keypoints on a 3DMatch scan: UKPGAN, D3Feat, random sampling and ISS.
Rotations

Rotate the object, keep the keypoints

Orientations are usually unknown, so a detector should find the same points however the object is turned. Thanks to the local reference frames, UKPGAN's keypoints are repeatable under arbitrary rotations: a keypoint counts as repeated if another rotated copy has one within 0.1 of it. With just four keypoints, more than 90% repeat; from 16 on, nearly all do.

Tables, chairs and airplanes each shown in four random rotations, with the same keypoints in orange on each copy.
Each object in four random rotations; keypoints (orange) stay on the same parts.
Relative repeatability against the number of keypoints from 4 to 512 on KeypointNet: UKPGAN starts above 90% at four keypoints and approaches 100%, while USIP, D3Feat and the hand-crafted detectors start between about 5% and 58%.
Repeatability under rotations on KeypointNet, from 4 to 512 keypoints.
Ablations

What each piece does

Without the local rotation-invariant features, keypoints stop being repeatable under rotation. Without GAN sparsity control, scores no longer single out meaningful points and agreement with human labels drops, even though the remaining keypoints repeat slightly more. Salient information distillation and symmetric regularization both raise agreement with human labels.

Keypoint probabilities on a table for the full model and four ablations, red high and blue low: without GAN sparsity control the table is almost all blue.
Keypoint probability on a table (red high, blue low): complete model, then without GAN sparsity control, salient information distillation, rotation-invariant input features and symmetric regularization.

Beyond 3D

The same idea works on 2D binary images. Treating each MNIST pixel as a point, UKPGAN finds the strokes' skeleton points and, without class labels, learns embeddings that are consistent within each digit.

MNIST digits with keypoint probability heat maps: high probability on stroke ends and junctions.
Keypoint heat maps.
MNIST digits coloured by learned embeddings; digits of the same class share colour patterns.
Learned embeddings.
Code

Train and run it

  • TensorFlow (main branch): training on ShapeNet and SMPL, IoU evaluation with KeypointNet, visualization on ShapeNet, SMPL and 3DMatch.
  • PyTorch (pytorch branch): with SHOT descriptors, much faster than PerfectMatch's.
  • Pretrained models on Hugging Face: airplane, chair, table, SMPL and a universal model.
hf download qq456cvb/UKPGAN --local-dir .        # checkpoints into outputs/
python visualize.py --type shapenet --nms --nms_radius 0.1
python visualize.py --type smpl --nms --nms_radius 0.2 --kp_num 10
python train.py cat_name=chair                    # ShapeNet category
python eval_iou.py --kpnet_root /your/kpnet/root    # IoU with KeypointNet
Abstract
Read the full abstract

Keypoint detection is an essential component for the object registration and alignment. In this work, we reckon keypoint detection as information compression, and force the model to distill out irrelevant points of an object. Based on this, we propose UKPGAN, a general self-supervised 3D keypoint detector where keypoints are detected so that they could reconstruct the original object shape. Two modules: GAN-based keypoint sparsity control and salient information distillation modules are proposed to locate those important keypoints. Extensive experiments show that our keypoints align well with human annotated keypoint labels, and can be applied to SMPL human bodies under various non-rigid deformations. Furthermore, our keypoint detector trained on clean object collections generalizes well to real-world scenarios, thus further improves geometric registration when combined with off-the-shelf point descriptors. Repeatability experiments show that our model is stable under both rigid and non-rigid transformations, with local reference frame estimation.

Cite

BibTeX

@inproceedings{you2022ukpgan,
  title={UKPGAN: A General Self-Supervised Keypoint Detector},
  author={You, Yang and Liu, Wenhai and Ze, Yanjie and Li, Yong-Lu and Wang, Weiming and Lu, Cewu},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  pages={17042--17051},
  year={2022}
}