from local

This commit is contained in:
dohe0342 2022-12-10 12:49:07 +09:00
parent bd9c10f9f1
commit 552f89adee
2 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@ -191,7 +191,15 @@ def encode_supervisions(
returned tensor and list of strings are guaranteed to be consistent with
each other.
"""
try: start_frame = supervisions["start_frame"]
except: start_frame = [0 for i in range(len(supervisions["cut"]))]
try: num_frames = supervisions["num_frames"]
except:
num_frames = []
for supervision in supervisions['cut']:
try: num_frames.append(supervision.tracks[0].cut.recording.num_samples)
except: num_frames.append(supervision.recording.num_samples)
supervision_segments = torch.stack(
(
supervisions["sequence_idx"],