Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
MengzhangLI committed Feb 13, 2022
2 parents 31f1ab6 + 0934a57 commit bc93c51
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions demo/MMSegmentation_Tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
"source": [
"## Train a semantic segmentation model on a new dataset\n",
"\n",
"To train on a customized dataset, the following steps are neccessary. \n",
"To train on a customized dataset, the following steps are necessary. \n",
"1. Add a new dataset class. \n",
"2. Create a config file accordingly. \n",
"3. Perform training and evaluation. "
Expand All @@ -228,11 +228,11 @@
"source": [
"### Add a new dataset\n",
"\n",
"Datasets in MMSegmentation require image and semantic segmentation maps to be placed in folders with the same perfix. To support a new dataset, we may need to modify the original file structure. \n",
"Datasets in MMSegmentation require image and semantic segmentation maps to be placed in folders with the same prefix. To support a new dataset, we may need to modify the original file structure. \n",
"\n",
"In this tutorial, we give an example of converting the dataset. You may refer to [docs](https://github.com/open-mmlab/mmsegmentation/docs/en/tutorials/new_dataset.md) for details about dataset reorganization. \n",
"\n",
"We use [Standord Background Dataset](http://dags.stanford.edu/projects/scenedataset.html) as an example. The dataset contains 715 images chosen from existing public datasets [LabelMe](http://labelme.csail.mit.edu), [MSRC](http://research.microsoft.com/en-us/projects/objectclassrecognition), [PASCAL VOC](http://pascallin.ecs.soton.ac.uk/challenges/VOC) and [Geometric Context](http://www.cs.illinois.edu/homes/dhoiem/). Images from these datasets are mainly outdoor scenes, each containing approximately 320-by-240 pixels. \n",
"We use [Stanford Background Dataset](http://dags.stanford.edu/projects/scenedataset.html) as an example. The dataset contains 715 images chosen from existing public datasets [LabelMe](http://labelme.csail.mit.edu), [MSRC](http://research.microsoft.com/en-us/projects/objectclassrecognition), [PASCAL VOC](http://pascallin.ecs.soton.ac.uk/challenges/VOC) and [Geometric Context](http://www.cs.illinois.edu/homes/dhoiem/). Images from these datasets are mainly outdoor scenes, each containing approximately 320-by-240 pixels. \n",
"In this tutorial, we use the region annotations as labels. There are 8 classes in total, i.e. sky, tree, road, grass, water, building, mountain, and foreground object. "
]
},
Expand All @@ -249,8 +249,8 @@
"outputs": [],
"source": [
"# download and unzip\n",
"!wget http://dags.stanford.edu/data/iccv09Data.tar.gz -O standford_background.tar.gz\n",
"!tar xf standford_background.tar.gz"
"!wget http://dags.stanford.edu/data/iccv09Data.tar.gz -O stanford_background.tar.gz\n",
"!tar xf stanford_background.tar.gz"
]
},
{
Expand Down Expand Up @@ -423,7 +423,7 @@
"id": "1y2oV5w97jQo"
},
"source": [
"Since the given config is used to train PSPNet on cityscapes dataset, we need to modify it accordingly for our new dataset. "
"Since the given config is used to train PSPNet on the cityscapes dataset, we need to modify it accordingly for our new dataset. "
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions tools/convert_datasets/potsdam.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def main():
zipp_list = glob.glob(os.path.join(dataset_path, '*.zip'))
print('Find the data', zipp_list)

with tempfile.TemporaryDirectory(dir=args.tmp_dir) as tmp_dir:
for zipp in zipp_list:
for zipp in zipp_list:
with tempfile.TemporaryDirectory(dir=args.tmp_dir) as tmp_dir:
zip_file = zipfile.ZipFile(zipp)
zip_file.extractall(tmp_dir)
src_path_list = glob.glob(os.path.join(tmp_dir, '*.tif'))
Expand Down

0 comments on commit bc93c51

Please sign in to comment.