- amodal road segmentation using amodal datasets
- code modified based on DANet
-
Install pytorch
- The code is tested on python3.6 and torch 1.4.0.
- The code is modified from DANet.
-
Clone the resposity
git clone https://github.com/coolgrasshopper/amodal_road_segmentation.git cd amodal_road_segmentation
-
Key files related to training and model construction:
experiments/segmentation/encoding/nn/loss.py
: define the cross entropy loss that is used for trainingexperiments/segmentation/encoding/model/sseg/danet.py
: define the proposed model architectureexperiments/segmentation/encoding/nn/da_att.py
: the Positional Attention module (PAM) and the Channel Attention Moduleexperiments/segmentation/train.py
: training codeexperiments/segmentation/test.py
: testing codeoverlay.py
: evaluation code of far and close IOU
- training:
cd experiments/segmentation
CUDA_VISIBLE_DEVICES=0,1 python3 train.py --model danet --backbone resnet50 --checkname danet50 --base-size 1024 --crop-size 768 --epochs 240 --batch-size 8 --lr 0.003 --workers 16
- testing:
cd experiments/segmentation
CUDA_VISIBLE_DEVICES=0 python3 test.py --model danet --backbone resnet50 --base-size 1024 --crop-size 768 --batch-size 8 --workers 16
- update evaluation code to the repo