Skip to content

Commit 1015aba

Browse files
authored
Merge pull request #76 from azavea/lf/0.11
Release v0.11
2 parents a04d588 + ac50be1 commit 1015aba

File tree

5 files changed

+25
-19
lines changed

5 files changed

+25
-19
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ This repository contains examples of using Raster Vision on open datasets.
44

55
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)
66
which contains the latest changes. For versions of this examples repo that correspond to stable, released versions of Raster Vision, see:
7+
* [0.11](https://github.com/azavea/raster-vision-examples/tree/0.11)
78
* [0.10](https://github.com/azavea/raster-vision-examples/tree/0.10)
89
* [0.9](https://github.com/azavea/raster-vision-examples/tree/0.9)
910

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

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

116117
#### Step 2: Run the Jupyter Notebook

docker/build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ then
2626
then
2727
if [ -z "$RASTER_VISION_REPO" ]
2828
then
29-
BASE_IMAGE="quay.io/azavea/raster-vision:tf-cpu-latest"
29+
BASE_IMAGE="quay.io/azavea/raster-vision:tf-cpu-0.11"
3030
else
3131
BASE_IMAGE="raster-vision-tf-cpu"
3232
fi
3333
docker build --build-arg BASE_IMAGE="$BASE_IMAGE" -t raster-vision-examples-tf-cpu -f Dockerfile .
3434

3535
if [ -z "$RASTER_VISION_REPO" ]
3636
then
37-
BASE_IMAGE="quay.io/azavea/raster-vision:tf-gpu-latest"
37+
BASE_IMAGE="quay.io/azavea/raster-vision:tf-gpu-0.11"
3838
else
3939
BASE_IMAGE="raster-vision-tf-gpu"
4040
fi
@@ -45,7 +45,7 @@ then
4545
then
4646
if [ -z "$RASTER_VISION_REPO" ]
4747
then
48-
BASE_IMAGE="quay.io/azavea/raster-vision:pytorch-latest"
48+
BASE_IMAGE="quay.io/azavea/raster-vision:pytorch-0.11"
4949
else
5050
BASE_IMAGE="raster-vision-pytorch"
5151
fi

examples/spacenet/vegas/all.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ def get_class_id_to_filter(self):
7474

7575
class VegasBuildings(SpacenetConfig):
7676
def __init__(self, raw_uri):
77-
self.base_dir = 'SpaceNet_Buildings_Dataset_Round2/spacenetV2_Train/AOI_2_Vegas'
78-
self.raster_dir = 'RGB-PanSharpen/'
79-
self.label_dir = 'geojson/buildings/'
80-
self.raster_fn_prefix = 'RGB-PanSharpen_AOI_2_Vegas_img'
81-
self.label_fn_prefix = 'buildings_AOI_2_Vegas_img'
77+
self.base_dir = 'spacenet/SN2_buildings/train/AOI_2_Vegas'
78+
self.raster_dir = 'PS-RGB'
79+
self.label_dir = 'geojson_buildings'
80+
self.raster_fn_prefix = 'SN2_buildings_train_AOI_2_Vegas_PS-RGB_img'
81+
self.label_fn_prefix = 'SN2_buildings_train_AOI_2_Vegas_geojson_buildings_img'
8282
super().__init__(raw_uri)
8383

8484
def get_class_map(self):

examples/spacenet/vegas/simple_segmentation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ def exp_main(self, raw_uri, root_uri, test=False):
3030
"""
3131
# Specify the location of the raw data
3232
base_uri = join(
33-
raw_uri, 'SpaceNet_Buildings_Dataset_Round2/spacenetV2_Train/AOI_2_Vegas')
33+
raw_uri, 'spacenet/SN2_buildings/train/AOI_2_Vegas')
3434
# The images and labels are in two separate directories within the base_uri
35-
raster_uri = join(base_uri, 'RGB-PanSharpen')
36-
label_uri = join(base_uri, 'geojson/buildings')
35+
raster_uri = join(base_uri, 'PS-RGB')
36+
label_uri = join(base_uri, 'geojson_buildings')
3737
# The tiff (raster) and geojson (label) files have have a naming convention of
3838
# '[prefix]_[image id].geojson.' The prefix indicates the type of data and the
3939
# image id indicates which scene each is associated with.
40-
raster_fn_prefix = 'RGB-PanSharpen_AOI_2_Vegas_img'
41-
label_fn_prefix = 'buildings_AOI_2_Vegas_img'
40+
raster_fn_prefix = 'SN2_buildings_train_AOI_2_Vegas_PS-RGB_img'
41+
label_fn_prefix = 'SN2_buildings_train_AOI_2_Vegas_geojson_buildings_img'
4242
# Find all of the image ids that have associated images and labels. Collect
4343
# these values to use as our scene ids.
4444
label_paths = list_paths(label_uri, ext='.geojson')

examples/test.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
'raw_uri': 's3://raster-vision-raw-data/isprs-potsdam',
3838
'processed_uri': 's3://raster-vision-lf-dev/examples/cowc-potsdam/processed-data',
3939
},
40+
'rv_profile': 'pytorch',
4041
},
4142
{
4243
'key': 'potsdam-semantic-segmentation-pytorch',
@@ -48,7 +49,8 @@
4849
'remote': {
4950
'raw_uri': 's3://raster-vision-raw-data/isprs-potsdam',
5051
'processed_uri': 's3://raster-vision-lf-dev/examples/potsdam/processed-data',
51-
}
52+
},
53+
'rv_profile': 'pytorch',
5254
},
5355
{
5456
'key': 'potsdam-semantic-segmentation-tf',
@@ -75,6 +77,7 @@
7577
'raw_uri': 's3://spacenet-dataset/',
7678
'processed_uri': 's3://raster-vision-lf-dev/examples/spacenet/rio/processed-data',
7779
},
80+
'rv_profile': 'pytorch',
7881
},
7982
{
8083
'key': 'spacenet-rio-chip-classification-tf',
@@ -102,7 +105,8 @@
102105
'processed_uri': 's3://raster-vision-lf-dev/examples/spacenet/vegas/processed-data',
103106
},
104107
'extra_args': [['target', 'buildings'],
105-
['task_type', 'semantic_segmentation']]
108+
['task_type', 'semantic_segmentation']],
109+
'rv_profile': 'pytorch',
106110
},
107111
{
108112
'key': 'spacenet-vegas-roads-semantic-segmentation-pytorch',
@@ -116,7 +120,8 @@
116120
'processed_uri': 's3://raster-vision-lf-dev/examples/spacenet/vegas/processed-data',
117121
},
118122
'extra_args': [['target', 'roads'],
119-
['task_type', 'semantic_segmentation']]
123+
['task_type', 'semantic_segmentation']],
124+
'rv_profile': 'pytorch',
120125
},
121126
{
122127
'key': 'xview-object-detection-tf',
@@ -140,7 +145,7 @@ def run_experiment(exp_cfg, root_uri, test=True, remote=False, commands=None):
140145
rv_profile = exp_cfg.get('rv_profile')
141146
if rv_profile is not None:
142147
cmd += ['-p', rv_profile]
143-
cmd += ['run', 'aws_batch' if remote else 'local', '-e', exp_cfg['module']]
148+
cmd += ['run', 'aws_batch' if remote else 'inprocess', '-e', exp_cfg['module']]
144149
cmd += ['-a', 'raw_uri', uris['raw_uri']]
145150
if 'processed_uri' in uris:
146151
cmd += ['-a', 'processed_uri', uris['processed_uri']]
@@ -250,4 +255,4 @@ def collect_eval_dir(root_uri):
250255

251256

252257
if __name__ == '__main__':
253-
test()
258+
test()

0 commit comments

Comments
 (0)