Skip to content
Branch: master
Find file History
ericjang and Copybara-Service Add FiLM-conditioned (Perez et al. 2017) ResNet implementation, clone…
…d from official TF ResNet impl.

PiperOrigin-RevId: 256478718
Latest commit 56fa9f6 Jul 4, 2019


Source codes for reproducing "Grasp2Vec: Learning Object Representations from Self-Supervised Grasping".



Eric Jang*1, Coline Devin*2, Vincent Vanhoucke1, Sergey Levine12

*Equal Contribution, 1 Google Brain, 2UC Berkeley

Training the Model

Data is not included in this repository, so you will have to provide your own training/eval datasets of TFRecords. The Grasp2Vec T2R model attempts to parse the following Feature spec from the data, before cropping and resizing the parsed images:

tspec.pregrasp_image = TensorSpec(shape=(512, 640, 3),
    dtype=tf.uint8, name='image', data_format='jpeg')
tspec.postgrasp_image = TensorSpec(
    shape=(512, 640, 3), dtype=tf.uint8, name='postgrasp_image',
tspec.goal_image = TensorSpec(
    shape=(512, 640, 3), dtype=tf.uint8, name='present_image',

Note that image, postgrasp_image, present_image are the names of features stored in the TFExample feature map.

python3 -m tensor2robot.bin.run_t2r_trainer --logtostderr \
  --gin_configs="tensor2robot/research/grasp2vec/configs/train_grasp2vec.gin" \
  --gin_bindings="train_eval_model.model_dir='/tmp/grasp2vec/'" \
  --gin_bindings="TRAIN_DATA='/path/to/your/data/train*' \

Tensorboard will show heatmap localization visualization summaries as shown in the paper.

You can’t perform that action at this time.