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 repository for benchmarking neural vocoders by their quality and speed.

License The majority of VocBench is licensed under CC-BY-NC, however portions of the project are available under separate license terms: Wavenet, Para

Meta Research 177 Dec 12, 2022
Bravia core script for python

Bravia-Core-Script You need to have a mandatory account If this L3 does not work, try another L3. enjoy

5 Dec 26, 2021
Tensorflow/Keras Plug-N-Play Deep Learning Models Compilation

DeepBay This project was created with the objective of compile Machine Learning Architectures created using Tensorflow or Keras. The architectures mus

Whitman Bohorquez 4 Sep 26, 2022
This is RFA-Toolbox, a simple and easy-to-use library that allows you to optimize your neural network architectures using receptive field analysis (RFA) and create graph visualizations of your architecture.

ReceptiveFieldAnalysisToolbox This is RFA-Toolbox, a simple and easy-to-use library that allows you to optimize your neural network architectures usin

84 Nov 23, 2022
Simple node deletion tool for onnx.

snd4onnx Simple node deletion tool for onnx. I only test very miscellaneous and limited patterns as a hobby. There are probably a large number of bugs

Katsuya Hyodo 6 May 15, 2022
3D-aware GANs based on NeRF (arXiv).

CIPS-3D This repository will contain the code of the paper, CIPS-3D: A 3D-Aware Generator of GANs Based on Conditionally-Independent Pixel Synthesis.

Peterou 563 Dec 31, 2022
🍅🍅🍅YOLOv5-Lite: lighter, faster and easier to deploy. Evolved from yolov5 and the size of model is only 1.7M (int8) and 3.3M (fp16). It can reach 10+ FPS on the Raspberry Pi 4B when the input size is 320×320~

YOLOv5-Lite:lighter, faster and easier to deploy Perform a series of ablation experiments on yolov5 to make it lighter (smaller Flops, lower memory, a

pogg 1.5k Jan 05, 2023
An Api for Emotion recognition.

PLAYEMO Playemo was built from the ground-up with Flask, a python tool that makes it easy for developers to build APIs. Use Cases Is Python your langu

greek geek 2 Jul 16, 2022
MusicYOLO framework uses the object detection model, YOLOx, to locate notes in the spectrogram.

MusicYOLO MusicYOLO framework uses the object detection model, YOLOX, to locate notes in the spectrogram. Its performance on the ISMIR2014 dataset, MI

Xianke Wang 2 Aug 02, 2022
Hyperbolic Procrustes Analysis Using Riemannian Geometry

Hyperbolic Procrustes Analysis Using Riemannian Geometry The code in this repository creates the figures presented in this article: Please notice that

Ronen Talmon's Lab 2 Jan 08, 2023
🐥A PyTorch implementation of OpenAI's finetuned transformer language model with a script to import the weights pre-trained by OpenAI

PyTorch implementation of OpenAI's Finetuned Transformer Language Model This is a PyTorch implementation of the TensorFlow code provided with OpenAI's

Hugging Face 1.4k Jan 05, 2023
Collections for the lasted paper about multi-view clustering methods (papers, codes)

Multi-View Clustering Papers Collections for the lasted paper about multi-view clustering methods (papers, codes). There also exists some repositories

Andrew Guan 10 Sep 20, 2022
Fully Connected DenseNet for Image Segmentation

Fully Connected DenseNets for Semantic Segmentation Fully Connected DenseNet for Image Segmentation implementation of the paper The One Hundred Layers

Somshubra Majumdar 84 Oct 31, 2022
Code for sound field predictions in domains with impedance boundaries. Used for generating results from the paper

Code for sound field predictions in domains with impedance boundaries. Used for generating results from the paper

DTU Acoustic Technology Group 11 Dec 17, 2022
This is the official repository for our paper: ''Pruning Self-attentions into Convolutional Layers in Single Path''.

Pruning Self-attentions into Convolutional Layers in Single Path This is the official repository for our paper: Pruning Self-attentions into Convoluti

Zhuang AI Group 77 Dec 26, 2022
CVPR2021: Temporal Context Aggregation Network for Temporal Action Proposal Refinement

Temporal Context Aggregation Network - Pytorch This repo holds the pytorch-version codes of paper: "Temporal Context Aggregation Network for Temporal

Zhiwu Qing 63 Sep 27, 2022
Luminous is a framework for testing the performance of Embodied AI (EAI) models in indoor tasks.

Luminous is a framework for testing the performance of Embodied AI (EAI) models in indoor tasks. Generally, we intergrete different kind of functional

28 Jan 08, 2023
A python script to convert images to animated sus among us crewmate twerk jifs as seen on r/196

img_sussifier A python script to convert images to animated sus among us crewmate twerk jifs as seen on r/196 Examples How to use install python pip i

41 Sep 30, 2022
This is an official pytorch implementation of Fast Fourier Convolution.

Fast Fourier Convolution (FFC) for Image Classification This is the official code of Fast Fourier Convolution for image classification on ImageNet. Ma

pkumi 199 Jan 03, 2023
Repository for scripts and notebooks from the book: Programming PyTorch for Deep Learning

Repository for scripts and notebooks from the book: Programming PyTorch for Deep Learning

Ian Pointer 368 Dec 17, 2022