vislearn / ngransac

Neural-Guided RANSAC for Estimating Epipolar Geometry from Sparse Correspondences
BSD 3-Clause "New" or "Revised" License
305 stars 44 forks source link

request help #24

Closed ABCDZLG closed 1 week ago

ABCDZLG commented 2 months ago

Hi When I run this command ‘’ python ngransac_demo.py -img1 images/demo1.jpg -fl1 900 -img2 images/demo2.jpg -fl2 900 ‘’on the remote server, he gets an error AttributeError: module 'ngransac' has no attribute 'find_essential_mat' (file:ngransac_demo.py)and (original program code: incount = ngransac.find_essential_mat(correspondences, probs, rand_seed, opt.hyps, opt.threshold, out_model, out_inliers, out_gradients))

Could you please help me out, thank you very much!

捕获1111

Also, I have another question to ask:The input is the correspondence between two pieces of the graph, does the sum of the output weights add up to 1? In this case, is the weight p or w? I'm confusing p and w.

In the paper, p(y;w) is considered to be a categorical distribution, where all p's sum to 1? I seem to have confused these concepts, I hope you can answer, thanks!

ebrach commented 1 month ago

Hi!

Regarding your error message: It seems the ngransac C++ extension did not compile properly. Please follow the steps for installation and look out for any errors that occur: https://github.com/vislearn/ngransac?tab=readme-ov-file#installation

Regarding p and w: p is a probability distribution over the correspondences (selection probabilities), and these sum to 1. w in the paper are the network weights, i.e. the parameters that you want to learn.

Hope that helps, Eric

ABCDZLG commented 1 month ago

Thank you for your answer, through this period of study, I have new questions, I wonder if you can help me answer them?

1What is the relationship between feature matching and multi-model fitting? What is the process? I don't understand the relationship between the two, but in multi-model fitting, feature matching is used

2Will model fitting be used in feature matching? Or will feature matching be used in the process of model fitting?

I think the relationship is to first get the matched points by inputting two pictures, and then fit a model or even multiple models through the matched points in each of the two pictures, and then estimate the essence matrix or the homology matrix through the plane composed of this model.

The code of two Multi-model fitting literatures, one is https://github.com/fkluger/consac and the other is https://github.com/fkluger/parsac

ebrach commented 1 week ago

Hi, yes you are correct. NG-RANSAC, CONSAC and PARSAC all assume that you first do the feature matching. Only afterwards will these algorithms attempt to fit a model - either a single one (NG-RANSAC) or multiple ones (CONSAC, PARSAC). Feature matching will not be done again throughout model fitting.

Hope that helps, Eric