Skip to content

This repository is for MORAI dataset training in semantic segmentation with HRNet + OCR

License

Notifications You must be signed in to change notification settings

cbnuirl/cbnu_mmsegmentation

Repository files navigation

Semantic Segmentation with HRNet + OCR on MORAI dataset

This repository is based on HRNet + OCR and mmsegmentation. All configurations and codes were revised for MORAI dataset.

Results and Models

HRNet + OCR

Class accuracy is IoU(Intersection over Union).

Dataset Iter vehicle bus truck freespace roadMark whiteLane yellowLane trafficSign fence background config log model
Real 160k 93.29 89.92 87.72 94.94 61.22 87.81 79.86 66.3 91.08 97.85 config log model
Daegu 160k 93.16 71.36 87.35 98.03 82.69 83.64 84.3 71.6 83.87 99.58 config log model
Sejong BRT 1 160k 55.83 75.51 53.52 98.67 66.46 82.2 63.77 72.14 X 99.83 config log model
Sangam Edge 160k 84.57 0.0 0.0 97.77 82.93 79.45 84.59 91.56 92.47 99.03 config log model
Sejong BRT 1 Edge 160k 53.91 0.0 0.0 98.4 X 92.01 35.98 0.0 X 99.56 config log model

Some of the classes not included in data or in small amounts.

Real:

image

Daegu:

image

Sejong BRT 1:

image

Sangam Edge:

image

Sejong BRT 1 Edge:

image

Mixed Models(10% real + 90% synthetic)

Dataset Iter vehicle bus truck freespace roadMark whiteLane yellowLane trafficSign fence background config log model
Daegu 160k 89.72 67.8 64.09 95.72 40.56 83.04 75.65 41.92 63.48 97.16 config log model
Sejong BRT 1 160k 86.25 77.94 62.12 95.82 49.5 82.73 74.57 37.21 67.79 97.68 config log model
Sangam Edge 160k 89.55 68.71 65.34 95.9 49.17 84.86 73.56 38.53 80.18 97.96 config log model
Sejong BRT 1 Edge 160k 84.95 68.66 20.02 94.88 0.94 82.81 72.19 0.0 49.82 94.42 config log model

Some of the classes not included in data or in small amounts.

Daegu:

image

Sejong BRT 1:

image

Sangam Edge:

image

Sejong BRT 1 Edge:

image

Usage

Installation

Please refer to install.md for installation, dataset preparation and making configuration file.

Testing, Demo

NOTE: Change mmseg/datasets/custom.py if original image format is in .jpg

…
def __init__(self,
                 pipeline,
                 img_dir,
                 # img_suffix='_leftImg8bit.png',
                 img_suffix='.png', -> Modify into ‘.jpg’
…
# single-gpu testing
python tools/test.py {CONFIG_FILE} {MODEL_FILE} --eval mIoU \
(--show-dir {LOCATION})

# multi-gpu testing
(CUDA_VISIBLE_DEVICES={GPU_NUM}) \
tools/dist_test.sh {CONFIG_FILE} {MODEL_FILE} {TOTAL_NUM_OF_GPU} --eval mIoU \
(--show-dir {LOCATION})

--show-dir saves pictures of result. You can use --show in GUI environment.

CUDA_VISIBLE_DEVICES can define which GPUs will be used. If not defined, they are used sequentially.

Example:

python tools/test.py \
configs/ocrnet/ocrnet_hr48_512x1024_160k_morai_daegu.py \
checkpoints/ocrnet_hr48_512x1024_160k_morai_daegu.pth \
--eval mIoU --show-dir result.mIoU.daegu/

CUDA_VISIBLE_DEVICES=0,1,3 tools/dist_test.sh \
configs/ocrnet/ocrnet_hr48_512x1024_160k_morai_daegu.py \
checkpoints/ocrnet_hr48_512x1024_160k_morai_daegu.pth 3 \
--eval mIoU --show-dir result.mIoU.daegu/

Training

# single-gpu training
python tools/train.py {CONFIG_FILE}

# multi-gpu training
(CUDA_VISIBLE_DEVICES={GPU_NUM}) tools/dist_train.sh {CONFIG_FILE} {TOTAL_NUM_OF_GPU}

Example:

python tools/train.py configs/ocrnet/ocrnet_hr48_512x1024_160k_morai_daegu.py

CUDA_VISIBLE_DEVICES=0,1,3 tools/dist_train.sh \
configs/ocrnet/ocrnet_hr48_512x1024_160k_morai_daegu.py 3

About

This repository is for MORAI dataset training in semantic segmentation with HRNet + OCR

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages