This model has been pushed to the Hub using the PytorchModelHubMixin integration:
- Library: https://huggingface.co/phython96/ROCKET-1
- Docs: [More Information Needed]
- Paper: https://huggingface.co/papers/2410.17856
- Github: https://github.com/CraftJarvis/ROCKET-1
- Project: https://craftjarvis.github.io/ROCKET-1
Usage
from rocket.arm.models import ROCKET1
from rocket.stark_tech.env_interface import MinecraftWrapper
model = ROCKET1.from_pretrained("phython96/ROCKET-1").to("cuda")
memory = None
input = {
"img": torch.rand(224, 224, 3, dtype=torch.uint8),
'segment': {
'obj_id': torch.tensor(6), # specify the interaction type
'obj_mask': torch.zeros(224, 224, dtype=torch.uint8), # highlight the regions of interest
}
}
agent_action, memory = model.get_action(input, memory, first=None, input_shape="*")
env_action = MinecraftWrapper.agent_action_to_env(agent_action)
# --------------------- the output --------------------- #
# agent_action = {'buttons': tensor([1], device='cuda:0'), 'camera': tensor([54], device='cuda:0')}
# env_action = {'attack': array(0), 'back': array(0), 'forward': array(0), 'jump': array(0), 'left': array(0), 'right': array(0), 'sneak': array(0), 'sprint': array(0), 'use': array(0), 'drop': array(0), 'inventory': array(0), 'hotbar.1': array(0), 'hotbar.2': array(0), 'hotbar.3': array(0), 'hotbar.4': array(0), 'hotbar.5': array(0), 'hotbar.6': array(0), 'hotbar.7': array(0), 'hotbar.8': array(0), 'hotbar.9': array(0), 'camera': array([-0.61539427, 10. ])}
- Downloads last month
- 36