Giter Club home page Giter Club logo

cursed_network's Introduction

Introduction

This is a very simple convnet classifier trained over a set of so-called "cursed" images scraped from various sources and an equivalent number of "uncursed" images taken from the "MIT 1003" image dataset.

EDIT: I've tweaked the model a bit since the original round of commits and the performance is better (~80% accuracy now):

I think the training/testing code should still work with the new model architecture, making it a straight-up drop-in replacement.

What the hell are cursed images?!

If you don't know what a cursed image is, I highly recommend this video as an introduction (the section towards the end where they play "blessed or cursed" is what inspired this, neural networks are basically just foam alien puppet anthropologists anyway) :

memesplaining

Otherwise KnowYourMeme's got arguably the best concise summary:

Cursed Images are images that are captioned with the phrase "Cursed Image." They are generally pictures or photographs that are seen as disturbing to the viewer, either due to the poor photo quality or content within the image that is abnormal or illogical. Images of this or similar nature are sometimes seen as the visual equivalent to CreepyPasta. They have inspired several popular social media accounts devoted to posting various cursed images.

Why do cursed images matter?

The network in this repo can help find cursed images, but it doesn't say much about what makes a cursed image cursed. Having created a tool to help identify them, the next step is to break down the properties that this classification system is using to do this. One thing I think we'll ultimately see is that in a couple of simultaneous domains, cursed images are really just a mostly natural, emergently organized image anomaly dataset. This could potentially make them useful in a number of computer-vision and other scientific/practical contexts.

I'll put up some of the work I've been doing along these lines when it's a little more complete/I actually have some results.

How do I use this?

  1. Clone or download the repository.
  2. Download my pre-trained model architecture and weights from this link. Extract the h5 and the json files from the package and move them to the "out" directory in this repository.
  3. Setup an appropriate Python environment using the provided requirements.txt file (I recommend Anaconda).
  4. If you want to train your own version of the network, I've provided code to do so both for setting up the tools to scrape the images and to train the model. Run the first three commands in the Makefile to setup the right folder structure in the repository, download RipMe, and scrape from the cursed images Twitter and subreddit. Run the "train_model" make command to train the network (you can alter argparse parameters for the model training process in the training function file).
  5. Add your own "neutral" images from whatever free source you've got to hand. The dataset I used is nice in that it contains a pretty broad range of lighting conditions, scene contexts, human/face content, photographic vantage points, etc, and that will definitely help your model make more accurate judgments.
  6. With either the pretrained or your own model in the right directory, run:
python funs/demo_cursed_image_model.py --image_path=path_to_some_image

to get back an estimate of whether your image is cursed, and just how cursed it is!

Examples

Definitely Not Cursed Definitely Cursed

A note of caution

Some of the stuff that seems to make some cursed images cursed is inarguably humanly ugly/upsetting/copyrighted. I don't intend by this project to tacitly or explicitly condone having images of that stuff floating around on the internet, and I certainly don't support any use or dissemination of them for the purposes of hurting, degrading, or marginalizing anybody. If you use it to those ends/claim that's what I was after, you're doing so without my knowledge or approval.

The sites this project is setup to scrape from are pretty good about filtering out obvious gore/violence content, but it is out there and if you go looking you're going to find it.

It's for these reasons I'm not providing my dataset directly.

I think the project is worth pursuing in spite of this because most of what counts as cursed is actually goofy and hilarious in a harmlessly absurd way, and because maybe we can use these things to accomplish some interesting stuff scientifically.

cursed_network's People

Contributors

hamcastle avatar

Stargazers

Alla Hoffman avatar no-materials avatar

Watchers

James Cloos avatar  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.