diff --git a/sleap/info/write_tracking_h5.py b/sleap/info/write_tracking_h5.py index 6cbefced8..c8e8dba4b 100644 --- a/sleap/info/write_tracking_h5.py +++ b/sleap/info/write_tracking_h5.py @@ -348,7 +348,8 @@ def write_csv_file(output_path, data_dict): tracks.append(detection) tracks = pd.DataFrame(tracks) - + all_frames = globals().get('all_frames', False) + if all_frames: tracks = tracks.set_index('frame_idx') tracks = tracks.reindex(range(0, len(data_dict['track_occupancy'])),fill_value=np.nan) @@ -362,7 +363,7 @@ def main( labels: Labels, output_path: str, labels_path: str = None, - all_frames: bool = True, + all_frames: bool = False, video: Video = None, csv: bool = False, ):