Automated Detection of Offensive Text in Social Media Images
M Ferrandez Jose, J Sherbondy Anthony, Jose V Joseph, Joshwa Thomas, Sharon Baby Thomas · 2025
Social media platforms have become a ubiquitous medium for communication, enabling users to share ideas, opinions, and multimedia content. However, the rise of user-generated content has also led to an increase in toxic behaviors, such as hate speech, cyberbullying, and offensive text embedded in images and memes. These harmful interactions pose significant risks to mental health and online safety, necessitating effective tools for real-time detection and moderation. This paper presents an automated system for detecting offensive text in social media images, leveraging advanced deep learning and natural language processing techniques. The proposed framework integrates YOLOv8 for robust text detection in complex images, PyTesseract for optical character recognition (OCR), and the FastText model for toxicity classification. The system is trained on the ICDAR 15 dataset, which includes diverse real-world images with varying text orientations, lighting conditions, and background complexities. To enhance accuracy, the dataset is annotated using Roboflow, ensuring precise bounding boxes for text regions. The developed web application allows users to upload social media content for real-time analysis, providing immediate feedback on the presence of offensive text. Compared to existing multimodal models, the proposed system achieves competitive performance, with FastText reaching 92.86% precision in toxicity classification and YOLOv8 achieving 57.3% mAP for text detection—balancing efficiency and accuracy for real-time use. To the best of our knowledge, this is one of the first implementations combining YOLOv8 and FastText for detecting offensive text in social media images. The proposed system aims to foster a safer online environment by empowering users and platform administrators to proactively identify and mitigate harmful content, thereby promoting responsible communication and mental well-being in digital spaces.