Skip to content

advaghasiya/hamburg_seg

Repository files navigation

Data preparation

Since some datasets don't allow to redistribute them, You need to get prepared the zip files. Please check mmsegmentation/dataset_prepare to get zip files.

After that, please run the following commands to prepare for datasets(Hamburg)

Hamburg

Download the original images from METAVER and GIS data from METAVER. Put your dataset source file in one directory.

python tools/convert_datasets/hamburg.py /path/to/hamburg

Get Started

i use python 3.7``mmcv-full=="1.7.1 and mmsegmentation==0.30.0 and device Nvidia DGX server which has 4 of Tesla V100-DGXS-32GB. Please follow the other dependencies to mmsegmentation.

Environment Setup

STEP 1. Run and install mmsegmentation by the following code.

For more information, refer to mmsegmentaiton/get_started.

pip install -U openmim && mim install mmcv-full=="1.7.1"
pip install mmsegmentation==0.30.0

STEP 2. Clone this repository and install.

git clone https://github.com/advaghasiya/hamburg_seg.git
cd hamburg_seg
pip install -v -e .
Training
  • Single GPU
python tools/train.py configs/path/to/config

For example, to train ham_seg-T on Hamburg dataset:

python tools/train.py configs/ham_seg/ham_seg_tiny_512x512_hamburg.py
  • Multi GPUs
bash tools/dist_train.sh configs/path/to/config num_gpus

For example, to train ham_seg-B on hamburg dataset on two gpus:

bash tools/dist_train.sh configs/ham_seg/ham_seg_base_512x512_hamburg.py 4

Note batch size matters. We're using 8 batch sizes.

Evaluation
  • Single GPU
python tools/test.py configs/path/to/config work_dirs/path/to/checkpoint --eval metrics

For example , to test ham_seg-T on hamburg dataset

python tools/test.py work_dirs/ham_seg_tiny_512x512_hamburg/date/ham_seg_tiny_512x512_hamburg.py work_dirs/ham_seg_tiny_512x512_hamburg/date/latest.pth --eval mIoU
  • Multi GPUs
bash tools/dist_test.py configs/path/to/config work_dirs/path/to/checkpoint num_gpus --eval metrics

For example , to test ham_seg-T on hamburg dataset

bash tools/dist_test.py work_dirs/ham_seg_tiny_512x512_hamburg/date/ham_seg_tiny_512x512_hamburg.py work_dirs/ham_seg_tiny_512x512_hamburg/date/latest.pth 4 --eval mIoU

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published