Updates
- September 4, 2018: Tutorial and data now available! We have a tutorial now available here, which walks through step-by-step of getting this repo running.
- June 26, 2019: We have updated the repo to pytorch 1.1 and CUDA 10. For code used for the experiments in the paper see here.
Dense Correspondence Learning in PyTorch
In this project we learn Dense Object Nets, i.e. dense descriptor networks for previously unseen, potentially deformable objects, and potentially classes of objects:
We also demonstrate using Dense Object Nets for robotic manipulation tasks:
Dense Object Nets: Learning Dense Visual Descriptors by and for Robotic Manipulation
This is the reference implementation for our paper:
Pete Florence*, Lucas Manuelli*, Russ Tedrake
Abstract: What is the right object representation for manipulation? We would like robots to visually perceive scenes and learn an understanding of the objects in them that (i) is task-agnostic and can be used as a building block for a variety of manipulation tasks, (ii) is generally applicable to both rigid and non-rigid objects, (iii) takes advantage of the strong priors provided by 3D vision, and (iv) is entirely learned from self-supervision. This is hard to achieve with previous methods: much recent work in grasping does not extend to grasping specific objects or other tasks, whereas task-specific learning may require many trials to generalize well across object configurations or other tasks. In this paper we present Dense Object Nets, which build on recent developments in self-supervised dense descriptor learning, as a consistent object representation for visual understanding and manipulation. We demonstrate they can be trained quickly (approximately 20 minutes) for a wide variety of previously unseen and potentially non-rigid objects. We additionally present novel contributions to enable multi-object descriptor learning, and show that by modifying our training procedure, we can either acquire descriptors which generalize across classes of objects, or descriptors that are distinct for each object instance. Finally, we demonstrate the novel application of learned dense descriptors to robotic manipulation. We demonstrate grasping of specific points on an object across potentially deformed object configurations, and demonstrate using class general descriptors to transfer specific grasps across objects in a class.
Citing
If you find this code useful in your work, please consider citing:
@article{florencemanuelli2018dense,
title={Dense Object Nets: Learning Dense Visual Object Descriptors By and For Robotic Manipulation},
author={Florence, Peter and Manuelli, Lucas and Tedrake, Russ},
journal={Conference on Robot Learning},
year={2018}
}
Tutorial
Code Setup
Dataset
Training and Evaluation
Miscellaneous
Git management
To prevent the repo from growing in size, recommend always "restart and clear outputs" before committing any Jupyter notebooks. If you'd like to save what your notebook looks like, you can always "download as .html", which is a great way to snapshot the state of that notebook and share.
Build on conda
Installation using the following command. Note to check torch and torchvision version before your installation
# navigate to the root of the project so paths can be inferred
cd pytorch-dense-correspondence
python config/download_pdc_data.py config/dense_correspondence/dataset/composite/caterpillar_upright.yaml <full_path_to_data_location>
git submodule update --init --recursive
pip3 install -r requirements.txt
Edit the file config/docker_run_config.yaml
to point to the directory that contains the directory above pdc
.
For example if your username is username
and your hostname is hostname
, and you just put the pdc
folder inside of pytorch-dense-correspondence
, you would add an entry for:
hostname:
username:
path_to_data_directory: '/path/to/pytorch-dense-correspondence/'
Using the environment through the following command
conda activate $CONDA_ENV
source docker/entrypoint.sh
use_pytorch_dense_correspondence
Start the notebook
./start_notebook.py