Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
deng c5288ba7c7 | 1 year ago | |
---|---|---|
PSPNet | 2 years ago | |
readme.md | 1 year ago |
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
.
PSPnet
Python C++ C Text Makefile other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》