faceSwap.py
def faceSwap(self, img1, img2, mode, showImages=False, saveSwappedImage=False):
        """Warping all up.

        Parameters
        ----------
        img1: nparray
            Readed value of image1.

        img2: nparray
            Readed value of image2.

        showOriginalImages : bool
            An optional argument whether or not to show the original images.

        saveSwappedImage : bool
            An optional argument whether or not to save the swapped image.

        Returns
        -------
        swappedImage: numpy.ndarray
            The swapped image.

        """

        # save the original image2
        img2_original = np.copy(img2)

        # find landmark points of the images
        faces_landmark_points1 = self.landmark_detection(img1)
        faces_landmark_points2 = self.landmark_detection(img2)

        swappedImage = self.chooseModes(
            img1, img2, img2_original, faces_landmark_points1, faces_landmark_points2, mode)

        if showImages is True:
            self.showImages(img1, img2_original, swappedImage,
                            showOriginalImages=True)

        if saveSwappedImage is True:
            self.saveSwappedImage(swappedImage)

        return swappedImage
Warping all up.

        Parameters
        ----------
        img1: nparray
            Readed value of image1.

        img2: nparray
            Readed value of image2.

        showOriginalImages : bool
            An optional argument whether or not to show the original images.

        saveSwappedImage : bool
            An optional argument whether or not to save the swapped image.

        Returns
        -------
        swappedImage: numpy.ndarray
            The swapped image.

        
Warping all up.
Parameters

nparray
Readed value of image1.

nparray
Readed value of image2.

showOriginalImages : bool
An optional argument whether or not to show the original images.

saveSwappedImage : bool
An optional argument whether or not to save the swapped image.

Returns


Warping all up . Parameters nparray Readed value of image1 . nparray Readed value of image2 . showOriginalImages : bool An optional argument whether or not to show the original images . saveSwappedImage : bool An optional argument whether or not to save the swapped image . Returns
def faceSwap(self, img1, img2, mode, showImages=False, saveSwappedImage=False):
        img2_original = np.copy(img2)
        faces_landmark_points1 = self.landmark_detection(img1)
        faces_landmark_points2 = self.landmark_detection(img2)
        swappedImage = self.chooseModes(
            img1, img2, img2_original, faces_landmark_points1, faces_landmark_points2, mode)
        if showImages is True:
            self.showImages(img1, img2_original, swappedImage,
                            showOriginalImages=True)
        if saveSwappedImage is True:
            self.saveSwappedImage(swappedImage)
        return swappedImage
def faceSwap ( self , img1 , img2 , mode , showImages = False , saveSwappedImage = False ) : img2_original = np . copy ( img2 ) faces_landmark_points1 = self . landmark_detection ( img1 ) faces_landmark_points2 = self . landmark_detection ( img2 ) swappedImage = self . chooseModes ( img1 , img2 , img2_original , faces_landmark_points1 , faces_landmark_points2 , mode ) if showImages is True : self . showImages ( img1 , img2_original , swappedImage , showOriginalImages = True ) if saveSwappedImage is True : self . saveSwappedImage ( swappedImage ) return swappedImage
Warping all up.
Warping all up .
"""Warping all up.

        Parameters
        ----------
        img1: nparray
            Readed value of image1.

        img2: nparray
            Readed value of image2.

        showOriginalImages : bool
            An optional argument whether or not to show the original images.

        saveSwappedImage : bool
            An optional argument whether or not to save the swapped image.

        Returns
        -------
        swappedImage: numpy.ndarray
            The swapped image.

        """ # save the original image2 # find landmark points of the images
self
img1
img2
mode
showImages
saveSwappedImage