This is the unofficial code of Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation of Road Scenes. the origin official is the official repository, and I borrowed most of the code from DDRNet.Pytorchthanks for their work.
- Input 512*512;
- Change DAPPM module ;
- Data augmentation: random_brightness,random_RotateAndCrop, random_hue, random_saturation, random_contrast ...
- Train on face segmentation datasetSemantic_Human_Matting
You need to download the Semantic_Human_Mattingdatasets. and rename the folder face
, then put the data under data
folder.
└── data
├── face
|————train_images
|————train_labels
|————val_images
|————val_labels
└── list
download the pretrained model on imagenet or the segmentation model from the official,and put the files in ${PROJECT}/pretrained_models
folder
download the imagenet pretrained model, and then train the model with 2 nvidia-3080
python tools/train_single.py --cfg experiments/face/ddrnet23_slim.yaml
The only change is to write your own dataset, you can reference to ‘./lib/datasets’
follow TorchMobile,test with S855+ and take about 150 ms per image.
https://github.com/midasklr/DDRNet.TensorRT
Test on RTX2070
model | input | FPS |
---|---|---|
Pytorch-aug | (3,1024,1024) | 107 |
Pytorch-no-aug | (3,1024,1024) | 108 |
TensorRT-FP32 | (3,1024,1024) | 117 |
TensorRT-FP16 | (3,1024,1024) | 215 |
TensorRT-FP16 | (3,512,512) | 334 |
Pytorch-aug means augment=True.
[1] DDRNet