class_docstr: Basic Reader Class
class_docstr_tok: ["Basic","Reader","Class"]
code: def video_face_crop(self, input_video):
      video = input_video
  
      preds = []
  
      for i in range(0, len(video), 3):
          pred = self.face_align_model.get_landmarks(video[i])
          if pred:
              preds.append(pred[0])
      preds = np.array(preds)
      heatmap = np.median(preds, axis=0)
  
      bounding_box = BoundingBox(heatmap[2:15])
  
      croped = video[
          :,
          bounding_box.miny : bounding_box.maxy,
          bounding_box.minx : bounding_box.maxx,
          :,
      ]
  
      crop_resize = np.zeros(
          (np.shape(video)[0], 112, 112, np.shape(video)[-1])
      )
  
      for i in range(len(croped)):
          try:
              crop_resize[i] = skimage.transform.resize(
                  croped[i], (112, 112), preserve_range=True
              )
          except Exception:
              print(croped)
              print("frame fails")
  
      crop_resize = crop_resize.astype(np.uint8)
  
      return crop_resize
  
imports: import cvtransforms
  import face_alignment
  import numpy
  import skimage.transform
  import skvideo.io
  import torch
  from models import pretrained
label_desc: Use image node_id 2 for calling the VideoReader obj's underlying member method code with example usage: obj.video_face_crop(input_video) and returns: crop_resize