GithubHelp home page GithubHelp logo

grumpyzhou / patch2pix Goto Github PK

View Code? Open in Web Editor NEW
264.0 264.0 25.0 6.03 MB

Patch2Pix: Epipolar-Guided Pixel-Level Correspondences [CVPR2021]

License: MIT License

Shell 0.61% Python 87.33% Jupyter Notebook 12.07%
deep-learning feature-matching image-matching

patch2pix's People

Contributors

grumpyzhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

patch2pix's Issues

Quantization Code

Dear Author,
You've mentioned that to evaluate this method on Aachen Day-Night Benchmark, you did quantization for the matches. Will you release the code for the quantization part?

questions on cls_fine

Hi,

Thank you for your excellent work! I'd like to ask for some advice for training this model.

When I modified this model on my own datasets, I encounter a problem that it converges to a point where the loss of cls_fine = 0, but the metric, Specificity of cls_fine, is about 0.01, which means it has a weak ability to distinguish the false match. May I get some advice for improving the performance further?

Question about the loss

Thank you for your outstanding work. My question is how many of the four kinds of loss (cls_mid/cls_fine/epi_mid/epi_fine) finally converge to? And how long the training will take?

Creating custom dataset

I want to create my own dataset to train with patch2pix. If I have fundemental matrix between source and destination images, would it be sufficent as supervision to train patch2pix ?

Segfault at import statement

Hello Authors,

I am getting Segfault error when I am trying to run visualize_matches.ipynb code. I debugged this error and specifically it happens at

from utils.common.plotting import plot_matches

I think there is some issue with module importing. I am running code in Linux.

Has anyone faced this issue?

Checkpoint Path Invalid

Hi @GrumpyZhou , Greetings!!
Thanks for the amazing work on patch2pix.

I was trying out patch2pix, however, the checkpoint paths seem invalid. Could you please confirm if the checkpoints have been migrated?

-Thanks

Crash when no matches are found

Hi Qunjie,

Thanks for releasing the code!

I observed a test-time crash that happens when there are no matches found. The trace is

  File "../localize.py", line 385, in main
    matches, _, _, _ = matcher(img1_name, img2_name)
  File "../localize.py", line 314, in <lambda>
    matcher = lambda im1, im2: model.match_pairs(im1, im2)
  File "/local/datasets/aachen_day_night/temp/image-matching-toolbox/immatch/modules/patch2pix.py", line 86, in match_pairs
    io_thres=self.match_threshold)        
  File "/local/datasets/aachen_day_night/temp/image-matching-toolbox/immatch/modules/../../third_party/patch2pix/networks/patch2pix.py", line 296, in refine_matches
    regressor=self.regress_mid)
  File "/local/datasets/aachen_day_night/temp/image-matching-toolbox/immatch/modules/../../third_party/patch2pix/networks/patch2pix.py", line 215, in forward_fine_match
    psize, ptype, regressor)
  File "/local/datasets/aachen_day_night/temp/image-matching-toolbox/immatch/modules/../../third_party/patch2pix/networks/patch2pix.py", line 177, in forward_fine_match_mini_batch
    f1s = f1s.view(-1, N, psize, psize).permute(1, 0, 2, 3)
RuntimeError: cannot reshape tensor of 0 elements into shape [-1, 0, 16, 16] because the unspecified dimension size -1 can be any value and is ambiguous

Here, I am using your image matching toolbox to use patch2pix with superglue features to match two images.
Do you know what the best fix would be?

[Error] AttributeError: 'Conv4d' object has no attribute 'weight'

AttributeError Traceback (most recent call last)
Cell In[1], line 29
25 else:
26 # Initialize patch2pix matcher
27 args = Namespace(io_thres=0.25, imsize=1024, ksize=2,
28 ckpt='../pretrained/patch2pix_pretrained.pth')
---> 29 matcher = init_patch2pix_matcher(args)
33 # Visualize matches on D2Net example pairs
34 for i in range(1, 4):

File ~/CodesWorld/Codes/patch2pix/examples/../utils/eval/model_helper.py:11, in init_patch2pix_matcher(args)
10 def init_patch2pix_matcher(args):
---> 11 net = load_model(args.ckpt, method='patch2pix')
12 matcher = lambda imq, imr: estimate_matches(net, imq, imr,
13 ksize=args.ksize,
14 io_thres=args.io_thres,
15 eval_type='fine',
16 imsize=args.imsize)
17 return matcher

File ~/CodesWorld/Codes/patch2pix/examples/../utils/eval/model_helper.py:60, in load_model(ckpt_path, method, lprint)
58 else:
59 lprint('Wrong method name.')
---> 60 net = Patch2Pix(config)
...
1613 return modules[name]
-> 1614 raise AttributeError("'{}' object has no attribute '{}'".format(
1615 type(self).name, name))

AttributeError: 'Conv4d' object has no attribute 'weight'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.