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

"Residuals are not finite" error with anipose triangulate #20

Open
vzimmern opened this issue Jul 18, 2023 · 1 comment
Open

"Residuals are not finite" error with anipose triangulate #20

vzimmern opened this issue Jul 18, 2023 · 1 comment

Comments

@vzimmern
Copy link

Good afternoon,

I'm working with a 4 camera setup to record mouse movements in relation to a neurological disorder.

I'm at the triangulation step of the anipose workflow, after getting through the others steps without errors.

The error is as follows:

/home/minassian/Documents/glove-anipose/2023-07-16/pose-3d/2023-07-16-vid1.csv
100%|███████████████████████████| 6888/6888 [00:01<00:00, 5993.77it/s]
/home/minassian/miniconda3/envs/glove-anipose/lib/python3.7/site-packages/aniposelib/cameras.py:1023: RuntimeWarning: divide by zero encountered in double_scalars
default_smooth = 1.0/np.mean(np.abs(np.diff(p3ds_med, axis=0)))
/home/minassian/miniconda3/envs/glove-anipose/lib/python3.7/site-packages/scipy/optimize/_lsq/least_squares.py:815: RuntimeWarning: invalid value encountered in multiply
return np.atleast_1d(fun(x, *args, **kwargs))
Traceback (most recent call last):
File "/home/minassian/miniconda3/envs/glove-anipose/lib/python3.7/site-packages/anipose/triangulate.py", line 346, in process_session
fname_dict, output_fname)
File "/home/minassian/miniconda3/envs/glove-anipose/lib/python3.7/site-packages/anipose/triangulate.py", line 222, in triangulate
verbose=True)
File "/home/minassian/miniconda3/envs/glove-anipose/lib/python3.7/site-packages/aniposelib/cameras.py", line 1050, in optim_points
n_deriv_smooth))
File "/home/minassian/miniconda3/envs/glove-anipose/lib/python3.7/site-packages/scipy/optimize/_lsq/least_squares.py", line 827, in least_squares
raise ValueError("Residuals are not finite in the initial point.")
ValueError: Residuals are not finite in the initial point.

From what I can find, the "residuals are not finite" error has to do with taking square roots of negative numbers.

I can't tell where this is coming from and how best to fix it.

I'm working on Ubuntu 22.04 LTS, Python 3.7.16, numba 0.54.1

Thanks for any help!

@xlvvr
Copy link

xlvvr commented Jul 2, 2024

I'm having the same issue, have you found a solution?

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

2 participants