All Projects → iwatake2222 → self-driving-ish_computer_vision_system

iwatake2222 / self-driving-ish_computer_vision_system

Licence: Apache-2.0 license
This project generates images you've probably seen in autonomous driving demo. Object Detection, Lane Detection, Road Segmentation, Depth Estimation using TensorRT

Programming Languages

C++
36643 projects - #6 most used programming language
Jupyter Notebook
11667 projects
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to self-driving-ish computer vision system

Baidu Lane Segmentation
4th place solution in Baidu Autonomous Driving Lane Segmentation
Stars: ✭ 19 (-92.52%)
Mutual labels:  autonomous-driving
mediapipe plus
The purpose of this project is to apply mediapipe to more AI chips.
Stars: ✭ 38 (-85.04%)
Mutual labels:  tensorrt
InsightFace-REST
InsightFace REST API for easy deployment of face recognition services with TensorRT in Docker.
Stars: ✭ 308 (+21.26%)
Mutual labels:  tensorrt
glcapsnet
Global-Local Capsule Network (GLCapsNet) is a capsule-based architecture able to provide context-based eye fixation prediction for several autonomous driving scenarios, while offering interpretability both globally and locally.
Stars: ✭ 33 (-87.01%)
Mutual labels:  autonomous-driving
bark-ml
Gym environments and agents for autonomous driving.
Stars: ✭ 68 (-73.23%)
Mutual labels:  autonomous-driving
dgp
ML Dataset Governance Policy for Autonomous Vehicle Datasets
Stars: ✭ 65 (-74.41%)
Mutual labels:  autonomous-driving
deepvac
PyTorch Project Specification.
Stars: ✭ 507 (+99.61%)
Mutual labels:  tensorrt
LiDAR fog sim
LiDAR fog simulation
Stars: ✭ 101 (-60.24%)
Mutual labels:  autonomous-driving
Master-Thesis
Deep Reinforcement Learning in Autonomous Driving: the A3C algorithm used to make a car learn to drive in TORCS; Python 3.5, Tensorflow, tensorboard, numpy, gym-torcs, ubuntu, latex
Stars: ✭ 33 (-87.01%)
Mutual labels:  autonomous-driving
Visualizing-lidar-data
Visualizing lidar data using Uber Autonomous Visualization System (AVS) and Jupyter Notebook Application
Stars: ✭ 75 (-70.47%)
Mutual labels:  autonomous-driving
PiP-Planning-informed-Prediction
(ECCV 2020) PiP: Planning-informed Trajectory Prediction for Autonomous Driving
Stars: ✭ 101 (-60.24%)
Mutual labels:  autonomous-driving
ros-yolo-sort
YOLO v3, v4, v5, v6, v7 + SORT tracking + ROS platform. Supporting: YOLO with Darknet, OpenCV(DNN), OpenVINO, TensorRT(tkDNN). SORT supports python(original) and C++. (Not Deep SORT)
Stars: ✭ 162 (-36.22%)
Mutual labels:  tensorrt
yolov4 trt ros
YOLOv4 object detector using TensorRT engine
Stars: ✭ 89 (-64.96%)
Mutual labels:  tensorrt
MotionPlanner
Motion Planner for Self Driving Cars
Stars: ✭ 129 (-49.21%)
Mutual labels:  autonomous-driving
yolov5 tensorrt int8
TensorRT int8 量化部署 yolov5s 模型,实测3.3ms一帧!
Stars: ✭ 112 (-55.91%)
Mutual labels:  tensorrt
The-Kraken-Pathfinding
A tentacle-based pathfinding library for nonholonomic robotic vehicles
Stars: ✭ 24 (-90.55%)
Mutual labels:  autonomous-driving
dig-into-apollo
Apollo notes (Apollo学习笔记) - Apollo learning notes for beginners.
Stars: ✭ 1,786 (+603.15%)
Mutual labels:  autonomous-driving
pyMHT
Track oriented, multi target, multi hypothesis tracker
Stars: ✭ 66 (-74.02%)
Mutual labels:  autonomous-driving
pnn
pnn is Darknet compatible neural nets inference engine implemented in Rust.
Stars: ✭ 17 (-93.31%)
Mutual labels:  tensorrt
AVP-SLAM-PLUS
An implementation of AVP-SLAM and some new contributions
Stars: ✭ 371 (+46.06%)
Mutual labels:  autonomous-driving
very_short.mp4

Self-Driving-ish Computer Vision System

  • This project generates images you've probably seen in autonomous driving demo
  • Detection
    • Object Detection and Tracking
    • Lane Detection and Curve Fitting
    • Road Segmentation
    • Depth Estimation
  • Transform using Projective Geometry and Pinhole Camera Model
    • Normal View -> Top View
    • Distance Calculation (image plane -> ground plane in world coordinate system)

Result

result

Tested Environment

Computer

  • Windows 10 (x64) + Visual Studio 2019
    • Intel Core i7-6700 @ 3.4GHz + NVIDIA GeForce GTX 1070
  • Jetson Xavier NX. JetPack 4.6
    • You will get error if using JetPack 4.5 or before because of TensorRT error

Deep Learning Inference Framework

  • TensorFlow Lite with XNNPACK delegate
    • CPU
    • Note: Running with CPU is very slow
  • TensorRT
    • GPU

Usage

./main [input]
 - input:
    - use the default image file set in source code (main.cpp): blank
        - ./main
     - use video file: *.mp4, *.avi, *.webm
        - ./main test.mp4
     - use image file: *.jpg, *.png, *.bmp
        - ./main test.jpg
    - use camera: number (e.g. 0, 1, 2, ...)
        - ./main 0
    - use camera via gstreamer on Jetson: jetson
        - ./main jetson
  • Mouse Drag: Change top view angle
  • Keyboard (asdwzx) : Change top view position

How to build a project

0. Requirements

  • OpenCV 4.x
  • CMake
  • TensorRT 8.0.x
    • If you get build error related to TensorRT, modify cmake settings for it in inference_helper/inference_helper/CMakeLists.txt

1. Download source code and pre-built libraries

  • Download source code
    • If you use Windows, you can use Git Bash
    git clone https://github.com/iwatake2222/self-driving-ish_computer_vision_system.git
    cd self-driving-ish_computer_vision_system
    git submodule update --init
    sh inference_helper/third_party/download_prebuilt_libraries.sh
  • Download models
    sh ./download_resource.sh

2-a. Build in Windows (Visual Studio)

  • Configure and Generate a new project using cmake-gui for Visual Studio 2019 64-bit
    • Where is the source code : path-to-cloned-folder
    • Where to build the binaries : path-to-build (any)
  • Open main.sln
  • Set main project as a startup project, then build and run!
  • Note:
    • You may need to modify cmake setting for TensorRT for your environment

2-b. Build in Linux (Jetson Xavier NX)

mkdir build && cd build
# cmake .. -DENABLE_TENSORRT=off
cmake .. -DENABLE_TENSORRT=on
make
./main

Note

cmake options

cmake .. -DENABLE_TENSORRT=off  # Use TensorFlow Lite (default)
cmake .. -DENABLE_TENSORRT=on   # Use TensorRT

cmake .. -DENABLE_SEGMENTATION=on    # Enable Road Segmentation function (default)
cmake .. -DENABLE_SEGMENTATION=off   # Disable Road Segmentation function

cmake .. -DENABLE_DEPTH=on    # Enable Depth Estimation function (default)
cmake .. -DENABLE_DEPTH=off   # Disable Depth Estimation function

Misc

  • It will take very long time when you execute the app for the first time, due to model conversion
    • I took 80 minutes with RTX 3060ti
    • I took 10 - 20 minutes with GTX 1070

Software Design

Class Diagram

class_diagram

Data Flow Diagram

data_flow_diagram

Model Information

Details

Performance

Model Jetson Xavier NX GTX 1070
== Inference time ==
Object Detection 10.6 ms 6.4 ms
Lane Detection 9.6 ms 4.9 ms
Road Segmentation 29.1 ms 13.5 ms
Depth Estimation 55.2 ms 37.8 ms
== FPS ==
Total (All functions) 6.8 fps 10.9 fps
Total (w/o Segmentation, Depth) 24.4 fps 33.3 fps
  • Input
    • Jetson Xavier NX: Camera
    • GTX 1070: mp4 video
  • With TensorRT FP16
  • "Total" includes image read, pre/post process, other image process, result image drawing, etc.

License

  • Copyright 2021 iwatake2222
  • Licensed under the Apache License, Version 2.0

Acknowledgements

I utilized the following OSS in this project. I appreciate your great works, thank you very much.

Code, Library

Model

Image Files

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].