Inspiration

We have a younger hacker in our group (17) and he is unfortunately not at the adult age of 18. We created this bot so that we could analyze and moderate images sent in our Discord server, to ensure that younger server members stay pure at heart.

What it does

All images sent in the server will be assessed by Picture Police. If moderation is needed for a particular image, the bot will censor all vulgar elements and foul language, replacing these sections with wholesome cat content.

How we built it

The discord.py bot frontend is hosted in Flask and its web server is deployed on Google App Engine. We used Google Cloud OCR to recognize profanities within digital images. Using the NLTK sentiment analysis with a VADER model allowed us to check whether or not the text was positive. The NudeNet image classification neural network detects nudity in particular, clearly mapping the location of unsafe material. These technologies enabled us to censor problematic materials within the images. Furthermore, Python PIL facilitates image manipulation when paired with the litter of wholesome cat images that will occupy the censored sections.

Challenges we ran into

Before starting development, creating a plan for using these technologies was difficult. We had to decide where we would host the Discord bot, image analyses, text NLP analysis, and image manipulation and determine if they were compatible. Even after our planning, we had to change one of our hosts due to technical compatibility issues. One of the challenges was configuring and learning to use the GCP software. Once we resolved configuration issues, using the GCP was straightforward.

What we learned

As mentioned, this project was vital for learning how to use GCP software. In addition, we learned NLTK sentimental analysis and Python PIL to identify negative/positive text when manipulating images.

Share this project:

Updates