代码拉取完成,页面将自动刷新
同步操作将从 DeepSpark/DeepSparkHub 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
MobileSeg models adopt encoder-decoder architecture and use lightweight models as encoder. These semantic segmentation models are designed for mobile and edge devices.
git clone -b release/2.7 https://github.com/PaddlePaddle/PaddleSeg.git
cd PaddleSeg
pip3 install -r requirements.txt
pip3 install protobuf==3.20.3
pip3 install urllib3==1.26.6
yum install mesa-libGL
Go to visit Cityscapes official website, then choose 'Download' to download the Cityscapes dataset.
Specify /path/to/cityscapes
to your Cityscapes path in later training process, the unzipped dataset path structure sholud look like:
cityscapes/
├── gtFine
│ ├── test
│ ├── train
│ │ ├── aachen
│ │ └── bochum
│ └── val
│ ├── frankfurt
│ ├── lindau
│ └── munster
└── leftImg8bit
├── train
│ ├── aachen
│ └── bochum
└── val
├── frankfurt
├── lindau
└── munster
# Datasets preprocessing
pip3 install cityscapesscripts
python3 tools/data/convert_cityscapes.py --cityscapes_path /path/to/cityscapes --num_workers 8
python3 tools/data/create_dataset_list.py /path/to/cityscapes --type cityscapes --separator ","
# CityScapes PATH as follow:
ls -al /path/to/cityscapes
total 11567948
drwxr-xr-x 4 root root 227 Jul 18 03:32 .
drwxr-xr-x 6 root root 179 Jul 18 06:48 ..
-rw-r--r-- 1 root root 298 Feb 20 2016 README
drwxr-xr-x 5 root root 58 Jul 18 03:30 gtFine
-rw-r--r-- 1 root root 252567705 Jul 18 03:22 gtFine_trainvaltest.zip
drwxr-xr-x 5 root root 58 Jul 18 03:30 leftImg8bit
-rw-r--r-- 1 root root 11592327197 Jul 18 03:27 leftImg8bit_trainvaltest.zip
-rw-r--r-- 1 root root 1646 Feb 17 2016 license.txt
-rw-r--r-- 1 root root 193690 Jul 18 03:32 test.txt
-rw-r--r-- 1 root root 398780 Jul 18 03:32 train.txt
-rw-r--r-- 1 root root 65900 Jul 18 03:32 val.txt
# Change '/path/to/cityscapes' as your local Cityscapes dataset path
data_dir=/path/to/cityscapes
sed -i "s#: data/cityscapes#: ${data_dir}#g" configs/_base_/cityscapes.yml
export FLAGS_cudnn_exhaustive_search=True
export FLAGS_cudnn_batchnorm_spatial_persistent=True
# One GPU
CUDA_VISIBLE_DEVICES=0 python3 train.py --config configs/mobileseg/mobileseg_mobilenetv3_cityscapes_1024x512_80k.yml --do_eval --use_vdl
# Eight GPUs
python3 -u -m paddle.distributed.launch --gpus 0,1,2,3,4,5,6,7 train.py \
--config configs/mobileseg/mobileseg_mobilenetv3_cityscapes_1024x512_80k.yml \
--do_eval \
--use_vdl
Method | Crop Size | Lr schd | FPS (BI x 8) | mIOU |
---|---|---|---|---|
MobileSeg | 512x1024 | 80000 | 28.68 | 0.726 |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。