semantic_affordance
June 10, 2024 ยท View on GitHub
Code for reproducing the results described in the paper:
Mining Semantic Affordances of Visual Object Categories
Yu-Wei Chao, Zhan Wang, Rada Mihalcea, and Jia Deng
IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015
If you use this code, please cite our work:
@INPROCEEDINGS{chao:cvpr2015,
author = {Yu-Wei Chao and Zhan Wang and Rada Mihalcea and Jia Deng},
title = {Mining Semantic Affordances of Visual Object Categories},
booktitle = {Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
year = {2015},
}
Check out the project site for more details.
Quick start
-
Download a copy of our affordance dataset and unzip the file.
-
Get the source code by cloning the repository:
git clone https://github.com/ywchao/semantic_affordance.git -
Change into the source code directory
cd semantic_affordanceand start MATLABmatlab. You should see the messageadded paths for the experiment!followed by the MATLAB prompt>>. -
Change the path
data_dirinconfig.mto the downloaded folderaffordance_data/.data_dir = '/z/ywchao/datasets/affordance_data/'; -
Run
setupto prepare the required files.- Generate ground-truth binary labels from afforadance data
- Generate WordNet similarity measures for 91 MS-COCO object categories
- Download KPMF code
-
Run
pca_2d_runto visualize the object categories in the 2D affordance space. -
Run
demo_cf_nnanddemo_cf_kpmfto reproduce the NN and KPMF results.- In the default setting, the code will reproduce the paper's results on 20 PASCAL object categories. To run on 91 MS-COCO object categories, change the variable
param.n_setfrom'pascal'to'mscoco' - If you download the affordance dataset before 2015-08-07, please re-download it as the previous one does not support the MS-COCO experiment.
- In the default setting, the code will reproduce the paper's results on 20 PASCAL object categories. To run on 91 MS-COCO object categories, change the variable