Skip to content

HighCWu/face_morpher_plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Face Morpher Plus

Mrph human faces plus bsed on facemorpher!
Scripts will automatically detect frontal faces and skip images if none is detected.

Built with Python, OpenCV, Numpy, Scipy, Stasm, facemorpher.

Supported on Python 3.6+ and OpenCV >= 3 (tested with OpenCV 3.4.1)
Tested on 64bit Linux.

Requirements

Use as local command-line utility

$ git clone https://github.com/alyssaq/face_morpher

Morphing Faces

Morph from a source to destination image:

python process.py --src=<src_imgpath> --dest=<dest_imgpath> --plot

All options listed in morpher.py (pasted below):

Morph from source to destination face or
Morph through all images in a folder

Usage:
  process.py (--src=<src_path> --dest=<dest_path> | --images=<folder>)
            [--width=<width>] [--height=<height>]
            [--num=<num_frames>] [--fps=<frames_per_second>]
            [--out_frames=<folder>] [--out_video=<filename>]
            [--alpha] [--plot]

Options:
  -h, --help              Show this screen.
  --src=<src_imgpath>     Filepath to source image (.jpg, .jpeg, .png)
  --dest=<dest_path>      Filepath to destination image (.jpg, .jpeg, .png)
  --images=<folder>       Folderpath to images
  --width=<width>         Custom width of the images/video [default: 500]
  --height=<height>       Custom height of the images/video [default: 600]
  --num=<num_frames>      Number of morph frames [default: 20]
  --fps=<fps>             Number frames per second for the video [default: 10]
  --out_frames=<folder>   Folder path to save all image frames
  --out_video=<filename>  Filename to save a video
  --alpha                 Flag to save transparent background [default: False]
  --plot                  Flag to plot images [default: False]
  --version               Show version.

Example

python process.py --src=./example/A.jpg --dest=./example/B.jpg --plot
  • In the plot mode, you can move the feature points
    • image
  • Morph process
    • image
    • image
  • From ... to ...
    • image
    • image

License

MIT

About

Face morpher plus based on facemorpher

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages