ltkong218 / IFRNet

IFRNet: Intermediate Feature Refine Network for Efficient Frame Interpolation (CVPR 2022)
MIT License
259 stars 23 forks source link

训练完gopro(9帧),测试出现问题 #5

Open dupc2018 opened 2 years ago

dupc2018 commented 2 years ago

测试的时候出现: 运行demo_8x.py 结果 out1 到out7 一致的问题,是训练的问题还是哪里出现问题了呢

ltkong218 commented 2 years ago

确保你训练测试时embt都是对应正确的

dupc2018 commented 2 years ago

训练测试的embt都是你原来的都没动,也就是数据集换了一下,其他的都没变,结果输出的7帧全部都是一样的,而且结果不怎么清晰,不知道原因出现在什么地方了

ltkong218 commented 2 years ago

建议先使用train_gopro.py在GoPro数据集上训练并测试,不要用train_vimeo90k.py训练的模型在demo_8x.py脚本中进行测试。

dupc2018 commented 2 years ago

直接使用train_gopro.py加载GoPro数据集是不是有点问题呢,我使用自己的数据集用train_gopro.py训练的,测试是用demo_8x.py脚本测试的,造成输出的都一样,连输出的图片文件大小都一样

dupc2018 commented 2 years ago

是不是demo_8x.py的原因呢,写上False 加载模型的时候 model.load_state_dict(torch.load('/mnt/IFRNet-main/checkpoint/IFRNet_L/2022-06-26 02:14:46/IFRNet_L_latest.pth'),False),但是如果不写False就报错 RuntimeError: Error(s) in loading state_dict for Model: Missing key(s) in state_dict: "encoder.pyramid1.0.0.weight", "encoder.pyramid1.0.0.bias", "encoder.pyramid1.0.1.weight", "encoder.pyramid1.1.0.weight", "encoder.pyramid1.1.0.bias", "encoder.pyramid1.1.1.weight", "encoder.pyramid2.0.0.weight", "encoder.pyramid2.0.0.bias", "encoder.pyramid2.0.1.weight", "encoder.pyramid2.1.0.weight", "encoder.pyramid2.1.0.bias", "encoder.pyramid2.1.1.weight", "encoder.pyramid3.0.0.weight", "encoder.pyramid3.0.0.bias", "encoder.pyramid3.0.1.weight", "encoder.pyramid3.1.0.weight", "encoder.pyramid3.1.0.bias", "encoder.pyramid3.1.1.weight", "encoder.pyramid4.0.0.weight", "encoder.pyramid4.0.0.bias", "encoder.pyramid4.0.1.weight", "encoder.pyramid4.1.0.weight"

ltkong218 commented 2 years ago

You can search this error and get the solution, such as this issue discussion. Also, I have fixed this problem by changing ddp_model.state_dict() to ddp_model.module.state_dict() when saving model checkpoints.

ltkong218 commented 2 years ago

For the problem that all output frames are the same, I suggest that you can read the paper and run provided code to understand the working principle of IFRNet, then you should know how to solve it.

loveisp commented 11 months ago

我也有这个问题。。啥情况?