This code is a Pytorch implementation of TIM. For implementation, I refer to the other matlab code. Original paper is Towards a practical lipreading system.
For use of TIM, please follow below steps.
-
Install required packages.
pip install einops torch
-
Copy
tim.py
or clone this repository to your local machine.
import torch
from tim import FixSequenceTIM
sample_video = torch.randn(18, 3, 224, 224)
tim_transform = FixSequenceTIM(sequence_length=16)
sample_video_transformed = tim_transform(sample_video) # shape: (16, 3, 224, 224)