Skip to content

Meme search and discovery engine using OpenAI CLIP and Salesforce BLIP

Notifications You must be signed in to change notification settings

seanvelasco/memegraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memegraph

Memegraph is a search engine and recommendation system for memes using OpenAI CLIP and Salesforce BLIP.

Search memes in natural langauge, explore memes with the same template, and discover memes that are visually similar.

Don't know the name of a meme? Just describe the meme!

Guy Thinking In Bed meme

Discover memes about your favorite topics

The Office memes

Looking for THAT obscure meme? Look it up!

Memes about Spongebob and Myers-Briggs Type Indicator (MBTI)

Discover similar memes

Boardroom meme

New way to browse memes

Memegraph home

Development

Important

This app uses MLX to run CLIP. To generate embeddings, a device with an Apple Silicon processor is needed. For non-Apple Silicon devices, the app can still run, provided there are already images and embeddings in the database, but it will not be able to search for memes by image similarity.

Install dependencies

pip install -r requirements.txt

Modify scripts in /scripts to point to your images directory, blob storage, and Postgres database.

Generate image embeddings and generate image captions

python main.py

Run the app in development

python app.py

Run the app in production

waitress-serve app:app

Data

All memes were retrieved from the top 1000 posts of all time on Reddit's meme subreddits using PRAW on the Reddit's API free tier.

Notes from the author

Python is not my primary language and I'm new to machine learning, so I greatly appreciate and welcome constructive feedback!