.. _setup_installation: Setup & Installation ==================== Prerequisites ------------- * Python 3.7+ * pip (Python package installer) * Git (for cloning the repository) * (Optional for CARLA mode) CARLA Simulator installed and running. Cloning the Repository ---------------------- .. code-block:: bash git clone https://github.com/batman-911/ADAS.git cd ADAS # Or your project's root directory Installing Dependencies ----------------------- The project uses a :doc:`requirements.txt <../../requirements>` file to manage Python dependencies. .. code-block:: bash pip install -r requirements.txt This will install packages like OpenCV, PyTorch, PyQt6, Ultralytics, NLTK, etc. Downloading Pre-trained Models ------------------------------ The system relies on pre-trained models for perception tasks. A script is provided to download these models. .. code-block:: bash chmod +x download_models.sh bash download_models.sh This script (:doc:`download_models.sh <../../download_models>`) downloads models like ``best.pt`` (for object detection), ``crestereo_combined_iter2_480x640.onnx`` (for disparity estimation), and ``ultra_falst_lane_detection_culane_288x800.onnx`` (for lane detection) into the ``wights/`` directory. Setting Up Environment Variables -------------------------------- A setup script is provided to add the project directory to ``PYTHONPATH``. .. code-block:: bash # Make sure you are in the project's root directory chmod +x setup.sh bash setup.sh This script (:doc:`setup.sh <../../setup>`) primarily ensures that Python can find the project's modules. NLTK Data for Chatbot --------------------- The NLP chatbot requires NLTK data (``punkt``, ``wordnet``). The :doc:`NLP/adas_chatbot.py <../../NLP/adas_chatbot>` script attempts to download these automatically upon first run if they are missing.