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
LF-YOLO (Lighter and Faster YOLO) is used to detect defect of X-ray weld image.

This project is based on ultralytics/yolov3. LF-YOLO (Lighter and Faster YOLO) is used to detect defect of X-ray weld image. The related paper is avai

26 Dec 13, 2022
PyTorch implementation of Barlow Twins.

Barlow Twins: Self-Supervised Learning via Redundancy Reduction PyTorch implementation of Barlow Twins. @article{zbontar2021barlow, title={Barlow Tw

Facebook Research 839 Dec 29, 2022
Code for the paper: Sketch Your Own GAN

Sketch Your Own GAN Project | Paper | Youtube Our method takes in one or a few hand-drawn sketches and customizes an off-the-shelf GAN to match the in

677 Dec 28, 2022
Immortal tracker

Immortal_tracker Prerequisite Our code is tested for Python 3.6. To install required liabraries: pip install -r requirements.txt Waymo Open Dataset P

74 Dec 03, 2022
Rotary Transformer

[中文|English] Rotary Transformer Rotary Transformer is an MLM pre-trained language model with rotary position embedding (RoPE). The RoPE is a relative

325 Jan 03, 2023
Gesture-Volume-Control - This Python program can adjust the system's volume by using hand gestures

Gesture-Volume-Control This Python program can adjust the system's volume by usi

VatsalAryanBhatanagar 1 Dec 30, 2021
SlideGraph+: Whole Slide Image Level Graphs to Predict HER2 Status in Breast Cancer

SlideGraph+: Whole Slide Image Level Graphs to Predict HER2 Status in Breast Cancer A novel graph neural network (GNN) based model (termed SlideGraph+

28 Dec 24, 2022
Implementation of "A MLP-like Architecture for Dense Prediction"

A MLP-like Architecture for Dense Prediction (arXiv) Updates (22/07/2021) Initial release. Model Zoo We provide CycleMLP models pretrained on ImageNet

Shoufa Chen 244 Dec 27, 2022
This project is for a Twitter bot that monitors a bird feeder in my backyard. Any detected birds are identified and posted to Twitter.

Backyard Birdbot Introduction This is a silly hobby project to use existing ML models to: Detect any birds sighted by a webcam Identify whic

Chi Young Moon 71 Dec 25, 2022
Code for the Paper: Conditional Variational Capsule Network for Open Set Recognition

Conditional Variational Capsule Network for Open Set Recognition This repository hosts the official code related to "Conditional Variational Capsule N

Guglielmo Camporese 35 Nov 21, 2022
Tracking Pipeline helps you to solve the tracking problem more easily

Tracking_Pipeline Tracking_Pipeline helps you to solve the tracking problem more easily I integrate detection algorithms like: Yolov5, Yolov4, YoloX,

VNOpenAI 32 Dec 21, 2022
Learning Saliency Propagation for Semi-supervised Instance Segmentation

Learning Saliency Propagation for Semi-supervised Instance Segmentation PyTorch Implementation This repository contains: the PyTorch implementation of

Berkeley DeepDrive 68 Oct 18, 2022
Resources related to EMNLP 2021 paper "FAME: Feature-Based Adversarial Meta-Embeddings for Robust Input Representations"

FAME: Feature-based Adversarial Meta-Embeddings This is the companion code for the experiments reported in the paper "FAME: Feature-Based Adversarial

Bosch Research 11 Nov 27, 2022
MLP-Like Vision Permutator for Visual Recognition (PyTorch)

Vision Permutator: A Permutable MLP-Like Architecture for Visual Recognition (arxiv) This is a Pytorch implementation of our paper. We present Vision

Qibin (Andrew) Hou 162 Nov 28, 2022
BuildingNet: Learning to Label 3D Buildings

BuildingNet This is the implementation of the BuildingNet architecture described in this paper: Paper: BuildingNet: Learning to Label 3D Buildings Arx

16 Nov 07, 2022
a generic C++ library for image analysis

VIGRA Computer Vision Library Copyright 1998-2013 by Ullrich Koethe This file is part of the VIGRA computer vision library. You may use,

Ullrich Koethe 378 Dec 30, 2022
[SDM 2022] Towards Similarity-Aware Time-Series Classification

SimTSC This is the PyTorch implementation of SDM2022 paper Towards Similarity-Aware Time-Series Classification. We propose Similarity-Aware Time-Serie

Daochen Zha 49 Dec 27, 2022
Cave Generation using metaballs in Blender. Originally created by sdfgeoff, Edited by Myself (Archie Jaskowicz).

Blender-Cave-Generation Cave Generation using metaballs in Blender. Originally created by sdfgeoff, Edited by Myself (Archie Jaskowicz). Installation

2 Dec 28, 2022
A list of all named GANs!

The GAN Zoo Every week, new GAN papers are coming out and it's hard to keep track of them all, not to mention the incredibly creative ways in which re

Avinash Hindupur 12.9k Jan 08, 2023
A modification of Daniel Russell's notebook merged with Katherine Crowson's hq-skip-net changes

Edits made to this repo by Katherine Crowson I have added several features to this repository for use in creating higher quality generative art (featu

Paul Fishwick 10 May 07, 2022