          """ Get the new face from the predictor and apply box manipulations """
          logger.trace("Getting: (filename: '%s', faces: %s)",
                       predicted["filename"], len(predicted["swapped_faces"]))
  
          placeholder = predicted["image"] / 255.0
          placeholder = np.concatenate((placeholder,
                                        np.zeros((frame_size[1], frame_size[0], 1))),
                                       axis=-1).astype("float32")
          for new_face, detected_face in zip(predicted["swapped_faces"],
                                             predicted["detected_faces"]):
              predicted_mask = new_face[:, :, -1] if new_face.shape[2] == 4 else None
              new_face = new_face[:, :, :3]
              src_face = detected_face.reference_face
 
</s> remove         new_face = np.clip(new_face, 0.0, 1.0)
 </s> add         np.clip(new_face, 0.0, 1.0, out=new_face) </s> remove         return placeholder
 </s> add         return placeholder, background </s> remove             placeholder = cv2.warpAffine(  # pylint: disable=no-member
 </s> add             cv2.warpAffine(  # pylint: disable=no-member </s> remove             mask = np.repeat(new_image[:, :, -1][:, :, np.newaxis], 3, axis=-1)
            foreground = new_image[:, :, :3]
            background = (predicted["image"][:, :, :3] / 255.0) * (1.0 - mask)

 </s> add             foreground, mask = np.split(new_image, (3, ), axis=-1) </s> remove             frame = foreground + background

 </s> add             background *= (1.0 - mask)
            background += foreground
            frame = background
        placeholder = np.zeros((frame_size[1], frame_size[0], 4), dtype="float32")
        background = predicted["image"] / np.array(255.0, dtype="float32")
        placeholder[:, :, :3] = background

          """ Get the new face from the predictor and apply box manipulations """
          logger.trace("Getting: (filename: '%s', faces: %s)",
                       predicted["filename"], len(predicted["swapped_faces"]))
  
        placeholder = np.zeros((frame_size[1], frame_size[0], 4), dtype="float32")
        background = predicted["image"] / np.array(255.0, dtype="float32")
        placeholder[:, :, :3] = background

        placeholder = np.zeros((frame_size[1], frame_size[0], 4), dtype="float32")
        background = predicted["image"] / np.array(255.0, dtype="float32")
        placeholder[:, :, :3] = background

        placeholder = np.zeros((frame_size[1], frame_size[0], 4), dtype="float32")
        background = predicted["image"] / np.array(255.0, dtype="float32")
        placeholder[:, :, :3] = background

        placeholder = np.zeros((frame_size[1], frame_size[0], 4), dtype="float32")
        background = predicted["image"] / np.array(255.0, dtype="float32")
        placeholder[:, :, :3] = background

          for new_face, detected_face in zip(predicted["swapped_faces"],
                                             predicted["detected_faces"]):
              predicted_mask = new_face[:, :, -1] if new_face.shape[2] == 4 else None
              new_face = new_face[:, :, :3]
              src_face = detected_face.reference_face
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Optimized numpy functions in Converter (#838) 
lib/convert.py