Skip to main content

Multiple object tracking algorithm via image registration

Project description

logo

release PyPI Downloads GitHub GitHub stars Youtube

ZephIR is a multiple object tracking algorithm based on image registration and built on PyTorch. Check out our preprint and tutorial video!

Latest Updates in v1.0.4

  • bug fixes for deprecated dependencies
  • see release notes for full list of changes

About

ZephIR tracks keypoints in a 2D or 3D movie by registering image descriptors sampled around each keypoint. Image registration loss is combined with three additional regularization terms:

  • spring connections between neighboring objects allow a flexible spatial model of loosely correlated motion
  • feature detection optimizes results towards centers of detected features
  • temporal smoothing of pixel intensity a small patch of frames limit fluctuations in activity

Overview of tracking loss:

loss

ZephIR is fast, efficient, and designed to run on laptops instead of powerful desktop workstations. It requires no prior training of any model weights, and it is capable of generalizing to a wide diversity of datasets with small tweaks to parameters. This makes ZephIR ideal for analyzing datasets that lack a large corpus of training data, and for tracking fluorescent sources in moving and deforming tissue, both of which create a particularly challenging environment for modern deep learning techniques. ZephIR can also serve as a data augmentation tool in some cases. We provide some support for exporting ZephIR results to DeepLabCut.

Installation

Quick start

pip install docopt flask==2.1.2 pandas==1.4.2 zephir

Dependencies

Make sure that Python (>=3.8.1) and the following packages are installed (prefer conda over pip):

  • dataclasses (>=0.6)
  • docopt (>=0.6.2)
  • Flask (>=2.1.2)
  • gevent (>=21.12.0)
  • h5py (>=3.6.0)
  • matplotlib (>=3.5.2)
  • numpy (>=1.22.4)
  • opencv-python (>=4.5.5.64)
  • pandas (>=1.4.2)
  • pathlib (>=1.0.1)
  • scikit-learn (>=1.0.2)
  • scikit-image (>=0.19.2)
  • scipy (>=1.7.3)
  • setuptools (>=61.2.0)
  • torch (>=1.10.0) (see PyTorch.org for instructions on installing with CUDA)
  • tqdm (>=4.64.0)

NOTE: If you run into an issue when launching the annotator, you may need to downgrade Flask (2.1.2) and Pandas (1.4.2).

Build from source

  1. Clone git repository:
git clone https://github.com/venkatachalamlab/ZephIR.git
  1. Navigate to the cloned directory on your local machine.

  2. Checkout the current release:

git checkout v1.0.4

Use the following command to see what's new in the most recent release:

git show v1.0.4
  1. Install:
python setup.py install

or install in development mode:

python setup.py develop

Getting Started

Run from command line:

zephir --dataset=. [options]

We provide a detailed guide for running ZephIR as well as some example workflows for using ZephIR here.

Parameters

For a list of all CLI options and user-tunable parameters, see here.

To help figure out what options may be right for you, check out the list of examples with explanations for the chosen parameters here.

Interfacing with Annotator

ZephIR includes an annotator GUI with custom Python macros for interacting with the data from the GUI.

Run from command line:

annotator --dataset=. [--port=5000]

Learn more about the annotator and its features here.

We also provide a more detailed user guide for using the GUI as a part of a ZephIR workflow here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zephir-1.0.4.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

zephir-1.0.4-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file zephir-1.0.4.tar.gz.

File metadata

  • Download URL: zephir-1.0.4.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for zephir-1.0.4.tar.gz
Algorithm Hash digest
SHA256 fda9991adc756a0e8a87504418913227975dbe6e9e1e32234a3a5578ac72ba5c
MD5 80332837b0d92f9d2abd7ef7f7366f40
BLAKE2b-256 58c09a89c8decf12eea8a61a1024453de50581549859f322c4aecf2f6cb1de81

See more details on using hashes here.

File details

Details for the file zephir-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: zephir-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for zephir-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1a46cebdecca53a8aa26f978cfd4c507834fca34beed2dc248bb0b94ebf40740
MD5 59f0f111256d297bf876eee386b8fc9e
BLAKE2b-256 0b1735f5b3d111119aec984c3be7b567c5b1b2e1c229571ed5c7b940ef35a0ee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page