          self.model.setPreferableTarget(cv2.dnn.DNN_TARGET_CPU)  # pylint: disable=no-member
  
      def process_input(self, batch):
          """ Compile the detected faces for prediction """
          faces, batch["roi"] = self.align_image(batch["detected_faces"])
          faces = self._normalize_faces(faces)
          batch["feed"] = np.array(faces, dtype="float32")[..., :3].transpose((0, 3, 1, 2))
          return batch
  
      def align_image(self, detected_faces):
 
</s> remove     def align_image(self, detected_faces):
 </s> add     def align_image(self, batch): </s> remove         batch["feed"] = cv2.dnn.blobFromImages(batch["scaled_image"],  # pylint: disable=no-member
 </s> add         batch["feed"] = cv2.dnn.blobFromImages(batch["image"],  # pylint: disable=no-member </s> remove         batch["feed"] = self.model.prepare_batch(batch["scaled_image"])
 </s> add         batch["feed"] = self.model.prepare_batch(batch["image"]) </s> remove         batch["feed"] = (batch["scaled_image"] - 127.5) / 127.5
 </s> add         batch["feed"] = (batch["image"] - 127.5) / 127.5 </s> remove         batch["feed"] = batch["scaled_image"]
 </s> add         batch["feed"] = batch["image"]
        faces, batch["roi"] = self.align_image(batch)
          self.model.setPreferableTarget(cv2.dnn.DNN_TARGET_CPU)  # pylint: disable=no-member
  
      def process_input(self, batch):
          """ Compile the detected faces for prediction """
        faces, batch["roi"] = self.align_image(batch)
          faces = self._normalize_faces(faces)
          batch["feed"] = np.array(faces, dtype="float32")[..., :3].transpose((0, 3, 1, 2))
          return batch
  
      def align_image(self, detected_faces):
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