Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PyTorch implementation of DeepLabv3

License

NotificationsYou must be signed in to change notification settings

chenxi116/DeepLabv3.pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a PyTorch implementation ofDeepLabv3 that aims to reuse theresnet implementation in torchvision as much as possible. This means we use thePyTorch model checkpoint when finetuning from ImageNet, instead ofthe one provided in TensorFlow.

We try to match every detail in DeepLabv3, except that Multi-Grid other than (1, 1, 1) is not yet supported. On PASCAL VOC 2012 validation set, using the same hyperparameters, we reproduce the performance reported in the paper (GPU with 16GB memory is required). We also support the combination of Group Normalization + Weight Standardization:

ImplementationNormalizationMulti-GridASPPImage PoolingmIOU
PaperBN(1, 2, 4)(6, 12, 18)Yes77.21
OursBN(1, 1, 1)(6, 12, 18)Yes76.49
OursGN+WS(1, 1, 1)(6, 12, 18)Yes77.20

To run the BN experiment, after preparing the dataset as follows, simply run:

python main.py --train --exp bn_lr7e-3 --epochs 50 --base_lr 0.007

To test the trained model, use the same command except delete--train. To use our trained model (76.49):

wget https://cs.jhu.edu/~cxliu/data/deeplab_resnet101_pascal_v3_bn_lr7e-3_epoch50.pth -P data/

To run the GN+WS experiment, begin by downloading the GN+WS ResNet101 trained on ImageNet:

wget https://cs.jhu.edu/~syqiao/WeightStandardization/R-101-GN-WS.pth.tar -P data/python main.py --train --exp gn_ws_lr7e-3 --epochs 50 --base_lr 0.007 --groups 32 --weight_std

Again, to test the trained model, use the same command except delete--train. To use our trained model (77.20):

wget https://cs.jhu.edu/~cxliu/data/deeplab_resnet101_pascal_v3_gn_ws_lr7e-3_epoch50.pth -P data/

Prepare PASCAL VOC 2012 Dataset

mkdir datacd datawget http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tartar -xf VOCtrainval_11-May-2012.tarcd VOCdevkit/VOC2012/wget http://cs.jhu.edu/~cxliu/data/SegmentationClassAug.zipwget http://cs.jhu.edu/~cxliu/data/SegmentationClassAug_Visualization.zipwget http://cs.jhu.edu/~cxliu/data/list.zipunzip SegmentationClassAug.zipunzip SegmentationClassAug_Visualization.zipunzip list.zip

Prepare Cityscapes Dataset

unzip leftImg8bit_trainvaltest.zipunzip gtFine_trainvaltest.zipgit clone https://github.com/mcordts/cityscapesScripts.gitmv cityscapesScripts/cityscapesscripts ./rm -rf cityscapesScriptspython cityscapesscripts/preparation/createTrainIdLabelImgs.py

About

PyTorch implementation of DeepLabv3

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp