mmengine/examples/segmentation
Zaida Zhou 6b0d5a5f1d
[Docs] Add README for examples (#1295)
2023-08-07 22:53:57 +08:00
..
README.md [Docs] Add README for examples (#1295) 2023-08-07 22:53:57 +08:00
train.ipynb [Docs] Add README for examples (#1295) 2023-08-07 22:53:57 +08:00
train.py Add a segmentation example (#1282) 2023-08-03 15:27:58 +08:00

README.md

Train a Segmentation Model

Download Camvid Dataset

First, you should get the collated Camvid dataset on OpenDataLab to use for the segmentation training example. The official download steps are shown below.

# https://opendatalab.com/CamVid
# Configure install
pip install opendatalab
# Upgraded version
pip install -U opendatalab
# Login
odl login
# Download this dataset
mkdir data
odl get CamVid -d data
# Preprocess data in Linux. You should extract the files to data manually in
# Windows
tar -xzvf data/CamVid/raw/CamVid.tar.gz.00 -C ./data

Run the Example

Single device training

python examples/segmentation/train.py

Distributed data parallel training

tochrun -nnodes 1 -nproc_per_node 8 examples/segmentation/train.py --launcher pytorch