GithubHelp home page GithubHelp logo

jalywang123 / yolov3-tensorrt-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dongfangduoshou123/yolov3-tensorrt

0.0 1.0 0.0 205 KB

Run YoloV3 with the newest TensorRT6.0 at 37 fps on NVIIDIA 1060.

License: MIT License

C++ 92.04% Cuda 0.66% CMake 3.51% Python 3.03% C 0.76%

yolov3-tensorrt-1's Introduction

YoloV3-TensorRT

Run YoloV3 with the newest TensorRT6.0 at 37 fps on NVIIDIA 1060.

I use the TensorRT's yolov3 python example's script(location at TensorRT-ROOT/samples/python/yolov3_onnx), to convert the yolov3 model from darknet to onnx format named yolov3.onnx, which does not contains the yolo layer.

In C++, I first parse the yolov3.onnx, then use the TensorRT's api to edit the parsed network(add the yoloplugin to the network,and mark the yoloplugin's output as network's output, and unmark the original output), then build the engine, and run inference.

Feature:

1:Use TensorRT's new plugin interface IPluginV2Ext to implement the yolo plugin.
2:Run on the current newest TensorRT version 6.0.1.5.
3:test on NVIDIA 1060 at 37 fps in f32 mode and 77 fps in int8 mode.
4.include the post process such as nms to get the final detection result.
5.add a tensorrt api class wrraper to unify the interface for all usage cases.(how to use please see trtNetWork.h/cpp trtDarkNet53.h/cpp and sampleYoloV3.cpp)

Build:

1.mkdir build && cd build
2.cmake .. -DTensorRT-ROOT=/path/to/tensorrt/root -DCUDA-ROOT=path/to/cuda/root -DOpenCV-ROOT=/path/to/opencv/root
3.make -j8
Note: I use opencv4.0.0, If you use opencv2.x or opencv3.x, please edit the ProcessDependency.cmake about the opencv lib config , beacuse may some so is not exsit in older opencv version, and opencv include config from: include_directories${OpenCV-ROOT}/include/opencv4) to include_directories(${OpenCV-ROOT}/include)

Requirment:

Install the TensorRT6.0.1.5,(I use CUDA10.1 version, but other cuda version's TensorRT should also work well).

Problem need to solve:

 I have Solved this problem, more detail jump to this issue:https://github.com/NVIDIA/TensorRT/issues/178(after add the yolo plugin in c++, it always failed to serialize the builded engine, I think this is a bug of the tensorrt's
 binary Components...currently I add a python script to serialize the trt engine and then use it in c++ for deploy.)

Reference:

1:https://github.com/NVIDIA-AI-IOT/deepstream_reference_apps (restructure branch, not master branch)
2:https://docs.nvidia.com/deeplearning/sdk/tensorrt-developer-guide

yolov3-tensorrt-1's People

Contributors

dongfangduoshou123 avatar runrunrun1994 avatar ucedar avatar

Watchers

 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.