Fix process_video bugs

This commit is contained in:
James Betker 2020-05-29 12:47:22 -06:00
parent beac71ad18
commit 5e9da65d81
2 changed files with 4 additions and 6 deletions

View File

@ -61,8 +61,4 @@ class WideResnetFeatureExtractor(nn.Module):
x = self.model.layer1(x)
x = self.model.layer2(x)
x = self.model.layer3(x)
return x
w = WideResnetFeatureExtractor()
w.forward(torch.randn(3,64,64))
return x

View File

@ -38,8 +38,10 @@ class FfmpegBackedVideoDataset(data.Dataset):
def get_time_for_it(self, it):
secs = it / self.frame_rate + self.start_at
mins = int(secs / 60)
hours = int(mins / 60)
secs = secs - (mins * 60)
return '%02d:%06.3f' % (mins, secs)
mins = mins % 60
return '%02d:%02d:%06.3f' % (hours, mins, secs)
def __getitem__(self, index):
if self.vertical_splits > 0: