ngthanhtin / Vehicle-CV-ADAS

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/YOLOv8 model in ONNX/TensorRT.

➤ Contents

  1. Requirements

  2. Examples

  3. Demo

  4. License

!ADAS on video

➤ Requirements

  • 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

  • Comvert Onnx to TenserRT model :

    python convertOnnxToTensorRT.py
    
  • 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.YOLOV8 Support yolov8n/s/m/l/x model.
    • Run :
    python demo.py
    

➤ Demo

➤ 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

About

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

License:GNU General Public License v3.0


Languages

Language:Python 100.0%