Skip to content

About

Enhancing the DreMa framework through automated data gathering, SAM 3 segmentation, and optimized 3D mesh generation in real-world setups

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

DreMa Freiburg Extension

This is a fork of DreMa (ICLR 2025) developed as part of a master's project at the University of Freiburg by Berke Ceylan.

For the original DreMa codebase readme see Original README.

The goal of this project was to take DreMa to a complete real-robot pipeline: collecting data with a Franka Panda, building the Gaussian splatting world model, generating augmented demonstrations, and training and deploying a PerAct policy back on the real robot.

Improved DreMa pipeline for lab deployment

Extensions & Improvements

The main extensions over the original codebase, needed to deploy and evaluate DreMa on a real Franka Panda in Freiburg:

Real-world data collection (robot_scanner/)

End-to-end automated data collection for the Franka Panda. Supports several movement patterns such as Bézier arch, orbit, line-scan, random-pose and GELLO replay, and handles camera–robot calibration, pose recording in DreMa format and depth saving.

Point cloud aggregation

robot_scanner/tools/pointcloud_aggregation.py fuses the recorded RGB-D frames into a single world-frame point cloud. This is a quick way to check that a scan is accurate and complete, and the same cloud later serves as the reference for mesh evaluation.

SAM3 segmentation backend

Integrated Meta's SAM3 as the segmentation backend (the original paper used DEVA). Everything is configured in configs/segmentation.yaml via the method field:

  • grounded_sam: GroundingDINO + SAM, text-prompted, per-frame
  • sam3: SAM3 image model, text-prompted, per-frame
  • sam3_video: SAM3 video tracker, visual-prompted, propagates across all frames

For sam3_video, first run tools/pick_visual_prompts.py to draw bounding boxes on one frame (the middle frame by default, or set prompt_frame). Then run_segmentation.py propagates these prompts through the whole video and writes the masks.

Visual prompt picking and propagation

Mesh quality improvement

The original paper extracts meshes from GS-rendered depth, which inherits the noise and incompleteness of the rendering so its not ideal for PyBullet interaction.

We feed the raw RealSense depth directly into TSDF fusion instead. Mesh quality is measured with bidirectional Chamfer distance against the aggregated point cloud (tools/eval_mesh_quality.py); on our scenes this brought the mean recall error from ~10mm down to ~6mm.

GS-rendered depth mesh vs raw depth mesh

Dual-camera setup

The simulation renders both the wrist camera (RealSense D415) and the overhead camera (Azure Kinect) with matching real-world calibration, including per-step wrist extrinsics. This fixes the wrist-camera rendering mismatch of the original release and gives PerAct two consistent views in both training and deployment.

PerAct training & deployment

The generated episodes are converted to PerAct's input format through our RLBench fork (no CoppeliaSim needed), and our PerAct fork trains directly on them. The trained policy runs both inside the DreMa simulation (simulate_peract.py) and on the real robot (deploy_peract.py).

Main Scripts

In pipeline order:

# 1. data collection
python robot_scanner/run.py                        # automated RGB-D + pose recording
python run_segmentation.py                         # object masks (SAM3 video)

# 2. simulation setup
python create_simulation.py                        # extract Gaussians, meshes, URDFs
python simulate.py                                 # inspect the reconstructed scene

# 3. data generation
python tools/prepare_scene_for_generation.py       # convert recording, add camera fields, create aux pkl files
python generate_new_data.py                        # generate augmented episodes (wrist + overhead)

# 4. training: run train.py from our PerAct fork on the generated data

# 5. deployment
python simulate_peract.py                          # trained policy inside the DreMa simulation
python deploy_peract.py                            # trained policy on the real robot

Credits

About

Enhancing the DreMa framework through automated data gathering, SAM 3 segmentation, and optimized 3D mesh generation in real-world setups

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages