/vigilant-driving

Deep Learning on the road

Primary LanguagePythonMIT LicenseMIT

Vigilant Driving

logo

Requirements

  • Requires Pytorch to run.
  • Use tools.txt or requirement.txt to install the appropriate packages that you may need to install in your system.

Pip

   cd vigilant-driving
   python -m pip install -r requirements.txt

Conda

   cd vigilant-driving
   conda create -n <environment-name> --file tools.txt

Run

  • Makes prediction using the device's camera
     cd vigilant-driving/common
     python run.py -load camera 
  • Make prediction using a .mp4 file
     cd vigilant-driving/common
     python run.py -video insert_your_video_here.mp4 -load video  

C++

  • REQUIRED Libtorch | OpenCV

  • Edit the CMakeLists file (set the correct directories) before executing.

     cd vigilant-driving/arm64
     python models.py
     mkdir -p build && cd build
     cmake .. 
     make && ./main

GUI (In Progress):

  • Vigilant Driving Application can be found here.

Directory Structure


.
 ├── common             #  Main control for all models 
 ├── mobile             #  android app 
 ├── arm64              #  ARM64 support 
 ├── segnet             #  Segmentation on lanes
 ├── segnet_V2          #  Complete segmentation on the environment
 ├── depth              #  Segmentation on lanes
 ├── speed              #  Speed Prediction
 ├── collection         #  Used to gather data 
 ├── Etc                #  Random Files, Images, Gifs

Release

  • Available Models: ['disparitynet', 'segnet', 'ures', 'vidresnet', 'segnetv2']
  • Please use the latest release to download models:
    • alantess/vigilant-driving:main/{latest_release}
import torch
repo = 'alantess/vigilant-driving:main/1.0.75'
model = torch.hub.load(repo, 'segnet', pretrained=True)

Datasets

To-Do

  • Fix memory allocation in android.
  • Re-train speed.
  • Complete trajectory analysis.
  • Deploy models on ARM64 devices.
  • Quantize all the models.

License


MIT

REPO IS NO LONGER BEING MAINTAINED.