Skip to content

PufferAI/PufferDrive

 
 

Repository files navigation

PufferDrive

Installation

Clone the repo

https://github.com/Emerge-Lab/PufferDrive.git

Make a venv

uv venv

Activate the venv

source .venv/bin/activate

Install inih

wget https://github.com/benhoyt/inih/archive/r62.tar.gz

Inside the venv, install the dependencies

uv pip install -e .

Compile the C code

python setup.py build_ext --inplace --force

To test your setup, you can run

puffer train puffer_drive

Alternative options for working with pufferdrive are found at https://puffer.ai/docs.html

Quick start

Start a training run

puffer train puffer_drive

Dataset

Data preparation

To train with PufferDrive, you need to convert JSON files to map binaries. Run the following command with the path to your data folder:

python pufferlib/ocean/drive/drive.py

Downloading Waymo Data

You can download the WOMD data from Hugging Face in two versions:

  • Mini Dataset: GPUDrive_mini contains 1,000 training files and 300 test/validation files
  • Full Dataset: GPUDrive contains 100,000 unique scenes

Note: Replace 'GPUDrive_mini' with 'GPUDrive' in your download commands if you want to use the full dataset.

Additional Data Sources

For more training data compatible with PufferDrive, see ScenarioMax. The GPUDrive data format is fully compatible with PufferDrive.

Visualizer

Headless server setup

Run the Raylib visualizer on a headless server and export as GIF.

Install dependencies

sudo apt update
sudo apt install ffmpeg xvfb

For HPC(There are no root privileges), so install into the conda environment

conda install -c conda-forge xorg-x11-server-xvfb-cos6-x86_64
conda install -c conda-forge ffmpeg
  • ffmpeg: Video processing and conversion
  • xvfb: Virtual display for headless environments

Build and run

  1. Build the application:
bash scripts/build_ocean.sh drive local
  1. Run with virtual display:
xvfb-run -s "-screen 0 1280x720x24" ./drive

The -s flag sets up a virtual screen at 1280x720 resolution with 24-bit color depth.

Output

The visualizer will automatically generate a GIF file from the rendered frames.

About

puffer_drive dev

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 66.0%
  • C 28.1%
  • Jupyter Notebook 1.5%
  • Cuda 1.2%
  • Cython 1.0%
  • Shell 0.9%
  • Other 1.3%