Giter Club home page Giter Club logo

drivecmd_llm's Introduction

Human-Centric Autonomous Systems With LLMs for User Command Reasoning

arXiv

Task: In-Cabin User Command Understanding (UCU), workshop in WACV2024

Here is our solution code. Please check the report for more detail.

llama & codellama

Here we introduced how to setup and the way to downloaded their model:

  1. Send request to their form Apply here in Meta official page and you will receive an email with some details.

  2. Dependencies: sudo apt install wget ucommon-utils

  3. run ./scripts/llama/download.sh to download Llama models.

  4. mamba create --name llc python=3.8 && mamba activate llc && pip install -r requirements.txt

  5. Run the example:

    torchrun --nproc_per_node 1 scripts/main_codellama.py

GPT API

copy your OPENAI_API_KEY and save it in .env. OPENAI_API_KEY='xxxx'

install below

pip install openai
pip install -U python-dotenv

Run the example:

python scripts/main_gpt.py --provide_few_shots True --step_by_step True

Evaluation

You will have a result .json file finally. Then run the eval.py For each task-level accuracy:

python scripts/eval.py -g assets/ucu.csv -e assets/result/test.json

Here is the demo output:

Evaluating assets/result/gpt-4_best.json ...
| Task                |   Accuracy |
|---------------------+------------|
| Perception          |   0.931756 |
| In-cabin monitoring |   0.748863 |
| Localization        |   0.915378 |
| Vehicle control     |   0.88626  |
| Entertainment       |   0.944495 |
| Personal data       |   0.859873 |
| Network access      |   0.919927 |
| Traffic laws        |   0.915378 |
| Overall             |   0.890241 |

LLVM_AD Official Leaderboard

Here is official evaluate with -o:

python3 scripts/llvm_ad/official_eval.py -o -g assets/ucu.csv -e assets/result/gpt4_best.csv

We attach the raw .json output files (with explainations and output), and its corresponding .cvs files (binary output only) under assets/result folder.

Here is demo output:

Since the input file is .json, we save the prediction to .csv file at assets/result/gpt-4_best.csv
Evaluating assets/result/gpt-4_best.json ...
Following is the evaluation result in official way:

Command-level acc: 0.38034576888080074
Question-level acc: 0.8902411282984531

Acknowledgements

This work was funded by Vinnova, Sweden (research grant). The computations were enabled by the supercomputing resource Berzelius provided by National Supercomputer Centre at Linköping University and the Knut and Alice Wallenberg foundation, Sweden.

This implementation is based on codes from several repositories. Thanks for these authors who kindly open-sourcing their work to the community. Please see our paper reference part to get more information.

❤️: llvm-ad, llama2

Cite Our Paper

@article{yi2023drivecmdllm,
  author={Yang, Yi and Zhang, Qingwen and Li, Ci and Simões Marta, Daniel and Batool, Nazre and Folkesson, John},
  title={Human-Centric Autonomous Systems With LLMs for User Command Reasoning},
  journal={arXiv preprint arXiv:2311.08206},
  year={2023}
}

drivecmd_llm's People

Contributors

kin-zhang avatar iyuner avatar celiali avatar

Stargazers

killer9 avatar Longhao Yan avatar savoki avatar  avatar  avatar James Vilho avatar szh avatar Zesen avatar  avatar Shaohang Han avatar Manasvi Saxena avatar

Watchers

Patric Jensfelt avatar Daniel Marta avatar  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.