GithubHelp home page GithubHelp logo

hhy5277 / imagedetect Goto Github PK

View Code? Open in Web Editor NEW

This project forked from feghal/imagedetect

0.0 1.0 0.0 1.55 MB

✂️ Detect and crop faces, barcodes and texts in image with iOS 11 Vision api.

License: MIT License

Swift 90.31% Ruby 9.69%

imagedetect's Introduction

ImageDetect

Awesome Version License Platform

ImageDetect is a library developed on Swift. With ImageDetect you can easily detect and crop faces, texts or barcodes in your image with iOS 11 Vision api. It will automatically create new images containing each object found within a given image.

Example



To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  1. Xcode 9.0 (beta) or higher.
  2. iOS 11.0 (beta) or higher.

Installation

CocoaPods

ImageDetect is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ImageDetect'

Then, run the following command:

pod install

Manually

  1. Drag and Drop it into your project

  2. Import ImageDetect

  3. You are ready to go!

Usage

Crop your (UIImage or CGImage)

// `type` in this method can be face, barcode or text
image.detector.crop(type: .face) { [weak self] result in
    switch result {
        case .success(let croppedImages):
            // When the `Vision` successfully find type of object you set and successfuly crops it.
            print("Found")
        case .notFound:
            // When the image doesn't contain any type of object you did set, `result` will be `.notFound`.
            print("Not Found")
        case .failure(let error):
            // When the any error occured, `result` will be `failure`.
            print(error.localizedDescription)
        }
}

Author

Arthur Sahakyan, [email protected]

License

ImageDetect is available under the MIT license. See the LICENSE file for more info.

imagedetect's People

Contributors

feghal avatar kellyroach 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.