Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
cc 4a2f39690c | 1 year ago | |
---|---|---|
.. | ||
configs | 2 years ago | |
core | 2 years ago | |
datasets | 2 years ago | |
models | 2 years ago | |
scripts | 1 year ago | |
tools | 2 years ago | |
README.md | 1 year ago | |
predict.py | 2 years ago | |
predict_ensemble.py | 2 years ago | |
predict_ensemble_three.py | 2 years ago | |
train.py | 2 years ago | |
val.py | 2 years ago |
Implementation of the 1st solution for AutoNUE@CVPR 2021 Challenge Semenatic Segmentation Track based on PaddlePaddle.
System Requirements:
Highly recommend you install the GPU version of PaddlePaddle, due to large overhead of segmentation models, otherwise it could be out of memory while running the models. For more detailed installation tutorials, please refer to the official website of PaddlePaddle。
You should use API Calling method to install PaddleSeg for flexible development.
pip install paddleseg==2.5.0
Firstly, you need to to download and convert the India Driving Dataset following the instructions of Segmentation Track. IDD_Dectection dataset also need for pseudo-labeling.
And then, you need to organize data following the below structure.
IDD_Segmentation
|
|--leftImg8bit
| |--train
| |--val
| |--test
|
|--gtFine
| |--train
| |--val
| |--test
We make three contributions and managed to rank 1st.
mkdir -p pretrain && cd pretrain
wget https://bj.bcebos.com/paddleseg/dygraph/cityscapes/ocrnet_hrnetw48_mapillary/pretrained.pdparams
cd ..
scripts/train.py
line 27 with from core.val import evaluate
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -u -m paddle.distributed.launch train.py \
--config configs/sscale_auto_nue_map+city@1920.yml --use_vdl \
--save_dir saved_model/sscale_auto_nue_map+city@1920 --save_interval 2000 --num_workers 2 --do_eval
scripts/train.py
line 27 'from core.val import evaluate' with from core.val_crop import evaluate
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -u -m paddle.distributed.launch train.py \
--config configs/auto_nue_map+city_crop.yml --use_vdl \
--save_dir saved_model/auto_nue_map+city_crop --save_interval 2000 --num_workers 2 --do_eval
First you need to organize the IDD_Detection dataset as follow:
IDD_Detection
|
|--JPEGImages
|--Annotations
where JPEGImages
and Annotation
are images and xml files collected from IDD_Detection/FrontFar
and IDD_Detection/FrontNear
two folders.
And Then:
AutoNUE21/predict.py
line 22 from paddleseg.core import predict
with from core.predict_generate_autolabel.py import predictAutolabel
AutoNUE21/predict.py
line 156 predict(
with predictAutolabel(
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m paddle.distributed.launch predict.py --config configs/sscale_auto_nue_map+city@1920.yml --model_path saved_model/sscale_auto_nue_map+city@1920/best_model/model.pdparams --image_path data/IDD_Detection/JPEGImages --save_dir detection_out --aug_pred --scales 1.0 1.5 2.0 --flip_horizontal
traffic lights
and traffic sign
two classes from bounding box annotation by running tools/IDD_labeling.py
pred_refine
folder under data/IDD_Detection
scripts/train.py
line 27 with from core.val import evaluate
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -u -m paddle.distributed.launch train.py \
--config configs/auto_nue_auto_label.yml --use_vdl \
--save_dir saved_model/auto_nue_auto_label --save_interval 2000 --num_workers 2 --do_eval
cd pretrain
wget https://bj.bcebos.com/paddleseg/dygraph/cityscapes/swin_mla_p4w7_mapillary/pretrained_swin.pdparams
cd ..
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -u -m paddle.distributed.launch train.py \
--config configs/swin_transformer_mla_base_patch4_window7_160k_autonue.yml --use_vdl \
--save_dir saved_model/swin_transformer_mla_autonue --save_interval 2000 --num_workers 2 --do_eval
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m paddle.distributed.launch predict.py --config configs/swin_transformer_mla_base_patch4_window7_160k_autonue.yml --model_path saved_model/swin_transformer_mla_autonue/best_model/model.pdparams --image_path data/IDD_Segmentation/leftImg8bit/test/ --save_dir test_out_swin --aug_pred --scales 1.0 1.5 2.0 --flip_horizontal
We provide a predict script for ensembling baseline
, pseudo-labeling
and rps
.
Just running:
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m paddle.distributed.launch predict_ensemble_three.py --config configs/sscale_auto_nue_map+city@1920.yml --config_1 configs/auto_nue_auto_label.yml --config_crop configs/auto_nue_map+city_crop.yml --model_path saved_model/sscale_auto_nue_map+city@1920/best_model/model.pdparams --model_path_1 saved_model/auto_nue_auto_label/best_model/model.pdparams --model_path_crop saved_model/auto_nue_map+city_crop/best_model/model.pdparams --image_path data/IDD_Segmentation/leftImg8bit/test/ --save_dir test_out --aug_pred --scales 1.0 1.5 2.0 --flip_horizontal
飞桨高性能图像分割开发套件,端到端完成从训练到部署的全流程图像分割应用。
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》