jjhbw / mosse-tracker

A proof-of-concept implementation of the MOSSE video object tracking algorithm by Bolme et al.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MOSSE tracker in Rust

A Rust implementation of the Minimum Output Sum of Squared Error (MOSSE) tracking algorithm, as presented in the 2010 paper Visual Object Tracking using Adaptive Correlation Filters by David S. Bolme et al.

example

For a bit of extra context, check out the accompanying blog post at https://barkeywolf.consulting/posts/mosse-tracker/.

Running it

Cut up a video into frames

ffmpeg -i ./testdata/traffic.mp4 -vf fps=30 ./testdata/traffic/img%04d.png

Run the example binary

Running a debug build (not using the --release flag) will dump the state of the filter at each frame to a file and will output additional debug information. Note that the image filenames need to be provided in order. Below commands should result in test_tracking.mp4.

cargo run --release --example demo $(ls ./testdata/traffic/img0*.png) &&\
ffmpeg -y -framerate 30 -i ./predicted_image_%4d.png -pix_fmt yuv420p test_tracking.mp4 &&\
rm *.png

Run web example

wasm-pack build --no-default-features --target web
python3 -m http.server

Open http://localhost:8000 and allow webcam access.

Evaluate on the votchallenge dataset

See /examples/votchallenge. Thanks @alsuren for contributing the necessary code!

About

A proof-of-concept implementation of the MOSSE video object tracking algorithm by Bolme et al.

License:MIT License


Languages

Language:Rust 91.8%Language:HTML 8.2%