Giter Club home page Giter Club logo

ai-photo-vs-drawing-classifier's Introduction

Photo vs Drawing Recognition Classifier

This project involves creating a lighthearted, AI-driven classifier that can distinguish between photographs and drawings.

Backgrounds

The project was initially conceived to playfully tease a friend known for taking humorously poor-quality photos, often resembling drawings more than actual photographs. The aim was to automatically alter these photos in a comedic manner, by applying effects like adding fog or implementing exaggerated zooms.

However, due to the limitations of the free and basic tier of the Twitter API, which no longer supports essential features for fetching and manipulating images from Twitter, the project had to be scaled down. It now serves solely as a basic photo vs. drawing classifier. The inability to access and edit photos directly from Twitter as originally intended has led to the project being archived in this reduced capacity, focusing only on classifying images rather than transforming them in the humorous way that was initially planned.

Prerequisites

  • Python 3.x

Installation

  1. Create and activate a virtual environment:
python -m venv venv
venv\Scripts\activate
  1. Install the required dependencies:
pip install -r requirements.txt

Configuration

  1. Create a Twitter Developer Account and create a new app to obtain the necessary API keys and access tokens.

  2. No longer used Update the following variables with your Twitter API credentials:

CONSUMER_KEY = 'your_consumer_key'
CONSUMER_SECRET = 'your_consumer_secret'
ACCESS_TOKEN = 'your_access_token'
ACCESS_TOKEN_SECRET = 'your_access_token_secret'
  1. Add training images to the assets_photo and assets_art folders. The classifier expects the following folder structure:
photo_1.jpg
photo_2.jpg
...
drawing_1.jpg
drawing_2.jpg
...

Usage

  1. Generate classifier:
python train.py
  1. Test the classifier:
python main.py

ai-photo-vs-drawing-classifier's People

Contributors

hyunwinter 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.