weixu000 / libtorch-yolov3-deepsort

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

It is for my undergrad thesis in Tsinghua University.

There are four modules in the project:

  • Detection: YOLOv3
  • Tracking: SORT and DeepSORT
  • Processing: Run detection and tracking, then display and save the results (a compressed video, a few snapshots for each target)
  • GUI: Display the results

YOLOv3

A Libtorch implementation of the YOLO v3 object detection algorithm, written with modern C++.

The code is based on the walktree.

The config file in .\models can be found at Darknet.

SORT

I also merged SORT to do tracking.

A similar software in Python is here, which also rewrite form the most starred version and SORT

DeepSORT

Recently I reimplement DeepSORT which employs another CNN for re-id. It seems it gives better result but also slows the program a bit. Also, a PyTorch version is available at ZQPei, thanks!

Performance

Currently on a GTX 1060 6G it consumes about 1G RAM and have 37 FPS.

The video I test is TownCentreXVID.avi.

GUI

With wxWidgets, I developed the GUI module for visualization of results.

Previously I used Dear ImGui. However, I do not think it suits my purpose.

Pre-trained network

This project uses pre-trained network weights from others

How to build

This project requires LibTorch, OpenCV, wxWidgets and CMake to build.

LibTorch can be easily integrated with CMake, but there are a lot of strange things...

On Ubuntu 16.04, I use apt install to install the others. Everything is fine. On Windows 10 + Visual Studio 2017, I use the latest stable version of the others from their official websites.

Snapshots

Here are some intermediate output from detection and tracking module: Detection Tracking

Here is the snapshot of processing module: Processing

Here is the snapshot of GUI module: GUI

About

License:MIT License


Languages

Language:C++ 98.1%Language:CMake 1.8%Language:C 0.1%