Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leg probabilities are different between Kinetic and Melodic #100

Open
s-kodama-isp opened this issue Jul 2, 2021 · 0 comments · May be fixed by #101
Open

leg probabilities are different between Kinetic and Melodic #100

s-kodama-isp opened this issue Jul 2, 2021 · 0 comments · May be fixed by #101

Comments

@s-kodama-isp
Copy link

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.

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.

s-kodama-isp added a commit to s-kodama-isp/people that referenced this issue Jul 2, 2021
@s-kodama-isp s-kodama-isp linked a pull request Jul 2, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant