PyTorch implementation of One Shot Affordance Detection, completed as a part of the semester long project for the course Advanced Machine Learning (CS5824/ECE5424) at Virginia Tech (Fall-2022).
- One-Shot Affordance Detection (IJCAI2021) (link)
Authors: Hongchen Luo, Wei Zhai, Jing Zhang, Yang Cao, Dacheng Tao
- One-Shot Affordance Detection in the Wild (IJCV) (link)
Authors: Wei Zhai*, Hongchen Luo*, Jing Zhang, Yang Cao, Dacheng Tao
- python 3.7
- pytorch 1.1.0
- opencv
- scipy
- matplotlib
- You can download the PAD from [ Google Drive | Baidu Pan (z40m) ].
- Create a
datasets
folder, and unzip the PAD dataset there.
You have to download the pretrained resnet50 model from [ Google Drive | Baidu Pan (xjk5) ],
then move it to the newly created models
folder. Create save_models
folder in the OSAD
directory before training the model. Remember that in the OSAD directory os_ad_1.py, os_ad_2.py, and os_ad_3.py are three different models trained by us. Whichever model you want to train, just rename that model as os_ad.py.
To train the models, execute run_os_ad.py script using the following command:
python run_os_ad.py
To test these models, execute run_os_ad.py
script. Make sure in the save_models folder created
before training the models, you are able to see model weights after each epoch:
python run_os_ad.py --mode test
In order to evaluate the results, go to the PyMetrics directory and run the requirements.txt file first by using the bash command:
pip install -r requirements.txt
Then go to the code folder and execute the test_metrics_3.py script:
python test_metrics_3.py
- Aruj Nayak [email protected].
- Trisha Bora [email protected].
- Sandeep Chinnareddy [email protected].
- Akhilesh Marathe [email protected].
- Prayati Dutta [email protected].