Skip to content

Commit

Permalink
Merge pull request #76 from azavea/lf/0.11
Browse files Browse the repository at this point in the history
Release v0.11
  • Loading branch information
lewfish authored Jun 19, 2020
2 parents a04d588 + ac50be1 commit 1015aba
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This repository contains examples of using Raster Vision on open datasets.

Note: The `master` branch of this examples repo should be used in conjunction with the `master` branch (or `latest` Docker image tag) of [Raster Vision](https://github.com/azavea/raster-vision)
which contains the latest changes. For versions of this examples repo that correspond to stable, released versions of Raster Vision, see:
* [0.11](https://github.com/azavea/raster-vision-examples/tree/0.11)
* [0.10](https://github.com/azavea/raster-vision-examples/tree/0.10)
* [0.9](https://github.com/azavea/raster-vision-examples/tree/0.9)

Expand Down Expand Up @@ -110,7 +111,7 @@ The dataset is stored on AWS S3 at `s3://spacenet-dataset`. You will need an AWS

Optional: to run this example with the data stored locally, first copy the data using something like the following inside the container.
```
aws s3 sync s3://spacenet-dataset/AOI_1_Rio/ /opt/data/spacenet-dataset/AOI_1_Rio/
aws s3 sync s3://spacenet-dataset/AOIs/AOI_1_Rio/ /opt/data/spacenet-dataset/AOIs/AOI_1_Rio/
```

#### Step 2: Run the Jupyter Notebook
Expand Down
6 changes: 3 additions & 3 deletions docker/build
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ then
then
if [ -z "$RASTER_VISION_REPO" ]
then
BASE_IMAGE="quay.io/azavea/raster-vision:tf-cpu-latest"
BASE_IMAGE="quay.io/azavea/raster-vision:tf-cpu-0.11"
else
BASE_IMAGE="raster-vision-tf-cpu"
fi
docker build --build-arg BASE_IMAGE="$BASE_IMAGE" -t raster-vision-examples-tf-cpu -f Dockerfile .

if [ -z "$RASTER_VISION_REPO" ]
then
BASE_IMAGE="quay.io/azavea/raster-vision:tf-gpu-latest"
BASE_IMAGE="quay.io/azavea/raster-vision:tf-gpu-0.11"
else
BASE_IMAGE="raster-vision-tf-gpu"
fi
Expand All @@ -45,7 +45,7 @@ then
then
if [ -z "$RASTER_VISION_REPO" ]
then
BASE_IMAGE="quay.io/azavea/raster-vision:pytorch-latest"
BASE_IMAGE="quay.io/azavea/raster-vision:pytorch-0.11"
else
BASE_IMAGE="raster-vision-pytorch"
fi
Expand Down
10 changes: 5 additions & 5 deletions examples/spacenet/vegas/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ def get_class_id_to_filter(self):

class VegasBuildings(SpacenetConfig):
def __init__(self, raw_uri):
self.base_dir = 'SpaceNet_Buildings_Dataset_Round2/spacenetV2_Train/AOI_2_Vegas'
self.raster_dir = 'RGB-PanSharpen/'
self.label_dir = 'geojson/buildings/'
self.raster_fn_prefix = 'RGB-PanSharpen_AOI_2_Vegas_img'
self.label_fn_prefix = 'buildings_AOI_2_Vegas_img'
self.base_dir = 'spacenet/SN2_buildings/train/AOI_2_Vegas'
self.raster_dir = 'PS-RGB'
self.label_dir = 'geojson_buildings'
self.raster_fn_prefix = 'SN2_buildings_train_AOI_2_Vegas_PS-RGB_img'
self.label_fn_prefix = 'SN2_buildings_train_AOI_2_Vegas_geojson_buildings_img'
super().__init__(raw_uri)

def get_class_map(self):
Expand Down
10 changes: 5 additions & 5 deletions examples/spacenet/vegas/simple_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ def exp_main(self, raw_uri, root_uri, test=False):
"""
# Specify the location of the raw data
base_uri = join(
raw_uri, 'SpaceNet_Buildings_Dataset_Round2/spacenetV2_Train/AOI_2_Vegas')
raw_uri, 'spacenet/SN2_buildings/train/AOI_2_Vegas')
# The images and labels are in two separate directories within the base_uri
raster_uri = join(base_uri, 'RGB-PanSharpen')
label_uri = join(base_uri, 'geojson/buildings')
raster_uri = join(base_uri, 'PS-RGB')
label_uri = join(base_uri, 'geojson_buildings')
# The tiff (raster) and geojson (label) files have have a naming convention of
# '[prefix]_[image id].geojson.' The prefix indicates the type of data and the
# image id indicates which scene each is associated with.
raster_fn_prefix = 'RGB-PanSharpen_AOI_2_Vegas_img'
label_fn_prefix = 'buildings_AOI_2_Vegas_img'
raster_fn_prefix = 'SN2_buildings_train_AOI_2_Vegas_PS-RGB_img'
label_fn_prefix = 'SN2_buildings_train_AOI_2_Vegas_geojson_buildings_img'
# Find all of the image ids that have associated images and labels. Collect
# these values to use as our scene ids.
label_paths = list_paths(label_uri, ext='.geojson')
Expand Down
15 changes: 10 additions & 5 deletions examples/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'raw_uri': 's3://raster-vision-raw-data/isprs-potsdam',
'processed_uri': 's3://raster-vision-lf-dev/examples/cowc-potsdam/processed-data',
},
'rv_profile': 'pytorch',
},
{
'key': 'potsdam-semantic-segmentation-pytorch',
Expand All @@ -48,7 +49,8 @@
'remote': {
'raw_uri': 's3://raster-vision-raw-data/isprs-potsdam',
'processed_uri': 's3://raster-vision-lf-dev/examples/potsdam/processed-data',
}
},
'rv_profile': 'pytorch',
},
{
'key': 'potsdam-semantic-segmentation-tf',
Expand All @@ -75,6 +77,7 @@
'raw_uri': 's3://spacenet-dataset/',
'processed_uri': 's3://raster-vision-lf-dev/examples/spacenet/rio/processed-data',
},
'rv_profile': 'pytorch',
},
{
'key': 'spacenet-rio-chip-classification-tf',
Expand Down Expand Up @@ -102,7 +105,8 @@
'processed_uri': 's3://raster-vision-lf-dev/examples/spacenet/vegas/processed-data',
},
'extra_args': [['target', 'buildings'],
['task_type', 'semantic_segmentation']]
['task_type', 'semantic_segmentation']],
'rv_profile': 'pytorch',
},
{
'key': 'spacenet-vegas-roads-semantic-segmentation-pytorch',
Expand All @@ -116,7 +120,8 @@
'processed_uri': 's3://raster-vision-lf-dev/examples/spacenet/vegas/processed-data',
},
'extra_args': [['target', 'roads'],
['task_type', 'semantic_segmentation']]
['task_type', 'semantic_segmentation']],
'rv_profile': 'pytorch',
},
{
'key': 'xview-object-detection-tf',
Expand All @@ -140,7 +145,7 @@ def run_experiment(exp_cfg, root_uri, test=True, remote=False, commands=None):
rv_profile = exp_cfg.get('rv_profile')
if rv_profile is not None:
cmd += ['-p', rv_profile]
cmd += ['run', 'aws_batch' if remote else 'local', '-e', exp_cfg['module']]
cmd += ['run', 'aws_batch' if remote else 'inprocess', '-e', exp_cfg['module']]
cmd += ['-a', 'raw_uri', uris['raw_uri']]
if 'processed_uri' in uris:
cmd += ['-a', 'processed_uri', uris['processed_uri']]
Expand Down Expand Up @@ -250,4 +255,4 @@ def collect_eval_dir(root_uri):


if __name__ == '__main__':
test()
test()

0 comments on commit 1015aba

Please sign in to comment.