Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Confiqure/reddit-meme-py

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

reddit-meme-py

Our goal is to use Reddit’s API to download trending memes while using basic image recognition to classify memes.

How it works

The algorithm works by comparing any given image to one of many pre-labeled memes in the comparisons/ directory. The comparsion algorithm first resizes the comparison images to the input image and then basically compares the individual RGB values for each pixel. This strategy is loosely the Euclidean distance classifier since we only compare against one sample per class.

Dependencies

Both numpy and opencv are dependencies for this project. Installing:

$ sudo pip install opencv
$ sudo pip install numpy

Usage

To classify an image on your local machine:

$ python classify.py /path/to/image

To classify an online image resource, add the --url flag:

$ python classify.py http://image.url/path/to/image --url

For verbose output, add the --verbose flag:

$ python classify.py /path/to/image --verbose

Set a different comparison meme directory via the --comparisons_dir:

$ python classify.py /path/to/image --comparisons_dir /path/to/comparisons

Future Work

  • Build a meme rating system
  • Build a recommending system based on user ratings
  • Extend computer vision to extract text from memes
  • Further classify and recommend memes using text as well as the meme type

About

Use Reddit’s API to download trending memes while using basic image recognition to classify memes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages