Code Monkey home page Code Monkey logo

auto-image-rotator's Introduction

Auto Image Rotator

Overview

This app uses the OpenCV and Dlib computer vision libraries to auto rotate images based on detected human faces.

This is useful for auto rotating images in bulk that do not contain EXIF orientation meta data (e.g., scanned photos).

Currently, this is only effective for images that contain one or more face. In the future, advanced CNN techniques could be implemented to auto correct the rotation for any photo.

title

Setup

Docker

  1. Install Docker so we can build and run the app

  2. Build the app's Docker image (this takes a few minutes to complete while it builds Dlib's native C extension for Python):

docker-compose build app

Usage

After the one-time setup, rotating a directory of images is as simple as running this command:

IMAGES_PATH=/path/to/your/images/folder docker-compose run app

By default, rotated images are saved as new files with a *-rotated filename pattern in your IMAGES_PATH directory. If you're comfortable overwriting your original files with rotated versions you may prefix the command with the OVERWRITE_FILES param like so:

IMAGES_PATH=/path/to/your/images/folder OVERWRITE_FILES=1 docker-compose run app

auto-image-rotator's People

Contributors

dsposito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

auto-image-rotator's Issues

Results not working

Hi Daniel, very creative work. From my own testing with people tilted and face tilted greatly in the image, all the images were not rotated at all. Is it supposed to be like this? Thank, Daniel!

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.