mmengine/examples/segmentation/README.md

36 lines
796 B
Markdown
Raw Normal View History

2023-08-03 15:27:58 +08:00
# 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.
```bash
# 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
```
2023-08-07 22:53:57 +08:00
## Run the Example
2023-08-03 15:27:58 +08:00
Single device training
```bash
2023-08-07 22:53:57 +08:00
python examples/segmentation/train.py
2023-08-03 15:27:58 +08:00
```
Distributed data parallel training
```bash
2023-08-07 22:53:57 +08:00
tochrun -nnodes 1 -nproc_per_node 8 examples/segmentation/train.py --launcher pytorch
2023-08-03 15:27:58 +08:00
```