class_docstr: Linear Projection Video Front-End for Lip Reading
  
  The spatial dimension is flattened and projected to dim_output using a Linear layer.
  This is equivalent to having a convolution layer with a kernel size of the size of the image.
  Circle crop can be used as pre-processing to crop the image as a circle around lips and ignore corner pixels
  
  Args:
      in_channels: number of inputs video channels, 1 for grayscale and 3 for RGB
      in_height: image height
      in_width: image width
      dim_output: output feature dimension for linear projection
      out_channels_first: Whether outputs should have channels_first format (Batch, Dout, Time) or channels_last (Batch, Time, Dout)
      circle_crop: crop the image as a circle before the Linear layer, default to False
      circle_radius: the circle radius, default to 1 for full circle
class_docstr_tok: ["Linear","Projection","Video","Front-End","for","Lip","Reading","The","spatial","dimension","is","flattened","and","projected","to","dim_output","using","a","Linear","layer",".","This","is","equivalent","to","having","a","convolution","layer","with","a","kernel","size","of","the","size","of","the","image",".","Circle","crop","can","be","used","as","pre-processing","to","crop","the","image","as","a","circle","around","lips","and","ignore","corner","pixels","Args",":","in_channels",":","number","of","inputs","video","channels",",","1","for","grayscale","and","3","for","RGB","in_height",":","image","height","in_width",":","image","width","dim_output",":","output","feature","dimension","for","linear","projection","out_channels_first",":","Whether","outputs","should","have","channels_first","format","(","Batch",",","Dout",",","Time",")","or","channels_last","(","Batch",",","Time",",","Dout",")","circle_crop",":","crop","the","image","as","a","circle","before","the","Linear","layer",",","default","to","False","circle_radius",":","the","circle","radius",",","default","to","1","for","full","circle"]
code: def __init__(
      self,
      in_channels,
      in_height,
      in_width,
      dim_output,
      out_channels_first=True,
      circle_crop=False,
      circle_radius=1.0,
  ):
      super(LinearProjectionVideoFrontEnd, self).__init__()
  
      self.out_channels_first = out_channels_first
      self.in_height = in_height
      self.in_width = in_width
      self.dim_output = dim_output
      self.in_channels = in_channels
      self.circle_crop = circle_crop
      self.circle_radius = circle_radius
      self.circle_indices = self.get_circle_indices()
  
      if self.dim_output is not None:
          if self.circle_crop:
              self.linear_proj = nn.Linear(
                  in_channels * len(self.circle_indices), dim_output
              )
          else:
              self.linear_proj = nn.Linear(
                  in_channels * in_height * in_width, dim_output
              )
      else:
          self.linear_proj = nn.Identity()
  
file_path: NeMo/nemo/collections/multimodal/speech_cv/modules/linear_projection_video_front_end.py
imports: from collections import OrderedDict
  import torch
  from torch import nn
  from nemo.core.classes.module import NeuralModule
  from nemo.core.neural_types import LengthsType, NeuralType, VideoSignal
label_desc: Use image node_id 1 to create a new LinearProjectionVideoFrontEnd object from inherited base classes: NeuralModule with example: obj = LinearProjectionVideoFrontEnd(in_channels, in_height, in_width, dim_output, out_channels_first, circle_crop, circle_radius)