mitroadmaps / roadtracer

MIT License
235 stars 76 forks source link

Road tracer stop after tracing only few roads. #37

Open 2016ee165 opened 3 years ago

2016ee165 commented 3 years ago

I am trying to run infer.py on Chicago and Boston regions using pretrained model provided on your website. I have download the imagery using 1_sat.go. I have tried various time both by giving starting location manually or reading starting location from json file. But, each time road tracer stop after tracing only few roads. I have also attached the image below. Can you kindly point out what might be the reason? Thank you.

Screenshot 2021-10-07 141225
uakfdotb commented 3 years ago

This repository is from a research project and the code is not maintained anymore. If you're looking for a robust way to detect road networks, there may be more polished systems out there.

Here are several things to try to improve performance:

2016ee165 commented 3 years ago

I have tried using a lower threshold and starting from multiple locations. The result improved a bit but is still not up to the mark. I'll try training the model from scratch as the change in imagery can be the limiting factor. Thanks for your response.

uakfdotb commented 3 years ago

OK, by the way for re-training we have newer version of code in https://github.com/favyen/muno21/tree/master/methods/roadtracerpp as a baseline for our ICCV 2021 dataset paper, MUNO21 (https://favyen.com/muno21/). It may be easier to train using the MUNO21 version, although there are some differences in the training process (the MUNO21 version corresponds to the approach in "Machine-Assisted Map Editing" instead of "RoadTracer: Automatic Extraction of Road Networks from Aerial Images"). Needs JPEG files, corresponding .graph files with ground truth road network, and a sizes.json file indicating the width/height of each JPEG image.

Another factor that may influence performance is resolution -- the model at https://mapster.csail.mit.edu/roadtracer/ is trained on 60 cm/pixel imagery. Additionally, for both the code here and the code in MUNO21, there are certain parameters (SEGMENT_LENGTH in train.py here, RoadWidth and D in mk_angles.go in the other repo) that need to be scaled depending on the resolution: the parameters are tuned for 60 cm/pixel imagery here, and 1 m/pixel imagery in MUNO21 repo.

2016ee165 commented 3 years ago

In 1_sat.go you are using Google Map API to download imagery at zoom level 18. The Google Map API provides imagery at different resolutions for different regions. How can we get 60cm/pixel imagery from MAP API for all regions? Kindly also mention whether to increase or decrease the segment length with a decrease in resolution.

Thank you for mentioning MUNO21. I'll look into it.

ZHONIN commented 2 years ago

OK, by the way for re-training we have newer version of code in https://github.com/favyen/muno21/tree/master/methods/roadtracerpp as a baseline for our ICCV 2021 dataset paper, MUNO21 (https://favyen.com/muno21/). It may be easier to train using the MUNO21 version, although there are some differences in the training process (the MUNO21 version corresponds to the approach in "Machine-Assisted Map Editing" instead of "RoadTracer: Automatic Extraction of Road Networks from Aerial Images"). Needs JPEG files, corresponding .graph files with ground truth road network, and a sizes.json file indicating the width/height of each JPEG image.

Another factor that may influence performance is resolution -- the model at https://mapster.csail.mit.edu/roadtracer/ is trained on 60 cm/pixel imagery. Additionally, for both the code here and the code in MUNO21, there are certain parameters (SEGMENT_LENGTH in train.py here, RoadWidth and D in mk_angles.go in the other repo) that need to be scaled depending on the resolution: the parameters are tuned for 60 cm/pixel imagery here, and 1 m/pixel imagery in MUNO21 repo.

Thank you very much for posting the MUNO21 dataset. Could you please make public the checkpoint (weight) file of the roadtracer trained with this dataset?