Hanqer / deep-hough-transform

Jittor and Pytorch code for paper "Deep Hough Transform for Semantic Line Detection" (ECCV 2020, PAMI 2021)
339 stars 71 forks source link

What if I labeled finite-line? #31

Closed landkwon94 closed 2 years ago

landkwon94 commented 2 years ago

Hello Sir, I am a reader of your nice paper. Also I am studying your codes these days, it looks really interesting!

By the way, I have a question about annotation of training datasets.

Your training datasets and the inference results are showing infinite line which are reaching to edge of the image.

Then, if I labeled 'finite' lines which are not reaching to the edge of the images, what will be the results of the inference?

Because I don't want to waste time for labeling so much images..

I just want to listen to your idea about my question!

Thank you so much again :)

Hanqer commented 2 years ago

Hi @landkwon94 , our method was designed for semantic line detection which aims to detect straight infinite lines in an image. The Deep Hough Transform (DHT) is for infinite straight line detection. Thus the annotation of the training dataset must be infinite lines (if the annotation is finite line segments, the scripts will convert it to infinite lines which are reaching the boundary of the image).
If you are pursuing a method to detect line segments, you can refer to Deep-Hough-Transform-Line-Priors and its related works.

landkwon94 commented 2 years ago

Wow! Many thanks for your quick reply! 'Deep-Hough-Transform-Line-Priors' is exactly what I was looking for!

Also, many thanks for your detailed explanation of your code. It is super-helpful for me :)

Thanks again!

landkwon94 commented 2 years ago

@Hanqer Oh, by the way, may I ask where does 'Deep Hough Transform' convert finite annotations to infinite lines which are reaching the boundary of the image? I want to check that scripts for my purpose :)

Many thanks again Sir!

zeakey commented 2 years ago

Actually we annotate the slope and bias of lines so that there is no such concept of finite lines in our method since all lines are considered as infinite.

The conversion from finite to infinite lines is easy: just compute the slopes and biases of line segments and ignore their star/end points.

Hanqer commented 2 years ago

@landkwon94 As @zeakey mentioned, we deal with all lines as infinities. But for the inaccurate annotations, we calculate the endpoints which reach the image boundary according to one point in this line and the slope of this line. This code is available in here.

landkwon94 commented 2 years ago

Many thanks for your comments! I totally understood how it works :) I will learn deeper, thanks again!