code: def crop_patch(self, video, landmarks):
      sequence = []
      tf_landmarks = []
      yx_min = []
      for frame_idx, frame in enumerate(video):
          window_margin = min(
              self.window_margin // 2,
              frame_idx,
              len(landmarks) - 1 - frame_idx,
          )
          smoothed_landmarks = np.mean(
              [
                  landmarks[x]
                  for x in range(
                      frame_idx - window_margin,
                      frame_idx + window_margin + 1,
                  )
              ],
              axis=0,
          )
          smoothed_landmarks += landmarks[frame_idx].mean(
              axis=0
          ) - smoothed_landmarks.mean(axis=0)
          (
              transformed_frame,
              transformed_landmarks,
          ) = self.affine_transform(
              frame,
              smoothed_landmarks,
              self.reference,
              grayscale=self.convert_gray,
          )
          output = cut_patch(
              transformed_frame,
              transformed_landmarks[self.start_idx : self.stop_idx],
              self.crop_height // 2,
              self.crop_width // 2,
          )
          if output is None:
              return None
          patch, y_min, x_min = output
          sequence.append(patch)
          yx_min.append([y_min, x_min])
          tf_landmarks.append(transformed_landmarks)
      return np.array(sequence), yx_min, tf_landmarks
  
file_path: espnet/egs2/lrs3/avsr1/local/face_alignment.py
imports: import os
  import cv2
  import numpy
  from skimage import transform
  from transforms import *
label_desc: Use image node_id 3 for calling the VideoProcess obj's underlying member method code with example usage: obj.crop_patch(video, landmarks) and returns: np,  yx_min,  tf_landmarks, None