Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative number of test results #28

Open
wangshuo98 opened this issue Jan 15, 2023 · 3 comments
Open

Negative number of test results #28

wangshuo98 opened this issue Jan 15, 2023 · 3 comments

Comments

@wangshuo98
Copy link

wangshuo98 commented Jan 15, 2023

Hi ,
Thanks for you great m-lsd work!
I use it to detect my own pictures,and save the Endpoint coordinates.There are small amount of Endpoint coordinates is Negative number .I find the mistake only happened at x_start.Can you give me some information of it .Thanks a lot
a result file
1403638127445096960.txt

@geonm
Copy link
Collaborator

geonm commented Jan 16, 2023

Hi.

I guess it's due to a wrongly predicted center point.

A displacement vector for the center point is predicted by reasoning both ends of a line segment relative from the center point, but if the predicted center is located far from one side and the other endpoint is out of an image, it tries to find a virtual point outside the image.

Can you share an example with me?

@wangshuo98
Copy link
Author

Thank you for your prompt reply before the Lunar New Year!

I'd be happy to provide pictures for you to test . I use mlsd on EuRoC dataset (MH03 MH04) score_thr=0.4, dist_thr=10;

If you have an idea to solve this problem, please let me know.Thanks a lot.

1403637130538319104
1403637261288318976
1403637245238319104

@geonm
Copy link
Collaborator

geonm commented Jan 28, 2023

Happy lunar new year too!

I've tested your examples and found it as I guessed before.

You can easily solve this problem.

If you'd like to fix a predicted line segment outside of an input image, just find an intersection between the predicted line segment and an edge of the image in the image coordinate system.

Note the edge of the image is one of these lines; (0,0)~(0,h), (0,h)~(h,w), (h,w)~(0,w), (0,w)~(0,0)

You can refer to https://github.com/navervision/mlsd/blob/master/utils.py#L176-L195 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants