Real-Time Spam Detection in Chat Systems Using Naive Bayes, CNN, and OCR Techniques - Adhikari, Prasanna; Jaiswal, Anku; Shrestha, Aakash; Sunar, Amar; Pradhan, Ankit (Journal of Advanced College of Engineering and Management, 2025)
In the modern era of digital communication, platforms such as email, SMS, and instant messaging have become integral to daily interactions. However, this widespread adoption has also led to an increase in spam content, which has evolved from traditional text-based messages to more sophisticated image-based formats in an effort to bypass conventional filters. This paper presents a hybrid spam detection approach integrated into a custom chat application, utilizing both text and image classification techniques. For text-based spam detection, a Naive Bayes classifier is employed, achieving an accuracy of 97%. To address image-based spam, a Deep Convolutional Neural Network (CNN) is used, attaining an accuracy of 96.87%. Additionally, an OCR-based method using Tesseract is implemented to extract textual content from images, which is then analyzed using the text classifier. The proposed approach demonstrates efficient processing times, with text messages classified in under one second and image messages within five seconds on web platforms. On mobile devices, image spam classification required approximately one minute and ten seconds. The effectiveness and responsiveness of these techniques for real-time spam detection are thoroughly evaluated in this paper.