Giter Club home page Giter Club logo

spam_buster's Introduction

Problem Statement Description

Build a "Spam Buster" for user generated IMAGE content based on predefined text, links identified as "known bads", based on which the image should be classified as spam or not-spam. The "known bads" can be updated anytime. The "Spam Buster" would need to analyze at image level, identify text components inside image and build appropriate logic to give a score to the image. A similar use case is employed by Facebook Ads technology to identify if the image ad contains too much text or contains any objectionable text."


Solution

We build a flask based micro-service which gives a "Spaminess score" for any uploaded image. The score is derived by aggregating the scores from two models:

  1. Text based spam classifier - Text is extracted from the image and a pre-trained model runs on the text to classify text in respective bucket
  2. Image based spam classifier - Convolution neural network which classifies image as spam or not based on the image features

Screenshots

Non Spam image

Spam image


Instructions

Work with the spam classifier models

Image to Text

Image Spam Classifier

Text Spam Classifier

Run locally

Clone the repo and cd into predict folder

cd predict

pip install -r requirements.txt

python3 app.py

Run within docker

Clone the repo and cd into predict folder

Run the image and bash into it to start the server

docker run --rm -itd --name hack -v /home/mayur/hack/spam_buster/predict:/predict -p 5000:5000 kayush206/img_spam:v2 bash

docker exec -it hack bash

cd /predict

python3 app.py

Access the service- http://localhost:5000/spam_buster/api/v1/model


Members

spam_buster's People

Contributors

dependabot[bot] avatar kayush2o6 avatar mayurmadnani avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

od07

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.