-
Project Type: Instance segmentation
-
Operating System & Browser: Mac OS Chrome
-
Project Universe Link or Workspace/Project ID: https://universe.roboflow.com/map-test-58w92/historic-paths
Hi I’m looking for advice on the problem of detecting features which are dashed parallel lines representing footpaths on a historic map.
I’ve tried using a yolo instance segmentation model as well as hough transform but I think this is hard problem for both of those techniques due to these being curved, non continuous lines.
I was wondering if there was a better way to think about this problem, such as doing object detection on the individual dashes, or groups of dashes and constructing lines from the detections.
I’d be really grateful to hear if anyone has worked on a similar problem.
Here’s an example image:
https://universe.roboflow.com/map-test-58w92/historic-paths/images/MNAgEj1GtWU2CIVTTUvw?queryText=&pageSize=50&startingIndex=0&browseQuery=true
Hey @pathematics ! That’s an interesting problem for sure. There could be some open/close image processing you could do but I think you’d catch other lines in the image. So my first instinct was that you might want to use a VLM. But it kind of depends on what all you need done eventually and the volume/speed you’re going for. RF-DETR might have some use here too. I’ll be curious to see what other ideas people have but below as a quick POC in the VLM style.
I played with ChatGPT by first showing your annotated image and having it find the path. Then I used its explanation to create a prompt for a fresh session. Below is the prompt and input/output images. Not 100% accurate but it got pretty far in the 10 minutes I spent.
Prompt:
Identify the dashed lines for me. Treat the dash pattern as one (or more) long broken lines and linked nearby dash segments into continuous paths. Create both an overlay version of the image and a binary mask. Some tips include:
-
Invert to make ink bright, then adaptive-threshold to separate ink from paper.
-
Keep only small components (dash-sized) and discard long borders/text.
-
Build a proximity graph of remaining components and connected neighbors within ~35 px, then draw the largest chains into a continuous mask.
Input Image:
Output images:
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.



