Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KimDarren/FaceCropper
:scissors: Crop faces, inside of your image, with iOS 11 Vision api.
https://github.com/KimDarren/FaceCropper
face face-detection face-recognition ios ios11 swift vision vision-api
Last synced: 7 days ago
JSON representation
:scissors: Crop faces, inside of your image, with iOS 11 Vision api.
- Host: GitHub
- URL: https://github.com/KimDarren/FaceCropper
- Owner: KimDarren
- License: mit
- Archived: true
- Created: 2017-07-10T01:58:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-14T12:06:32.000Z (over 7 years ago)
- Last Synced: 2024-04-28T16:43:52.459Z (8 months ago)
- Topics: face, face-detection, face-recognition, ios, ios11, swift, vision, vision-api
- Language: Swift
- Homepage:
- Size: 304 KB
- Stars: 487
- Watchers: 19
- Forks: 34
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - FaceCropper - Crop faces, inside of your image, with iOS 11 Vision api. (Media / Image)
- embedded-ai.bi-weekly - KimDarren/FaceCropper: Crop faces, inside of your image, with iOS 11 Vision api.
- awesome-ios-star - FaceCropper - Crop faces, inside of your image, with iOS 11 Vision api. (Media / Image)
README
# FaceCropper
[![Version](https://img.shields.io/cocoapods/v/FaceCropper.svg?style=flat)](http://cocoapods.org/pods/FaceCropper)
[![License](https://img.shields.io/cocoapods/l/FaceCropper.svg?style=flat)](http://cocoapods.org/pods/FaceCropper)## Requirements
* Xcode 9.0 _(beta)_ or higher.
* iOS 11.0 _(beta)_ or higher.
- _(It is possible to import this library under the iOS 11. But it won't be working.)_
## Usage* Crop faces from your image (`UIImage` or `CGImage`) in the easy way.
```swift
let image = UIImage(named: "image_contains_faces")
image.face.crop { result in
switch result {
case .success(let faces):
// When the `Vision` successfully find faces, and `FaceCropper` cropped it.
// `faces` argument is a collection of cropped images.
case .notFound:
// When the image doesn't contain any face, `result` will be `.notFound`.
case .failure(let error):
// When the any error occured, `result` will be `failure`.
}
}
```## Example
![Example app screenshot](https://github.com/KimDarren/FaceCropper/blob/master/screenshots/example.png?raw=true)
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Installation
**FaceCropper** is available through [CocoaPods](http://cocoapods.org).
To install it, simply add the following line to your Podfile:```ruby
pod "FaceCropper"
```## Author
KimDarren, [email protected]
## License
FaceCropper is available under the MIT license. See the [LICENSE](LICENSE) file for more info.