├── .gitattributes ├── README.md ├── configs └── seg_path_configs.json ├── data ├── chexpert_data │ └── chexpert_pesudo_label │ │ ├── chexpert_list_1.txt │ │ ├── chexpert_list_2.txt │ │ ├── chexpert_list_3.txt │ │ ├── chexpert_list_4.txt │ │ ├── chexpert_list_5.txt │ │ ├── chexpert_mask_1.csv │ │ ├── chexpert_mask_2.csv │ │ ├── chexpert_mask_3.csv │ │ ├── chexpert_mask_4.csv │ │ └── chexpert_mask_5.csv ├── cls_fold_5_all_images │ ├── fold0 │ │ ├── train.txt │ │ └── val.txt │ ├── fold1 │ │ ├── train.txt │ │ └── val.txt │ ├── fold2 │ │ ├── train.txt │ │ └── val.txt │ ├── fold3 │ │ ├── train.txt │ │ └── val.txt │ └── fold4 │ │ ├── train.txt │ │ └── val.txt ├── cls_fold_5_all_images_p_label_chexpert │ ├── fold0 │ │ ├── train.txt │ │ └── val.txt │ ├── fold1 │ │ ├── train.txt │ │ └── val.txt │ ├── fold2 │ │ ├── train.txt │ │ └── val.txt │ ├── fold3 │ │ ├── train.txt │ │ └── val.txt │ ├── fold4 │ │ ├── train.txt │ │ └── val.txt │ ├── p_label_885_0.9_0.1.txt │ ├── p_label_889_0.95_0.05.txt │ └── p_label_889_0.9_0.1.txt ├── competition_data │ ├── sample_submission.csv │ └── train-rle.csv ├── det_fold_5 │ ├── fold0 │ │ ├── train.txt │ │ └── val.txt │ ├── fold1 │ │ ├── train.txt │ │ └── val.txt │ ├── fold2 │ │ ├── train.txt │ │ └── val.txt │ ├── fold3 │ │ ├── train.txt │ │ └── val.txt │ └── fold4 │ │ ├── train.txt │ │ └── val.txt ├── ensemble_5fold_0.4.csv └── ensemble_5fold_0.45.csv ├── requirements.txt ├── semantic_segmentation ├── .gitignore ├── .gitmodules ├── Dockerfile ├── LICENSE ├── PREPARE_DATASETS.md ├── README.md ├── config.py ├── datasets │ ├── __init__.py │ ├── camvid.py │ ├── cityscapes.py │ ├── cityscapes_labels.py │ ├── kitti.py │ ├── mapillary.py │ ├── nullloader.py │ ├── sampler.py │ └── uniform.py ├── eval.py ├── images │ ├── method.png │ └── vis.png ├── loss.py ├── network │ ├── Resnet.py │ ├── SEresnext.py │ ├── __init__.py │ ├── deepv3.py │ ├── mynn.py │ └── wider_resnet.py ├── optimizer.py ├── scripts │ ├── eval_cityscapes_SEResNeXt50.sh │ ├── eval_cityscapes_WideResNet38.sh │ ├── submit_cityscapes_WideResNet38.sh │ ├── train_cityscapes_SEResNeXt50.sh │ ├── train_cityscapes_WideResNet38.sh │ ├── train_mapillary_SEResNeXt50.sh │ └── train_mapillary_WideResNet38.sh ├── sdcnet │ ├── _aug.sh │ ├── _eval.sh │ ├── datasets │ │ ├── __init__.py │ │ ├── dataset_utils.py │ │ └── frame_loader.py │ ├── main.py │ ├── models │ │ ├── __init__.py │ │ ├── model_utils.py │ │ └── sdc_net2d.py │ ├── sdc_aug.py │ └── utility │ │ ├── Dockerfile │ │ └── tools.py ├── train.py ├── transforms │ ├── __init__.py │ ├── joint_transforms.py │ └── transforms.py └── utils │ ├── __init__.py │ ├── attr_dict.py │ ├── misc.py │ └── my_data_parallel.py ├── src_unet_cls ├── __init__.py ├── dataset │ ├── __pycache__ │ │ ├── dataset.cpython-35.pyc │ │ └── dataset_test.cpython-35.pyc │ └── dataset.py ├── models │ ├── __pycache__ │ │ ├── bagnet.cpython-35.pyc │ │ ├── common.cpython-35.pyc │ │ ├── deepv3.cpython-35.pyc │ │ ├── densenet_efficient.cpython-35.pyc │ │ ├── ibnresnet.cpython-35.pyc │ │ ├── ibnresnextnet.cpython-35.pyc │ │ ├── model_gcn.cpython-35.pyc │ │ ├── model_store.cpython-35.pyc │ │ ├── model_unet.cpython-35.pyc │ │ ├── models.cpython-35.pyc │ │ └── resnet.cpython-35.pyc │ └── model_unet.py ├── predict.py ├── stacking.py ├── swa.py ├── train_model.py └── tuils │ ├── loss_function.py │ ├── lrs_scheduler.py │ └── tools.py └── src_unet_seg ├── A_train_model.py ├── B_train_model.py ├── __init__.py ├── creat_sub.py ├── dataset ├── __pycache__ │ ├── dataset.cpython-35.pyc │ └── dataset_test.cpython-35.pyc └── dataset.py ├── ef_unet.py ├── ensemble_5_model.py ├── precdict_1024.py ├── precdict_768.py ├── swa_models.py └── tuils ├── __pycache__ ├── loss_function.cpython-35.pyc ├── lrs_scheduler.cpython-35.pyc ├── preprocess.cpython-35.pyc ├── swa_utils.cpython-35.pyc └── tools.cpython-35.pyc ├── loss_function.py ├── lrs_scheduler.py ├── swa_utils.py └── tools.py /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/.gitattributes -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/README.md -------------------------------------------------------------------------------- /configs/seg_path_configs.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/configs/seg_path_configs.json -------------------------------------------------------------------------------- /data/chexpert_data/chexpert_pesudo_label/chexpert_list_1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/chexpert_data/chexpert_pesudo_label/chexpert_list_1.txt -------------------------------------------------------------------------------- /data/chexpert_data/chexpert_pesudo_label/chexpert_list_2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/chexpert_data/chexpert_pesudo_label/chexpert_list_2.txt -------------------------------------------------------------------------------- /data/chexpert_data/chexpert_pesudo_label/chexpert_list_3.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/chexpert_data/chexpert_pesudo_label/chexpert_list_3.txt -------------------------------------------------------------------------------- /data/chexpert_data/chexpert_pesudo_label/chexpert_list_4.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/chexpert_data/chexpert_pesudo_label/chexpert_list_4.txt -------------------------------------------------------------------------------- /data/chexpert_data/chexpert_pesudo_label/chexpert_list_5.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/chexpert_data/chexpert_pesudo_label/chexpert_list_5.txt -------------------------------------------------------------------------------- /data/chexpert_data/chexpert_pesudo_label/chexpert_mask_1.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/chexpert_data/chexpert_pesudo_label/chexpert_mask_1.csv -------------------------------------------------------------------------------- /data/chexpert_data/chexpert_pesudo_label/chexpert_mask_2.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/chexpert_data/chexpert_pesudo_label/chexpert_mask_2.csv -------------------------------------------------------------------------------- /data/chexpert_data/chexpert_pesudo_label/chexpert_mask_3.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/chexpert_data/chexpert_pesudo_label/chexpert_mask_3.csv -------------------------------------------------------------------------------- /data/chexpert_data/chexpert_pesudo_label/chexpert_mask_4.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/chexpert_data/chexpert_pesudo_label/chexpert_mask_4.csv -------------------------------------------------------------------------------- /data/chexpert_data/chexpert_pesudo_label/chexpert_mask_5.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/chexpert_data/chexpert_pesudo_label/chexpert_mask_5.csv -------------------------------------------------------------------------------- /data/cls_fold_5_all_images/fold0/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images/fold0/train.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images/fold0/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images/fold0/val.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images/fold1/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images/fold1/train.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images/fold1/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images/fold1/val.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images/fold2/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images/fold2/train.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images/fold2/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images/fold2/val.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images/fold3/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images/fold3/train.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images/fold3/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images/fold3/val.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images/fold4/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images/fold4/train.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images/fold4/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images/fold4/val.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/fold0/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/fold0/train.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/fold0/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/fold0/val.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/fold1/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/fold1/train.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/fold1/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/fold1/val.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/fold2/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/fold2/train.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/fold2/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/fold2/val.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/fold3/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/fold3/train.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/fold3/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/fold3/val.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/fold4/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/fold4/train.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/fold4/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/fold4/val.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/p_label_885_0.9_0.1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/p_label_885_0.9_0.1.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/p_label_889_0.95_0.05.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/p_label_889_0.95_0.05.txt -------------------------------------------------------------------------------- /data/cls_fold_5_all_images_p_label_chexpert/p_label_889_0.9_0.1.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/cls_fold_5_all_images_p_label_chexpert/p_label_889_0.9_0.1.txt -------------------------------------------------------------------------------- /data/competition_data/sample_submission.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/competition_data/sample_submission.csv -------------------------------------------------------------------------------- /data/competition_data/train-rle.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/competition_data/train-rle.csv -------------------------------------------------------------------------------- /data/det_fold_5/fold0/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/det_fold_5/fold0/train.txt -------------------------------------------------------------------------------- /data/det_fold_5/fold0/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/det_fold_5/fold0/val.txt -------------------------------------------------------------------------------- /data/det_fold_5/fold1/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/det_fold_5/fold1/train.txt -------------------------------------------------------------------------------- /data/det_fold_5/fold1/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/det_fold_5/fold1/val.txt -------------------------------------------------------------------------------- /data/det_fold_5/fold2/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/det_fold_5/fold2/train.txt -------------------------------------------------------------------------------- /data/det_fold_5/fold2/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/det_fold_5/fold2/val.txt -------------------------------------------------------------------------------- /data/det_fold_5/fold3/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/det_fold_5/fold3/train.txt -------------------------------------------------------------------------------- /data/det_fold_5/fold3/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/det_fold_5/fold3/val.txt -------------------------------------------------------------------------------- /data/det_fold_5/fold4/train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/det_fold_5/fold4/train.txt -------------------------------------------------------------------------------- /data/det_fold_5/fold4/val.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/det_fold_5/fold4/val.txt -------------------------------------------------------------------------------- /data/ensemble_5fold_0.4.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/ensemble_5fold_0.4.csv -------------------------------------------------------------------------------- /data/ensemble_5fold_0.45.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/data/ensemble_5fold_0.45.csv -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/requirements.txt -------------------------------------------------------------------------------- /semantic_segmentation/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/.gitignore -------------------------------------------------------------------------------- /semantic_segmentation/.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/.gitmodules -------------------------------------------------------------------------------- /semantic_segmentation/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/Dockerfile -------------------------------------------------------------------------------- /semantic_segmentation/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/LICENSE -------------------------------------------------------------------------------- /semantic_segmentation/PREPARE_DATASETS.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/PREPARE_DATASETS.md -------------------------------------------------------------------------------- /semantic_segmentation/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/README.md -------------------------------------------------------------------------------- /semantic_segmentation/config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/config.py -------------------------------------------------------------------------------- /semantic_segmentation/datasets/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/datasets/__init__.py -------------------------------------------------------------------------------- /semantic_segmentation/datasets/camvid.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/datasets/camvid.py -------------------------------------------------------------------------------- /semantic_segmentation/datasets/cityscapes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/datasets/cityscapes.py -------------------------------------------------------------------------------- /semantic_segmentation/datasets/cityscapes_labels.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/datasets/cityscapes_labels.py -------------------------------------------------------------------------------- /semantic_segmentation/datasets/kitti.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/datasets/kitti.py -------------------------------------------------------------------------------- /semantic_segmentation/datasets/mapillary.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/datasets/mapillary.py -------------------------------------------------------------------------------- /semantic_segmentation/datasets/nullloader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/datasets/nullloader.py -------------------------------------------------------------------------------- /semantic_segmentation/datasets/sampler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/datasets/sampler.py -------------------------------------------------------------------------------- /semantic_segmentation/datasets/uniform.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/datasets/uniform.py -------------------------------------------------------------------------------- /semantic_segmentation/eval.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/eval.py -------------------------------------------------------------------------------- /semantic_segmentation/images/method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/images/method.png -------------------------------------------------------------------------------- /semantic_segmentation/images/vis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/images/vis.png -------------------------------------------------------------------------------- /semantic_segmentation/loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/loss.py -------------------------------------------------------------------------------- /semantic_segmentation/network/Resnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/network/Resnet.py -------------------------------------------------------------------------------- /semantic_segmentation/network/SEresnext.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/network/SEresnext.py -------------------------------------------------------------------------------- /semantic_segmentation/network/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/network/__init__.py -------------------------------------------------------------------------------- /semantic_segmentation/network/deepv3.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/network/deepv3.py -------------------------------------------------------------------------------- /semantic_segmentation/network/mynn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/network/mynn.py -------------------------------------------------------------------------------- /semantic_segmentation/network/wider_resnet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/network/wider_resnet.py -------------------------------------------------------------------------------- /semantic_segmentation/optimizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/optimizer.py -------------------------------------------------------------------------------- /semantic_segmentation/scripts/eval_cityscapes_SEResNeXt50.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/scripts/eval_cityscapes_SEResNeXt50.sh -------------------------------------------------------------------------------- /semantic_segmentation/scripts/eval_cityscapes_WideResNet38.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/scripts/eval_cityscapes_WideResNet38.sh -------------------------------------------------------------------------------- /semantic_segmentation/scripts/submit_cityscapes_WideResNet38.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/scripts/submit_cityscapes_WideResNet38.sh -------------------------------------------------------------------------------- /semantic_segmentation/scripts/train_cityscapes_SEResNeXt50.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/scripts/train_cityscapes_SEResNeXt50.sh -------------------------------------------------------------------------------- /semantic_segmentation/scripts/train_cityscapes_WideResNet38.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/scripts/train_cityscapes_WideResNet38.sh -------------------------------------------------------------------------------- /semantic_segmentation/scripts/train_mapillary_SEResNeXt50.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/scripts/train_mapillary_SEResNeXt50.sh -------------------------------------------------------------------------------- /semantic_segmentation/scripts/train_mapillary_WideResNet38.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/scripts/train_mapillary_WideResNet38.sh -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/_aug.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/sdcnet/_aug.sh -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/_eval.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/sdcnet/_eval.sh -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/datasets/__init__.py: -------------------------------------------------------------------------------- 1 | from .frame_loader import * -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/datasets/dataset_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/sdcnet/datasets/dataset_utils.py -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/datasets/frame_loader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/sdcnet/datasets/frame_loader.py -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/sdcnet/main.py -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/models/__init__.py: -------------------------------------------------------------------------------- 1 | from .sdc_net2d import * -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/models/model_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/sdcnet/models/model_utils.py -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/models/sdc_net2d.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/sdcnet/models/sdc_net2d.py -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/sdc_aug.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/sdcnet/sdc_aug.py -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/utility/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/sdcnet/utility/Dockerfile -------------------------------------------------------------------------------- /semantic_segmentation/sdcnet/utility/tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/sdcnet/utility/tools.py -------------------------------------------------------------------------------- /semantic_segmentation/train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/train.py -------------------------------------------------------------------------------- /semantic_segmentation/transforms/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /semantic_segmentation/transforms/joint_transforms.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/transforms/joint_transforms.py -------------------------------------------------------------------------------- /semantic_segmentation/transforms/transforms.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/transforms/transforms.py -------------------------------------------------------------------------------- /semantic_segmentation/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /semantic_segmentation/utils/attr_dict.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/utils/attr_dict.py -------------------------------------------------------------------------------- /semantic_segmentation/utils/misc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/utils/misc.py -------------------------------------------------------------------------------- /semantic_segmentation/utils/my_data_parallel.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/semantic_segmentation/utils/my_data_parallel.py -------------------------------------------------------------------------------- /src_unet_cls/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | # @author yelan -------------------------------------------------------------------------------- /src_unet_cls/dataset/__pycache__/dataset.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/dataset/__pycache__/dataset.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/dataset/__pycache__/dataset_test.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/dataset/__pycache__/dataset_test.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/dataset/dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/dataset/dataset.py -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/bagnet.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/bagnet.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/common.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/common.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/deepv3.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/deepv3.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/densenet_efficient.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/densenet_efficient.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/ibnresnet.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/ibnresnet.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/ibnresnextnet.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/ibnresnextnet.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/model_gcn.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/model_gcn.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/model_store.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/model_store.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/model_unet.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/model_unet.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/models.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/models.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/__pycache__/resnet.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/__pycache__/resnet.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_cls/models/model_unet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/models/model_unet.py -------------------------------------------------------------------------------- /src_unet_cls/predict.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/predict.py -------------------------------------------------------------------------------- /src_unet_cls/stacking.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/stacking.py -------------------------------------------------------------------------------- /src_unet_cls/swa.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/swa.py -------------------------------------------------------------------------------- /src_unet_cls/train_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/train_model.py -------------------------------------------------------------------------------- /src_unet_cls/tuils/loss_function.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/tuils/loss_function.py -------------------------------------------------------------------------------- /src_unet_cls/tuils/lrs_scheduler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/tuils/lrs_scheduler.py -------------------------------------------------------------------------------- /src_unet_cls/tuils/tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_cls/tuils/tools.py -------------------------------------------------------------------------------- /src_unet_seg/A_train_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/A_train_model.py -------------------------------------------------------------------------------- /src_unet_seg/B_train_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/B_train_model.py -------------------------------------------------------------------------------- /src_unet_seg/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: UTF-8 -*- 2 | # @author hjh -------------------------------------------------------------------------------- /src_unet_seg/creat_sub.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/creat_sub.py -------------------------------------------------------------------------------- /src_unet_seg/dataset/__pycache__/dataset.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/dataset/__pycache__/dataset.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_seg/dataset/__pycache__/dataset_test.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/dataset/__pycache__/dataset_test.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_seg/dataset/dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/dataset/dataset.py -------------------------------------------------------------------------------- /src_unet_seg/ef_unet.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/ef_unet.py -------------------------------------------------------------------------------- /src_unet_seg/ensemble_5_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/ensemble_5_model.py -------------------------------------------------------------------------------- /src_unet_seg/precdict_1024.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/precdict_1024.py -------------------------------------------------------------------------------- /src_unet_seg/precdict_768.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/precdict_768.py -------------------------------------------------------------------------------- /src_unet_seg/swa_models.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/swa_models.py -------------------------------------------------------------------------------- /src_unet_seg/tuils/__pycache__/loss_function.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/tuils/__pycache__/loss_function.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_seg/tuils/__pycache__/lrs_scheduler.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/tuils/__pycache__/lrs_scheduler.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_seg/tuils/__pycache__/preprocess.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/tuils/__pycache__/preprocess.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_seg/tuils/__pycache__/swa_utils.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/tuils/__pycache__/swa_utils.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_seg/tuils/__pycache__/tools.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/tuils/__pycache__/tools.cpython-35.pyc -------------------------------------------------------------------------------- /src_unet_seg/tuils/loss_function.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/tuils/loss_function.py -------------------------------------------------------------------------------- /src_unet_seg/tuils/lrs_scheduler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/tuils/lrs_scheduler.py -------------------------------------------------------------------------------- /src_unet_seg/tuils/swa_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/tuils/swa_utils.py -------------------------------------------------------------------------------- /src_unet_seg/tuils/tools.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yelanlan/Pneumothorax-Segmentation-2nd-place-solution/HEAD/src_unet_seg/tuils/tools.py --------------------------------------------------------------------------------