Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
dudu d847826971 | 1 year ago | |
---|---|---|
benchmark | 2 years ago | |
configs | 2 years ago | |
deploy | 2 years ago | |
images | 2 years ago | |
paddleseg | 2 years ago | |
slim | 2 years ago | |
test_tipc | 2 years ago | |
tests | 2 years ago | |
tools | 2 years ago | |
train_log | 2 years ago | |
.copyright.hook | 2 years ago | |
.gitignore | 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框架复现了CCNet语义分割模型,CCNet提出了Criss-Cross Attention Module,该模块使得特征图的每个特征向量都可以与全局信息交互,增加了感受野,提升分割效果。CCNet原论文中的miou为80%
,本次复现的miou为80.95%
,miou超出原本实现0.95%
.
论文:
项目参考:
在CityScapes val数据集的测试效果如下表。
NetWork | steps | opt | image_size | batch_size | dataset | memory | card | mIou | config | weight | log |
---|---|---|---|---|---|---|---|---|---|---|---|
CCNet | 60K | SGD | 769x769 | 8 | CityScapes | 32G | 4 | 80.95% | ccnet_resnet101_os8_cityscapes_769x769_60k.yml | model 提取码:wwiw | log |
硬件: Tesla V100 * 4
框架:
# clone this repo
git clone https://openi.pcl.ac.cn/dudu/CCNet_paddle.git
cd CCNet_paddle
安装第三方库
pip install -r requirements.txt
单卡训练:
python train.py --config configs/ccnet/ccnet_resnet101_os8_cityscapes_769x769_60k.yml --do_eval --use_vdl --log_iter 100 --save_interval 4000 --save_dir output
多卡训练:
python -m paddle.distributed.launch train.py --config configs/ccnet/ccnet_resnet101_os8_cityscapes_769x769_60k.yml --do_eval --use_vdl --log_iter 100 --save_interval 1000 --save_dir output
output目录下包含已经训练好的模型参数以及对应的日志文件。(权重文件在上方的表格中)
python val.py --config configs/ccnet/ccnet_resnet101_os8_cityscapes_769x769_60k.yml --model_path {your_model_path}
进入DDRNet_paddle文件夹,首先准备轻量级训练数据集,命令如下(会下载完整的cityscapes数据集):
bash test_tipc/prepare.sh ./test_tipc/configs/ccnet/train_infer_python.txt 'lite_train_lite_infer'
接着运行训练推理一体化测试脚本:
bash test_tipc/test_train_inference_python.sh ./test_tipc/configs/ccnet/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 * 4 脚本任务训练120K miou达到80.95%。
2、本项目基于PaddleSeg开发。
相关信息:
信息 | 描述 |
---|---|
作者 | 郎督 |
日期 | 2022年4月 |
框架版本 | PaddlePaddle==2.2.2 |
应用场景 | 语义分割 |
硬件支持 | GPU、CPU |
在线体验 | notebook在线体验 |
@misc{liu2021paddleseg,
title={PaddleSeg: A High-Efficient Development Toolkit for Image Segmentation},
author={Yi Liu and Lutao Chu and Guowei Chen and Zewu Wu and Zeyu Chen and Baohua Lai and Yuying Hao},
year={2021},
eprint={2101.06175},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@misc{paddleseg2019,
title={PaddleSeg, End-to-end image segmentation kit based on PaddlePaddle},
author={PaddlePaddle Contributors},
howpublished = {\url{https://github.com/PaddlePaddle/PaddleSeg}},
year={2019}
}
@article{huang2020ccnet,
author={Huang, Zilong and Wang, Xinggang and Wei, Yunchao and Huang, Lichao and Shi, Humphrey and Liu, Wenyu and Huang, Thomas S.},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
title={CCNet: Criss-Cross Attention for Semantic Segmentation},
year={2020},
month={},
volume={},
number={},
pages={1-1},
keywords={Semantic Segmentation;Graph Attention;Criss-Cross Network;Context Modeling},
doi={10.1109/TPAMI.2020.3007032},
ISSN={1939-3539}}
@article{huang2018ccnet,
title={CCNet: Criss-Cross Attention for Semantic Segmentation},
author={Huang, Zilong and Wang, Xinggang and Huang, Lichao and Huang, Chang and Wei, Yunchao and Liu, Wenyu},
booktitle={ICCV},
year={2019}}
使用PaddlePaddle复现CCNet
Python Text Java Shell 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》