from local

This commit is contained in:
dohe0342 2022-12-10 12:55:39 +09:00
parent 023b4c8c07
commit 63e2c16dc6
4 changed files with 2 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -192,7 +192,7 @@ def encode_supervisions(
each other. each other.
""" """
try: start_frame = supervisions["start_frame"] try: start_frame = supervisions["start_frame"]
except: start_frame = [0 for i in range(len(supervisions["cut"]))] except: start_frame = torch.IntTensor([0 for i in range(len(supervisions["cut"]))])
try: num_frames = supervisions["num_frames"] try: num_frames = supervisions["num_frames"]
except: except:
@ -200,6 +200,7 @@ def encode_supervisions(
for supervision in supervisions['cut']: for supervision in supervisions['cut']:
try: num_frames.append(supervision.tracks[0].cut.recording.num_samples) try: num_frames.append(supervision.tracks[0].cut.recording.num_samples)
except: num_frames.append(supervision.recording.num_samples) except: num_frames.append(supervision.recording.num_samples)
num_frames = torch.IntTensor(num_frames)
supervision_segments = torch.stack( supervision_segments = torch.stack(
( (