          logger.trace("Padded image shape: %s", image.shape)
          return image
  
      # <<< FINALIZE METHODS >>> #
      @staticmethod
      def _remove_zero_sized_faces(batch):
          """ Remove items from dict where detected face is of zero size
              or face falls entirely outside of image """
          dims = [img.shape[:2] for img in batch["image"]]
          logger.trace("image dims: %s", dims)
          batch["detected_faces"] = [[face
                                      for face in faces
 
</s> remove         # Remove zero sized faces
        self._remove_zero_sized_faces(batch)
 </s> add  </s> remove         dims = [img.shape[:2] for img in batch["image"]]
        logger.trace("image dims: %s", dims)
        batch["detected_faces"] = [[face
                                    for face in faces
                                    if face.right > 0 and face.left < dim[1]
                                    and face.bottom > 0 and face.top < dim[0]]
                                   for dim, faces in zip(dims, batch.get("detected_faces", []))]
 </s> add         logger.trace("Input sizes: %s", [len(face) for face in batch_faces])
        retval = [[face
                   for face in faces
                   if face.right > 0 and face.left < self.input_size
                   and face.bottom > 0 and face.top < self.input_size]
                  for faces in batch_faces]
        logger.trace("Output sizes: %s", [len(face) for face in retval])
        return retval
    def _remove_zero_sized_faces(self, batch_faces):
        """ Remove items from batch_faces where detected face is of zero size
          logger.trace("Padded image shape: %s", image.shape)
          return image
  
      # <<< FINALIZE METHODS >>> #
    def _remove_zero_sized_faces(self, batch_faces):
        """ Remove items from batch_faces where detected face is of zero size
    def _remove_zero_sized_faces(self, batch_faces):
        """ Remove items from batch_faces where detected face is of zero size
    def _remove_zero_sized_faces(self, batch_faces):
        """ Remove items from batch_faces where detected face is of zero size
              or face falls entirely outside of image """
          dims = [img.shape[:2] for img in batch["image"]]
          logger.trace("image dims: %s", dims)
          batch["detected_faces"] = [[face
                                      for face in faces
keep keep keep keep replace replace replace keep keep keep keep keep
 bugfix: Extract - Calculate zero sized faces prior to scaling up 
plugins/extract/detect/_base.py