  
              logger.trace("Putting to queue. ('%s', detected_faces: %s, swapped_faces: %s)",
                           item["filename"], len(item["detected_faces"]),
                           item["swapped_faces"].shape[0])
              self.out_queue.put(item)
              pointer += num_faces
          logger.trace("Queued out batch. Batchsize: %s", len(batch))
  
  
  class OptionalActions():
 
</s> remove         return placeholder
 </s> add         return placeholder, background </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             frame = foreground + background

 </s> add             background *= (1.0 - mask)
            background += foreground
            frame = background
  
              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():
keep keep keep keep replace keep keep keep keep keep
 Optimized numpy functions in Converter (#838) 
scripts/convert.py