mmagic.models.editors.tof.tof_vfi_net
¶
Module Contents¶
Classes¶
PyTorch implementation of TOFlow for video frame interpolation. |
|
Basic module of SPyNet. |
|
SPyNet architecture. |
|
ResNet architecture. |
- class mmagic.models.editors.tof.tof_vfi_net.TOFlowVFINet(rgb_mean=[0.485, 0.456, 0.406], rgb_std=[0.229, 0.224, 0.225], flow_cfg=dict(norm_cfg=None, pretrained=None), init_cfg=None)[source]¶
Bases:
mmengine.model.BaseModule
PyTorch implementation of TOFlow for video frame interpolation.
Paper: Xue et al., Video Enhancement with Task-Oriented Flow, IJCV 2018 Code reference:
- Parameters
rgb_mean (list[float]) – Image mean in RGB orders. Default: [0.485, 0.456, 0.406]
rgb_std (list[float]) – Image std in RGB orders. Default: [0.229, 0.224, 0.225]
flow_cfg (dict) – Config of SPyNet. Default: dict(norm_cfg=None, pretrained=None)
init_cfg (dict, optional) – Initialization config dict. Default: None.
- class mmagic.models.editors.tof.tof_vfi_net.BasicModule(norm_cfg)[source]¶
Bases:
torch.nn.Module
Basic module of SPyNet.
Note that unlike the common spynet architecture, the basic module here could contain batch normalization.
- Parameters
norm_cfg (dict | None) – Config of normalization.
- class mmagic.models.editors.tof.tof_vfi_net.SPyNet(norm_cfg, pretrained=None)[source]¶
Bases:
torch.nn.Module
SPyNet architecture.
Note that this implementation is specifically for TOFlow. It differs from the common SPyNet in the following aspects:
The basic modules in paper of TOFlow contain BatchNorm.
- Normalization and denormalization are not done here, as
they are done in TOFlow.
- Paper:
Optical Flow Estimation using a Spatial Pyramid Network
- Code reference:
- Parameters
norm_cfg (dict | None) – Config of normalization.
pretrained (str) – path for pre-trained SPyNet. Default: None.