Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
wuyefeilin adbff64f35 | 1 year ago | |
---|---|---|
.. | ||
configs | 2 years ago | |
core | 1 year ago | |
datasets | 1 year ago | |
docs | 2 years ago | |
models | 2 years ago | |
transforms | 2 years ago | |
utils | 2 years ago | |
README.md | 2 years ago | |
README_CN.md | 2 years ago | |
predict.py | 1 year ago | |
train.py | 1 year ago | |
val.py | 1 year ago |
English | 简体中文
The implementation of Panoptic Deeplab algorithm based on PaddlePaddle.
Panoptic DeepLab has comfirmed that the bottem-up algorithm can achieve state-of-the-art effect for the first time。Panoptic DeepLab predicts three ouputs: Semantic Segmentation, Center Prediction and Center Regression。According to the principle of nearest distance, the pixels of instance category are gathered to the center of the instance to obtain the segmentation result. Finally, according to the rules of majority-vote, semantic segmentation results and instance segmentation results are fused to obtain the final panoptic segmentation results.
It achieves segmentation by assigning each pixel to one category or instance.
Backbone | Batch Size | Resolution | Training Iters | PQ | SQ | RQ | AP | mIoU | Links |
---|---|---|---|---|---|---|---|---|---|
ResNet50_OS32 | 8 | 2049x1025 | 90000 | 58.35% | 80.03% | 71.52% | 25.80% | 79.18% | model | log |
ResNet50_OS32 | 64 | 1025x513 | 90000 | 60.32% | 80.56% | 73.56% | 26.77% | 79.67% | model | log |
git clone https://github.com/PaddlePaddle/PaddleSeg
cd PaddleSeg
pip install -e .
cd contrib/PanopticDeepLab
Please put the dataset in data
directory under the PaddleSeg/contrib/PanopticDeepLab
.
Go to CityScapes website to download dataset and make is as the following structure:
cityscapes/
|--gtFine/
| |--train/
| | |--aachen/
| | | |--*_color.png, *_instanceIds.png, *_labelIds.png, *_polygons.json,
| | | |--*_labelTrainIds.png
| | | |--...
| |--val/
| |--test/
| |--cityscapes_panoptic_train_trainId.json
| |--cityscapes_panoptic_train_trainId/
| | |-- *_panoptic.png
| |--cityscapes_panoptic_val_trainId.json
| |--cityscapes_panoptic_val_trainId/
| | |-- *_panoptic.png
|--leftImg8bit/
| |--train/
| |--val/
| |--test/
Install CityscapesScripts
pip install git+https://github.com/mcordts/cityscapesScripts.git
*_panoptic.png
Generation command (need to find the createPanopticImgs.py
file):
python /path/to/cityscapesscripts/preparation/createPanopticImgs.py \
--dataset-folder data/cityscapes/gtFine/ \
--output-folder data/cityscapes/gtFine/ \
--use-train-id
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 # 根据实际情况进行显卡数量的设置
python -m paddle.distributed.launch train.py \
--config configs/panoptic_deeplab/panoptic_deeplab_resnet50_os32_cityscapes_1025x513_bs8_90k_lr00005.yml \
--do_eval \
--use_vdl \
--save_interval 5000 \
--save_dir output
note: Using --do_eval affects training speed and increases GPU memory consumption, turning on and off as you need.
To view more informationg of parameters, run the following command:
python train.py --help
python val.py \
--config configs/panoptic_deeplab/panoptic_deeplab_resnet50_os32_cityscapes_1025x513_bs8_90k_lr00005.yml \
--model_path output/iter_90000/model.pdparams
You can download the pretrained model we provide for evaluation directly.
To view more informationg of parameters, run the following command:
python val.py --help
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 # Set the number of GPUs as required.
python -m paddle.distributed.launch predict.py \
--config configs/panoptic_deeplab/panoptic_deeplab_resnet50_os32_cityscapes_1025x513_bs8_90k_lr00005.yml \
--model_path output/iter_90000/model.pdparams \
--image_path data/cityscapes/leftImg8bit/val/ \
--save_dir ./output/result
You can download the pretrained model we provide for prediction directly.
To view more informationg of parameters, run the following command:
python predict.py --help
Panoptic segmentations results:
Semantic segmentations results:
Instance sementations results:
飞桨高性能图像分割开发套件,端到端完成从训练到部署的全流程图像分割应用。
https://github.com/PaddlePaddle/PaddleSeg
Python Markdown Text Shell Java 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》