Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inference on imagery for which we don't have graph #19

Closed
chrishna1 opened this issue Nov 29, 2018 · 4 comments
Closed

Inference on imagery for which we don't have graph #19

chrishna1 opened this issue Nov 29, 2018 · 4 comments

Comments

@chrishna1
Copy link

Hi,
To run infer.py we need to pass two arguments; that is the path of graph and starting_locations. Since both is available for 40 cities data set, it is working fine over them.
But what if we want to infer on entirely new region for which I've downloaded the required imagery using 1_sat.go ?

Is there any workaround for this or do we need to download them first to proceed forward ?

On a different note : For applying Roadtracer on a new region we also need to pass --r switch, which contains the name of the region otherwise by default it assumes chicago or reassign REGION .

@uakfdotb
Copy link
Member

uakfdotb commented Nov 29, 2018

In a typical application users will have an existing street map and want to find roads that are in the imagery but missing from their map. So using the EXISTING_GRAPH_FNAME setting in infer.py, RoadTracer will use starting locations along the existing road network and only infer segments along roads that didn't appear in the existing map.

For a region where there is no map at all, there are two things you'd need to do:

  1. Set USE_TL_LOCATIONS=False and set MANUAL_POINT1 and MANUAL_POINT2 to be the pixel position of a point on the road network in an image tile. You can set the position of the tile with MANUAL_RELATIVE.
  2. Would recommend two-phase inference approach, see https://github.com/mitroadmaps/roadtracer/tree/master/roadtracer#starting-from-multiple-locations . The first phase will use your MANUAL_POINTs to infer many segments with low confidence threshold, then in second phase it will use the segments from first phase as starting locations to infer road network with high confidence threshold.

Edit: the code still requires graph path but if it complains about graph file not existing you can just create it as an empty file. Only the starting_locations file is used, but if you use MANUAL_POINTs then it is not used either.

@ntelo007
Copy link

ntelo007 commented Dec 5, 2019

Could you please post an example command for infering with new image data? I already applied the change (insert manual points, change USE_TL_LOCATIONS=False) but I can't make it run.

@uakfdotb
Copy link
Member

uakfdotb commented Dec 5, 2019

ntelo007 What error do you get?

In practice it makes sense to start with the existing map (like OpenStreetMap) and use tool like RoadTracer to add more roads. (With this RoadTracer code you can use --g option to pass the existing map.)

Usually it would not make sense to infer a new map from scratch, that is useless map because it ignores the existing high-quality data. It is not a real problem.

@ntelo007
Copy link

ntelo007 commented Dec 6, 2019

@uakfdotb Please have a look at issue #31 to see about the error I get.

The reason why I would like to test the algorithm on a new image is to understand how it works and identify its limitations. There are thousands of roads still not mapped in underdeveloped countries, which could get benefited by such algortihms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants