HenonBamboo 9748e7d265 | 9 months ago | |
---|---|---|
convert | 1 year ago | |
inference | 1 year ago | |
src | 1 year ago | |
.gitignore | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 1 year ago | |
eval.py | 1 year ago | |
moxing_adapter.py | 1 year ago | |
train.py | 9 months ago |
PSPNet(Pyramid Scene Parsing Network,金字塔场景解析网络)通过金字塔池模块将不同区域的上下文聚合在一起,具有强大的全局上下文信息能力。
paper from CVPR2017
金字塔池模块融合了四种不同金字塔尺度下的特征。为了保持合理的表示间隙,该模块是一个四级模块,bin大小分别为1×1、2×2、3×3和6×6。
SBD是VOC2011和VOC2012的一个增强版本,但是他们之间的兼容性还存在一些问题:
(1) VOC2012 train set中有331张image,不包含在 SBD train set中。这导致了,无论 VOC2012 还是 SBD 的 train set 都不是最强的。
(2) VOC2012 val set中有545张image,包含在 SBD train set中。这导致了,使用SBD train set作为训练集、VOC2012作为验证集时,只能使用VOC2012的subval set。
考虑到以上两点不足,PASCAL VOC 2012 Augment(VOC2012AUG)就诞生了。 + 针对问题(2),VOC2012AUG 的 val set 就等于 VOC2012 的 val set + 针对问题(1),VOC2012AUG 的 train set 聚合了 VOC2012 train set(a)、SBD train set(b) 和 SBD val set(c),并扣除了 b与a重复的部分、c与a重复的部分、b与VOC2012 val set重复的部分、c与VOC2012 val set重复的部分。
数据集构成:
PASCAL VOC2012AUG 的构成如下:
train:10582
val:1449
train+val:12031
.
└─PSPNet
├── convert # convert
├── inference # inference
├── eval.py # Evaluation python file for /VOC2012AUG
├── README.md # descriptions about PSPNet
├── config # the training config file
│ ├── ade20k_pspnet50.yaml
│ └── voc2012_pspnet50.yaml
├── src # PSPNet
│ ├── dataset # data processing
│ │ ├── pt_dataset.py
│ │ └── pt_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
└── train.py # The training python file for ADE20K/VOC2012-SBD
name: "PSPNet"
backbone: "resnet50_v2"
base_size: 512 # based size for scaling
crop_size: 473
init_lr: 0.01
momentum: 0.9
weight_decay: 0.0001
batch_size: 16 # batch size for training
batch_size_val: 16 # batch size for validation during training
epochs: 50
python train.py
# training result(1p)-VOC2012AUG
Train epoch time: 215749.452 ms, per step time: 1307.572 ms
Train epoch time: 217972.430 ms, per step time: 1321.045 ms
Train epoch time: 213208.878 ms, per step time: 1292.175 ms
Train epoch time: 218587.545 ms, per step time: 1324.773 ms
Epoch: 49, val_loss: 0.31603706
Epoch: 49, val_loss: 0.242274
Epoch: 49, val_loss: 0.21327616
Epoch: 49, val_loss: 0.25860044
=== epoch: 49, device id: 3, best miou: 0.6963, miou: 0.6825
=== epoch: 49, device id: 0, best miou: 0.6969, miou: 0.6932
=== epoch: 49, device id: 2, best miou: 0.6761, miou: 0.6761
=== epoch: 49, device id: 1, best miou: 0.7048, miou: 0.6969
Train epoch time: 213211.140 ms, per step time: 1292.189 ms
Train epoch time: 213662.691 ms, per step time: 1294.925 ms
Train epoch time: 214910.849 ms, per step time: 1302.490 ms
Train epoch time: 218207.310 ms, per step time: 1322.469 ms
Epoch: 50, val_loss: 0.31445614
Epoch: 50, val_loss: 0.21240959
Epoch: 50, val_loss: 0.24067509
Epoch: 50, val_loss: 0.2589045
=== epoch: 50, device id: 2, best miou: 0.6772, miou: 0.6772
=== epoch: 50, device id: 1, best miou: 0.7048, miou: 0.6990
=== epoch: 50, device id: 3, best miou: 0.6963, miou: 0.6842
=== epoch: 50, device id: 0, best miou: 0.6969, miou: 0.6930
python eval.py
VOC2012-AUG-ss:mIoU/mAcc/allAcc 0.6929/0.8305/0.9232.
Parameter | PSPNet |
---|---|
resources | Ascend 910;CPU 2.60GHz, 192core;memory:755G |
Upload date | 2023.05.15 |
mindspore version | mindspore2.0.0 |
training parameter | epoch=50,batch_size=16 |
optimizer | SGD optimizer,momentum=0.9,weight_decay=0.0001 |
loss function | SoftmaxCrossEntropyLoss |
Blog URL | https://zhuanlan.zhihu.com/p/628391472 |
Random number seed | set_seed = id |
No Description
Python Text
Apache-2.0
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》