Giter VIP home page Giter VIP logo

ucl-affcorrs's Introduction

One-Shot Affordance Region Correspondences with AffCorrs

This repository contains code for annotation generation, and affordance correspondence described in the paper "One-Shot Transfer of Affordance Regions? AffCorrs!"

One-shot transfer example outputs from our model shown in pairs of refernce image and annotated areas (left) and the target image with estimated correspondences (right) without any training on these classes.

image

If you use the AffCorrs model or UMD_i dataset please consider citing our work:

@article{Hadjivelichkov2022,
    title = {{One-Shot Transfer of Affordance Regions? AffCorrs!}},
    year = {2022},
    journal = {{Proceedings of the 6th Conference on Robot Learning (CoRL)}},
    author = {Hadjivelichkov, Denis and Zwane, Sicelukwanda and Deisenroth, Marc and Agapito, Lourdes and Kanoulas, Dimitrios}
}

and its ancestors:

@article{Shir2021,
author = {Amir, Shir and Gandelsman, Yossi and Bagon, Shai and Dekel, Tali},
year = {2021},
month = {12},
title = {{Deep ViT Features as Dense Visual Descriptors}}
}
@inproceedings{Myers2015icra,
  author    = {Austin Myers and Ching L. Teo and Cornelia Ferm\"uller and Yiannis Aloimonos},
  title     = {Affordance Detection of Tool Parts from Geometric Features},
  booktitle = {ICRA},
  year      = {2015}
}

Dependencies

The code has been tested with the following packages:

pydensecrf=1.0
torch=1.10+cu113
faiss=1.5
pytorch_metric_learning=0.9.99
fast_pytorch_kmeans=0.1.6
timm=0.6.7
cv2=4.6
scikit-image=0.17.2

However, other versions of these packages will likely be sufficient as well.

pip3 install pydensecrf torch torchvision timm cv2 scikit-image\
faiss pytorch_metric_learning fast_pytorch_kmeans

Dataset

The dataset is added as a .zip file. Unzip and refer to its README instruction.

Demo

To run a demo of the model cd demos; python3 show_part_annotation_correspondence.py.

To try on your own images, (i) change SUPPORT_DIR to point to a directory containing the affordance.npy and prototype.png and (ii) change TARGET_IMAGE_PATH to point toward an image file which contains the target scene.

Annotation

Annotation can be generated via annotate_parts.py. Four named windows will appear. Drawing on the source image with the mouse will create the affordance mask. Middle-click will save the current affordance and proceed to the next affordance mask. Pressing s will save all the affordance masks generated for this source image into a folder called affordance_database/temp. Pressing the n-key will change the source image to the next in the folder. The target image and similarity windows are there just for reference while annotating, showing the best point correspondences.

ucl-affcorrs's People

Contributors

dennisushi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jjhw jojijoseph

ucl-affcorrs's Issues

Enquiries about the dataset

Hi, I am reproducing the evaluation part of the Affcorrs. I downloaded the dataset UMD_i from your GitHub and I found four files in each object's folder. My questions are as follows:

  1. Which two masks should I compare with? I have used the affcorrs model to process the images, which are the predicted mask from the affcorrs, but I didn't see the ground truth mask in the folder.
  2. In each object's folder, there are two files named 'label_rank.npy' and 'mask.jpg'. I found that the npy file is composed of a 1021027 array. I don't understand what is the meaning of these seven channels. For the jpg file, when I converted it into a npy file, I found it is also not a binary image. Could you please provide me the mask file that I should compare to?
  3. I saw your readme of the dataset and I found that the evaluation part is not public. Would you mind releasing your evaluation code if it's convenient for you?

dataset

Thank you for sharing such an interesting article. In my experiments, I found that the npy NumPy array in your open-sourced UMD data is 7-dimensional, which is different from the dimensions of the npy file in the affordance's USB. Could you please explain how you chose and processed this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.