Git Product home page Git Product logo

jason-li-831202 / vehicle-cv-adas Goto Github PK

View Code? Open in Web Editor NEW
137.0 3.0 34.0 23.18 MB

The project can achieve FCWS, LDWS, and LKAS functions solely using only visual sensors. using YOLOv5 / YOLOv5-lite / YOLOv6 / YOLOv7 / YOLOv8 / YOLOv9 / EfficientDet and Ultra-Fast-Lane-Detection-v2 .

License: GNU General Public License v3.0

Python 100.00%
lane-detection object-detection onnxruntime yolov5 ultra-fast-lane-detection-v2 python tensorrt yolov8 yolov5-lite fcws

vehicle-cv-adas's Introduction

Vehicle-CV-ADAS

Python OnnxRuntime TensorRT Markdown Visual Studio Code Windows

Example scripts for the detection of lanes using the ultra fast lane detection v2 model in ONNX/TensorRT.

Example scripts for the detection of objects using the YOLOv5/YOLOv5-lite/YOLOv6/YOLOv7/YOLOv8/YOLOv9/EfficientDet model in ONNX/TensorRT.

Add ByteTrack to determine the driving direction of ID vehicles and perform trajectory tracking.

➤ Contents

  1. Requirements

  2. Examples

  3. Demo

  4. License

!ADAS on video

➤ Requirements

  • Python 3.7+

  • OpenCV, Scikit-learn, onnxruntime, pycuda and pytorch.

  • Install :

    The requirements.txt file should list all Python libraries that your notebooks depend on, and they will be installed using:

    pip install -r requirements.txt
    

➤ Examples

  • Download YOLO Series Onnx model :

    Use the Google Colab notebook to convert

    Model release version Link
    YOLOv5 v6.2 Open In Colab
    YOLOv6/Lite 0.4.0 Open In Colab
    YOLOv7 v0.1 Open In Colab
    YOLOv8 8.1.27 Open In Colab
    YOLOv9 v0.1 Open In Colab
  • Convert Onnx to TenserRT model :

    Need to modify onnx_model_path and trt_model_path before converting.

    python convertOnnxToTensorRT.py -i <path-of-your-onnx-model>  -o <path-of-your-trt-model>
    
  • Quantize ONNX models :

    Converting a model to use float16 instead of float32 can decrease the model size.

    python onnxQuantization.py -i <path-of-your-onnx-model>
    
  • Video Inference :

    • Setting Config :

      Note : can support onnx/tensorRT format model. But it needs to match the same model type.

    lane_config = {
     "model_path": "./TrafficLaneDetector/models/culane_res18.trt",
     "model_type" : LaneModelType.UFLDV2_CULANE
    }
    
    object_config = {
     "model_path": './ObjectDetector/models/yolov8l-coco.trt',
     "model_type" : ObjectModelType.YOLOV8,
     "classes_path" : './ObjectDetector/models/coco_label.txt',
     "box_score" : 0.4,
     "box_nms_iou" : 0.45
    }
    Target Model Type Describe
    Lanes LaneModelType.UFLD_TUSIMPLE Support Tusimple data with ResNet18 backbone.
    Lanes LaneModelType.UFLD_CULANE Support CULane data with ResNet18 backbone.
    Lanes LaneModelType.UFLDV2_TUSIMPLE Support Tusimple data with ResNet18/34 backbone.
    Lanes LaneModelType.UFLDV2_CULANE Support CULane data with ResNet18/34 backbone.
    Object ObjectModelType.YOLOV5 Support yolov5n/s/m/l/x model.
    Object ObjectModelType.YOLOV5_LITE Support yolov5lite-e/s/c/g model.
    Object ObjectModelType.YOLOV6 Support yolov6n/s/m/l, yolov6lite-s/m/l model.
    Object ObjectModelType.YOLOV7 Support yolov7 tiny/x/w/e/d model.
    Object ObjectModelType.YOLOV8 Support yolov8n/s/m/l/x model.
    Object ObjectModelType.YOLOV9 Support yolov9s/m/c/e model.
    Object ObjectModelType.EfficientDet Support efficientDet b0/b1/b2/b3 model.
    • Run :
    python demo.py
    

➤ Demo

  • Demo Youtube Video

  • Display

    !ADAS on video

  • Front Collision Warning System (FCWS)

    !FCWS

  • Lane Departure Warning System (LDWS)

    !LDWS

  • Lane Keeping Assist System (LKAS)

    !LKAS

➤ License

WiFi Analyzer is licensed under the GNU General Public License v3.0 (GPLv3).

GPLv3 License key requirements :

  • Disclose Source
  • License and Copyright Notice
  • Same License
  • State Changes

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.