Skip to content

TECOLOGYxyz/FlowerTracking

Repository files navigation

TECOLOGYxyz - FlowerTracking


Logo

Track Individual Flowers in Images

Get flowering phenology for individual flowers using an automatic tracking algorithm..
Explore the docs »

Report Bug

Table of Contents

  1. About The Project
  2. Getting Started
  3. Contributing
  4. Contact

About The Project

This repository supports the paper Towards individual-based pollination ecology: Automatic tracking of life histories of individual flowers.

The paper present a tracking algorithm developed for fast and accurate tracking of individual flowers in time-lapse image series.

The algorithm includes a set of user-defined parameters for optimizing tracking performance:

The maximum number of frames a detection can be lost before new points are forced into a new track is set by max gap. The number of frames for calculating the running mean of the position of an object is set by running mean. If there are less than this number of frames currently in the track, a mean over what is in the track will be used. Simple centroid tracking algortihms will associate any two points between the current and the previus frame, disregarding the absolute distance between them, as long as they are the closest. In our algorithm, points that have a distance to tracked objects higher than max_distance_threshold will be forced into new tracks. If set to 0, this parameter will be ignored.

The tracking algorithm can be applied to any objects and can be used both offline (on detection output already produced) or online (in realtime, frame by frame, as detections are made).

The speed of the tracking algorithm depends on the computational power available and the number of object being tracked. The method is fast, however. Tracking of a series containing 85 objects ran at 0.02 seconds per frame.

Getting Started

The code was written in Python 3.10.4. It requires the packages pandas, geopandas, matplotlib, motmetrics, scipy, numpy, and shapely as listed in the requirements.txt file.

To use the tracking algorithm and associated tools, follow the steps below.

  1. Clone the repo
    git clone https://github.com/TECOLOGYxyz/TrackingFlowers.git
  2. Install nessecary packages
    pip install -r requirements.txt
  3. Run a test to check if the tracking, filtering, and evaluation algorithms are giving the expected outputs
    src/test.py
  4. Find some examples of how to apply the tracking, filtering, and evaluation algorithms
    src/run.py

Contributing

Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

@HjalteMann - mann@ecos.au.dk - http://tecology.xyz/

https://github.com/TECOLOGYxyz/TrackingFlowers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published