Julian "trackpy" alternative?

does anyone know or is working on a Particle Tracking toolkit for Julia, in python there is a good package
called “trackpy” :

https://github.com/soft-matter/trackpy

is there any workable alternative for Julia?

I don’t know of one, though I have wished for something like this myself. A few years ago I started a package for Markov-chain Monte Carlo data association (https://github.com/ElOceanografo/MCMCDA.jl), which includes some data structures for target tracking in a radar context, but I never really finished it. This is something I would be potentially interested in contributing to, though I don’t have the time at the moment to take the lead on it…

1 Like

In an odd and happy coincidence, @baggepinnen announced BlobTracking.jl a week after I posted the above. I haven’t played with it myself, but it is definitely worth checking out: https://github.com/baggepinnen/BlobTracking.jl

1 Like

All the tracking in BlobTracking.jl is handled by LowLevelParticleFilters.jl which implements a few different flavors of particles filters, as well as (extended/unscented/vanilla) Kalman filters (used in BlobTracking).

The Markov-chain Monte Carlo data association stuff looks interesting :slight_smile: The data association in BlobTracking is rather primitive, only two methods are implemented, assignment using the hungarian algorithm or nearest neighbor.

1 Like

Yeah, I never really finished the MCMCDA package. Particle/target tracking is not my expertise, but I keep needing to do it for one project or another.

I think it’s a task that Julia is well-suited for, and I’ve thought a bit about what kind of general interface might work for a more fully-featured tracking suite. I think the general pieces of this problem are:

  1. Directed-graph-like data structure for keeping track of particles and their associations
  2. Prediction functions to project where each particle will be in the next time step
  3. A cost function for distance between a prediction and an observed particle
  4. Models for the likelihood of missed detections and false positives
  5. An association algorithm (nearest-neighbor, Hungarian, joint-probability data association, multiple-hypothesis tracking, MCMCDA, probability hypothesis density…)

I’d envision the user providing the data and defining functions for items 2-4, and the package having implementations of various association algorithms that could be dropped in and compared. Kind of like in DifferentialEquations, where the user defines a single derivative function and can run it using different solvers and compare results. Or in Turing, where the user defines a single model and can then sample it using different MCMC algorithms.

predict(particle, t) = ...
cost(predicted_x, detected_x) = ...
false_detection_rate(x, t) = ...
missed_detection_rate(x, t) = ...
algo1 = NearestNeighbor(predict)
algo2 = JPDA(predict, cost, false_detection_rate, missed_detection_rate)
tracks1 = associate(data, algo1)
tracks2 = associate(data, algo2)

Maybe some day I’ll even get around to working on something like this :upside_down_face: