Git Product home page Git Product logo

cosense3d's Introduction

Welcome to CoSense3D! This is an agent-oriented framework specially designed for cooperative perception for autonomous driving. The agent-based structure of this framework aims to accelerate the development process of cooperative perception models by more efficient and flexible data loading and distributing process, as well as the forward and gradient calculation scheduling.

Installation

Quick installation scripts are provided to install the environment with the following commands. For more detailed information about the installation, please refer to Installation page.

conda create -n consense3d python=3.8
conda activate cosense3d
cd Cosense3D 
# for Nvidia RTX 3090
bash setup_env_3090.sh
# for Nvidia RTX 4090
bash setup_env_4090.sh

Datasets

CoSense3D formats meta information of a dataset in a standardized json file, including the annotations and the relative path to the image and point cloud data. For a given new opensource dataset for collective perception, the meta info are parsed to json files, the media files are kept with its original folder structure. Currently, the supported datasets are:

  • OPV2V
  • V2Vreal
  • DairV2X

For more details about downloading the datasets, please refer to Datasets page.

Quick start

The main entry of this project is at cosense3d/tools/agent_runner.py.

Required arguments:

  • config: the yaml configuration file path.
  • mode: runner mode. vis_train and vis_test for visualizing the training and the testing data, respectively. train and test for training and testing the model.

Optional arguments:

  • visualize: visualize the data during the training and the testing process.
  • resume-from: resume training from the give checkpoint path.
  • load-from: load checkpoint to initialize model for training or testing.
  • log-dir: logging path for training output. If not provided, it will log to the cosense3d/logs/default_[Month-Day-Hour-Minute-Second] path.
  • run-name: if given, the logging path will be formatted as cosense3d/logs/[run-name]_[Month-Day-Hour-Minute-Second].
  • seed: global random seed.
  • gpus: number of gpus for training. The default is 0 means no parallel training. This number can only to set to >= 1 when using tochrun for parallel training on multiple GPUs.
  • data-path: overwrite the data path in the yaml config file.
  • meta-path: overwrite the meta path in the yaml config file.
  • batch-size: overwrite the training batch size in the yaml config file.
  • n-workers: overwrite the number of the workers in the yaml config file.

GUI

Our framework provides a graphical user interface for interactive visualization of the data and the training and testing process. To have a quick look into your dataset, run

cd CoSense3D 
PYTHONPATH=. python cosense3d/tools/agent_runner.py --config [CONFIG FILE] --mode [vis_train | vis_test]
# check if the OPV2Vt data is correctly loaded during training
PYTHONPATH=. python cosense3d/tools/agent_runner.py --config ./config/sp3d_cav.yaml --mode train --visualize

Demos:

# visualize OPV2Vt dataset test set
PYTHONPATH=. python cosense3d/tools/agent_runner.py --config ./config/opv2v.yaml --mode vis_test

DEMO OPV2Vt

# visualize DairV2Xt dataset test set
PYTHONPATH=. python cosense3d/tools/agent_runner.py --config ./config/dairv2x.yaml --mode vis_test

DEMO DairV2Xt

Train

# Train on a single GPU
PYTHONPATH=. python cosense3d/tools/agent_runner.py --config ./config/sp3d_cav.yaml --mode train --run-name sp3d-opv2vt
# Parallel training on multiple GPUs
PYTHONPATH=. OMP_NUM_THREADS=16 torchrun \
--nproc_per_node=2 \
cosense3d/tools/agent_runner.py \
--config ./cosense3d/config/sp3d_cav.yaml \
--mode train \
--gpus 2 \
--batch-size 2

Test

# Train on a single GPU
PYTHONPATH=. python cosense3d/tools/agent_runner.py --config ./path/to/config/file.yaml --mode test --load-from path/to/ckpt.pth

Benchmark and Model Zoo

Object Detection

Model Ngrad OPV2V [email protected] OPV2V [email protected] OPV2Vt ckpt
Fcooper all 82.2 89.9 drawing
Fcooper 2 68.7 83.5 drawing
FPVRCNN all 84.0 87.3 drawing
FPVRCNN 1 84.9 87.8 drawing
EviBEV all 84.1 91.1 drawing
EviBEV 1 79.5 89.1 drawing
AttnFusion all 87.6 92.3 drawing
AttnFusion 1 87.1 92.6 drawing

Citation

@INPROCEEDINGS{cosense3d,
  author={Yunshuang Yuan and Monika Sester},
  booktitle={2024 IEEE Intelligent Vehicles Symposium (IV)}, 
  title={CoSense3D: an Agent-based Efficient Learning Framework for Collective Perception}, 
  year={2024},
  pages={1-6},
  keywords={Collective Perception, Object Detection, Efficient Training},
  doi={10.1109/IV55152.2023.10186693}}

cosense3d's People

Contributors

yuanyunshuang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.