myungsub / CAIN

Source code for AAAI 2020 paper "Channel Attention Is All You Need for Video Frame Interpolation"
MIT License
326 stars 43 forks source link

Interpolation error #1

Closed Jerchongkong closed 4 years ago

Jerchongkong commented 4 years ago

When I tried to test the program with test_custom.sh I get this error:

Namespace(batch_size=64, beta1=0.9, beta2=0.99, cuda=True, data_dir='data', data_root='data/frame_seq', dataset='custom', depth=3, exp_name='CAIN_fin', fix_loaded=False, img_fmt='jpg', log_dir='logs', log_iter=20, loss='1*L1', lpips=False, lr=0.0001, max_epoch=200, mode='test', model='cain', n_resblocks=12, num_frames=3, num_gpu=1, num_workers=5, random_seed=12345, resume=True, resume_exp=None, start_epoch=0, test_batch_size=8, test_mode='hard', up_mode='shuffle', use_tensorboard=False, val_batch_size=4, viz=False) Building model: CAIN

of parameters: 42780432

Evaluating for epoch = 175 [0] images ready to be loaded 0it [00:00, ?it/s] Traceback (most recent call last): File "generate.py", line 124, in main(args) File "generate.py", line 120, in main test(args, args.start_epoch) File "generate.py", line 108, in test print('im_processed: {:d}/{:d} {:.3f}s \r'.format(i + 1, len(test_loader), time.time() - t)) UnboundLocalError: local variable 'i' referenced before assignment

I have all the packages installed with their respective versions.

myungsub commented 4 years ago

Hi, It seems like you are not loading any frames for interpolation. Please make sure to change the --data_root to point to the directory containing the frames that you want to interpolate, and choose the correct --img_fmt (image format, possibly jpg or png).