Skip to content

Moskov-1/MEME_Filter_AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Meme Filter AI

A lightweight AI-powered meme filtering tool that retrieves and analyzes memes using a combination of image and text features. It aims to support text-based meme retrieval (e.g., search by keywords like "crying girl") to find the most relevant memes from a dataset.


πŸ“Œ Overview

This notebook:

  • Downloads memes from the Imgflip API.
  • Extracts and processes text (if present) from memes.
  • Embeds meme content using CLIP (Contrastive Language–Image Pre-training) from OpenAI.
  • Supports search via natural language queries (e.g., "spongebob meme" or "crying baby").
  • Evaluates relevance by comparing CLIP text/image embeddings.
  • Shows a comparison for search with both memes + text and search with only memes.

⚠️ Current limitation: The Imgflip API mostly provides memes without overlaid text, which reduces performance. To get the best results, use memes with visible text.


βš™οΈ Features

  • βœ… Meme scraping with requests
  • βœ… CLIP model usage for vision-language understanding
  • βœ… Cosine similarity-based ranking
  • βœ… Basic search functionality to find memes by text
  • βœ… Colab-ready (includes folder creation, saving assets, etc.)

πŸš€ Usage

  1. Download the Notebook

    • Clone this repo or download memes.ipynb.
  2. Or Run in Google Colab

    • Upload the notebook to Google Colab.
    • All meme images will be saved to content/memes.
  3. Run all cells

    • It will:
      • Fetch memes from the web
      • Extract features via CLIP
      • Allow you to search using keywords
  4. Run Without Text Search

    • It will:
      • Fetch the memes Collected from API
      • Will Search Based on Image Alone
      • Allow you to search using keywords
      • Gives mediocre results
  5. Run Text Search

    • It will:
      • Fetch the memes Collected from Drive
      • Will Search on Multi Modal Data (Image + Text)
      • Allow you to search using keywords
      • Gives Proper results

πŸ” Sample Search Queries

Try searches like:

  • "crying girl"
  • "angry cat"
  • "SpongeBob"
  • "funny office"

The AI model really likes SpongeBob memes. πŸ˜„


πŸ§ͺ Future Work

  • Improve OCR to extract overlaid text from image.
  • Support additional meme sources (e.g., Reddit).
  • Deploy a minimal web interface.

πŸ“ Folder Structure

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors