The international Silly-hacks competition is global hackathon where people from France, Indonetia etc participated. The task was to build something brilliant, yet silly aimed at just having fun. We built Silly-Cam winning us the competition. It uses machine learning, and generates viral meme videos with the face of the user instead.
Deep fake is a really fun technology and has been around for a while. So I figured, why not use this and bring it to the phone of our users! The python code uses GPU, I added the code to pass in any image and it will morph it within the chosen Viral Video.
Since the code was extremely complex and needed gpu to generate a video within seconds, I converted the code into a docker container and built a flask api so it can communicate outside python. Then I uploaded this container to Google cloud and and hosted my code there. We designed a flutter app and connected the app to my api, hosted in the cloud. Any user can enter a custom photo into the app and it'd send it to cloud, generate a video and send it back to the user!
Since generating a video almost took 15 minutes on CPU, I had to optmize the code a lot and performed multi-processing and other mechanims and refactored the code accordingly. Lastly I engaged GPU instead and brough run time down to about 25 seconds!