Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

License

NotificationsYou must be signed in to change notification settings

mitroadmaps/roadtracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the code for"RoadTracer: Automatic Extraction of Road Networks from Aerial Images".

There are several components, and each folder has a README with more usage details:

  • dataset: code for dataset preparation
  • roadtracer: RoadTracer
  • roadcnn: our segmentation approach (baseline)
  • deeproadmapper: DeepRoadMapper (baseline)

You will need gomapinfer (https://github.com/mitroadmaps/gomapinfer/) as a dependency.

The training/inference code is built on top of TensorFlow.

Usage

First, follow instructions in dataset/ to download the dataset.

Then, follow instructions in the other folders to train a model and run inference.

Junction Metric

The junction metric matches junctions (any vertex with three or more incident edges) between a ground truth road network graph and an inferred one.

go run junction_metric.go /data/graphs/chicago.graph chicago.out.graph chicago

Visualization

viz.go will generate an SVG from a road network graph. It will refer to the/data/testsat/ images; to view the SVG, those images will need to be in the same folder as the generated SVG.

go run viz.go chicago /data/graphs/chicago.graphgo run viz.go chicago chicago.out.graph

Applying RoadTracer on a new region

You need to make a few modifications to run the code on a region outside of the 40-city RoadTracer dataset.

First, download the imagery. Updatedataset/lib/regions.go and put a latitude/longitude bounding box around your region in the regionMap. You can comment out the existing regions. Then, follow instructions in dataset/ for running1_sat.go.

Then, updateroadtracer/tileloader.py and setTRAINING_REGIONS andREGIONS to just a list with your region label from the regionMap. Also updateREGION,TILE_START, andTILE_END ininfer.py (e.g. if your imagery tiles were saved asxyz_-1_-1_sat.png throughxyz_1_1_sat.png, setTILE_START = -1, -1 andTILE_END = 2, 2.

Finally, manually specify a starting location for RoadTracer in infer.py. SetUSE_TL_LOCATIONS = False,MANUAL_RELATIVE = 0, 0, and set the manual points to the pixel positions of two points on the road network inxyz_0_0_sat.png. These two points should be close to each other (around SEGMENT_LENGTH apart) and best to be in the middle of a road.

Now you should be able to get a road network graph by running infer.py.

To convert this to latitude/longitude, you can usedataset/convertarg.go:

go run convertarg.go YOUR_REGION_LABEL frompix out.graph out.lonlat.graph

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp