UnsuperPoint: End-to-end Unsupervised Interest Point Detector and Descriptor

Peter Hviid Christiansen, Mikkel Fly Kragh, Yury Brodskiy, Henrik Karstoft

Introduction

Deep learning has since 2012 improved a broad range of computer vision tasks. Especially supervised image classification and recognition have reached (super-)human-level performance . In particular, deep learning-based methods have improved and influenced traditional tasks in geometric computer vision such as pose estimation , homography estimation , stereo matching and visual odometry . Furthermore, deep learning-methods have powered new applications that previously did not exist such as depth from monocular camera and pose estimation, where position and orientation are estimated directly using regression . Nevertheless, traditional interest point detectors (SIFT , SURF , ORB , AKAZE , BRISK ) are still commonly used in practical applications, where the concept of points and descriptors remains a powerful representation - in particular because interest point correspondences for a set of images can be established by both ensuring that points match by their descriptors and that matching point positions also satisfy multi-view geometric constraints. Point correspondences are also key in bundle adjustment used in Structure-from-Motion (SfM), Photogrammetry, Visual Simultaneous Localization and Mapping (VSLAM) and Augmented Reality (AR). Bundle adjustment enables large-scale applications (long sequence recordings in large scenes) , correction of maps based on loop closure , and fusion with odometry sensors such as GPS or as in Visual-Inertial SLAM , where an IMU is used to reduce drift and improve localization.

In recent years, deep learning-based interest point detectors and descriptors have gained popularity. However, most research only address the descriptor, for discriminating local image patches as defined in e.g. the Brown dataset. These methods do not address detection of points, and they rely on traditional interest point detectors.

The challenge for learning point detectors is that valid ground truth data for interest points in natural images are hard to create. The definition of an interest point is not clearly defined and consistent labels by a human annotator are hard to acquire. The lack of ground truth data thus makes point detectors non-trivial to train.

In TILDE , pseudo ground truth interest points are obtained by selecting points from a Difference-of-Gaussians blob detector that are repeatable across an image sequence. Each sequence is captured from the same viewpoint at different times of day and at different seasons. The drawback is that the detector is trained on static viewpoint images. That is, it is not trained explicitly for rotation and scale invariance.

Quad-network uses unsupervised learning for training a shallow neural network for interest point detection. The model is trained to learn a ranking of points that are preserved under image transformations. This enables the model to learn what defines a good interest point. However, the model runs only on patches and does not provide descriptors for each patch.

LIFT is able to predict both points and descriptors using three modules; a detector to create a score map of good interest points, an orientation estimator to predict the orientation of a patch and a descriptor module. The score map is used to crop patches of good interest points. A Spatial Transformer Network (STN) rotates patches by the estimated orientation before a descriptor is created for each patch. LIFT is end-to-end differentiable on patches. However, the model does not train on whole images and does not converge when trained from scratch. It is trained in multiple steps and requires an SfM pipeline to guide the training initially. Furthermore, each module in the LIFT framework does not share computations, making it too slow for real-time applications.

LF-Net uses (similar to LIFT) a module for selecting good image patches and transforms them using an STN before passing patches through a descriptor module. The training framework is end-to-end differentiable and learns both positions, scale, rotation and descriptors. Unlike LIFT, position, rotation and scale are estimated by a single module. LF-Net is able to train on full images from scratch, it is fast and the model has demonstrated state-of-the-art performance for SfM image matching. However, the framework requires the output of an SfM pipeline during training and it does not share computations between the detector and the descriptor. The use of patches also restricts the area from which the network is able to learn descriptors.

SuperPoint is also able to predict both points and descriptors. However, in SuperPoint the detector and descriptor share most computations, making it fast. SuperPoint is trained using online-generated synthetic images of simple geometrical shapes. Pseudo ground truth points are defined as corners, junctions, blobs and line segments of the synthesized data. However, to generalize for “real” images, two rounds of homography adaptation are used. The model is initially trained on the synthesized data, followed by training on real images to generate pseudo ground truth interest points by aggregating predictions of 100 different homography transformations per image. A new model is trained and the homography adaptation step is repeated to improve pseudo ground truth points even further. Finally, a new model is trained to predict both points and descriptors using a siamese network. However, the initial two/three rounds of training are cumbersome and a good interest point is initially only defined by the authors as junctions of simple geometrical shapes in the synthetic data.

In this work, we present UnsuperPoint - a fast deep learning-based interest point detector and descriptor inspired by SuperPoint . Similar to SuperPoint, the model shares most computations for the detector and the descriptor and utilizes a siamese network to train descriptors. However, in UnsuperPoint, we use regression for predicting positions and introduce a novel interest point detector loss function to also train detection of points in a self-supervised manner. Unlike most trainable detectors, it requires only one round of training, no generation of pseudo ground truth points and no SfM-generated representations. Finally, we also introduce a novel loss function to easily regularize network predictions to be uniformly distributed.

Network architecture

UnsuperPoint has a multi-task network architecture with a shared backbone followed by multiple task-specific submodules as shown in Figure 1.

The backbone takes a color image as input and provides a downsampled feature map that is further processed by task-specific submodules in the same way as done in Superpoint . The submodules process the backbone output with additional convolutional layers. The convolutional structure of backbone and subtasks enables the model to process any input image size. The subtasks are designed to produce an aligned output where each entry represents a point with a position, score and descriptor.

The combined output of the network resembles the output of traditional point detectors by providing a position, score and descriptor for each interest point. Thus, the network can be used as a drop-in replacement for traditional interest point-based systems such as SfM, AR and VSLAM.

Each point position is expressed by its relative position Prelative\mathbf{P}_{\text{relative}} and is easily transformed to image pixel coordinates Pmap\mathbf{P}_{\text{map}}. The score Smap\mathbf{S}_{\text{map}} is the fitness of each point and used for sampling the best NN points. The descriptor map Fmap\mathbf{F}_{\text{map}} has an embedding of FF channels for each entry to uniquely match corresponding points from different images. Smap\mathbf{S}_{map}, Pmap\mathbf{P}_{\text{map}} and Fmap\mathbf{F}_{\text{map}} are reshaped and sorted by highest score into respectively a vector s\mathbf{s} with MM elements, an M×2M\times 2 matrix P\mathbf{P} and an M×FM\times F matrix F\mathbf{F}, where M=H8⋅W8M=\frac{H}{8}\cdot\frac{W}{8} represents all predicted points. The top NN interest points are simply the top NN rows of the reshaped output. All convolutional layers have a stride of 1 and a kernel size of 3. Apart from the final layer in each subtask, all convolutional layer are followed by batch normalization and a leaky ReLU activation function.

2 Backbone module

The backbone takes an input image and generates an intermediate feature map representation to be processed by each subtask. The backbone is fully convolutional with four pairs of convolutional layers. The four pairs are separated by three max-pooling layers with a stride and a kernel size of two. After each pooling layer, the number of channels for subsequent convolutional layers are doubled. The number of channels in the eight convolutional layers are 32-32-64-64-128-128-256-256. Effectively, each pooling layer downsamples the feature map height and width by a factor of two, while the whole backbone downsamples by a factor of eight. An entry in the final output corresponds to an 8×88\times 8 area in the input image. Thus, for an input image of e.g. 480×640480\times 640, the network will return (480/8)⋅(640/8)=4800\left(480/8\right)\cdot\left(640/8\right)=4800 entries. Each entry is processed in a fully convolutional way for each subtask to output a descriptor, score and position - effectively creating 4800 interest points.

3 Score module

The score module regresses a score for each entry in the final feature map. The score module contains two convolutional layers with 256 and 1 channels, respectively. The final layer is followed by a sigmoid activation to bound score predictions in the interval [0,1]\left[0,1\right]. The scores are important for selecting the top NN points in an image.

4 Position module

The position module predicts a relative image coordinate for each output entry and maps this to an image pixel coordinate. The position module contains two convolutional layers with 256 and 2 channels, respectively. The final layer is followed by a sigmoid activation to bound position predictions in the interval [0,1]\left[0,1\right]. For a network with 3 poolings layers (a subsampling factor of 8), a relative position is predicted for each 8×88\times 8 region in the input image. This is demonstrated in Figure 2 for a small input image of size 24×2424\times 24.

The mapping from relative image coordinates Prelative\mathbf{P}_{\text{relative}} to image pixel coordinates Pmap\mathbf{P}_{\text{map}} is calculated by:

Relative image coordinates Prelative\mathbf{P}_{\text{relative}} are added by the column entry index cc for the xx-coordinate, and the row entry index rr for the yy-coordinate. The output is then multiplied by the downsampling factor fdownsample=8f_{\text{downsample}}=8 of the network.

Using regression for point detection is a clear distinction to SuperPoint and LF-Net , where top interest point locations are selected from a heat map of the same size as the input image. The purpose of using regression for estimating position is two-fold. Most importantly, it is differentiable and enables fully unsupervised training. Secondly, by only predicting a single point for each 8×88\times 8 area, it adds functionality similar to non-maximum suppression (NMS) as part of the network architecture. Intuitively, NMS might come as a disadvantage, as an 8×88\times 8 region may have multiple interest points. However, by removing closely clustered points, interest points will become more homogeneously distributed. This is a desired property and many interest point based systems use NMS to improve robustness, stability and accuracy .

5 Descriptor module

The descriptor module generates a descriptor for each entry. The descriptor module contains two convolutional layers with 256 and F=256F=256 channels, respectively. The final layer has no activation. The descriptor map can be used coarsely or by interpolating descriptors based on interest point positions. In SuperPoint, the interpolation is a post-processing step used under inference. In our implementation, interpolation of descriptors is integrated into the model. The model use all point positions in Pmap\mathbf{P}_{\text{map}} to interpolate all entries in descriptor map Fmap\mathbf{F}_{\text{map}}. Regression of point positions makes interpolation of descriptors differentiable, and it is used in training.

Self-supervised framework

UnsuperPoint uses a self-supervised training framework to learn all three tasks simultaneously. The procedure is demonstrated in Figure 3, where UnsuperPoint is used in a siamese network to predict interest points for two augmentations of the same input image. The two augmentations and their predictions are separated into individual branches. Branch A (blue) is a non-wrapped version of the input image, whereas branch B (red) is a wrapped version of the input image.

The image in branch B is spatially transformed by a random homography TT (rotation, scale, skew and perspective transforms). The image for each branch is then transformed by independent random non-spatial image augmentations such as brightness and noise. UnsuperPoint predicts interest points on the image from each branch. Point positions of branch A are transformed by TT to spatially align points from branch A to branch B. We define points from each branch to correspond if they are spatially close after alignment. Finally, point correspondences are used in loss functions to train the model. All components in UnsuperPoint, the transformation of points by TT and loss functions are differentiable, thus enabling the model of each branch to be trained end-to-end.

Loss functions

This section presents the loss functions to train score, position and descriptor. The total loss Ltotal\mathcal{L}_{\text{total}} consists of four loss terms.

Each loss term is weighted by a factor α\alpha. The first loss term Lusp\mathcal{L}^{\text{usp}} is the UnSupervised Point (USP) loss to learn position and score of interest points. The second loss term Luni_xy\mathcal{L}^{\text{uni\_xy}} is a regularization term to encourage a uniform distribution of relative point positions. The final two loss terms Ldesc\mathcal{L}^{\text{desc}} and Ldecorr\mathcal{L}^{\text{decorr}} optimize only the descriptor. Ldesc\mathcal{L}^{\text{desc}} is required to learn descriptors, while Ldecorr\mathcal{L}^{\text{decorr}} is merely a regularization term to reduce overfitting by decorrelating descriptors.

Each branch b∈{A,B}b\in\left\{A,B\right\} outputs three tensors sb\mathbf{s}^{b}, Pb\mathbf{P}^{b} and Fb\mathbf{F}^{b} that contain point scores, point positions and point descriptors. To calculate loss functions in the following sections, we need to establish point correspondences (point-pairs) from the two branches. To do this, an MA×MBM^{\text{A}}\times M^{\text{B}} distance matrix G\mathbf{G} is determined by computing the pairwise distances between all MAM^{\text{A}} transformed points from branch A and all MBM^{\text{B}} points from branch B.

Each entry gijg_{ij} in G\mathbf{G} is the Euclidean distance between a transformed point piA→B=TpiA\mathbf{p}^{\text{A}\rightarrow\text{B}}_{i}=T\mathbf{p}^{\text{A}}_{i} with index ii in branch A and a point pjB\mathbf{p}^{\text{B}}_{j} with index jj in branch B. A point-pair is the combination of a point ii in branch A that corresponds to a point jj in branch B. Not all points in branch A are merged into point-pairs, because a point in branch A may not have a nearby neighbor in branch B. We define that points correspond if point ii in branch A has point jj as its nearest neighbor in branch B, and if the distance gijg_{ij} between these is less than a minimum distance ϵcorrespond\epsilon_{\text{correspond}}.

With point correspondences, we can redefine output tensors (sb\mathbf{s}^{b}, Pb\mathbf{P}^{b} and Fb\mathbf{F}^{b}) to a new set of tensors defined as corresponding tensors (respectively s^b\mathbf{\hat{s}}^{b}, P^b\mathbf{\hat{P}}^{b} and F^b\mathbf{\hat{F}}^{b}) with KK entries, so that each entry kk in the corresponding tensors maps to the same point in the input image. For each entry kk in branch bb, we define a point-pair score s^kb\hat{s}_{k}^{b}, the point-pair position p^kb\hat{\mathbf{p}}_{k}^{b} and the point-pair descriptor f^kb\hat{\mathbf{f}}_{k}^{b}. Finally, we also define the point-pair correspondence distance dkd_{k} written as

Similar to equation 3, it is the distance between points from branch A and B. However, dkd_{k} is only the distance between a point-pair.

We introduce a novel loss function called UnSupervised Point (USP) loss that uses point-pairs to train a detector using an unsupervised loss function. The overall objective of the USP loss is to improve repeatability of the detector, meaning that the same interest points are detected - regardless of the camera viewpoint. In other words, the detector should from multiple camera viewpoints predict image positions that capture the same 3D points in the scene.

The unsupervised point loss Lusp\mathcal{L}^{\text{usp}} is divided into three terms and accumulated over all K corresponding point-pairs:

We add weight terms to position αposition\alpha_{\text{position}} and score αscore\alpha_{\text{score}}.

The objective of the first term lkpositionl_{k}^{\text{position}} is to ensure that the predicted positions of a point-pair represent the same point in the input image. We can achieve this by simply minimizing the distance for each point-pair kk:

Initially, a siamese network will predict random positions. Over time, the siamese network will gradually reduce the distances between point-pairs and thus improve interest point positioning. Figure 4a shows an example histogram of point-pair distances for a converged network.

The objective of the second term lkscorel_{k}^{\text{score}} is to ensure that the predicted scores for a point-pair are similar. The second objective is achieved by minimizing the squared distance between score values for each point-pair kk:

In image matching, it is important to have a similar score for points (captured from multiple viewpoints) that represent the same point in the scene. By having similar scores, it is more likely that the N points with the highest score from each image represent the same points in the scene.

The objective of the third term lkuspl_{k}^{\text{usp}} is to ensure that predicted scores actually represent the confidence of interest points. That is, the highest score should be the most repeatable point, and the lowest score should be the least repeatable point. The loss is calculated for each corresponding point-pair kk:

Here, s^k\hat{s}_{k} denotes the joint score of a point-pair and is calculated as

, whereas d‾\overline{d} denotes the average distance between all point-pairs and is calculated as

The core concept of lkuspl_{k}^{usp} is that the network should define a good interest point as a point with a low point-pair correspondence distance dkd_{k}. Oppositely, for a bad interest point, dkd_{k} is large, because the network is unable to predict point positions consistently.

With equation 8, we will have that for dk<d‾d_{k}<\overline{d}, the model must learn to set the score high to minimize the loss, and for dk>d‾d_{k}>\overline{d}, the model must learn to set the score low to minimize the loss. Figure 4b presents how scores are distributed after training.

Effectively, the specified loss function makes the network output increase scores, when the network believes that the same position can be retrieved under the augmentations specified in the framework (spatial and non-spatial augmentations). An advantage of this procedure is that the network is able to learn the characteristics of good interest points based on the provided data and some specified augmentation. The network is free to use both local features (blobs, corners, line segments, textures) and more global features to improve interest point detection.

Training a model using only the above-mentioned loss functions introduces some unwanted artefacts for position predictions. Figure 5a illustrates the artifact in the histogram of predicted x-coordinates.

Recall that the network predicts a relative position in an 8×88\times 8 area in the input image. Optimally, the relative xx- and yy-coordinate predictions should be uniformly distributed within this area. However, the histogram in Figure 5a shows a large number of points near the boundaries (values of 0 and 8). One reason for this is that a model is encouraged, especially for hardly repeatable points, to place the point as closely to points outside its own region in order to minimize dkd_{k}. Instead, it is better to force the model to only predict the best position in its own local region. Thus, we should encourage a uniform distribution of xx- and yy-predictions.

We therefore introduce, to our knowledge, a new loss function to encourage a uniform distribution. The core concept is that ascendingly sorted values sampled from a uniform distribution will approximate a straight line going from the lower to the upper bound within the specified range. We demonstrate this by a few simple examples. Figure 6a presents a uniform distribution (blue) and two clipped Gaussian distributions centered around 0.5 with a variance of 0.3 (orange) and 0.10 (green). Figure 6b presents ascendingly sorted samples from the same three distributions. The dashed line is a diagonal line going from lower to upper bound. These examples demonstrate that the distance to a uniform distribution is the distance between sorted values and the diagonal line.

We define a heuristic measure D(U,V)D\left(\mathcal{U},\mathcal{V}\right) to calculate the distance between a uniform distribution U(a,b)\mathcal{U}\left(a,b\right) and some distribution V\mathcal{V} in a bound interval [a,b]\left[a,b\right]. LL values are sampled from V\mathcal{V} to form a vector v\mathbf{v}. The distance between distributions is defined as

where visortedv_{i}^{\text{sorted}} is the ascendingly sorted values of v\mathbf{v} such that visorted<vi+1sortedv_{i}^{\text{sorted}}<v_{i+1}^{\text{sorted}} for i∈{1,2,…,L−1}i\in\left\{1,2,\dots,L-1\right\}. The first term normalizes sorted values to the interval [0,1]\left[0,1\right] and the second term is a proportional line from 0 to 1. For samples in the interval [0,1]\left[0,1\right], the loss is

This loss function is a simple and fast procedure to regularizing network predictions to be uniformly distribution. Compared to other methods that measure the difference/distance to a uniform distribution or randomness of a signal (information entropy), this function is differentiable, and it does not require predictions to be discretized.

For UnsuperPoint, the loss Luni_xy\mathcal{L}^{\text{uni\_xy}} is calculated as the distance between a uniform distribution and the distribution of the relative image positions Prelative,x\mathbf{P}_{\text{relative,x}} and Prelative,y\mathbf{P}_{\text{relative,y}}, individually. These are denoted Luni_x\mathcal{L}^{\text{uni\_x}} and Luni_y\mathcal{L}^{\text{uni\_y}}, respectively. Unlike the previous section, the loss is calculated independently for each branch, and it does not rely on point correspondences.

The ascendingly sorted values are respectively xisortedx_{i}^{\text{sorted}} and yisortedy_{i}^{\text{sorted}} for all MM points. The loss term is weighted by αuni_xy\alpha_{\text{uni\_xy}}.

Figure 5b presents the distribution of the xx-coordinates when a model has been trained with a uniform loss. It is clear that the peaks at the boundaries have been reduced significantly.

The descriptor loss is determined using a hinge loss with a positive and a negative margin as described in SuperPoint .

We define an MA×MBM^{\text{A}}\times M^{\text{B}} correspondence matrix C\mathbf{C} containing values of either 0 or 1. Each entry cijc_{ij} specifies if two points are separated by less than 8 pixels for any pair combination of transformed points in branch A, piA→B\mathbf{p}^{\text{A}\rightarrow\text{B}}_{i} where i∈{1,2,…,MA}i\in\left\{1,2,\dots,M^{\text{A}}\right\}, and points in branch B, pjB\mathbf{p}^{\text{B}}_{j} where j∈{1,2,…,MB}j\in\left\{1,2,\dots,M^{\text{B}}\right\}. Unlike point-pairs, a single point may correspond to multiple points in the other branch.

The hinge loss is calculated using both a positive margin mpm_{p} and a negative margin mnm_{n} and by accumulating losses for any pair combination of descriptors from branch A and B .

To balance the few corresponding points compared to non-corresponding points, a weight term λd\lambda_{d} is added.

Feature descriptors are decorrelated to reduce overfitting and improve compactness. Similar to , we reduce the correlation between dimensions by minimizing the off-diagonal entries of the descriptor correlation matrix Rb=[rijb]F×F\mathbf{R}^{b}=\left[r^{b}_{ij}\right]_{F\times F} for each branch bb.

Each entry rijbr^{b}_{ij} in Rb\mathbf{R}^{b} is

where vib\mathbf{v}_{i}^{b} is a Mb×1M^{b}\times 1 sized vector and is the iith column of Fb\mathbf{F}^{b}, and vˉib\bar{v}_{i}^{b} is the mean of vib\mathbf{v}_{i}^{b}.

Experimental details

The siamese network was trained with PyTorch . We used the 118,287 training images from MS COCO , but without labels. The whole model was trained for 10 epochs with data shuffling, a batch size of 5 (for each branch) and color images of size 240×320240\times 320. Images were normalized by subtracting 0.5 and multiplying with 0.225 for each channel. We used an ADAM optimizer with a default setting as specified in . A random homography transformation was constructed for branch A by combining scale, rotation and perspective transformations. The amount of scaling, rotation and perspective transformation was sampled uniformly in restricted intervals. Furthermore, we added standard non-spatial augmentations for each branch such as noise, blur and brightness. The magnitude of each augmentation was uniformly distributed within restricted intervals. The max distance between corresponding points was ϵcorrespond=4\epsilon_{\text{correspond}}=4. We adopted the descriptor loss weights from SuperPoint with a positive margin mp=1m_{p}=1, a negative margin mn=0.2m_{n}=0.2 and a balancing factor δd=250\delta_{d}=250. The search space for estimating the optimal weight for loss terms in equation 2 is large and has not been investigated. The procedure for selecting appropriate weight terms has been adjusted coarsely for each new loss term added to the total loss. The selected weight terms were αusp=1\alpha_{\text{usp}}=1, αposition=1\alpha_{\text{position}}=1, αscore=2\alpha_{\text{score}}=2, αuni_xy=100\alpha_{\text{uni\_xy}}=100, αdesc=0.001\alpha_{\text{desc}}=0.001 and αdecorr=0.03\alpha_{\text{decorr}}=0.03.

Experiments

In experiments, we have evaluated configurations of UnsuperPoint to highlight the benefit of interpolating descriptors, adding a loss to uniformly distribute point predictions and adding a loss to decorrelate descriptors. Furthermore, we compare UnsuperPoint to state-of-the-art.

We have used the evaluation metrics from SuperPoint by evaluating interest point positions by repeatability rate and localization error, and by evaluating the whole detector (score, position and descriptors) in a homography estimation framework by measuring matching score and the homography accuracy. Each metric is shortly described in the following sections.

The repeatability score (RS) measures the quality of interest points and is the ratio between the number of points observed by both viewpoints and the total number of points . For a planar scene, the point correspondences between two camera views can be established by simply mapping points from one view to the other using a homography. To account for localization errors between two corresponding points, we define points to correspond if they are below a certain pixel distance defined as the correct distance ρ\rho. To only evaluate points that are observable in both views, the repeatability measure will only include points in a region shared by the two viewpoints. Because the scale may change between two views, the repeatability rate depends on which camera view the points have been mapped to. The repeatability is therefore the average repeatability calculated in the view of each camera.

1.2 Localization Error (LE)

The localization error (LE) is the average pixel distance between corresponding points. Only point-pairs with distances below ρ\rho are included in the calculation. Like repeatability rate, the localization error is the average error of corresponding points calculated in both camera views.

1.3 Homography estimation procedure

The homography estimation procedure presented in Figure 7 is commonly used in computer vision applications. The procedure may use any detector to select NN points from two images of the same (planar) scene. Descriptors from the two images are matched. In our procedure, we use nearest neighbor (brute force) matching with cross check. The homography is estimated with RANSAC using OpenCV. This uses matches and interest point positions to provide both a homography matrix and a filtered set of matches (that comply with the estimated homography).

1.4 Matching Score (MS)

The matching score (MS) is the ratio between the correct matches and all points within the shared view. A correct match is defined as two points that are nearest neighbors in descriptor space and separated by a pixel distance less than the correct distance ρ\rho after points have been transformed to the same view by the ground truth homography.

1.5 Homography Accuracy (HA)

We define the homography error (HE) as the mean distance between target image corners transformed by the ground truth homography HgtH_{\text{gt}} and the estimated homography HestH_{\text{est}}. This is visualized in Figure 8 where image corners have been transformed by HgtH_{\text{gt}} and HestH_{\text{est}}. The distances between image corners are visualized by the dashed lines.

The homography accuracy (HA) is the ratio between the number of correctly estimated homographies and the total number of homographies. To quantify if an estimated homography is correct, the HE should be less than a defined tolerance error ϵ\epsilon. Similar to SuperPoint, we measure HA at multiple tolerance values.

2 Evaluations

In this section, we compare UnsuperPoint to other detectors using the metrics specified in the previous section. The evaluation was performed on the full image sequence from the HPatch dataset . The dataset contains 57 illumination scenes and 59 viewpoint scenes. Each scene contains six images (one reference image and five target images) of a planar scene/surface and five transformations to map the reference frame to each of the five target frames. Each evaluated algorithm detected points for each frame and matched the reference frame to each target frame - creating a total of 57⋅5+59⋅5=58057\cdot 5+59\cdot 5=580 image pairs. Metrics were calculated and averaged for all image pairs. We defined two settings; 240×320240\times 320 resolution images with N=300N=300 points and 480×640480\times 640 resolution images with N=1000N=1000 point. We have set the correct distance ρ=3\rho=3. To make a fair comparison of different detectors, we guaranteed that detectors always provided NN points in an image. To do this, we lowered the threshold of interest point detectors and then selected NN top points. Similar to , we used NMS for some evalations. If NMS was used, the top points were selected after NMS. For SIFT , SURF , ORB , AKAZE and BRISK we used the implementation provided by OpenCV (v3.4.6-dev). We used the author-released Github versions for both SuperPoint and LF-Net . For LF-net, we used both the indoor and outdoor models provided on the Github.

In this section, we have evaluated different configurations of UnsuperPoint on 240×320240\times 320 resolution images with N=300N=300. We present the benefit of 1) Interpolation, 2) uniform point predictions (UniformXY) and 3) decorrelation of descriptors (DecorrDesc). In Table 1, the metrics of the base model C0 and UnsuperPoint C4 are presented in the top and bottom row. Intermediate rows show the relative improvements in percentage to the base model C0. For localization, lower is better, and for other metrics, higher is better.

The C1 model adds interpolation of descriptors to improve the matching score. The C2 model encourages a uniform distribution of point positions, which increases repeatability and homography estimation and reduces localization error. C3 adds decorrelation of descriptors to, apart from repeatability, improve overall performance. Finally, C4 uses all modules together. The final row presents the actual results of C4 which we denote as UnsuperPoint.

2.2 Point detector

Table 2 shows interest points for repeatability and localization error. Similar to , interest point metrics were calculated with NMS.

UnsuperPoint had both a high repeatability (similar to SuperPoint) and a low localization error (similar to SIFT). Figure 9 visualizes interest points from two views of the same scene and demonstrates that the detector detects a combination of corners, blobs and edges.

2.3 Detector

Table 3 presents the matching score and homography estimation with a tolerance threshold ϵ\epsilon of 1, 3 and 5, respectively. In Table 3, without NMS (NMS=0)\left(\text{NMS}=0\right), UnsuperPoint has far more matches compared to other detectors. SuperPoint and UnsuperPoint were best for homography estimation with large tolerance errors. However, SIFT was better for estimating homographies with a low tolerance error ϵ=1\epsilon=1.

SuperPoint was presented with an NMS module in the original paper. Bottom section of Table 3 presents also SIFT, SuperPoint and UnsuperPoint with NMS (NMS=4)\left(\text{NMS}=4\right). Generally, SIFT does not improve with NMS. NMS improves SuperPoint and UnsuperPoint with far more matches and better homography estimation for large tolerance errors.

Figure 10 presents filtered matches for UnsuperPoint to demonstrate the result of the detector after matching. Especially the bottom example demonstrates that UnsuperPoint was able to handle large perspective transformations caused by a change of viewpoint.

2.4 Speed

Table 4 presents execution times of evaluated detectors on 240×320240\times 320 and 480×640480\times 640 resolution images. SuperPoint, UnsuperPoint and LF-Net were evaluated on GPU (GeForce Titan X), and remaining detectors were evaluated on CPU (Intel i7-7700HQ).

SuperPoint is slightly faster than UnsuperPoint. However, the evaluation of SuperPoint does not include various post processing steps such as selecting points and interpolation. These steps have have not been optimized for speed and are therefore not included.

Discussion

The used model is largely inspired by SuperPoint and is of similar performance in terms of speed, matching score and homography estimation for high tolerance errors. However, UnsuperPoint achieves better repeatability, lower localization error, better homography estimation for low tolerance errors and maintains matching score better without the use of NMS. Furthermore, we train the model from scratch and directly on MS COCO images in a single training round, while SuperPoint requires synthetic data and four rounds of training.

SIFT remains a good interest point detector with low localization error and the ability to estimate low homography errors ϵ=1\epsilon=1 with a large margin. SuperPoint and UnsuperPoint are, however, better at estimating homographies when large errors are tolerated (ϵ=3\epsilon=3 and ϵ=5\epsilon=5), and they match far more points. Furthermore, SIFT runs only 12 fps on 480×640480\times 640 images and is typically not considered for real-time applications. Moreover, it is patented and therefore not always suitable for commercial use.

LF-Net presents a novel detector and training framework for self-supervised learning. The model is differentiable, learned from scratch in a single training round and fully rotational and scale invariant. Drawbacks of LF-net are that the detector and the descriptor do not share computations, and it requires an SfM-generated output to train. LF-net has shown state-of-the-art performance for general SfM applications, however, as demonstrated in the HPatch data, it is less powerful for image matching with small baseline image pairs. As also presented in the LF-Net paper, the performance of the detector drops when adding scale and rotational invariance. We argue that this has two causes. First, the extraction of image patches will restrict the visible area of the network to the patch. Secondly, an incorrect prediction of scale or rotation will damage the descriptor and cause the matching score to drop. For many applications (and especially in AR and VSLAM), the motion between frames in a video sequence is limited, and we can expect interest points to remain similar in scale and rotation. As demonstrated in this work and by SuperPoint, deep learning-based methods are powerful enough to learn some degree of invariance - without explicitly predicting scale and rotation. The gain for some applications is more matches and better homography estimation. In future work, we will test UnsuperPoint for VSLAM and/or AR. Furthermore, we use a simple backbone architecture and should therefore explore more advanced components such as residual connections , dense convolutional layers , squeeze-and-excitation , depth separable filters and skip connections from higher resolution features .

Conclusion

We have established a framework for training a deep learning-based interest point detector using self-supervised learning. The framework and model use regression of point positions and a novel loss function to successfully train an interest point detector from scratch using no labels, no pseudo ground truth points and no Structure-from-Motion-generated outputs. Furthermore, we have investigated and successfully utilized a cost function to encourage a uniform distribution that may have utilization in other applications. The outcome is UnsuperPoint - a fast interest point detector with state-of-the-art performance.

Acknowledgments

This work is part of P. Christiansen’s Industrial PostDoc at EIVA A/S (eiva.com). The interest point detector is available under an EIVA license. This work is partly funded by the Innovation Fund Denmark (IFD) under File No. 8054-00002.

References