MCPcopy Index your code
hub / github.com/EmbodiedGPT/EmbodiedGPT_Pytorch

github.com/EmbodiedGPT/EmbodiedGPT_Pytorch @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
531 symbols 1,473 edges 28 files 98 documented · 18%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Embodied Family Code Base

We will update the instructions for this codebase as soon as possible.

Installation

See INSTALLATION.md

Data Preparation

  1. Download the EgoCOT dataset.
  2. Download the COCO-2017 dataset.

Download the Pretrained Model

Download the testing model Embodied_family_7btiny.

Prepare the Text Data Paired with Video and Image

  • Unzip datasets_share.zip, which contains the text part of the multi-modal dataset, to the ./datasets/ directory.

🏠 Overview

image

🎁 Major Features

image

Usage

This repo can be used in conjunction with PyTorch's Dataset and DataLoader for training models on heterogeneous data. Here's a brief overview of the classes and their functionalities:

BaseDataset

The BaseDataset class extends PyTorch's Dataset and is designed to handle different media types (images, videos, and text). It includes a transformation process to standardize the input data and a processor to handle the data specific to the task.

Example

from robohusky.base_dataset_uni import BaseDataset

# Initialize the dataset with the required parameters
dataset = BaseDataset(
    dataset,  # Your dataset here
    processor,  # Your processor here
    image_path="path/to/images",
    input_size=224,
    num_segments=8,
    norm_type="openai",
    media_type="image"
)

# Use the dataset with a PyTorch DataLoader
from torch.utils.data import DataLoader

data_loader = DataLoader(dataset, batch_size=32, shuffle=True)

WeightedConcatDataset

The WeightedConcatDataset class extends PyTorch's ConcatDataset and allows for the creation of a unified dataset by concatenating multiple datasets with specified weights.

Example

from robohusky.base_dataset_uni import WeightedConcatDataset

# Assume we have multiple datasets for different tasks
dataset1 = BaseDataset(...)
dataset2 = BaseDataset(...)
dataset3 = BaseDataset(...)

# Define the weights for each dataset
weights = [0.5, 0.3, 0.2]

# Create a weighted concatenated dataset
weighted_dataset = WeightedConcatDataset([dataset1, dataset2, dataset3], weights=weights)

# Use the weighted dataset with a PyTorch DataLoader
data_loader = DataLoader(weighted_dataset, batch_size=32, shuffle=True)

Customization

The package is designed to be flexible and customizable. You can implement your own transformation and processing logic by subclassing BaseDataset and overriding the necessary methods.

🎫 License

This project is released under the Apache 2.0 license.

🖊️ Citation

If you find this project useful in your research, please consider cite:

@article{mu2024embodiedgpt,
  title={Embodiedgpt: Vision-language pre-training via embodied chain of thought},
  author={Mu, Yao and Zhang, Qinglong and Hu, Mengkang and Wang, Wenhai and Ding, Mingyu and Jin, Jun and Wang, Bin and Dai, Jifeng and Qiao, Yu and Luo, Ping},
  journal={Advances in Neural Information Processing Systems},
  volume={36},
  year={2024}
}

Core symbols most depended-on inside this repo

from_pretrained
called by 20
robohusky/configuration_husky.py
register_conv_template
called by 19
robohusky/conversation.py
append_message
called by 18
robohusky/conversation.py
get_conv_template
called by 15
robohusky/conversation.py
copy
called by 14
robohusky/conversation.py
transpose_for_scores
called by 14
robohusky/model/modeling_husky_embody2.py
generate
called by 10
robohusky/model/modeling_husky.py
transpose_for_scores
called by 7
robohusky/model/modeling_husky.py

Shape

Method 350
Class 107
Function 74

Languages

Python100%

Modules by API surface

robohusky/model/modeling_husky_embody2.py102 symbols
robohusky/model/modeling_husky_embody2_ori.py98 symbols
robohusky/model/modeling_husky.py98 symbols
robohusky/video_transformers.py45 symbols
demo/script.py22 symbols
robohusky/base_dataset_uni.py20 symbols
robohusky/utils.py14 symbols
robohusky/base_dataset.py14 symbols
demo/test.py14 symbols
demo/inference.py14 symbols
robohusky/conversation.py11 symbols
robohusky/model/configuration_husky_ori.py10 symbols

For agents

$ claude mcp add EmbodiedGPT_Pytorch \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact