Coder Social home page Coder Social logo

dilu's Introduction

DiLu๐Ÿด: A Knowledge-Driven Approach to Autonomous Driving with Large Language Models

Custom badge Custom badge Stars GitHub issues PRs Welcome

ๅ •ๆช€ๆบชๆฐดไธญ๏ผŒๆบบไธๅพ—ๅ‡บใ€‚ๅค‡ๆ€ฅๆ›ฐ๏ผšโ€˜็š„ๅข๏ผŒไปŠๆ—ฅๅŽ„็Ÿฃ๏ผŒๅฏๅŠชๅŠ›๏ผโ€™็š„ๅขไนƒไธ€่ธŠไธ‰ไธˆ๏ผŒ้‚ๅพ—่ฟ‡๏ผŒไน˜ๆตฎๆธกๆฒณ. -- ไธ‰ๅ›ฝๅฟ—

In the face of adversity, the legendary horse DiLu follows Liu Bei's words to leapt across the Tanxi River, embodying intelligence and strength. Inspired by this tale, our DiLu framework endeavors to navigate the challenging terrains of autonomous driving.

Dilu-video.mp4

๐Ÿ” Framework Overview

DiLu is an innovative closed-loop, self-evolving framework, blending common-sense knowledge and memory components with the power of large language models. DiLu consists of four core modules: Environment, Reasoning, Reflection, and Memory.

DiLu is not just a framework, it's an exploration of Knowledge-driven Autonomous Driving.

๐ŸŒŸ Highlights

  • 2024-01-22 Codes are now release!
  • 2024-01-17 Exciting news! DiLu is accepted by ICLR 2024 ๐ŸŽ‰๐ŸŽ‰!
  • 2023-10-12 Explore our project page, now live here๐Ÿ”—!
  • 2023-09-28 Our paper is available on Arxiv๐Ÿ“„!

๐Ÿš€ Getting Started

1. Requirements ๐Ÿ“ฆ

For an optimal experience, we recommend using conda to set up a new environment for DiLu.

conda create -n dilu python=3.8 
conda activate dilu
pip install -r requirements.txt

๐Ÿ“ Note: DiLu requires specific versions of certain libraries (i.e. langchain==0.0.335, openai==0.28.1, chromadb==0.3.29), Please adhere to the versions specified in requirements.txt.

2. Configuration โš™๏ธ

All configurable parameters are located in config.yaml.

Before running DiLu, set up your OpenAI API keys. DiLu supports both OpenAI and Azure Openai APIs.

Configure as below in config.yaml:

OPENAI_API_TYPE: # 'openai' or 'azure'
# below are for Openai
OPENAI_KEY: # 'sk-xxxxxx' 
OPENAI_CHAT_MODEL: 'gpt-4-1106-preview' # Alternative models: 'gpt-3.5-turbo-16k-0613' (note: performance may vary)
# below are for Azure OAI service
AZURE_API_BASE: # https://xxxxxxx.openai.azure.com/
AZURE_API_VERSION: "2023-07-01-preview"
AZURE_API_KEY: #'xxxxxxx'
AZURE_CHAT_DEPLOY_NAME: # chat model deployment name
AZURE_EMBED_DEPLOY_NAME: # text embed model deployment name  

3. Running DiLu ๐Ÿด

Running DiLu is straightforward:

python run_dilu.py

The default setting runs a 3-shot simulation with different seeds. You can modify this in config.yaml.

After completing the simulations, check the results folder. log.txt contains detailed steps and seeds for each simulation, and all simulation videos are saved here too.

๐Ÿ“ Note: During DiLu execution, the 'highway-env' pygame window might appear unresponsive. If the terminal is actively outputting, everything is running as expected.

Use reflection module:

To activate the reflection module, set reflection_module to True in config.yaml. New memory items will be saved to the updated memory module.

4. Visualizing Results ๐Ÿ“Š

We provide a visualization scripts for the simulation result.

python ./visualize_results.py -r results/highway_0.db -m memories/20_mem

Open http://127.0.0.1:7860 to view each frame's prompts and decisions!

๐Ÿ”– Citation

If you find our paper and codes useful, please kindly cite us via:

@article{wen2023dilu,
  title={Dilu: A knowledge-driven approach to autonomous driving with large language models},
  author={Wen, Licheng and Fu, Daocheng and Li, Xin and Cai, Xinyu and Ma, Tao and Cai, Pinlong and Dou, Min and Shi, Botian and He, Liang and Qiao, Yu},
  journal={arXiv preprint arXiv:2309.16292},
  year={2023}
}

๐Ÿ“ License

DiLu is released under the Apache 2.0 license.

dilu's People

Contributors

zijinoier 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.