Giter Site home page Giter Site logo

effdotsh / thumbfail Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 10.29 MB

Uses a CNN shamelessly stolen from TensorFlow's examples to decide whether a thumbnail is clickable

License: Creative Commons Zero v1.0 Universal

Starlark 0.61% Batchfile 1.79% Shell 1.79% Python 95.81%
bad

thumbfail's Introduction

Thumbfail

Install

Install with one of the 3 methods below: Please report an issue if you have any problems.

Linux/Mac

Download the respiratory with

git clone https://github.com/AI-Spawn/Thumbfail

Then install dependencies with

cd Thumbfail/
./run.sh

After that, set everything up with

./train.sh

this will take around 5 minutes.

Windows

Install Git

Download the respirtory with

git clone https://github.com/AI-Spawn/Thumbfail

Open the folder named Thumbfail Double click on run.bat or type run.bat in the cmd , than double click on train.bat or run train.bat

Manual Install (Windows/Mac/Linux)

First, install Git, then:

git clone https://github.com/AI-Spawn/Thumbfail
cd Thumbfail
python retrain.py --image_dir data --output_graph graph.pb --output_labels labels.txt
sudo apt install python3-pip
sudo apt install python-pip
sudo pip install tensorflow 
sudo pip install "tensorflow>=1.7.0" 
sudo pip install tensorflow-hub numpy argparse hashlib 
sudo pip install tensorflow --ignore-installed --upgrade 
curl -LO https://github.com/tensorflow/tensorflow/raw/master/tensorflow/examples/label_image/label_image.py
curl -LO https://github.com/tensorflow/hub/raw/master/examples/image_retraining/retrain.py
python retrain.py --image_dir data --output_graph graph.pb --output_labels labels.txt

Usage

Place an image named Thumbnail.jpg in the folder, if the image in not a jpg, use the manual option

Linux/Mac

./check.sh

Windows

Using cmd, check.bat

Manual

python label_image.py --graph=graph.pb --labels=labels.txt --input_layer=Placeholder --output_layer=final_result --image=[IMAGE NAME]

Updating the Program

This program is always updating, and getting better, to update your version re-run train.bat again for Windows or train.sh again for Linux/Mac. It's recommended to update every time before using the program.

thumbfail's People

Contributors

effdotsh avatar

Watchers

 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.