          logger.trace("Aligning image around center")
          sizes = (self.input_size, self.input_size)
          rois = []
          faces = []
          for face in detected_faces:
              box = (face.left,
                     face.top,
                     face.right,
                     face.bottom)
              diff_height_width = face.h - face.w
 
</s> remove     def align_image(self, detected_faces):
 </s> add     def align_image(self, batch): </s> remove         # TODO modify detected face to hold this data as a matrix
 </s> add  </s> remove         for face, ul, br in zip(batch["detected_faces"], upper_left, bot_right):
            height, width = face.image.shape[:2]
            channels = 3 if face.image.ndim > 2 else 1
            br_width, br_height = br[0].astype('int32')
            ul_width, ul_height = ul[0].astype('int32')
            new_dim = (br_height - ul_height, br_width - ul_width, channels)
 </s> add         for image, top_left, bottom_right in zip(batch["image"], upper_left, bot_right):
            height, width = image.shape[:2]
            channels = 3 if image.ndim > 2 else 1
            bottom_right_width, bottom_right_height = bottom_right[0].astype('int32')
            top_left_width, top_left_height = top_left[0].astype('int32')
            new_dim = (bottom_right_height - top_left_height,
                       bottom_right_width - top_left_width,
                       channels) </s> remove         self._rollover = []  # Items that are rolled over from the previous batch in get_batch
 </s> add         self._rollover = None  # Items that are rolled over from the previous batch in get_batch
        for face, image in zip(batch["detected_faces"], batch["image"]):
          logger.trace("Aligning image around center")
          sizes = (self.input_size, self.input_size)
          rois = []
          faces = []
        for face, image in zip(batch["detected_faces"], batch["image"]):
              box = (face.left,
                     face.top,
                     face.right,
                     face.bottom)
              diff_height_width = face.h - face.w
keep keep keep keep replace keep keep keep keep keep
 plugins.extract - Create ExtractMedia class for pipeline flow
Bugfix - Fix memory leak in extract 
plugins/extract/align/cv2_dnn.py