YihongSun / Bayesian-Amodal

[CVPR 2022] Amodal Segmentation through Out-of-Task and Out-of-Distribution Generalization with a Bayesian Model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Amodal Segmentation through Out-of-Task and Out-of-Distribution Generalization with a Bayesian Model

Yihong Sun, Adam Kortylewski, Alan Yuille. CVPR 2022

[PDF]  

Official PyTorch code for the paper: Amodal Segmentation through Out-of-Task and Out-of-Distribution Generalization with a Bayesian Model

Quick Start

Setup environment / Download models and dataset

conda env create -f environment.yml
conda activate amodal
bash download.sh
  • In the case that download.sh cannot be executed properly, please identify the missing directory and rerun the wget command for the corresponding zip file. If the issue persists, please refer to the download.sh description below.

Run experiments

  • Table 1: change the file Code/configs.py to set TABLE_NUM = 1 and MODEL_TYPE = 'ML' or MODEL_TYPE = 'E2E' and run the command below.

  • Table 2: change the file Code/configs.py to set TABLE_NUM = 2 and MODEL_TYPE = 'ML' or MODEL_TYPE = 'E2E' and run the command below.

  • Table 3: change the file Code/configs.py to set TABLE_NUM = 3 and MODEL_TYPE = 'ML' or MODEL_TYPE = 'E2E' and run the command below.

cd Code
python3 run_experiment.py

Optional: download.sh Description

Download models

  • Download pretrained model weights from here, unzip Models.zip and place the folder as /Models/.

  • Download RPN results used for evaluatiooon from here, unzip RPN_results.zip and place the folder as /RPN_results/.

Download dataset

  • Download Occluded Vehicle Dataset from here, unzip Occluded_Vehicles.zip and place the folder as /Dataset/Occluded_Vehicles/.

  • Download KINS Dataset from here, unzip kitti.zip and place the folder as /Dataset/kitti/.

  • Download COCOA Dataset from here, unzip COCO.zip and place the folder as /Dataset/COCO/. Additionally, download COCO data train2014 and val2014 and place the folders as /Dataset/COCO/train2014/ and /Dataset/COCO/val2014/.

Qualitative Results

Citation

Please cite the following papers if you use the code directly or indirectly in your research projects.

@article{sun2021amodal,
  title=Amodal Segmentation through Out-of-Task and Out-of-Distribution Generalization with a Bayesian Model},
  author={Sun, Yihong and Kortylewski, Adam and Yuille, Alan},
  journal={arXiv preprint arXiv:2010.13175},
  year={2021}
}

About

[CVPR 2022] Amodal Segmentation through Out-of-Task and Out-of-Distribution Generalization with a Bayesian Model

License:MIT License


Languages

Language:Python 98.9%Language:Shell 1.1%