Parskatt / RoMa

[CVPR 2024] RoMa: Robust Dense Feature Matching; RoMa is the robust dense feature matcher capable of estimating pixel-dense warps and reliable certainties for almost any image pair.
https://parskatt.github.io/RoMa/
MIT License
556 stars 43 forks source link

approx kde #22

Closed Parskatt closed 7 months ago

Parskatt commented 7 months ago

@ducha-aiki can you check this out?

ducha-aiki commented 7 months ago

Thank you, will check tomorrow

Parskatt commented 7 months ago

It could also work to replace the balanced sampling with NMS kind of similar to casmtr. Havent tried though.

Basically we just want a nice spread of the matches.

ducha-aiki commented 7 months ago

    matches, match_certainty = matcher.sample(warp, certainty, num=roma_max_matches)
  File "/RoMa/roma/models/matcher.py", line 487, in sample
    density = approx_kde(good_matches, std=0.1)
  File "/RoMa/roma/utils/kde.py", line 16, in approx_kde
    y = torch.multinomial(x, min(max_num_cmp,len(x.shape[-2])), replacement=False)
TypeError: object of type 'int' has no len()
Parskatt commented 7 months ago

Moved to https://github.com/Parskatt/RoMa/pull/23