hardest negative mining for non-overlapping volumes
Solonets opened this issue · 0 comments
Hi Chris,
I noticed that you only include voxels from overlapping volumes of point clouds. i.e only voxels that have at least one correspondence in the other cloud have a possibility to be included in the negative loss (and therefore the total loss).
neg_keys0 = _hash([pos_ind0.numpy(), D01ind], hash_seed)
...
mask0 = torch.from_numpy(
np.logical_not(np.isin(neg_keys0, pos_keys, assume_unique=False)))
...
neg_loss0 = F.relu(self.neg_thresh - D01min[mask0]).pow(2)
The problem arises when the overlapping volume of the given clouds is not that big: even when the loss is zero, on the validation voxels from non-overlapping areas can produce false positives that corrupt the registration (that is particularly strange to get a wrong result with the zero loss).
I tried to include negative matches from non-overlapping volume and it appears to fix the problem. What do you think about that? If you validate my idea I can propose apr for this issue.