cutcutcodec.core.nn.model.enhancement.cnn.CNN
- class cutcutcodec.core.nn.model.enhancement.cnn.CNN(**kwargs)[source]
Improve RGB image quality keeping the resolution.
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(video: Tensor) Tensor[source]
Improve the quality of the middle frame of the 5 consecutives rgb frames.
Parameters
- videotorch.Tensor
The contanenation of 5 video batched frames in RGB format of shape (n, h, w, 15).
Returns
- middle_frametorch.Tensor
The enhanced third frame of the sequence, of shape (n, h, w, 3).
Examples
>>> import torch >>> from cutcutcodec.core.nn.model.enhancement.cnn import CNN >>> CNN()(torch.rand((2, 720, 1080, 15))).shape torch.Size([2, 720, 1080, 15]) >>>