Inspiration
The inspiration for this project was to allow for individuals' anonymity to be maintained in pictures without taking away from the intent of the original image through adding a bulky black box or pixelization over their face.
What it does
This project takes in an input image and uses gans to generate 10 random fake faces for each individual in the photo, and then the algorithm analyzes which of the faces are most similar to the originals and replaces the faces in the original input image with the most similar gan generated face. This helps maintain privacy without detracting from the original image with traditional censorship methods.
How we built it
We created an interface for the API that allowed the user to submit an image to censor. We used Facebook's stylegan as a basis for the random face generator. Candidate faces are extracted from the target image and an AutoEncoder is used to identify the closest synthetic face. This new face is then aligned using facial features and blended into the original image.
Challenges we ran into
We ran into several challenges during this contest including the facial replacement. Our first few attempts left a harsh box with a black outline on certain edges of the gan generated face after replacement, so we had to adjust the picture input and code to eliminate any harsh contrast between the stitched images. Since the point of our project was to maintain the effect of the original image after censorship this was an important step we had to get right. Further, it was a challenge to think of how to maintain anonymity by adjusting facial features while also keeping realistic looking features/visuals when replacing faces. We realized that by just randomly assigning a gan generated face we would run into problems on certain runs such as changing key features like an individual's gender. This is where the several gan generated images and similarity comparison with the input image came in to help decrease major changes in the original image that could possibly detract from the image.
Accomplishments that we're proud of
We are very proud of our final project and how real the facial replacement looks. We feel that the original image is still maintained, and many individuals would not be even able to realize that the image run was even censored if they had not seen the original image input. We feel like this is a natural next step to helping protect individuals' privacy in an age where capturing images and videos is extremely pervasive part of our culture. This will allow for privacy while maintaining the general effect/impact we hope to capture with these photos and videos. Our team sees many applications for this project and are very proud to see what a strong product we could create in such a short period of time.
What we learned
We were able to build off our team's existing knowledge of gans, image processing, APIs, and user interface to think of a unique application of these skills. Further, we were able to learn more about the application of these methods when looking into current best practices and code that is available to read about and adjust for our application. Finally, we learned about the nuances of working with images and getting them to look real. Even a slight deviation or issue with the algorithm and its application can lead to major visual distortions that takes away from the image's impact.
What's next for Image Anonymizer
We are hoping to look into taking this project to the next step by expanding application of the anonymized gan generated features. One way we intend to do this is by applying this technique to videos. There are several applications were an individuals image would want to be censored, and this seems like a natural next step. However, the large amount of data and therefore processing power would definitely make it a difficult undertaking that would need more time. Further, we hope to improve the algorithms ability to take in and process faces at all angles. Finally, we may look into how to adjust distinctive landmarks in the background to further protect the individual's privacy.
Log in or sign up for Devpost to join the conversation.