          self.min_size = min_size
          self.parent_is_pool = False
          self.init = None
  
          # The input and output queues for the plugin.
          # See lib.queue_manager.QueueManager for getting queues
          self.queues = {"in": None, "out": None}
 
</s> remove         super().initialize(*args, **kwargs)
        logger.info("Initializing MTCNN Detector...")
        is_gpu = False

        # Must import tensorflow inside the spawned process
        # for Windows machines
        import_tensorflow()
        _, vram_free, _ = self.get_vram_free()
        mtcnn_graph = tf.Graph()

        # Windows machines sometimes misreport available vram, and overuse
        # causing OOM. Allow growth fixes that
        config = tf.ConfigProto()
        config.gpu_options.allow_growth = True  # pylint: disable=no-member

        with mtcnn_graph.as_default():  # pylint: disable=not-context-manager
            sess = tf.Session(config=config)
            with sess.as_default():  # pylint: disable=not-context-manager
                pnet, rnet, onet = create_mtcnn(sess, self.model_path)

            if any("gpu" in str(device).lower()
                   for device in sess.list_devices()):
                logger.debug("Using GPU")
                is_gpu = True
        mtcnn_graph.finalize()

        if not is_gpu:
            alloc = 2048
            logger.warning("Using CPU")
        else:
            alloc = vram_free
        logger.debug("Allocated for Tensorflow: %sMB", alloc)
 </s> add         try:
            super().initialize(*args, **kwargs)
            logger.info("Initializing MTCNN Detector...")
            is_gpu = False

            # Must import tensorflow inside the spawned process
            # for Windows machines
            import_tensorflow()
            _, vram_free, _ = self.get_vram_free()
            mtcnn_graph = tf.Graph()

            # Windows machines sometimes misreport available vram, and overuse
            # causing OOM. Allow growth fixes that
            config = tf.ConfigProto()
            config.gpu_options.allow_growth = True  # pylint: disable=no-member

            with mtcnn_graph.as_default():  # pylint: disable=not-context-manager
                sess = tf.Session(config=config)
                with sess.as_default():  # pylint: disable=not-context-manager
                    pnet, rnet, onet = create_mtcnn(sess, self.model_path)

                if any("gpu" in str(device).lower()
                       for device in sess.list_devices()):
                    logger.debug("Using GPU")
                    is_gpu = True
            mtcnn_graph.finalize()

            if not is_gpu:
                alloc = 2048
                logger.warning("Using CPU")
            else:
                alloc = vram_free
            logger.debug("Allocated for Tensorflow: %sMB", alloc) </s> remove         event = None
        if hasattr(self.process_detect, "event"):
            event = self.process_detect.event

 </s> add         event = self.process_detect.event if hasattr(self.process_detect, "event") else None
        error = self.process_detect.error if hasattr(self.process_detect, "error") else None </s> remove         super().initialize(*args, **kwargs)
        logger.verbose("Initializing Dlib-CNN Detector...")
        self.detector = dlib.cnn_face_detection_model_v1(  # pylint: disable=c-extension-no-member
            self.model_path)
        is_cuda = self.compiled_for_cuda()
        if is_cuda:
            logger.debug("Using GPU")
            _, vram_free, _ = self.get_vram_free()
        else:
            logger.verbose("Using CPU")
            vram_free = 2048
 </s> add         try:
            super().initialize(*args, **kwargs)
            logger.verbose("Initializing Dlib-CNN Detector...")
            self.detector = dlib.cnn_face_detection_model_v1(  # pylint: disable=c-extension-no-member
                self.model_path)
            is_cuda = self.compiled_for_cuda()
            if is_cuda:
                logger.debug("Using GPU")
                _, vram_free, _ = self.get_vram_free()
            else:
                logger.verbose("Using CPU")
                vram_free = 2048 </s> remove         # Batch size of 2 actually uses about 338MB less than a single image??
        # From there batches increase at ~680MB per item in the batch
 </s> add             # Batch size of 2 actually uses about 338MB less than a single image??
            # From there batches increase at ~680MB per item in the batch
        self.error = None
          self.min_size = min_size
          self.parent_is_pool = False
          self.init = None
        self.error = None
  
          # The input and output queues for the plugin.
          # See lib.queue_manager.QueueManager for getting queues
          self.queues = {"in": None, "out": None}
keep keep add keep keep keep keep
 Better extractor error handling on initialization 
plugins/extract/detect/_base.py