forked from mrq/DL-Art-School
Fix process_video bugs
This commit is contained in:
parent
beac71ad18
commit
5e9da65d81
|
@ -62,7 +62,3 @@ class WideResnetFeatureExtractor(nn.Module):
|
||||||
x = self.model.layer2(x)
|
x = self.model.layer2(x)
|
||||||
x = self.model.layer3(x)
|
x = self.model.layer3(x)
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
|
||||||
w = WideResnetFeatureExtractor()
|
|
||||||
w.forward(torch.randn(3,64,64))
|
|
|
@ -38,8 +38,10 @@ class FfmpegBackedVideoDataset(data.Dataset):
|
||||||
def get_time_for_it(self, it):
|
def get_time_for_it(self, it):
|
||||||
secs = it / self.frame_rate + self.start_at
|
secs = it / self.frame_rate + self.start_at
|
||||||
mins = int(secs / 60)
|
mins = int(secs / 60)
|
||||||
|
hours = int(mins / 60)
|
||||||
secs = secs - (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):
|
def __getitem__(self, index):
|
||||||
if self.vertical_splits > 0:
|
if self.vertical_splits > 0:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user