TheCacophonyProject / classifier-pipeline

Exports tracked animals through thermal vision.
GNU General Public License v3.0
21 stars 14 forks source link

Kalman filter for estimating animals position #76

Closed BenMcEwen1 closed 5 years ago

BenMcEwen1 commented 5 years ago

The Kalman filter predicts the current position of the animals centroid to reduce noise and the affects of occlusion. It also estimates the current velocity of the animal and uses this to predict its future position.

mjs commented 5 years ago

Also, it seems like you've got a bunch of code formatting issues to deal with, as reported here: https://travis-ci.com/TheCacophonyProject/classifier-pipeline/builds/115731541

The main issue seems to be that your editor is set to use tabs instead of spaces. You can installed the Black tool and run it on your own machine to see what it's complaining about and fix locally.

mjs commented 5 years ago

To save you some time, here's the formatting version of your code: https://gist.github.com/mjs/2dc1b67847daa2f5586526f349a7d69b

mjs commented 5 years ago

I also noticed there a number of unused variables. Could you deal with those?

For example: ret and radius in find_center; sum_x, sum_y, previous_center and more in kalman_filter. The pylint tool is helpful for finding these.

In the case of functions with multiple return values where you don't care about some, use _ for the unwanted values. E.g. _, foo = bar(1.23)

mjs commented 5 years ago

Final issues dealt with in #79