Skip to content
Snippets Groups Projects
Commit 7e314398 authored by Cribellier, Antoine's avatar Cribellier, Antoine
Browse files

Correct small bug

parent 116bdc45
No related branches found
No related tags found
No related merge requests found
......@@ -267,8 +267,10 @@ def save_2d_tracks_from_paths(csv_paths: Dict[str, str], save_names: Dict[str, s
y_px = np.array([pts_csv[camn]['y_px'] for camn in csv_paths[obj_name].keys()])
frames = np.array([pts_csv[camn]['frame'] for camn in csv_paths[obj_name].keys()])
if not np.array_equal(frames, np.sort(np.unique(frames))):
raise ValueError('frames_objs must be sorted and unique')
uni_frames = np.sort(np.unique(frames))
for i, camn in enumerate(csv_paths[obj_name].keys()):
if not np.array_equal(frames[i], uni_frames):
raise ValueError('frames_objs must be sorted and unique')
if not os.path.exists(save_paths[camn]): os.makedirs(save_paths[camn])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment