cutcutcodec.core.nn.dataaug.video.interlace¶
- cutcutcodec.core.nn.dataaug.video.interlace(video: Tensor) Tensor[source]¶
Simulate an interlaced video.
Examples¶
>>> import torch >>> from cutcutcodec.core.nn.dataaug.video import interlace >>> video = torch.empty(5, 5, 12) >>> video[:, :, 0:3] = 1.0 >>> video[:, :, 3:6] = 2.0 >>> video[:, :, 6:9] = 3.0 >>> video[:, :, 9:12] = 4.0 >>> video = interlace(video) >>> video[:, :, 6] tensor([[3., 3., 3., 3., 3.], [2., 2., 2., 2., 2.], [3., 3., 3., 3., 3.], [2., 2., 2., 2., 2.], [3., 3., 3., 3., 3.]]) >>>