              logger.trace("Putting to queue. ('%s', detected_faces: %s, swapped_faces: %s)",
                           item["filename"], len(item["detected_faces"]),
                           item["swapped_faces"].shape[0])
              pointer += num_faces
          logger.trace("Queued out batch. Batchsize: %s", len(batch))
  
  
  class OptionalActions():
      """ Process the optional actions for convert """
 
</s> remove             self.out_queue.put(item)
 </s> add  </s> remove             item = in_queue.get()
            if item == "EOF":
 </s> add             items = in_queue.get()
            if items == "EOF": </s> remove             logger.trace("Patch queue got: '%s'", item["filename"])

            try:
                image = self.patch_image(item)
            except Exception as err:  # pylint: disable=broad-except
                # Log error and output original frame
                logger.error("Failed to convert image: '%s'. Reason: %s",
                             item["filename"], str(err))
                image = item["image"]
                # UNCOMMENT THIS CODE BLOCK TO PRINT TRACEBACK ERRORS
                # import sys
                # import traceback
                # exc_info = sys.exc_info()
                # traceback.print_exception(*exc_info)

            logger.trace("Out queue put: %s", item["filename"])
            out_queue.put((item["filename"], image))
 </s> add             for item in items:
                logger.trace("Patch queue got: '%s'", item["filename"])
                try:
                    image = self.patch_image(item)
                except Exception as err:  # pylint: disable=broad-except
                    # Log error and output original frame
                    logger.error("Failed to convert image: '%s'. Reason: %s",
                                 item["filename"], str(err))
                    image = item["image"]
                    # UNCOMMENT THIS CODE BLOCK TO PRINT TRACEBACK ERRORS
                    # import sys
                    # import traceback
                    # exc_info = sys.exc_info()
                    # traceback.print_exception(*exc_info)

                logger.trace("Out queue put: %s", item["filename"])
                out_queue.put((item["filename"], image)) </s> remove         return placeholder
 </s> add         return placeholder, background </s> remove         placeholder = predicted["image"] / 255.0
        placeholder = np.concatenate((placeholder,
                                      np.zeros((frame_size[1], frame_size[0], 1))),
                                     axis=-1).astype("float32")
 </s> add         placeholder = np.zeros((frame_size[1], frame_size[0], 4), dtype="float32")
        background = predicted["image"] / np.array(255.0, dtype="float32")
        placeholder[:, :, :3] = background

        self.out_queue.put(batch)
              logger.trace("Putting to queue. ('%s', detected_faces: %s, swapped_faces: %s)",
                           item["filename"], len(item["detected_faces"]),
                           item["swapped_faces"].shape[0])
              pointer += num_faces
        self.out_queue.put(batch)
          logger.trace("Queued out batch. Batchsize: %s", len(batch))
  
  
  class OptionalActions():
      """ Process the optional actions for convert """
keep keep keep add keep keep keep keep keep
 Optimized numpy functions in Converter (#838) 
scripts/convert.py