Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
dudu 7deee965a5 | 1 year ago | |
---|---|---|
benchmark | 2 years ago | |
configs | 2 years ago | |
deploy | 2 years ago | |
docs | 2 years ago | |
images | 2 years ago | |
log | 2 years ago | |
paddleseg | 2 years ago | |
slim | 2 years ago | |
test_tipc | 2 years ago | |
tests | 2 years ago | |
tools | 2 years ago | |
.copyright.hook | 2 years ago | |
.pre-commit-config.yaml | 2 years ago | |
.style.yapf | 2 years ago | |
.travis.yml | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 1 year ago | |
export.py | 2 years ago | |
predict.py | 2 years ago | |
requirements.txt | 2 years ago | |
setup.py | 2 years ago | |
train.py | 2 years ago | |
val.py | 2 years ago |
本项目基于paddlepaddle框架复现了PSANet语义分割模型,PSANet设计了PSA(point-wise spatial attention)模块,该模块使得特征图的特征向量相互交互信息,丰富了语义信息的提取,更好的提升了模型性能。PSANet原论文的miou为77.24%,本次复现的精度为79.94%
,超出原论文精度2.7%
。
本项目使用PaddlePaddle实现了自定义C++算子psamask,该算子代码存放目录为paddleseg/models/ops。
论文:
项目参考:
在CityScapes val数据集的测试效果如下表。
NetWork | steps | opt | image_size | batch_size | dataset | memory | card | mIou | config | weight | log |
---|---|---|---|---|---|---|---|---|---|---|---|
PSANet | 80K | SGD | 1024x512 | 8 | CityScapes | 32G | 1 | 79.94% | psanet_resnet50_os8_cityscapes_1024x512_80k.yml | weight 提取码:2fbf | log |
硬件: Tesla V100 * 1
框架:
# clone this repo
git clone https://openi.pcl.ac.cn/dudu/PSANet_paddle.git
cd PSANet_paddle
安装第三方库
pip install -r requirements.txt
单卡训练:
python train.py --config configs\psanet\psanet_resnet50_os8_cityscapes_1024x512_80k.yml --do_eval --use_vdl --log_iter 100 --save_interval 4000 --save_dir output
多卡训练(psamask自定义算子多卡编译可能有问题,不推荐):
python -m paddle.distributed.launch train.py --config configs\psanet\psanet_resnet50_os8_cityscapes_1024x512_80k.yml --do_eval --use_vdl --log_iter 100 --save_interval 1000 --save_dir output
权重文件在上方的表格中,先下载权重。
python val.py --config configs\psanet\psanet_resnet50_os8_cityscapes_1024x512_80k.yml --model_path {your_model_path}
进入PSANet_paddle文件夹,首先准备轻量级训练数据集,命令如下(会下载完整的cityscapes数据集):
bash test_tipc/prepare.sh ./test_tipc/configs/psanet/train_infer_python.txt 'lite_train_lite_infer'
接着运行训练推理一体化测试脚本:
bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/psanet/train_infer_python.txt 'lite_train_lite_infer'
代码结构
├─benchmark
├─configs
├─deploy
├─images
├─configs
├─slim
├─images
├─output
├─paddleseg
├─test_tipc
│ export.py
│ predict.py
│ README.md
│ README_CN.md
│ requirements.txt
│ setup.py
│ train.py
│ val.py
说明
1、本项目在Aistudio平台,使用Tesla V100 * 1 训练80K miou达到79.94%。
2、本项目基于PaddleSeg开发。
相关信息:
信息 | 描述 |
---|---|
作者 | 郎督 |
日期 | 2022年4月 |
框架版本 | PaddlePaddle==2.2.2 |
应用场景 | 语义分割 |
硬件支持 | GPU、CPU |
@misc{semseg2019,
author={Zhao, Hengshuang},
title={semseg},
howpublished={\url{https://github.com/hszhao/semseg}},
year={2019}
}
@inproceedings{zhao2017pspnet,
title={Pyramid Scene Parsing Network},
author={Zhao, Hengshuang and Shi, Jianping and Qi, Xiaojuan and Wang, Xiaogang and Jia, Jiaya},
booktitle={CVPR},
year={2017}
}
@inproceedings{zhao2018psanet,
title={{PSANet}: Point-wise Spatial Attention Network for Scene Parsing},
author={Zhao, Hengshuang and Zhang, Yi and Liu, Shu and Shi, Jianping and Loy, Chen Change and Lin, Dahua and Jia, Jiaya},
booktitle={ECCV},
year={2018}
}
使用PaddlePaddle复现PSANet
Python Text Shell Java Markdown 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》