Extract road segments from a map

Hello everyone, I have a task to extract road segments from a map (as shown in Figure 1). I have implemented road segmentation using YOLO, and obtained an image as shown in Figure 2 (a binary image, where black represents the background and white represents roads). Now, which AI technique should I use to extract the white parts as road segment data? I hope my data will be in a format similar to the following: start:x1,y1 end:x2,y2,and the visualization of this data on the image should resemble Figure 3.

Figure 1

Figure 2

Figure 3

I am just guessing here, but maybe image segmentation like UNET!?

Thank you , I will try it

1 Like

I suggest applying a skeletonization algorithm to Figure 2 (e.g., Skeletonize — skimage 0.23.1 documentation) and finding road endpoints analyzing neighboring pixels. Then, transform the road endpoints to the format you want.

1 Like