Downloads · 30 days
7
28% of all-time downloads
kavinrajkrupsurge/act-lampe-movements
act-lampe-movements is a machine learning model from kavinrajkrupsurge. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
ACT (Action Chunking with Transformers) model trained on the autolampesearch dataset for robot control.
Downloads · 30 days
7
28% of all-time downloads
All-time downloads
25
Public
Parameters
14M
55.9 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors55.9 MB · 100%
From the Hugging Face model README
ACT (Action Chunking with Transformers) model trained on the auto_lampe_search dataset for robot control.
Repository: kavinrajkrupsurge/act-lampe-movements
# Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install PyTorch (choose based on your CUDA version)
# For CUDA 11.8:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# For CUDA 12.1:
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# For CPU only:
pip install torch torchvision torchaudio
# Install LeRobot
git clone https://github.com/huggingface/lerobot.git
cd lerobot
pip install -e .
# Install additional dependencies
pip install huggingface_hub pillow numpy pandas tqdm draccus
The model will be automatically downloaded when you use the inference script. Alternatively, you can download manually:
pip install huggingface_hub
python -c "from huggingface_hub import snapshot_download; snapshot_download('kavinrajkrupsurge/act-lampe-movements')"
# Download the inference script from the repository
# Or use the one provided in this repository
python inference_hf.py \
--repo-id kavinrajkrupsurge/act-lampe-movements \
--image path/to/your/image.jpg \
--dataset-root /path/to/dataset # Optional if you have the dataset
from inference_hf import ACTInference
from PIL import Image
import numpy as np
# Initialize model (will download automatically from Hugging Face)
model = ACTInference(
repo_id="kavinrajkrupsurge/act-lampe-movements",
device="cuda" # or "cpu"
)
# Load image
image = Image.open("path/to/image.jpg")
# Predict action
action = model.predict(
image=image,
state=np.array([0.0, 0.0]) # [position, velocity]
)
print(f"Position: {action[0]:.4f}, Velocity: {action[1]:.4f}")
This repository contains multiple checkpoints from training:
The main model files in the root directory correspond to checkpoint-005000.
from inference_hf import ACTInference
from huggingface_hub import hf_hub_download
import json
import torch
from pathlib import Path
# Download specific checkpoint
checkpoint_path = hf_hub_download(
repo_id="kavinrajkrupsurge/act-lampe-movements",
filename="checkpoints/checkpoint-003000/pretrained_model/config.json"
)
# Use the checkpoint path with ACTInference or modify the code to load from local path
auto_lampe_search/
├── auto_lampe_search_0/
│ ├── frames/
│ │ ├── frame_0000.jpg
│ │ ├── frame_0001.jpg
│ │ └── ...
│ ├── joint_trajectory.csv
│ └── metadata.json
├── auto_lampe_search_1/
│ └── ...
└── ...
auto_lampe_search_{N}/frames/: Directory with images named frame_{XXXX}.jpgjoint_trajectory.csv: CSV with columns base_joint, velocity (and optionally joint2, joint3, joint4)metadata.json: JSON with episode metadata# Clone the repository or download convert_to_lerobot.py
python convert_to_lerobot.py
This will create a LeRobot-compatible dataset at /workspace/lerobot_dataset.
# Install LeRobot first (see installation section above)
cd lerobot
python -m lerobot.scripts.lerobot_train \
--dataset.repo_id=local/auto_lampe_search \
--dataset.root=/path/to/lerobot_dataset \
--policy.type=act \
--policy.push_to_hub=false \
--output_dir=/path/to/outputs/act_lampe_search \
--job_name=act_lampe_search \
--policy.device=cuda \
--batch_size=16 \
--steps=5000 \
--policy.optimizer_lr=1e-4 \
--policy.optimizer_weight_decay=1e-2 \
--policy.chunk_size=20 \
--policy.n_action_steps=20 \
--policy.n_obs_steps=1 \
--policy.dropout=0.3 \
--policy.dim_model=256 \
--policy.dim_feedforward=1024 \
--policy.n_encoder_layers=2 \
--policy.n_decoder_layers=1 \
--policy.use_vae=false \
--save_freq=1000 \
--wandb.enable=false
python push_to_huggingface.py
Follow the prompts to:
The script will upload all checkpoints automatically.
[position, velocity][position, velocity]act-lampe-movements/
├── README.md # This file
├── inference_hf.py # Inference script
├── config.json # Model configuration (checkpoint-005000)
├── model.safetensors # Model weights (checkpoint-005000)
├── policy_preprocessor.json # Preprocessor config
├── policy_postprocessor.json # Postprocessor config
├── train_config.json # Training configuration
└── checkpoints/ # All training checkpoints
├── checkpoint-001000/
│ └── pretrained_model/
├── checkpoint-002000/
│ └── pretrained_model/
├── checkpoint-003000/
│ └── pretrained_model/
├── checkpoint-004000/
│ └── pretrained_model/
└── checkpoint-005000/
└── pretrained_model/
torch>=2.0.0
torchvision>=0.15.0
lerobot
huggingface_hub
pillow
numpy
pandas
tqdm
draccus
pip install torch torchvision torchaudio huggingface_hub pillow numpy pandas tqdm draccus
pip install -e lerobot # After cloning lerobot repository
If you encounter CUDA OOM errors:
--batch_size=8 or --batch_size=4--policy.device=cpu (slower but uses less memory)--policy.dim_model and --policy.dim_feedforwardEnsure:
convert_to_lerobot.py are correctIf model download fails:
huggingface_hub installed: pip install huggingface_hubhuggingface-cli loginCommon issues:
[position, velocity]device="cuda"If you use this model, please cite:
@misc{act-lampe-movements,
author = {Your Name},
title = {ACT Model for Lamp Search Task},
year = {2024},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/kavinrajkrupsurge/act-lampe-movements}}
}
Apache 2.0
For questions or issues, please open an issue on the Hugging Face model repository.