GithubHelp home page GithubHelp logo

5l1v3r1 / libtorch-yolov3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from walktree/libtorch-yolov3

0.0 1.0 0.0 1.54 MB

A Libtorch implementation of the YOLO v3 object detection algorithm

CMake 1.38% C++ 98.62%

libtorch-yolov3's Introduction

libtorch-yolov3

A Libtorch implementation of the YOLO v3 object detection algorithm, written with pure C++. It's fast, easy to be integrated to your production, and CPU and GPU are both supported. Enjoy ~

This project is inspired by the pytorch version, I rewritten it with C++.

Requirements

  1. LibTorch v1.0.0
  2. Cuda
  3. OpenCV (just used in the example)

To compile

  1. cmake3
  2. gcc 5.4 +
mkdir build && cd build
cmake3 -DCMAKE_PREFIX_PATH="your libtorch path" ..

# if there are multi versions of gcc, then tell cmake which one your want to use, e.g.:
cmake3 -DCMAKE_PREFIX_PATH="your libtorch path" -DCMAKE_C_COMPILER=/usr/local/bin/gcc -DCMAKE_CXX_COMPILER=/usr/local/bin/g++ ..

Running the detector

The first thing you need to do is to get the weights file for v3:

cd models
wget https://pjreddie.com/media/files/yolov3.weights 

On Single image:

./yolo-app ../imgs/person.jpg

As I tested, it will take 25 ms on GPU ( 1080 ti ). please run inference job more than once, and calculate the average cost.

libtorch-yolov3's People

Contributors

walktree 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.