cvg / DeepLSD

Implementation of the paper "DeepLSD: Line Segment Detection and Refinement with Deep Image Gradients"
MIT License
487 stars 62 forks source link

A question about training on custom dataset #25

Open mateth opened 1 year ago

mateth commented 1 year ago

Hi, I am trying to train this model on some data I've collected online to test its training capabilities. I have the images annotated with lines and they are saved in a txt format like what Yolov8 uses. Is there an example of how I should transform this data to input as training for this model? Is there any way to train the model to detect only some particular lines instead of all of them?

rpautrat commented 1 year ago

Hi, DeepLSD is originally meant to be trained without ground truth lines, so we do not have any code to do what you want.

However, it could be feasible with a bit of work, by converting your lines into a distance and angle fields (e.g. using the distanceTransform of OpenCV, or doing it programmatically), and then supervising the network with these two fields.

heivens commented 9 months ago

@mateth Hello, I am preparing to do the same thing as you described. Have you found any convenient ways?