LINCellularNeuroscience/VAME

alignment egocentric

Opened this issue · 0 comments

Aligning data test070424, Pose confidence value: 0.50

TypeError Traceback (most recent call last)
in <cell line: 2>()
1 ## Align Egocentrically
----> 2 vame.egocentric_alignment(config, pose_ref_index=[2,9])

4 frames
/usr/local/lib/python3.10/dist-packages/vame-1.0-py3.10.egg/vame/util/align_egocentrical.py in egocentric_alignment(config, pose_ref_index, crop_size, use_video, video_format, check_video)
314 for file in filename:
315 print("Aligning data %s, Pose confidence value: %.2f" %(file, confidence))
--> 316 egocentric_time_series, frames = alignment(path_to_file, file, pose_ref_index, video_format, crop_size,
317 confidence, use_video=use_video, check_video=check_video)
318 np.save(os.path.join(path_to_file,'data',file,file+'-PE-seq.npy'), egocentric_time_series)

/usr/local/lib/python3.10/dist-packages/vame-1.0-py3.10.egg/vame/util/align_egocentrical.py in alignment(path_to_file, filename, pose_ref_index, video_format, crop_size, confidence, use_video, check_video)
287
288
--> 289 frames, n, time_series = align_mouse(path_to_file, filename, video_format, crop_size, pose_list, pose_ref_index,
290 confidence, pose_flip_ref, bg, frame_count, use_video)
291

/usr/local/lib/python3.10/dist-packages/vame-1.0-py3.10.egg/vame/util/align_egocentrical.py in align_mouse(path_to_file, filename, video_format, crop_size, pose_list, pose_ref_index, confidence, pose_flip_ref, bg, frame_count, use_video)
153
154 for i in pose_list:
--> 155 i = interpol(i)
156
157 if use_video:

/usr/local/lib/python3.10/dist-packages/vame-1.0-py3.10.egg/vame/util/align_egocentrical.py in interpol(arr)
84 y = np.transpose(arr)
85
---> 86 nans, x = nan_helper(y[0])
87 y[0][nans]= np.interp(x(nans), x(~nans), y[0][~nans])
88 nans, x = nan_helper(y[1])

/usr/local/lib/python3.10/dist-packages/vame-1.0-py3.10.egg/vame/util/align_egocentrical.py in nan_helper(y)
76 #Helper function to return indexes of nans
77 def nan_helper(y):
---> 78 return np.isnan(y), lambda z: z.nonzero()[0]
79
80

TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

hi, having some issues with alignment egocentrically and pose_ref_index. Can someone help me out with this issue please.