Correspondence Networks with Adaptive Neighbourhood Consensus
Shuda Li Kai Han Theo W. Costain Henry Howard-Jenkins Victor Prisacariu
cs.CV









Correspondence Networks with Adaptive Neighbourhood Consensus
    Shuda Li^1indicates equal contribution Kai Han^2[1] Theo W. Costain^1 Henry Howard-Jenkins^1 Victor Prisacariu^1


^1Active Vision Lab & ^2Visual Geometry Group


Department of Engineering Science, University of Oxford

{shuda, khan, costain, henryhj, victor}@robots.ox.ac.uk

    December 30, 2023
========================================================================================================================================================================================================================================================================================



© 2020 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.



In this paper, we tackle the task of establishing dense visual correspondences between images containing objects of the same category.
This is a challenging task due to large intra-class variations and a lack of dense pixel level annotations.
We propose a convolutional neural network architecture, called adaptive neighbourhood consensus network (ANC-Net), that can be trained end-to-end with sparse key-point annotations, to handle this challenge.
At the core of ANC-Net is our proposed non-isotropic 4D convolution kernel, which forms the building block for the adaptive neighbourhood consensus module for robust matching.
We also introduce a simple and efficient multi-scale self-similarity module in ANC-Net to make the learned feature robust to intra-class variations.
Furthermore, we propose a novel orthogonal loss that can enforce the one-to-one matching constraint.
We  thoroughly evaluate the effectiveness of our method on various benchmarks, where it substantially outperforms state-of-the-art methods. 
















§ INTRODUCTION

Establishing visual correspondences has long been a fundamental problem in computer vision. 
It has seen variety of applications in areas such as 3D reconstruction <cit.>, 
image editing <cit.>, scene understanding <cit.>, and object detection <cit.>.

Earlier works mainly focused on estimating correspondences for images of the same scene or object (instance-level correspondences) using hand-crafted features such as SIFT <cit.> or HOG <cit.>. 
Recently, finding correspondences for different instances from the same category (semantic correspondences) has attracted more and more attention<cit.>. 
In this paper, we focus on the problem of establishing dense correspondences for a pair of images depicting different instances from the same category.
This task is extremely challenging due to large intra-class variation in properties such as colour, scale, pose, and illumination.
Further, it is unreasonably expensive, if not impossible, to provide dense annotations for such image pairs. 

To deal with the challenges mentioned above, we introduce a convolutional neural network (CNN), called Adaptive Neighbourhood Consensus Network (ANC-Net), which can produce reliable semantic correspondences without requiring dense human annotations.
ANC-Net takes a pair of images as input and predicts a 4D correlation map, containing the matching scores for all possible matches between the two images.
The most likely matches can then be retrieved by finding the matches giving the maximum matching scores. 

ANC-Net consists of a CNN feature extractor, a multi-scale self-similarity module, and an adaptive neighbourhood consensus module.
At the core of ANC-Net is our proposed non-isotropic 4D convolution, which incorporates an adaptive neighbourhood consensus constraint for robust matching, and our proposed multi-scale self-similarity module, which aggregates multiple self-similarity features, which are insensitive to intra-class appearance variation<cit.>. 

CNN features have been very popular for the task of correspondence estimation due to their promising performance, and most state-of-the-art methods are based on CNN features  <cit.>.
Like other methods, ANC-Net also extracts features with a pre-trained CNN. 
However, instead of directly using the CNN features to calculate matching scores, we introduce the multi-scale self-similarity.
Self-similarity has been introduced in existing methods <cit.>.

Unlike other methods that either use self-similarity as an extra feature alongside raw CNN features <cit.>, or use computationally expensive irregular self-similarity patterns <cit.>, our self-similarity features are both computationally cheap to obtain, and do not need combining with raw CNN features, whist still capturing the complex self-similarity patterns.

With reliable feature representation, the matching scores for each individual feature pair can then be calculated.
However, as the individual feature pairs do not contain any matching validity information, matching by direct feature comparison can be rather noisy.
To mitigate this, correspondence validity constraints should be applied to obtain reliable matching scores.
Neighbourhood consensus, which measures how many pairs are matched in the neighbourhoods of the two points under consideration, turns to be one of the most effective correspondence validity constraints, and has been successfully introduced in recent work <cit.>.
However, <cit.> and <cit.> assume neighbourhoods of the same size for the two points in consideration.
Unfortunately, this assumption does not hold in practice, as objects in real images typically have different scales and shapes.
Therefore, adopting neighbourhoods of the same size is very likely to be affected by unrelated neighbours (background parts).
To address this issue, we propose an adaptive neighbourhood consensus module, which can select the correct neighbourhoods. 

As mentioned earlier, the cost of labelling ground truth means fully supervised learning with dense annotations is not feasible.
Instead, our model can effectively make use of sparse key-point annotations. To enforce the one-to-one mapping constraint, which is crucial for plausible correspondences, we further propose a novel one-to-one mapping loss, called orthogonal loss, to regularise the training.

To summarise, our contributions are four fold:
nolistsep

    
  * We introduce ANC-Net for the task of dense semantic correspondence estimation, which can be trained with sparse key-point annotations.
    
  * We propose a non-isotropic 4D convolutional kernel, which forms the building block for the adaptive neighbourhood consensus module for robust matching. 
    
  * We propose a simple and efficient multi-scale self-similarity to make the feature matching robust to intra-class variation. 
    
  * We propose a novel orthogonal loss that can enforce the one-to-one matching constraint, encouraging plausible matching results.

We thoroughly evaluate the effectiveness of our method on various benchmarks, where it substantially outperforms state-of-the-art methods. 
Our code can be found at <https://ancnet.avlcode.org/>. 



§ RELATED WORK


The semantic correspondence estimation problem is often considered as either a pixel-wise matching problem, an image alignment problem, or a flow estimation problem.
Earlier works used hand-crafted features, such as SIFT <cit.> or HOG <cit.>, to establish semantic correspondences <cit.>.
Here, we briefly review recent CNN based methods. 

Pixel-wise matching.Long et al. <cit.> transferred the features pre-trained on an image classification task to pixel-wise correspondence estimation.
Choy et al. <cit.> introduced a method to learn a feature embedding for the correspondence problem, by pulling positive features pairs close and pushing negative feature pairs away.
Han et al. <cit.> proposed a CNN model that tries to match image patches considering both appearance and geometry information, and obtains the pixel-wise correspondences by interpolation.
Novotny et al. <cit.> introduced a method to learn geometrically stable features with self-supervised learning by applying a synthetic warp to the images.
More recently, Rocco et al. <cit.> proposed to construct a CNN model that incorporates neighbourhood consensus information to refine the 4D tensor storing all the matching scores, which are obtained from pre-trained CNN features.
Huang et al. <cit.> introduced a method to incorporate self-similarity based on <cit.> and fuse different features with an attention mechanism.
Min et al. <cit.> showed that effectively combining features extracted from different layers can provide significant benefits for the dense semantic correspondence estimation task.

Image alignment.
Rocco et al. <cit.> developed a CNN architecture that can predict the global geometric transformation between two images by training on synthetically warped data.
Seo et al. <cit.> improved <cit.> by introducing attention based offset-aware correlation kernels.
Rocco et al. <cit.> presented an end-to-end trainable CNN architecture that uses weak image-level supervision, which is trained by a soft inlier counting loss in a similar spirit to RANSAC.
Jeon et al. <cit.> introduced a hierarchical learning procedure to progressively learn affine transformations to align the images in a chaos-to-fine manner.
Kim et al. <cit.> introduced to a recurrent transformer network, which is trained with an iterative process and can predict the transformations between a pair of images. 

Flow estimation.
Fischer et al. <cit.> introduced an end-to-end trainable model called FlowNet, which is trained on synthetic data to predict optical flow.
FlowNet is further improved by Ilg et al. <cit.> in several aspects. 
Kim et al. <cit.> proposed a learnable self-similarity feature, which is then used to estimate an dense affine transformation flow for each feature location.
The semantic correspondences can then be obtained by applying such transformations.
Lee et al. <cit.> introduced a method to use images annotated with binary foreground masks, and subjected to synthetic geometric deformations, to train a CNN model with a mask consistency loss and a flow consistency loss.
Besides these, there are also some methods that learn the flow using videos <cit.> by considering temporal consistency. 
















§ METHOD

Given a pair of images (𝐈^s, 𝐈^t), our objective is to find pixel-wise correspondences between the two images.
We propose a CNN, ANC-Net, which takes (𝐈^s, 𝐈^t) as input and produces a 4D correlation map containing the matching scores for all possible pairs in the feature space of the two images.
Pixel-wise correspondence then can be extracted by interpolation among the most likely matches in the feature space.
The model can be trained with a supervised loss on sparse key-point annotations in an end-to-end manner.
To encourage one-to-one matching, we propose using a novel loss, called the orthogonal loss, together with the supervised loss on sparse key-point annotations, for training our model. 

Figure <ref> illustrates the main architecture of our network.
It consists of a feature extractor ℱ, a multi-scale self-similarity module,  and an adaptive neighbourhood consensus (ANC) module 𝒩. 
The feature extractor ℱ is composed of a sequence of standard convolutional layers.
We first feed the two images into ℱ, and get a pair of feature maps 𝐅^s and 𝐅^t. 
The multi-scale self-similarity module 𝒮 consists of two convolutional layers followed by a concatenation operation to fuse them into the multi-scale features. 
With 𝐅^s and 𝐅^t, 𝒮 will produce the multi-scale self-similarity feature maps 𝐒^s and 𝐒^t which capture the complex self-similarity patterns. 
We can then obtain the 4D correlation map 𝐂_s from 𝐒^s and 𝐒^t, and the 4D correlation map 𝐂_f from 𝐅^s and 𝐅^t.
However, 𝐂_s and 𝐂_f are often noisy as they lack the constraints to enforce the correspondence validity, and thus are unreliable for directly extracting correspondences. 
Our proposed ANC module 𝒩, which is realised with a stack of non-isotropic 4D convolutions, takes 𝐂_s and 𝐂_f as input, refining them by considering neighbourhoods with varying sizes.
Finally, the ANC module combines the refined correlation maps by simply summing up the two, producing a single 4D correlation map 𝐂̅, from which reliable correspondences can be retrieved.
𝐂_s is introduced to capture the second order (and higher) cues derived from the raw features. 𝐂_s shares a similar structure to 𝐂_f, allowing both to be refined using a neighbourhood consensus module without introducing extra learnable parameters.
Experiments show that the proposed self-similarity module outperforms similar methods <cit.>.















In this section, we will first introduce the multi-scale self-similarity module in Section <ref>. We then, in Section <ref>, describe the adaptive neighbourhood consensus matching validity module. Section <ref> will discuss the approach to enforcing global constraints over the output of the neighbourhood consensus by maximising an a posteriori estimation. Finally, we describe the learning objectives for training our network in Section <ref>.





 §.§ Multi-scale self-similarity





Self-similarity has been shown to be effective for the task of semantic correspondence estimation <cit.>. 
Given a feature map 𝐅∈ℝ^h_f × w_f × d established by the backbone feature extractor, a self-similarity map measures the local similarity pattern at each feature location.
One way to extract the self-similarity feature for the feature vector 𝐟_ij at (i, j) in 𝐅 is to calculate the cosine distance between itself and its neighbours.
Figure <ref> illustrates the self-similarity module when considering the 3× 3 neighbours of a given feature vector.
This approach results in 9 self-similarity scores for each 𝐟_ij.
We further vectorise each of the 3× 3 self-similarity scores into a 9-vector, which make up the self-similarity feature map 𝐒_0 ∈ℝ^h_f × w_f × 9.


To further capture the correlations among different self-similarity features,
we apply two 2D convolutional layers with zero padding on 𝐒_0.
Given the output feature maps for the two layers are 𝐒_1 and 𝐒_2, we then concatenate the 3-scales 𝐒_0, 𝐒_1, and 𝐒_2 together to form an enhanced feature map 𝐒, which will serve as the input to the later layers.
With the feature maps 𝐒^s and 𝐒^t of source and target images respectively, we can obtain the 4D correlation map 𝐂_s. 



Unlike DCCNet <cit.>, where the self-similarity of a single scale is considered, and the self-similarity scores are then concatenated with 𝐅 and convolved using a point-wise convolution which is intended to use the self-similarity to re-weight the raw features, our method avoids fusing with 𝐅 to reduce redundancy, as the features in 𝐅 have already been implicitly included in 𝐒_0.
Further, we extract more complex self-similarities than DCCNet and make use of multi-scale self-similarities to bootstrap the features.
Thus, we capture more complex features from a much larger local window as well as second order (and higher) information.

As will be shown in the experiments, our multi-scale self-similarity module performs better than that of DCCNet.
It is also worth noting that FCSS <cit.> proposes a similar design, however their self-similarity score is defined using a set of irregular point pairs within the local window which is more complex to implement.
In contrast, we adopt the design of correlating the centre feature with neighbours for simplicity and computation efficiency, and as a result, our simplified self-similarity module outperforms FCSS in all benchmarks.

Both 𝐂_f and 𝐂_s are complementary to each other as we hypothesise they are dominated by first order and higher order cues respectively.
They will be refined by the following ANC module independently and then combined.



 §.§ Adaptive neighbourhood consensus


Neighbourhood consensus has been shown to be effective for filtering the noisy 4D correlation map <cit.>.
Multiple layers of the isotropic 4D convolutional kernels, kernels with identical size in each dimension, are applied on the 4D correlation map to refine it. The isotropic 4D convolution with size 5× 5 × 5 × 5 is illustrated in top left of Figure <ref>. It can be seen that the kernel establishes two neighbourhoods with the same size for both images. However, objects in real images often have varying scales and shapes, therefore, two neighbourhoods depicting the same semantic meaning are very likely to have different sizes. Thus, using neighbourhoods of the same size for both images may introduce noise (unrelated background) when determining a match.

To deal with the problem, we introduce the adaptive neighbourhood consensus (ANC) module which contains a set of non-isotropic 4D convolutional layers. As illustrated in the top right of Figure <ref>, the non-isotropic 4D convolution has dimensions of 3× 3 × 5× 5, defining the neighbourhood of 3× 3 and 5× 5. 

To handle objects in real images with varying scales and shapes, we can combine our non-isotropic 4D kernels with isotropic 4D kernels so that the model can dynamically determine which set of convolutions should be activated to handle objects of various sizes. 
We consider 3 candidate architectures (shown in Figure <ref>) in our experiments with each non-isotropic 4D convolution using zero padding. 
Unless stated otherwise, we use (d) in our experiments, as it gives the best performance in our evaluation.
This is possibly because (d) allows for more scale variation than the others.
This choice might ignore better designs than (d), but the main point in this work is to demonstrate the effectiveness of the ANC module.

It is also worth noting that it is unnecessary to have both p × p × q × q and q × q × p × p kernels in the model where p and q are the sizes of some kernel dimensions, as the bidirectional neighbourhood consensus filter in Eq. <ref> (which will be explained next) effectively tries both the configurations of small vs large neighbourhood and large vs small by reversing the matching direction, and the effect of both filters are equivalent due to the bidirectional matching. 






Let 𝒩 be the module of our adaptive neighbourhood consensus. It takes a 4D correlation map 𝐂_s or 𝐂_f as input and refining them.
Their refined counterparts can then be combined to form 𝐂̅.
We apply 𝒩 to both matching directions (matching 𝐈^s to 𝐈^t and matching 𝐈^t to 𝐈^s), so that our model is invariant to the order of the images.
More importantly, this allows 𝒩 to only include one p× p× q× q non-isotropic kernel to handle the small to large as well as the large to small neighbourhood.
In particular, the refined 4D correlation map can be obtained by 


    𝐂̅=𝒩(𝐂_s)+(𝒩(𝐂_s^⊤))^⊤ + 𝒩(𝐂_f)+(𝒩(𝐂_f^⊤))^⊤,

where ^⊤ denotes the swapping of the matching direction given an image pair, , (C^⊤)_ijkl = C_klij.



 §.§ Most likely matches


After obtaining the refined 4D correlation map 𝐂̅, we follow <cit.> to apply soft mutual nearest neighbour filtering, , for each c̅_i j c d in 𝐂̅, we replace it by ĉ_i j c d = r_i j k l^s r_i j k l^tc̅_i j k l where r_i j k l^s=c̅_i j k l/max _a bc̅_a b k l and r_i j k l^t=c̅_i j k l/max _c dc̅_i j c d, which downweights the scores of matches that are not mutual nearest neighbours. Next, we perform soft-max normalisation to the scores ĉ_i j k l.
The normalised scores can be interpreted as the matching probabilities.
In particular, the probability of a given point at (i, j) in 𝐈^s being matched with an arbitrary point  (k, l) in 𝐈^t is

    v_i j k l^t=exp(ĉ_i j k l)/∑_c dexp(ĉ_i j c d) .

Similarly, the probability of a given point at (k, l) in 𝐈^t being matched with an arbitrary point  (i, j) in 𝐈^s is

    v_i j k l^s=exp(ĉ_i j k l)/∑_a bexp(ĉ_a b k l) .

For a given position (i, j) in 𝐈^s,  the most likely match (k, l) in 𝐈^t can be found by 

    (k, l) = c dmax v_i j c d^t .

Similarly, for a given position (k, l) in 𝐈^t, the most likely match (i, j) in 𝐈^s can be found by 

    (i, j) = a bmax v_a b k l^s .

After retrieving the correspondences in the feature space with Eq. <ref> and Eq. <ref>, the pixel-wise correspondences can be obtained by interpolation. 



 §.§ Learning objective


For the tasks of establishing dense semantic correspondences, it is impossible to obtain dense ground-truth labelling for all training image pairs due to the huge amount of human labour required. 
In practice, one can easily label only a few key-points of the objects in an image.
These key-points often indicate the objects parts with concrete semantic meaning (eyes, mouths, body joints, etc.).


Sparse key-point annotations are included in many existing datasets including PF-PASCAL <cit.>, Spair-71k <cit.>, CUB <cit.> and others.
There are also other forms of alternative annotations, such as image level pairwise annotations <cit.>, or object masks <cit.>.
In this paper, we are interested in the sparse key-point annotations, as they are more directly linked to our objective to learn semantic correspondences.














The sparse key-point annotations provide a straightforward way to train a CNN model for semantic matching, in which we minimise the distances between features of matched key-points (<cit.>).
However, this is not applicable to ANC, because the feature space ANC operates is a 4D correlation map, rather than a 3D feature map consisting of per pixel feature vectors. Therefore, we introduce a simple but effective supervised loss on 4D correlation maps to train our model. 



For each key-point (x, y) in the image ( Figure <ref>(a)), 



we first re-scale (x, y) to the same resolution as the feature map, giving the re-scaled coordinates (x_c, y_c).
Since (x_c, y_c) is a sub-pixel coordinate, it can not be used as the target in the feature map directly.
Instead, we can simply pick the nearest neighbour (x_n, y_n) of (x_c, y_c) in the feature map to be the target (see Figure <ref> (b)).
However, this will introduce errors caused by ignoring the offset between the (x_n, y_n) and (x_c, y_c).
As the resolution of the feature map is much smaller than that of the image, small offsets in the feature map will cause large errors in the image.
To compensate for the offset, we take the four nearest neighbours into consideration (see Figure <ref> (c)), rather than the single nearest neighbour.
In particular, we pick the four nearest neighbours (x_n^1, y_n^1),  (x_n^2, y_n^2),  (x_n^3, y_n^3), and  (x_n^4, y_n^4), and set scalar values t_1, t_2, t_3, and t_4 to them representing the probability of being the considered as target.
t_1, t_2, t_3, and t_4 are proportional to their distances to (x_c, y_c), and ∑_j=1^4 t_j = 1. We then apply 2D Gaussian smoothing on the four nearest neighbour probability map obtained above. We found that such smoothing can effectively enhance the performance.
In this way, each key-point location annotation is converted into a 2D probability map. Next, we reshape the smoothed 2D probability map into a (h_c × w_c)-vector for the key-point (x, y), followed by L_2 normalisation.
For the source image 𝐈^s containing n key-points, we can therefore construct its target as a matrix 𝐌_gt∈ℝ^ n× (h_c × w_c) with each row being a probability vector of a ground truth matching key-point in the target image 𝐈^t. Let 𝐌_gt and 𝐌 be the ground truth and prediction. Note that 𝐌 can be obtained by flattening the first two and last two dimentions of 𝐂̅ (after mutual nearest neighbour filtering), and taking the same n rows corresponding to 𝐌_gt. The loss function is then the Frobenius Norm between them for both matching directions:



    ℒ_k = 𝐌^s - 𝐌^s_gt_F + 𝐌^t - 𝐌^t_gt_F,

where 𝐌^s denotes target probability map from 𝐈^s to 𝐈^t and 𝐌^t denotes inverse direction. 













 §.§ Enforcing one-to-one matching

The one-to-one mapping (one point can be only matched to one other point) turns out to be a useful clue for improve the matching accuracy in classic graph matching (GM)<cit.>, which aims to match two given point sets (graphs) in two images.
Ideally, for our semantic correspondence estimation task, the result should also agree with the one-to-one mapping constraint.
This is especially helpful when there exist some repetitive patterns in the image (a building with multiple identical windows).
GM methods always assume that the number of  key-points in two images are exactly the same.
However, this is often not the case in real applications.
For example, due to pose variation, some key-points may be visible in one image, but not in the other.
In this case, there exist one-to-none mappings in both images.
A plausible one-to-one matching constraint should be able to ignore the one-to-none matches in the data automatically.
To handle this problem, we introduce a novel loss, named the orthogonal loss, as it was inspired by the non-negative orthogonal GM algorithm <cit.>.
The idea is that when 𝐌𝐌^⊤ is an identity matrix 𝐈, each row of 𝐌 contains only one element, and the rest are zero, so we include a difference between 𝐌𝐌^⊤ and 𝐈 in the loss. However, in reality, 𝐌 may contain zero rows for one-to-none case. Therefore, our orthogonal loss term can be defined as 

    ℒ_o =  MM^⊤ - M_gtM_gt^⊤_F ,

where ._F is a the Frobenius norm.  It is worth noting that M_gtM_gt^⊤ has zeros on its diagonal that allows both one-to-one and one-to-none matches to be accurately penalised.
The orthogonal loss has to be combined with Eq. <ref> as it has no impact over the prediction accuracy.
It simply regularises the model by encouraging one-to-one predictions.
The overall loss of our model can be written as 

    ℒ =  ℒ_k +αℒ^m_o,

where α is a weight balancing term, which is set to 0.001 in all our experiments, and ℒ^m_o = M^sM^s^⊤ - M^s_gtM^s_gt^⊤_F + M^tM^t^⊤ - M^t_gtM^t_gt^⊤_F by considering both matching directions.










§ EXPERIMENTAL RESULTS




 §.§ Datasets and implementation details

Datasets. We evaluate our method on four public datasets, namely, PF-PASCAL <cit.>,  Spair-71k <cit.>, and CUB <cit.>. 
PF-PASCAL contains 1351 image pairs, which is approximately divided into 700 pairs for training 300 pairs for validation and 300 pairs for testing <cit.>. 
Spair-71k dataset is much more challenging than the others as it contains both large view point differences and scale differences. We use the 12,234 pairs of testing pairs. Spair-71k is only used to evaluate the transferrability of the models trained on the PF-PASCAL training split. 
The CUB dataset contains 11,788 images of various species of birds with large variation of appearance, shape and pose. We randomly sample about 10,000 pairs from the CUB training data and test using the 5,000 pairs selected by <cit.>.

Implementation details.
Our ANC-Net is implemented in the PyTorch <cit.> framework.
We experiment with three convolutional networks as feature backbones, namely, ResNet-50, ResNet-101 and ResNeXt-101.
All of them are pre-trained on ImageNet <cit.>, and the parameters are fixed during the training of our ANC-Net. 

The size of the self-similarity window is set to 5×5,
and channels of ANC module are set to {1, 16, 16, 1}.
The model is initially trained for 10 epochs using an Adam optimiser <cit.> with a learning rate of 0.001 and applying  Gaussian smoothing with a kernel size of 5 for ground truth probability map generation. 


The model is then fine-tuned for 5 epochs applying Gaussian smoothing with a kernel size of 3 followed by another 5 epochs with a kernel size of 0. 



To compare with DCCNet <cit.>, we implemented it based on the publicly available official implementation of NC-Net <cit.>.
Our implementation slightly surpassed the reported accuracy in <cit.>.
We also implemented UCN_ResNet-101 based on the publicly available official code <cit.>. 

Evaluation metric.
Following common practice, we use the percentage of correct key-points (PCK@α) as our evaluation metric. We report the results under PCK threshold α=0.1.
α is set w.r.t. max(w_r, h_r) where w_r and h_r are the width and height of either the image or the object bounding box. 
Following existing works <cit.>, we use α w.r.t. the image size on PF-PASCAL, and w.r.t. the object bounding box on CUB and Spair-71k.





 §.§ Benchmark comparisons

We compare our method with recent state-of-the-art methods, and present our results in Table <ref>.
For results on PF-PASCAL and Spair-71k, all methods are trained on PF-PASCAL.
For results on CUB, the methods are trained and tested on CUB. 


We used three different feature backbones, ResNet-50, ResNet-101, and ResNext-101 for our method.
When using an identical feature backbone (ResNet-101) with other methods, our ANC-Net achieves the best performance on all the datasets.
For example, we achieve 86.1% and 28.7% on PF-PASCAL and Spair-71k respectively.
Note that even with the ResNet-50 feature backbone, our model outperforms NC-Net and DCCNet with the more powerful ResNet-101 feature backbone on all datasets.
Further, when we replace our feature backbone with ResNext-101, the performance of our method can be further boosted on all datasets (86.1% to 88.7% on PF-PASCAL, 72.4% to 74.1% on CUB, and 28.7% to 30.1% on Spair-71k). Our results are also better than the previous best results achieved HPF with ResNet-101-FCN.
The results clearly demonstrate the effectiveness of our approach. 


Unbiased evaluation on FP-PASCAL.
As discussed in <cit.>, there are 302 images in the training split overlapping with either target or source images in the testing split. In terms of images pairs, there are 95 target-to-source pairs in the training split overlapping with the source-to-target pairs in the testing split. Hence, we further conduct an unbiased evaluation by excluding the 302 images and the 95 image pairs respectively. The results are shown in Table <ref>. Our method consistently outperforms NC-Net and DCCNet.





 §.§ Ablation study

In the ablation experiments, we analyse the effectiveness of all the proposed modules of ANC-Net on PF-PASCAL, with ResNet-101 as the feature backbone.

We experiment on four variants of our ANC-Net, namely, ANC-Net (our model with all components), ANC-Net w/o ANC (our model without ANC, replacing our non-isotropic 4D kernels with the isotropic counterparts), ANC-Net w/o MS (our model with out the multi-scale self-similarity), and ANC-Net w/o Orth (our model trained without orthogonal loss). We also evaluate the three ANC module candidates, denoted as, ANC_b, ANC_c and ANC_d in  Figure <ref>. 
We also compare with NC-Net and DCCNet. 
For a fair comparison with them, we also retrain them with the same sparse annotations.
The retrained NC-Net is the plain baseline of our method, and the retrained DCCNet can be compared with ANC-Net w/o ANC module for evaluating our multi-scale self-similarity module against the self-similarity module of DCCNet. 

The results are reported in Table <ref>.
As can be seen, when we remove each of our proposed modules, the performance drops, showing that all our proposed modules are effective.
However, ANC-Net and all its variants perform consistently better than the retrained NC-Net and DCCNet as well as the original NC-Net and DCCNet. Among the three ANC architectures in Figure <ref>,


ANC_d performs better than the other two by a noticeable margin.
This might be explained by the fact that ANC_d contains more flexible feature combination paths to deal with objects having more severe scale variations.










 §.§ Qualitative evaluations








We show two sets of qualitative experiments. 
The first set of qualitative experiments is shown in Figure <ref>.
It includes examples of key-points with some degree of ambiguity, such as the limbs of an animal or a table. 
With both NC-Net and DCCNet, it can be seen that there are often multiple peaks in the correlation maps.
In some cases, this can lead to failures where, although the key-points look alike, they are far from the true correspondence.
In contrast, ANC-Net tends to produce correlation maps with a single dominant peak.
This drastically reduces the occurrence of these failures due to the ambiguous nature of a key-point.
We qualitatively evaluate the dense correspondence prediction of ANC-Net in Figure <ref>.
From a correlation map predicted by the network, we compute a dense flow field, which maps pixel locations from the source to the target image. 
In general, ANC-Net and NC-Net preserve more details in the warping than DCCNet, and ANC-Net is able to capture the scale of the target  more accurately.





§ CONCLUSION



In this paper, we have proposed a convolutional neural network, called ANC-Net, for dense semantic matching.
ANC-Net takes a pair of images depicting different objects from the same category as input, and produces a dense 4D correlation map containing all the pair-wise matches in the feature space.
Pixel-wise semantic correspondences can then be extracted from the 4D correlation map.
ANC-Net can be trained end-to-end with sparse key-point annotations.
At the core of ANC-Net is our proposed 4D non-isotropic convolution kernels, which incorporates an adaptive  neighbourhood consensus constraint for robust matching, and our proposed multi-scale self-similarity module, which aggregates multiple self-similarity features that are insensitive to intra-class appearance variation.
We also proposed a novel loss, called orthogonal loss, that can enforce a one-to-one matching constraint,  encouraging plausible matching results.
We have thoroughly evaluated the effectiveness of our method on various benchmarks, and it substantially outperforms state-of-the-art methods.

Acknowledgements. We gratefully acknowledge the support of the European Commission Project Multiple-actOrs Virtual EmpathicCARegiver for the Elder (MoveCare) and the EPSRC Programme Grant Seebibyte  EP/M013774/1.

ieee_fullname





