Our goal is to use Reddit’s API to download trending memes while using basic image recognition to classify memes.
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.
Both numpy and opencv are dependencies for this project. Installing:
$ sudo pip install opencv
$ sudo pip install numpyTo classify an image on your local machine:
$ python classify.py /path/to/imageTo classify an online image resource, add the --url flag:
$ python classify.py http://image.url/path/to/image --urlFor verbose output, add the --verbose flag:
$ python classify.py /path/to/image --verboseSet a different comparison meme directory via the --comparisons_dir:
$ python classify.py /path/to/image --comparisons_dir /path/to/comparisons- 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