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

I encountered the following problem when performing the anipose filter step. It was still running successfully a month ago #132

Open
wyclearnpy opened this issue Feb 29, 2024 · 1 comment

Comments

@wyclearnpy
Copy link

(DEEPLABCUT) D:\A_3DFishPose>anipose filter
Filtering tracked points...
D:\A_3DFishPose\2024.2.29\pose-2d-filtered\koipose0_camA.h5
0it [00:01, ?it/s]
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "E:\anaconda3\envs\DEEPLABCUT\lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "d:\anipose-master\anipose\filter_pose.py", line 121, in viterbi_path_wrapper
pts_new, scs_new = viterbi_path(pts, scs, max_offset, thres_dist)
File "d:\anipose-master\anipose\filter_pose.py", line 47, in viterbi_path
points_nans = remove_dups(points, thres=5)
File "d:\anipose-master\anipose\filter_pose.py", line 29, in remove_dups
tree = cKDTree(pts_ix.reshape(-1, 3))
File "_ckdtree.pyx", line 561, in scipy.spatial._ckdtree.cKDTree.init
ValueError: data must be finite, check for nan or inf values
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "\?\E:\anaconda3\envs\DEEPLABCUT\Scripts\anipose-script.py", line 33, in
sys.exit(load_entry_point('anipose', 'console_scripts', 'anipose')())
File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "d:\anipose-master\anipose\anipose.py", line 149, in filter
filter_pose_all(config)
File "d:\anipose-master\anipose\common.py", line 168, in fun
return process_all(config, process_session, **args)
File "d:\anipose-master\anipose\common.py", line 153, in process_all
output[past_folders] = process_session(config, path, **args)
File "d:\anipose-master\anipose\filter_pose.py", line 387, in process_session
points, scores = filter_fun(config, all_points, metadata['bodyparts'])
File "d:\anipose-master\anipose\filter_pose.py", line 175, in filter_pose_viterbi
for jix, pts_new, scs_new in tqdm(results, ncols=70):
File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\tqdm\std.py", line 1182, in iter
for obj in iterable:
File "E:\anaconda3\envs\DEEPLABCUT\lib\multiprocessing\pool.py", line 870, in next
raise value
ValueError: data must be finite, check for nan or inf values

@caikangjia
Copy link

(DEEPLABCUT) D:\A_3DFishPose>anipose filter Filtering tracked points... D:\A_3DFishPose\2024.2.29\pose-2d-filtered\koipose0_camA.h5 0it [00:01, ?it/s] multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "E:\anaconda3\envs\DEEPLABCUT\lib\multiprocessing\pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "d:\anipose-master\anipose\filter_pose.py", line 121, in viterbi_path_wrapper pts_new, scs_new = viterbi_path(pts, scs, max_offset, thres_dist) File "d:\anipose-master\anipose\filter_pose.py", line 47, in viterbi_path points_nans = remove_dups(points, thres=5) File "d:\anipose-master\anipose\filter_pose.py", line 29, in remove_dups tree = cKDTree(pts_ix.reshape(-1, 3)) File "_ckdtree.pyx", line 561, in scipy.spatial._ckdtree.cKDTree.init ValueError: data must be finite, check for nan or inf values """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "?\E:\anaconda3\envs\DEEPLABCUT\Scripts\anipose-script.py", line 33, in sys.exit(load_entry_point('anipose', 'console_scripts', 'anipose')()) File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 1157, in call return self.main(*args, **kwargs) File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\decorators.py", line 92, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) File "d:\anipose-master\anipose\anipose.py", line 149, in filter filter_pose_all(config) File "d:\anipose-master\anipose\common.py", line 168, in fun return process_all(config, process_session, **args) File "d:\anipose-master\anipose\common.py", line 153, in process_all output[past_folders] = process_session(config, path, **args) File "d:\anipose-master\anipose\filter_pose.py", line 387, in process_session points, scores = filter_fun(config, all_points, metadata['bodyparts']) File "d:\anipose-master\anipose\filter_pose.py", line 175, in filter_pose_viterbi for jix, pts_new, scs_new in tqdm(results, ncols=70): File "E:\anaconda3\envs\DEEPLABCUT\lib\site-packages\tqdm\std.py", line 1182, in iter for obj in iterable: File "E:\anaconda3\envs\DEEPLABCUT\lib\multiprocessing\pool.py", line 870, in next raise value ValueError: data must be finite, check for nan or inf values

Hi, I found the problem. The SciPy 1.11+ caused this issue. Downgrade to SciPy 1.10/1.9 will have the filter running.

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