Skip to content

Instantly share code, notes, and snippets.

@shreyasgite
shreyasgite / modal_deploy.py
Created March 15, 2025 04:28
Training script for lerobot using modal
import modal
# how to run:
# modal run modal_deploy.py
# modal run --detach modal_deploy.py
image = (
modal.Image
.debian_slim()
.pip_install_from_pyproject("pyproject.toml")
@shreyasgite
shreyasgite / robot-tragectory-augmentation.py
Created March 4, 2025 19:33
Helper functions for augmenting robot trajectories for so100 robot and lerobot
def flip_frame(frame_data, flip=True):
"""
Create a flipped version of a frame by horizontally flipping camera images
and inverting the first dimension of action and state tensors.
Args:
frame_data: Dict containing frame data
flip: Boolean indicating whether to actually flip the frame (default: True)
If False, only format standardization is performed
@shreyasgite
shreyasgite / image-utils.py
Created February 22, 2025 15:35
Helper functions for Image Inpainting for Robotics datasets.
import modal
from diffusers.utils import load_image
import matplotlib.pyplot as plt
import numpy as np
from PIL import Image
from PIL import ImageDraw
import cv2
from tqdm.notebook import tqdm
from typing import List, Optional, Dict, Union