We introduce One-shot Open Affordance Learning (OOAL), where a model is trained with just one example per base object category, but is expected to identify novel objects and affordances. While vision-language models excel at recognizing novel objects and scenes, they often struggle to understand finer levels of granularity such as affordances. To handle this issue, we conduct a comprehensive analysis of existing foundation models, to explore their inherent understanding of affordances and assess the potential for data-limited affordance learning. We then propose a vision-language framework with simple and effective designs that boost the alignment between visual features and affordance text embeddings. Experiments on two affordance segmentation benchmarks show that the proposed method outperforms state-of-the-art models with less than 1% of the full training data, and exhibits reasonable generalization capability on unseen objects and affordances.
Code is tested under Pytorch 1.12.1, python 3.7, and CUDA 11.3
pip install -r requirements.txt
Download the AGD20K dataset from [ Google Drive | Baidu Pan (g23n) ] .
Download the one-shot data Google Drive (you can annotate your own one-shot data in the same format).
Put the data in the dataset
folder with following structure.
dataset
├── one-shot-seen
├── one-shot-unseen
├── Seen
└── Unseen
Run following commands to start training or testing:
python train.py
python test.py --model_file <PATH_TO_MODEL>
Our pretrained model can be downloaded from Google Drive.
@inproceedings{li:ooal:2024,
title = {One-Shot Open Affordance Learning with Foundation Models},
author = {Li, Gen and Sun, Deqing and Sevilla-Lara, Laura and Jampani, Varun},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year={2024}
}
Some code is borrowed from CoOp and ZegCLIP. Thanks for their great work!