Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.7 KB

README.md

File metadata and controls

53 lines (38 loc) · 1.7 KB

MagicMirror

MagicMirror is a Python application that uses computer vision; image processing and deep learning to transfer hairstyles from a face (a source image) to another (a target image).

Deep learning is applied to recognize face shapes, which is then used to filter user hairstyle feeds to only display faces with similar face shapes to ensure high quality Hair Transfer.

Implicitly, hair transfer uses face swapping but a modest attempt is made here to emphasize on hair features of the target image.

TensorFlow was used for deep learning. The Inception V3 deep learning model was retrained to recognize five face shapes.

Quick Start

Prerequisites

  • Python 3.6+
  • pip package manager

Installation

  1. Create and activate a virtual environment

    # Create virtual environment
    python3 -m venv myenv
    
    # Activate virtual environment
    # On Unix/macOS:
    source myenv/bin/activate
    # On Windows:
    myenv\Scripts\activate
  2. Install dependencies

    pip install -r requirements.txt

Credits: Switching Eds with Python