What is motile ?

motile tracks multiple objects over time, given a graph of candidate objects (nodes) and possible ways they could be linked over time frames (edges).

It does so by solving a global optimization problem. The objective function and constraints on the solution are highly customizable: motile provides common costs and constraints, and custom extensions can easily be added.

Show me an example!

Consider the following example track graph, where each node is a potential object and each edge a potential link of objects between frames:

The numbers in nodes show how likely it is that a node represents a true object (versus being a false positive). Similarly, for edges the number shows how likely the incident nodes represent the same object across time.

We want to find tracks in this graph that globally maximize the overall score, subject to certain constraints. This can be done with motile as follows:

from motile.constraints import MaxParents, MaxChildren
from motile.costs import NodeSelection, EdgeSelection, Appear

# create a motile solver
solver = motile.Solver(graph)

# tell it how to compute costs for selecting nodes and edges
solver.add_cost(
    NodeSelection(
        weight=-1.0,
        attribute='score'))
solver.add_cost(
    EdgeSelection(
        weight=-1.0,
        attribute='score'))

# add a small penalty to start a new track
solver.add_cost(Appear(constant=1.0))

# add constraints on the solution (no splits, no merges)
solver.add_constraint(MaxParents(1))
solver.add_constraint(MaxChildren(1))

# solve
solution = solver.solve()

Inspecting the solution will reveal that the following nodes and edges were selected:

This is just a simple example of what can be done with motile. See the Quickstart for a quick tour of what can be done with it, and the API Reference for a full list of costs, constraints, and variables that are shipped with motile.

motile can also be extended to fit your own needs. See Extending motile for a tutorial on how to write your own variable, constraints, and costs.

Why is it called motile?

motile stands for Multi Object Tracking with Integer Linear Equations (which is precisely what motile does). “motile” also means having the ability to move, which is neat.

Full Documentation: