你确认删除该任务么?此任务一旦删除不可恢复。
deng c5288ba7c7 | 1年前 | |
---|---|---|
PSPNet | 2 年前 | |
readme.md | 1年前 |
PSPNet(Pyramid Scene Parsing Network) has great capability of global context information by different-region based context aggregation through the pyramid pooling module together.
paper from CVPR2017
The pyramid pooling module fuses features under four different pyramid scales.For maintaining a reasonable gap in representation,the module is a four-level one with bin sizes of 1×1, 2×2, 3×3 and 6×6 respectively.
.
└─PSPNet
├── eval.py # Evaluation python file for ADE20K/VOC2012
├── export.py # export mindir
├── README.md # descriptions about PSPnet
├── src # PSPNet
│ ├── config # the training config file
│ │ ├── ade20k_pspnet50.yaml
│ │ └── voc2012_pspnet50.yaml
│ ├── dataset # data processing
│ │ ├── dataset.py
│ │ └── transform.py
│ ├── model # models for training and test
│ │ ├── PSPNet.py
│ │ ├── resnet.py
│ │ └── cell.py # loss function
│ └── utils
│ ├── functions_args.py # test helper
│ ├── lr.py # learning rate
│ ├── metric_and_evalcallback.py # evalcallback
│ ├── aux_loss.py # loss function helper
│ └── p_util.py # some functions
│
├── scripts
│ ├── run_distribute_train_ascend.sh # multi cards distributed training in ascend
│ ├── run_train1p_ascend.sh # multi cards distributed training in ascend
│ └── run_eval.sh # validation script
└── train.py # The training python file for ADE20K/VOC2012
Set script parameters in src/config/ade20k_pspnet50.yaml and src/config/voc2012_pspnet50.yaml
name: "PSPNet"
backbone: "resnet50_v2"
base_size: 512 # based size for scaling
crop_size: 473
init_lr: 0.005
momentum: 0.9
weight_decay: 0.0001
batch_size: 8 # batch size for training
batch_size_val: 8 # batch size for validation during training
ade_root: "./data/ADE/" # set dataset path
voc_root: "./data/voc/voc"
epochs: 100/50 # ade/voc2012
pretrained_model_path: "./data/resnet_deepbase.ckpt"
save_checkpoint_epochs: 10
keep_checkpoint_max: 10
bash scripts/run_train1p_ascend.sh [YAML_PATH] [DEVICE_ID]
bash scripts/run_distribute_train_ascend.sh [RANK_TABLE_FILE] [YAML_PATH]
The training results will be saved in the PSPNet path, you can view the log in the ./LOG/log.txt
# training result(1p)-voc2012
epoch: 1 step: 1063, loss is 0.62588865
epoch time: 493974.632 ms, per step time: 464.699 ms
epoch: 2 step: 1063, loss is 0.68774235
epoch time: 428786.495 ms, per step time: 403.374 ms
epoch: 3 step: 1063, loss is 0.4055968
epoch time: 428773.945 ms, per step time: 403.362 ms
epoch: 4 step: 1063, loss is 0.7540638
epoch time: 428783.473 ms, per step time: 403.371 ms
epoch: 5 step: 1063, loss is 0.49349666
epoch time: 428776.845 ms, per step time: 403.365 ms
Check the checkpoint path in config/ade20k_pspnet50.yaml and config/voc2012_pspnet50.yaml used for evaluation before running the following command.
bash run_eval.sh [YAML_PATH] [DEVICE_ID]
The results at eval/log were as follows:
ADE20K:mIoU/mAcc/allAcc 0.4164/0.5319/0.7996.
VOC2012:mIoU/mAcc/allAcc 0.7380/0.8229/0.9293.
Parameter | PSPNet |
---|---|
resources | Ascend 910;CPU 2.60GHz, 192core;memory:755G |
Upload date | 2021.11.13 |
mindspore version | mindspore1.3.0 |
training parameter | epoch=100,batch_size=8 |
optimizer | SGD optimizer,momentum=0.9,weight_decay=0.0001 |
loss function | SoftmaxCrossEntropyLoss |
training speed | epoch time: 493974.632 ms, per step time: 464.699 ms(1p for voc2012) |
total time | 6h10m34s(1pcs) |
Random number seed | set_seed = 1234 |
The random seed in train.py
.
尊敬的启智用户
感谢您一直以来对Openl启智社区AI协作平台的支持。为了保障您的使用权益和确保网络安全,我们于2024年1月份更新了《Openl启智社区AI协作平台使用协议》。更新后的协议明确了用户禁止使用内网穿透工具的条例。您单击“同意并继续”后,便可以继续使用我们的服务。感谢您的合作与理解。
更多协议内容,请参考《Openl启智社区AI协作平台使用协议》