Skip to main content

rt-2 - PyTorch

Project description

Multi-Modality

Robotic Transformer 2 (RT-2): The Vision-Language-Action Model

rt gif

GitHub issues GitHub forks GitHub stars GitHub license Share on Twitter Share on FacebookShare on LinkedIn Discord Share on Reddit Share on Hacker News Share on Pinterest Share on WhatsApp


This is my implementation of the model behind RT-2. RT-2 leverages PALM-E as the backbone with a Vision encoder and language backbone where images are embedded and concatenated in the same space as the language embeddings. This architecture is quite easy to architect but suffers from a lack of deep understanding of both the unified multi modal representation or the individual modality representations.

CLICK HERE FOR THE PAPER

Installation

RT-2 can be easily installed using pip:

pip install rt2

Usage

The RT2 class is a PyTorch module that integrates the PALM-E model into the RT-2 class. Here are some examples of how to use it:

Initialization

First, you need to initialize the RT2 class. You can do this by providing the necessary parameters to the constructor:

import torch
from rt2.model import RT2

# img: (batch_size, 3, 256, 256)
# caption: (batch_size, 1024)
img = torch.randn(1, 3, 256, 256)
caption = torch.randint(0, 20000, (1, 1024))

# model: RT2
model = RT2()

# Run model on img and caption
output = model(img, caption)
print(output)  # (1, 1024, 20000)

Benefits

RT-2 stands at the intersection of vision, language, and action, delivering unmatched capabilities and significant benefits for the world of robotics.

  • Leveraging web-scale datasets and firsthand robotic data, RT-2 provides exceptional performance in understanding and translating visual and semantic cues into robotic control actions.
  • RT-2's architecture is based on well-established models, offering a high chance of success in diverse applications.
  • With clear installation instructions and well-documented examples, you can integrate RT-2 into your systems quickly.
  • RT-2 simplifies the complexities of multi-domaster understanding, reducing the burden on your data processing and action prediction pipeline.

Model Architecture

RT-2 integrates a high-capacity Vision-Language model (VLM), initially pre-trained on web-scale data, with robotics data from RT-2. The VLM uses images as input to generate a sequence of tokens representing natural language text. To adapt this for robotic control, RT-2 outputs actions represented as tokens in the model’s output.

RT-2 is fine-tuned using both web and robotics data. The resultant model interprets robot camera images and predicts direct actions for the robot to execute. In essence, it converts visual and language patterns into action-oriented instructions, a remarkable feat in the field of robotic control.

Datasets

Dataset Description Source Percentage in Training Mixture (RT-2-PaLI-X) Percentage in Training Mixture (RT-2-PaLM-E)
WebLI Around 10B image-text pairs across 109 languages, filtered to the top 10% scoring cross-modal similarity examples to give 1B training examples. Chen et al. (2023b), Driess et al. (2023) N/A N/A
Episodic WebLI Not used in co-fine-tuning RT-2-PaLI-X. Chen et al. (2023a) N/A N/A
Robotics Dataset Demonstration episodes collected with a mobile manipulation robot. Each demonstration is annotated with a natural language instruction from one of seven skills. Brohan et al. (2022) 50% 66%
Language-Table Used for training on several prediction tasks. Lynch et al. (2022) N/A N/A

Datasets

Datasets used in the paper

Dataset Description Source Percentage in Training Mixture (RT-2-PaLI-X) Percentage in Training Mixture (RT-2-PaLM-E)
WebLI Around 10B image-text pairs across 109 languages, filtered to the top 10% scoring cross-modal similarity examples to give 1B training examples. Chen et al. (2023b), Driess et al. (2023) N/A N/A
Episodic WebLI Not used in co-fine-tuning RT-2-PaLI-X. Chen et al. (2023a) N/A N/A
Robotics Dataset Demonstration episodes collected with a mobile manipulation robot. Each demonstration is annotated with a natural language instruction from one of seven skills. Brohan et al. (2022) 50% 66%
Language-Table Used for training on several prediction tasks. Lynch et al. (2022) N/A N/A

Commercial Use Cases

The unique capabilities of RT-2 open up numerous commercial applications:

  • Automated Factories: RT-2 can significantly enhance automation in factories by understanding and responding to complex visual and language cues.
  • Healthcare: In robotic surgeries or patient care, RT-2 can assist in understanding and performing tasks based on both visual and verbal instructions.
  • Smart Homes: Integration of RT-2 in smart home systems can lead to improved automation, understanding homeowner instructions in a much more nuanced manner.

Contributing

Contributions to RT-2 are always welcome! Feel free to open an issue or pull request on the GitHub repository.

Contact

For any queries or issues, kindly open a GitHub issue or get in touch with kyegomez.

Citation

@inproceedings{RT-2,2023,
  title={},
  author={Anthony Brohan, Noah Brown, Justice Carbajal, Yevgen Chebotar, Xi Chen, Krzysztof Choromanski,
Tianli Ding, Danny Driess, Avinava Dubey, Chelsea Finn, Pete Florence, Chuyuan Fu,
Montse Gonzalez Arenas, Keerthana Gopalakrishnan, Kehang Han, Karol Hausman, Alexander Herzog,
Jasmine Hsu, Brian Ichter, Alex Irpan, Nikhil Joshi, Ryan Julian, Dmitry Kalashnikov, Yuheng Kuang,
Isabel Leal, Lisa Lee, Tsang-Wei Edward Lee, Sergey Levine, Yao Lu, Henryk Michalewski, Igor Mordatch,
Karl Pertsch, Kanishka Rao, Krista Reymann, Michael Ryoo, Grecia Salazar, Pannag Sanketi,
Pierre Sermanet, Jaspiar Singh, Anikait Singh, Radu Soricut, Huong Tran, Vincent Vanhoucke, Quan Vuong,
Ayzaan Wahid, Stefan Welker, Paul Wohlhart, Jialin Wu, Fei Xia, Ted Xiao, Peng Xu, Sichun Xu, Tianhe Yu,
and Brianna Zitkovich},
  year={2024}
}

License

RT-2 is provided under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rt2-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

rt2-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file rt2-0.1.0.tar.gz.

File metadata

  • Download URL: rt2-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for rt2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 46de9b96f9000fea300b5ceaab3d9666e9bf9764015e81c89e16ec35448b3c9e
MD5 9b04d8cac48a47b6149f5bf617191c14
BLAKE2b-256 8ffecf541adb493c2e9da08671f9a348615dc8fc89ca0472a17137c93efe53f0

See more details on using hashes here.

File details

Details for the file rt2-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rt2-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.0 Darwin/22.4.0

File hashes

Hashes for rt2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 210589fa32e35e0d04e12597dd9d8f05ed72b6204a11aa3feb5fc66fab94cd31
MD5 e0efa573a3be8a713ee73685e2c65f41
BLAKE2b-256 5c23f2b806c2d15c9b4bf9dcfb7b3ffcde710228dbeedefdb6c49bb98ad01b1e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page