fire
fire copied to clipboard
Lowe’s first-to-second neighbor ratio test
nice work. https://github.com/naver/fire/blob/main/losses.py#L46
dist2_second2 = torch.argmin(dist2, dim=0)
ratio1to2 = dist[best2,arange] / dist2_second2. # should it be dist[best2,arange] /dist2[dist2_second2:arange] ?