question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

find_homography_dlt - possible improvement and usage

See original GitHub issue

❓ Usage

Hi, Kornia community. Did anyone use find_homography_dlt as a part of an end-to-end network? I am working on end-to-end image registration project and tried to incorporate it into the network architecture, without any success so far. I’ve set a small learning rate (i.e. 1e-6/8/10/12) and after a couple of iterations weights of my network explode - what’s interesting, gradients do not explode… I am having a hard time understanding what’s wrong here - maybe the whole idea of inserting find_homography_dlt in end-to-end fashion is wrong?

Any tips?

❓ Possible improvement

I could have a couple of possible improvements over the current version, let me start with this one: https://github.com/kornia/kornia/blob/master/kornia/geometry/homography.py#L39 , where we have a manual iteration over all points.

    w_list = []
    axy_list = []
    for i in range(points1.shape[1]):
        axy_list.append(ax[:, i])
        axy_list.append(ay[:, i])
        w_list.append(weights[:, i])
        w_list.append(weights[:, i])
    A = torch.stack(axy_list, dim=1)
    w = torch.stack(w_list, dim=1)

Is there any reason why we do this manually? Why don’t we use:

A = torch.cat((ax, ay), dim=-1).reshape(ax.shape[0], -1, ax.shape[-1])
w = weights.repeat(1, 2)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
ducha-aikicommented, Sep 25, 2020

Is it some urban knowledge?

@dkoguciuk no, just from the fact that displacements == optical flow in your example was a)negative -> do not survive ReLU and big, e.g. 8,therefore would be scaled down by batchnorm. I am glad, that I helped 😃

I don’t know why random noise in that case solves the problem

@edgarriba Because for that particular case, it not that matrix was somehow singular, it was, in fact all zeros or all ones. That is why noise helped. Not sure for the general case…

0reactions
dkoguciukcommented, Oct 6, 2020

Merged in #693

Read more comments on GitHub >

github_iconTop Results From Across the Web

find_homography_dlt - possible improvement and usage #690
I am working on end-to-end image registration project and tried to incorporate it into the network architecture, without any success so far. I' ......
Read more >
How to improve the homography accuracy? - Stack Overflow
If you have several similar frames, it is possible that you see that homography changes a little between them. There are tricks to...
Read more >
What methods can be used to compute homography
I've read about Direct Linear Transform, Least Squares method and RANSAC. However, from what I've read I'd say DLT and RANSAC are the...
Read more >
Lecture 4.3 Estimating homographies from feature ... - UiO
Robust estimation with RANSAC. – Improved estimation based on RANSAC inliers. • This homography enables us to compose the images into a larger...
Read more >
Method for online matching of multiple identical targets using ...
... targets using local homography matrix based on moving DLT ... et al 2014 As-projective-as-possible image stitching with moving DLT IEEE ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found