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

ZeroDivisionError: float division by zero in body.py #47

Closed
Adeel-Intizar opened this issue Feb 3, 2021 · 1 comment
Closed

ZeroDivisionError: float division by zero in body.py #47

Adeel-Intizar opened this issue Feb 3, 2021 · 1 comment

Comments

@Adeel-Intizar
Copy link

RuntimeWarning: invalid value encountered in true_divide
vec = np.divide(vec, norm)
Traceback (most recent call last):
File "demo.py", line 16, in
candidate, subset = body_estimation(oriImg)
File "src\body.py", line 135, in call
0.5 * oriImg.shape[0] / norm - 1, 0)
ZeroDivisionError: float division by zero

@Adeel-Intizar
Copy link
Author

I managed to solve it, in case if anyone is looking for it, just add 1e-6 to the norm variable which is causing this error and the problem will be solved

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

No branches or pull requests

1 participant