Python版OpenCVのTracking APIのサンプルです。DaSiamRPNアルゴリズムまで対応しています。

Overview

OpenCV-Object-Tracker-Sample

Python版OpenCVのTracking APIのサンプルです。
 

Requirement

  • opencv-contrib-python 4.5.3.56 or later

Algorithm

2021/07/16時点でOpenCVには以下9アルゴリズムが実装されています。

  • DaSiamRPN
  • MIL
  • GOTURN
  • CSRT
  • KCF
  • Boosting(Legacy API)
  • MOSSE(Legacy API)
  • MedianFlow(Legacy API)
  • TLD(Legacy API)

Usage

DaSiamRPNトラッカーのみのサンプルと、各アルゴリズムを比較するサンプルの2種類を用意しています。

DaSiamRPNトラッカーサンプル

以下コマンドでデモを起動してください。
最初のフレーム表示時にROI選択を行い追跡対象を指定します。
ESCキー押下でプログラム終了、スペースキー押下で追跡対象の再指定を行います。

python DaSiamRPN_sample.py
  • --device
    動画ファイル、もしくはカメラデバイス番号の指定
    デフォルト:"sample_movie/bird.mp4"
  • --width
    カメラキャプチャ時の横幅
    デフォルト:960
  • --height
    カメラキャプチャ時の縦幅
    デフォルト:540

各アルゴリズム比較サンプル

以下コマンドでデモを起動してください。
最初のフレーム表示時にROI選択を行い追跡対象を指定します。
ESCキー押下でプログラム終了、スペースキー押下で追跡対象の再指定を行います。
--use_xxxxを指定することで使用アルゴリズムを追加できます。 ※何も指定していない場合はDaSiamRPNのみで動作

python performance_comparison_sample.py
  • --device
    動画ファイル、もしくはカメラデバイス番号の指定
    デフォルト:"sample_movie/bird.mp4"
  • --width
    カメラキャプチャ時の横幅
    デフォルト:960
  • --height
    カメラキャプチャ時の縦幅
    デフォルト:540
  • --use_mil
    MILトラッカーの使用有無
    デフォルト:指定なし
  • --use_goturn
    GOTURNトラッカーの使用有無 ※model/GOTURN配下のzip要解凍
    デフォルト:指定なし
  • --use_dasiamrpn
    DaSiamRPNトラッカーの使用有無
    デフォルト:指定なし
  • --use_csrt
    CSRTトラッカーの使用有無
    デフォルト:指定なし
  • --use_kcf
    KCFトラッカーの使用有無
    デフォルト:指定なし
  • --use_boosting
    Boostingトラッカーの使用有無
    デフォルト:指定なし
  • --use_mosse
    MOSSEトラッカーの使用有無
    デフォルト:指定なし
  • --use_medianflow
    MedianFlowトラッカーの使用有無
    デフォルト:指定なし
  • --use_tld
    TLDトラッカーの使用有無
    デフォルト:指定なし

ToDo

  • GOTURNトラッカーのモデル読み込みに失敗する問題の調査

Author

高橋かずひと(https://twitter.com/KzhtTkhs)

License

OpenCV-Object-Tracker-Sample is under Apache-2.0 License.

License(Image)

サンプル動画はNHKクリエイティブ・ライブラリーハクセキレイ エサをついばみながら歩くを使用しています。

Owner
KazuhitoTakahashi
KazuhitoTakahashi
A Python Reconnection Tool for alt:V

altv-reconnect What? It invokes a reconnect in the altV Client Dev Console. You get to determine when your local client should reconnect when developi

8 Jun 30, 2022
The official re-implementation of the Neurips 2021 paper, "Targeted Neural Dynamical Modeling".

Targeted Neural Dynamical Modeling Note: This is a re-implementation (in Tensorflow2) of the original TNDM model. We do not plan to further update the

6 Oct 05, 2022
An implementation of the paper "A Neural Algorithm of Artistic Style"

A Neural Algorithm of Artistic Style implementation - Neural Style Transfer This is an implementation of the research paper "A Neural Algorithm of Art

Srijarko Roy 27 Sep 20, 2022
PyTorch implementation of Super SloMo by Jiang et al.

Super-SloMo PyTorch implementation of "Super SloMo: High Quality Estimation of Multiple Intermediate Frames for Video Interpolation" by Jiang H., Sun

Avinash Paliwal 2.9k Jan 03, 2023
git《Learning Pairwise Inter-Plane Relations for Piecewise Planar Reconstruction》(ECCV 2020) GitHub:

Learning Pairwise Inter-Plane Relations for Piecewise Planar Reconstruction Code for the ECCV 2020 paper by Yiming Qian and Yasutaka Furukawa Getting

37 Dec 04, 2022
improvement of CLIP features over the traditional resnet features on the visual question answering, image captioning, navigation and visual entailment tasks.

CLIP-ViL In our paper "How Much Can CLIP Benefit Vision-and-Language Tasks?", we show the improvement of CLIP features over the traditional resnet fea

310 Dec 28, 2022
A Low Complexity Speech Enhancement Framework for Full-Band Audio (48kHz) based on Deep Filtering.

DeepFilterNet A Low Complexity Speech Enhancement Framework for Full-Band Audio (48kHz) based on Deep Filtering. libDF contains Rust code used for dat

Hendrik Schröter 292 Dec 25, 2022
Volsdf - Volume Rendering of Neural Implicit Surfaces

Volume Rendering of Neural Implicit Surfaces Project Page | Paper | Data This re

Lior Yariv 221 Jan 07, 2023
Definition of a business problem according to Wilson Lower Bound Score and Time Based Average Rating

Wilson Lower Bound Score, Time Based Rating Average In this study I tried to calculate the product rating and sorting reviews more accurately. I have

3 Sep 30, 2021
In-place Parallel Super Scalar Samplesort (IPS⁴o)

In-place Parallel Super Scalar Samplesort (IPS⁴o) This is the implementation of the algorithm IPS⁴o presented in the paper Engineering In-place (Share

82 Dec 22, 2022
TransCD: Scene Change Detection via Transformer-based Architecture

TransCD: Scene Change Detection via Transformer-based Architecture

wangzhixue 29 Dec 11, 2022
The authors' implementation of Unsupervised Adversarial Learning of 3D Human Pose from 2D Joint Locations

Unsupervised Adversarial Learning of 3D Human Pose from 2D Joint Locations This is the authors' implementation of Unsupervised Adversarial Learning of

Dwango Media Village 140 Dec 07, 2022
Predictive AI layer for existing databases.

MindsDB is an open-source AI layer for existing databases that allows you to effortlessly develop, train and deploy state-of-the-art machine learning

MindsDB Inc 12.2k Jan 03, 2023
Pytorch implementation of CoCon: A Self-Supervised Approach for Controlled Text Generation

COCON_ICLR2021 This is our Pytorch implementation of COCON. CoCon: A Self-Supervised Approach for Controlled Text Generation (ICLR 2021) Alvin Chan, Y

alvinchangw 79 Dec 18, 2022
The story of Chicken for Club Bing

Chicken Story tl;dr: The time when Microsoft banned my entire country for cheating at Club Bing. (A lot of the details are from memory so I've recreat

Eyal 142 May 16, 2022
Make a Turtlebot3 follow a figure 8 trajectory and create a robot arm and make it follow a trajectory

HW2 - ME 495 Overview Part 1: Makes the robot move in a figure 8 shape. The robot starts moving when launched on a real turtlebot3 and can be paused a

Devesh Bhura 0 Oct 21, 2022
G-NIA model from "Single Node Injection Attack against Graph Neural Networks" (CIKM 2021)

Single Node Injection Attack against Graph Neural Networks This repository is our Pytorch implementation of our paper: Single Node Injection Attack ag

Shuchang Tao 18 Nov 21, 2022
ReLoss - Official implementation for paper "Relational Surrogate Loss Learning" ICLR 2022

Relational Surrogate Loss Learning (ReLoss) Official implementation for paper "R

Tao Huang 31 Nov 22, 2022
This repository contains the code for the paper ``Identifiable VAEs via Sparse Decoding''.

Sparse VAE This repository contains the code for the paper ``Identifiable VAEs via Sparse Decoding''. Data Sources The datasets used in this paper wer

Gemma Moran 17 Dec 12, 2022