Skip to content

Instantly share code, notes, and snippets.

View normandipalo's full-sized avatar

Norman Di Palo normandipalo

View GitHub Profile
@normandipalo
normandipalo / dinobot_oneshot_il.py
Last active May 21, 2024 14:17
Code snippet for the one-shot imitation learning phase of DINOBot (alignment + replay).
"""
In this script, we demonstrate how to use DINOBot to do one-shot imitation learning.
You first need to install the following repo and its requirements: https://github.com/ShirAmir/dino-vit-features.
You can then run this file inside that repo.
There are a few setup-dependent functions you need to implement, like getting an RGBD observation from the camera
or moving the robot, that you will find on top of this file.
"""
import torch
import numpy as np