Skip to content

About

[ICRA 2025] Robotic-CLIP: Fine-tuning CLIP on Action Data for Robotic Applications

Resources

Stars

19 stars

Watchers

3 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

📄 Robotic-CLIP: Fine-tuning CLIP on Action Data for Robotic Applications

📌 Introduction

This repository contains the source code for the paper "Robotic-CLIP: Fine-tuning CLIP on Action Data for Robotic Applications", accepted at ICRA 2025. Robotic-CLIP enhances robotic perception by fine-tuning CLIP on a large-scale action dataset, allowing it to better understand dynamic actions in robotic tasks. Our model significantly improves action recognition and grasp detection in real-world applications.

🌟 Key Contributions

  • Robotic-CLIP Model: A novel fine-tuned CLIP model that aligns video frames with action descriptions for improved robotic perception.
  • Large-Scale Action Dataset: We construct a dataset of 309,433 videos (≈7.4M frames) labeled using foundation models to enable action understanding.
  • New Fine-tuning Approach: A contrastive learning pipeline that maintains CLIP’s static image capabilities while introducing action awareness.
  • Superior Performance: Outperforms CLIP and Alpha-CLIP in multiple robotic tasks, including grasp detection, policy learning, and visual navigation.
  • Real-World Applications: Demonstrates effectiveness in grasping tasks using a Kinova Gen3 robot.

📂 Dataset

To fine-tune Robotic-CLIP, we utilize three large-scale action datasets:

  • Something-Something V2: 220,847 videos across 174 action categories.
  • BridgeData V2: 60,096 videos covering 13 robotic manipulation actions.
  • RoboSet: 28,500 videos featuring 12 robotic tasks.

These datasets are processed using GroundingDINO and SAM to generate alpha masks, allowing Robotic-CLIP to focus on action-relevant object regions. The final dataset consists of 309,433 videos (~7.4M frames), making it one of the largest action datasets for robotic perception.

📷 Overview Figure

Robotic-CLIP Overview
Figure 1: Comparison of CLIP, Alpha-CLIP, and our Robotic-CLIP, which integrates action descriptions to enhance robotic understanding.

🔧 Installation

Create Environment

git clone https://github.com/Fsoft-AIC/Robotic-CLIP.git
cd Robotic-CLIP
conda create -n RoboticCLIP python=3.9
conda activate RoboticCLIP

Install Packages

conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch
pip install -r requirements.txt

Install AlphaCLIP

Our work acknowledges Alpha-CLIP by Sun et al., which serves as an important foundation for Robotic-CLIP. You can refer to their paper and repository here: Alpha-CLIP (Sun et al.)

git clone https://github.com/SunzeY/AlphaCLIP.git
cd AlphaCLIP
pip install -e .
cd ..

🚀 Usage

Training Robotic-CLIP:

$ export CUDA_VISIBLE_DEVICES=0
$ python train_robotic_clip_video.py \
  --dataset_path <path/to/action_data/video> \
  --checkpoint <local-pretrained-ViT-model> \
  --batch_size 8 \
  --clip_model <ViT-version> \
  --frac 0.95 \
  --epochs 100 \
  --robotic_checkpoint <path/to/Robotic-CLIP-checkpoint> \
  --train_batch_per_epoch 200 \
  --val_batch_per_epoch 50 \

Finetune Grasp Detection + Robotic-CLIP:

$ export CUDA_VISIBLE_DEVICES=0
$ python train_network_with_alpha.py \
    --network grconvnet3 \
    --use-depth 0 \
    --dataset grasp-anything \
    --dataset-path <path/to/grasp-anything> \
    --alpha-vision-ckpt-pth <local-pretrained-ViT-model> \
    --robot_checkpoint <path/to/Robotic-CLIP-checkpoint> \
    --batch-size 8 \
    --batches-per-epoch 600 \
    --epochs 100 \
    --optim adam \
    --lr-step-size 10 \
    --logdir logs/ \
    --seen 1

Evaluate on a grasp detection task:

$ python evaluate_cm.py \
  --dataset grasp-anything \
  --use-depth 0 \
  --dataset-path <path/to/grasp-anything> \
  --iou-eval 
  --seen 0 
  --network <path/to/checkpoint>

📜 Citation

If you use this code in your research, please cite:

@inproceedings{nguyen2025robotic,
  title={Robotic-CLIP: Fine-tuning CLIP on Action Data for Robotic Applications},
  author={Nguyen, Nghia and Vu, Minh Nhat and Ta, Tung D and Huang, Baoru and Vo, Thieu and Le, Ngan and Nguyen, Anh},
  booktitle = {ICRA},
  year={2025}
}

Thank you for your interest in our research! 🚀

About

[ICRA 2025] Robotic-CLIP: Fine-tuning CLIP on Action Data for Robotic Applications

Resources

Stars

19 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages