Skip to content

Codes for making the distance maps from the scribble and the pseudo labels

Notifications You must be signed in to change notification settings

Zxl19990529/Distance-Map

Repository files navigation

Make the distance map accrodding to the scribble or the pseudo label's boundary

Dependency

pip install opencv-python
pip install tqdm

Make the distance map from the scribble

Run the file:

python mamakedistancemap_multiprocessing.py \
    --workers 10 \ # This depends on your cpu cores.
    --src_dir /home/zxl/dataset/ScribbleSup/pascal_2012_scribble \ # path to the scribble mask folder.
    --save_dir ./dsmp_scribble_lambd_e2 \ # path to the save folder.
    --lambd 7.3890560989306495 # The lambd_s to control the distance map.

The visualized result may looks like:

Make the distance map from the pseudo label's boundary

Run the file:

python makedistancemap_fromCAM_multiprocessing.py.py \
    --workers 10 \ # This depends on your cpu cores.
    --src_dir /home/zxl/dataset/ScribbleSup/CAMpseudolabels/bmp_ws_train_aug_dataset \ # path to the pseudo label folder.
    --save_dir ./pseudolabel_dsmp/bmp/pseudo_dsmp_lambd_e \ # path to the save folder.
    --lambd 7.3890560989306495 # The lambd_s to control the distance map.

The visualized result may looks like:

About

Codes for making the distance maps from the scribble and the pseudo labels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages