GithubHelp home page GithubHelp logo

rir's Introduction

RIR

Reddit Image Recognizer (RIR) in python

Please note the Presentation is named presentation.pptx, the Project paper is named Paper.pdf, and the Survey paper is named Survey.pdf. They are all in the top level directory of this repo.

This was an experiment for my Computer Vision class project.

Requires python 3.X, Tensorflow, tflearn, numpy, and PRAW.

NOTE: Unfortunately, the method of gathering datasets no longer works as of 4/11/18 because Reddit is mean and changed their API... Now gathering data in the same fashion is not possible (searching by date is no longer possible from the Reddit API). There are other methods available using other APIS to access Reddit, but I do not have time (nor a need) to do so as I had gathered all my data before this change.

In order to run:

  1. Go to reddit.com, make an account, and see this page to make yourself a personal use script oauth token: https://www.reddit.com/prefs/apps . Then set client_id and client_secret in botCredentials.py so you can access Reddit's API.
  2. See the config.py file in this folder in order to set your data and model locations folders.
  3. Each subfolder contains a separate, runnable set of files that are capable of gathering the dataset, training a model on either the reddit dataset or the comparison dataset (CIFAR10 and Kaggle DVC, both are expected to be provided by the user), and predicting on the test set for evaluation.
  4. Run the gatherDataset.py file in whatever folder you wish to test to generate the Reddit version of that dataset.
  5. Manually split your image datasets into two sub folders: "TRAIN" and "TEST".
  6. Run the training for the Reddit model and the comparison model. Make sure they are able to find your dataset and model folders. You may have to manually delete the created model folder if you wish to restart or there is an error.
  7. Run the predict.py file to predict whichever model with whichever evaluation dataset. In order to change the model and dataset, edit the predict file.

This model can be extended easily by copying an existing model and customizing it to your liking. See subredditcategories.py for an idea on how to structure your input to the gatherDatatset function.

rir's People

Contributors

kensand avatar

Watchers

James Cloos avatar

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.