ivoflipse / Pawlabeling

Tool for processing and analyzing pressure measurements
Other
18 stars 1 forks source link

Improve the heuristic for labeling paws #13

Open ivoflipse opened 11 years ago

ivoflipse commented 11 years ago

When labeling paws I calculate a heuristic based on how well the paw matches the average of the other paws that have already been labeled. Sadly, I'm not very happy with its performance.

The best value seems to be the max of max image, however alignment/normalization is an issue. Perhaps I can center them around their COP so at least they align in that sense.

Suggestions for improving this are more than welcome. See pawswidget -> predict_label

ivoflipse commented 11 years ago

I just looked at an IPython notebook about Where's Waldo and realized that my best bet to improve the alignment for now is to normalize each paw, because at least it'll give me the best overlap. I'll have to see whether I should resize everything to a 20x20 array or at least have it be proportional, so you can see the difference between front and hind legs (more clearly). Though this difference should also be clear from the other heuristics (max force + max surface).

Another thing to take into account is the gait diagram. If I already labeled any previous paws, then if those are still making contact, they should be penalized. Perhaps I can come up with an algorithm that depending on the pattern of the gait diagram, it can tell which paw it most likely is.

ivoflipse commented 10 years ago

Based on my image registration experiments, I think I should be able to do a lot better. Here are the results from unsupervised clustering based on the mean square error between each paw. While this particular example may be from a trained Restricted Boltzmann Machine (which is far too expensive to train for each dog or measurement), it shows a lot of promise.

LF: 2013-09-29 12_01_03-image registration experiment-14 LH: 2013-09-29 12_01_09-image registration experiment-14 RF: 2013-09-29 12_00_57-image registration experiment-14 RH: 2013-09-29 12_01_15-image registration experiment-14

Likewise my experiments with the gait diagram show a lot of promise for being able to cluster the contacts unsupervised. Gait diagram

The only downside is that the image based approach works less well on small dogs, because the paws are too small and similarly shaped. The gait diagram approach fails on big dogs if some paws are missing, because it will compare against the wrong paws. Also it works less well when the dog walks with a curve, instead of a straight line, because it skews some of the distances.

ivoflipse commented 10 years ago

I had some experiments with Random Forests and got ~95% accuracy, so this may prove very promising for helping to predict the label. Especially given it uses no heuristics like: which paws are currently also on the ground. Do I think it's likely we're seeing this paw twice?

I'm also labeling a pig data set now, hopefully that'll prove some generality for the algorithm