Git Product home page Git Product logo

tensorrt-smoke's Introduction

TensorRT-SMOKE

This repo deploys SMOKE using TensorRT for C++ inference.

Prerequisites

  • Install TensorRT 8.0
    # https://developer.nvidia.cn/nvidia-tensorrt-8x-download
    tar -xvzf TensorRT-8.0.3.4.Linux.x86_64-gnu.cuda-10.2.cudnn8.2.tar.gz
    # export TENSORRT_DIR=~/TensorRT-8.0.3.4
    git clone -b release/8.0 https://github.com/Yibin122/TensorRT.git  # MMCVModulatedDeformConv2d plugin
    cd TensorRT
    git submodule update --init --recursive
    mkdir -p build && cd build
    cmake .. -DTRT_LIB_DIR=~/TensorRT-8.0.3.4/lib -DTRT_OUT_DIR=`pwd`/out -DCUDA_VERSION=10.2  # e.g. CUDA 10.2
    make -j$(nproc)
    make install
  • MMDetection3D (v1.0.0)
    pip install torch==1.8.0 torchvision==0.9.0
    pip install mmcv-full==1.4.0
    pip install mmdet==2.19.0
    pip install mmsegmentation==0.20.0
    git clone -b v1.0.0rc0 https://gitee.com/open-mmlab/mmdetection3d.git
    cd mmdetection3d
    pip install -v -e .  # or "python setup.py develop"

Steps

  1. Export ONNX (first comment code in mmdet3d/models/dense_heads/smoke_mono3d_head.py)
    cd mmdetection3d
    python smoke_pth2onnx.py  # smoke_dla34.onnx
  2. Build engine
    cd TensorRT-8.0.3.4/bin
    # use your own model_path
    ./trtexec --workspace=4096 --onnx=${model_path}/smoke_dla34.onnx --saveEngine=${model_path}/smoke_dla34.trt8
  3. C++ inference
    cd TensorRT-SMOKE/
    mkdir build && cd build
    cmake ..
    make && ./smoke_trt
    kitti_000008_pred

TODO

  • MonoFlex

tensorrt-smoke's People

Contributors

yibin122 avatar

Stargazers

 avatar

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.