Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/walktree/libtorch-yolov3
A Libtorch implementation of the YOLO v3 object detection algorithm
https://github.com/walktree/libtorch-yolov3
cpp libtorch pytorch yolov3
Last synced: 3 months ago
JSON representation
A Libtorch implementation of the YOLO v3 object detection algorithm
- Host: GitHub
- URL: https://github.com/walktree/libtorch-yolov3
- Owner: walktree
- Created: 2018-11-28T08:12:01.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-16T03:51:34.000Z (over 4 years ago)
- Last Synced: 2024-08-03T01:23:33.697Z (6 months ago)
- Topics: cpp, libtorch, pytorch, yolov3
- Language: C++
- Size: 1.54 MB
- Stars: 449
- Watchers: 15
- Forks: 130
- Open Issues: 37
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-yolo-object-detection - walktree/libtorch-yolov3 - yolov3?style=social"/> : A Libtorch implementation of the YOLO v3 object detection algorithm, written with pure C++. (Other Versions of YOLO)
- awesome-yolo-object-detection - walktree/libtorch-yolov3 - yolov3?style=social"/> : A Libtorch implementation of the YOLO v3 object detection algorithm, written with pure C++. (Other Versions of YOLO)
README
# 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](https://github.com/ayooshkathuria/pytorch-yolo-v3), 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.