          "gui_radio": False,
          "fixed": True,
      },
  }
 
</s> remove                       out_queue=self._queues["extract_align_in"],
                      queue_size=self._queue_size)
 </s> add                       out_queue=self._queues["extract_align_in"]) </s> remove         batch["prediction"], batch["mtcnn_points"] = [prediction], [points]
 </s> add         batch["prediction"], batch["mtcnn_points"] = prediction, points </s> remove     def predict(self, feed):
 </s> add     def _amd_predict_with_optimized_batchsizes(self, feed, batch_size):
        """ Minimizes the amount of kernels to be compiled when using
        the ``Amd`` backend with varying batchsizes while trying to keep
        the batchsize as high as possible.

        Parameters
        ----------
        feed: numpy.ndarray or list
            The feed to be provided to the model as input. This should be a ``numpy.ndarray``
            for single inputs or a ``list`` of ``numpy.ndarrays`` for multiple inputs.
        batch_size: int
            The upper batchsize to use.
        """
        if isinstance(feed, np.ndarray):
            feed = [feed]
        items = feed[0].shape[0]
        done_items = 0
        results = list()
        while done_items < items:
            if batch_size < 4:  # Not much difference in BS < 4
                batch_size = 1
            batch_items = ((items - done_items) // batch_size) * batch_size
            if batch_items:
                pred_data = [x[done_items:done_items + batch_items] for x in feed]
                pred = self._model.predict(pred_data, batch_size=batch_size)
                done_items += batch_items
                results.append(pred)
            batch_size //= 2
        if isinstance(results[0], np.ndarray):
            return np.concatenate(results)
        return [np.concatenate(x) for x in zip(*results)]

    def predict(self, feed, batch_size=None): </s> remove             return self._model.predict(feed)
 </s> add             if batch_size is None:
                return self._model.predict(feed)
            return self._amd_predict_with_optimized_batchsizes(feed, batch_size) </s> remove                 return self._model.predict(feed)
 </s> add                 return self._model.predict(feed, batch_size=batch_size)
    "batch-size": {
        "default": 8,
        "info": "The batch size to use. To a point, higher batch sizes equal better performance, "
                "but setting it too high can harm performance.\n"
                "\n\tNvidia users: If the batchsize is set higher than the your GPU can "
                "accomodate then this will automatically be lowered.",
        "datatype": int,
        "rounding": 1,
        "min_max": (1, 64),
        "choices": [],
        "gui_radio": False,
        "fixed": True,
    }
          "gui_radio": False,
          "fixed": True,
      },
    "batch-size": {
        "default": 8,
        "info": "The batch size to use. To a point, higher batch sizes equal better performance, "
                "but setting it too high can harm performance.\n"
                "\n\tNvidia users: If the batchsize is set higher than the your GPU can "
                "accomodate then this will automatically be lowered.",
        "datatype": int,
        "rounding": 1,
        "min_max": (1, 64),
        "choices": [],
        "gui_radio": False,
        "fixed": True,
    }
  }
keep keep add keep
 Optimized mtcnn a bit + added batching (#874) 
plugins/extract/detect/mtcnn_defaults.py