wg-perception / people

274 stars 200 forks source link

Random Leg Probabilities due to Incorrect Copy of Features #67

Closed semeyerz closed 5 years ago

semeyerz commented 5 years ago

With the current kinetic version we were not able to get reasonable leg probabilities.

I looked into the changes since OpenCV and found a major bug in https://github.com/wg-perception/people/blame/kinetic/leg_detector/src/leg_detector.cpp#L731 that was introduced with #53

Here float values are assigned to uchar[i]. This messes up the whole feature vector and thus the classification becomes basically randomized.

Also the probability calculation looks wrong to me. Right now it is: 0.5 - fuzzy_value/num_trees As fuzzy_value is between the classes -1(rejection) and 1(leg) the resulting probability would be between -0.5 and 1.5.

You can find our fixed version here: https://github.com/CentralLabFacilities/people/tree/kinetic_cv3 As there are multiple changes(that are already pretty old but increased the quality of tracking). I will try to find time to create a pull request that at least fixes the major bugs.