-
Notifications
You must be signed in to change notification settings - Fork 202
Open
Description
We found that detected results by leg_detector are different between Kinetic and Melodic in our internal test.
It looked that bugs pointed out in #67 about leg probabilities remain in the Melodic version. We think that the probability calculation in leg_detector.cpp(L735-737) is wrong.
people/leg_detector/src/leg_detector.cpp
Lines 735 to 737 in bc73fa0
| float probability = 0.5 - | |
| forest->predict(tmp_mat, cv::noArray(), cv::ml::RTrees::PREDICT_SUM) / | |
| forest->getRoots().size(); |
As results, probabilities take values between -0.5 and 1.5.
So, we want to fix as below.
float probability = 0.5 + 0.5 *
static_cast<float>(forest->predict(tmp_mat, cv::noArray(), cv::ml::RTrees::PREDICT_SUM)) /
static_cast<float>(forest->getRoots().size());
After we fixed this bug as the above, we got almost the same results between Kinetic and Melodic in our internal test.
We will create a pull request. Thanks.
Metadata
Metadata
Assignees
Labels
No labels