giphyFaceSwap

Replace faces in GIFs with your own. Make sure to check out some snapshots of GIFs made with GIPHY Face Swap in the slideshow above.

Inspiration

GIFs are supposed to be fun and social. Enabling users to customize any of the GIFs from GIPHY's expansive library makes them even more fun and the ability to swap faces with friends or celebrities makes them even more social. Generate a face-swapped GIF and download or share!

What it Does

Three steps:

  • Use the GIPHY API Search Bar to find your favorite GIF with a face in it
  • Upload a photo from your computer (selfies work best here, friends)
  • Press the face swap button to see the original animated GIF, but now animated with your face on it!

How I Built It

The front-end of the website is built with HTML, CSS, and JS. I also utilize jquery to interface with the GIPHY API that searches the GIPHY database. The back-end is coded entirely in Python, utilizing a software called OpenCV to analyze the facial structures in the images. GIFs are unique because they are low-resolution and contain few frames, allowing OpenCV to process the GIF frame-by-frame, creating a custom fit for each frame and taking into account the slight orientation, lighting changes, skin color differences, and size discrepancies between the two faces. The result is an extremely fast processing time and an utterly smooth mask.

Challenges, Accomplishments, and Learning

I started this project about 12 hours before it was due after my team left the competition. I started from scratch with my own idea and very little web-dev experience. This weekend I learned how to use various JS queries, setup a local server, interface with flask, and access web APIs with the help of the amazing PennApps mentors from Qualtrics.

What's Next

After the amazing feedback received from testers, I aim to take GIPHY FaceSwap to mobile. This may be a Facebook Messenger app, Android App, iOS App, or all three! This hackathon was an amazing proof-of-concept that users not only want to have GIPHY FaceSwap on their phones, but that they would even be willing to pay for it. I'm looking forward to developing my mobile coding skills and bringing my hack to the world!

Share this project:
×

Updates