diff --git a/color_syncnet_train.py b/color_syncnet_train.py index c3b99f2..8ae099e 100644 --- a/color_syncnet_train.py +++ b/color_syncnet_train.py @@ -55,7 +55,7 @@ class Dataset(object): def crop_audio_window(self, spec, start_frame): # num_frames = (T x hop_size * fps) / sample_rate - start_frame_num = self.get_frame_id(start_frame) + 1 # 0-indexing ---> 1-indexing + start_frame_num = self.get_frame_id(start_frame) start_idx = int(80. * (start_frame_num / float(hparams.fps))) end_idx = start_idx + syncnet_mel_step_size @@ -278,4 +278,4 @@ if __name__ == "__main__": train(device, model, train_data_loader, test_data_loader, optimizer, checkpoint_dir=checkpoint_dir, checkpoint_interval=hparams.syncnet_checkpoint_interval, - nepochs=hparams.nepochs) \ No newline at end of file + nepochs=hparams.nepochs)