Twitter Face Filter Bot Overview

Basic Overview

The Twitter Face Filter Bot is a project I decided to undertake in the summer of code program hosted by Mohamed Amine Belabbes during the summer between my first and second year of University in 2021. Its main purpose is to retrieve media from a tweet which mentions the page shown below. When media is retrieved the bot then uses machine learning to place a filter over the face of people in the image currently it places a batman mask over the face of the person in the image. It has two major components, a REST API System, written in Java using Twitter4J and SpringBoot libraries and a Machine Learning System used to apply the filter to the image, written in python using OpenCV and MediaPipe.


Twitter Page


Example of Bot's Work

  1. Tweet mentioning bot is posted on twitter. Example Tweet

  2. Bot REST API System returns most recent tweet including ‘@FaceFilterBot’ in JSON format. When the bot makes a GET request to the REST API. Example Tweet

  3. Bot then retrieves the media in the tweet and applies the filter to it using OpenCV and MediaPipe libraries in Python. If the media is a Photo it simply applies the filter to it, using the machine learning methods that will be discussed further in the post on a later Bot Filter System Post. [Placeholder Temp]

Final Product