Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Shuangchi He b0cda8b87e | 1 year ago | |
---|---|---|
.. | ||
configs/deeplabv2 | 2 years ago | |
cvlibs | 2 years ago | |
datasets | 2 years ago | |
models | 1 year ago | |
script | 1 year ago | |
utils | 2 years ago | |
README.md | 2 years ago | |
requirements.txt | 2 years ago | |
run-DA_src.sh | 2 years ago | |
train.py | 2 years ago | |
val.py | 2 years ago |
Domain adaptation is the ability to apply an algorithm trained in one or more "source domains" to a different (but related) "target domain". With domain adaptation algorithms, performance drop caused by domain shift can be alleviated. Specifically, none of the manually labeled images will be used in unsupervised domain adaptation(UDA). The following picture shows the result of applying our unsupervised domain adaptation algorithms on semantic segmentation task. By comparing the segmentation results between "without DA" and "with DA", we can observe a remarkable performance gain.
In this project, we reproduce PixMatch [Paper|Code] with PaddlePaddle and reaches mIOU = 47.8% on Cityscapes Dataset.
On top of that, we also tried several adjustments including:
Model | Backbone | Resolution | Training Iters | mIoU | Links |
---|---|---|---|---|---|
PixMatch | resnet101 | 1280x640 | 60000 | 47.8% | model |log |vdl |
Pixmatch-featpullin | resnet101 | 1280x640 | 100000 | 48.0% | model |log |vdl |
If you would like to try out our project, there are serveral things you need to figure out.
git clone https://github.com/PaddlePaddle/PaddleSeg.git
cd contrib/DomainAdaptation/
pip install -r requirments.txt
python -m pip install paddlepaddle-gpu==2.2.0 -i https://mirror.baidu.com/pypi/simple
Download GTA5 dataset, cityscapes dataset and relative data_list.
Orgranize the dataset and data list as following:
data
├── cityscapes
│ ├── gtFine
│ │ ├── train
│ │ │ ├── aachen
│ │ │ └── ...
│ │ └── val
│ └── leftImg8bit
│ ├── train
│ └── val
├── GTA5
│ ├── images
│ ├── labels
│ └── list
├── city_list
└── gta5_list
Download pretrained model on GTA5 and save it to models/.
Train on one GPU
sh run-DA_src.sh
Validate on one GPU:
Download the trained model on cityscapes, and save it to models/model.pdparams:
Validate with the following script. Since we forget to save the ema model, the validation result is 46% :
python3 -m paddle.distributed.launch val.py --config configs/deeplabv2/deeplabv2_resnet101_os8_gta5cityscapes_1280x640_160k_newds_gta5src.yml --model_path models/model.pdparams --num_workers 4
No Description
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》