For semantic segmentation task on ADE20K, we use MMSegmentation implementations. First, make sure you have installed MIM, which is also a project of OpenMMLab.
pip install openmim
mim install mmsegmentation
Besides, please refer to MMSegmentation for installation and data preparation.
After installation, you can run MMSeg with simple command.
bash seg_mmsegmentation/mim_dist_train.sh ${CONFIG} ${PRETRAIN} ${GPUS}
Remarks:
CONFIG
: Use config files underconfigs/benchmarks/mmsegmentation/
or write your own config filesPRETRAIN
: the pre-trained model file (the backbone parameters only).${GPUS}
: The number of GPUs that you want to use to train. We adopt 4 GPUs for segmentation tasks by default.
After training, you can also run the command below to test your model.
bash seg_mmsegmentation/mim_dist_test.sh ${CONFIG} ${CHECKPOINT} ${GPUS}
Remarks:
${CHECKPOINT}
: The trained segmentation model that you want to test.