FaceCropper is an open source library that utilizes the new iOS 11 Vision API to automatically find images within a photo from Taejun Kim
.
FaceCropper will automatically create new images containing each face found within a given image.
This snippet shows basic usage of FaceCropper:
image.face.crop { result in
switch result {
case .success(let faces):
// When the <code>Vision</code> successfully find faces, and <code>FaceCropper</code> cropped it.
// <code>faces</code> argument is a collection of cropped images.
case .notFound:
// When the image doesn’t contain any face, <code>result</code> will be <code>.notFound</code>.
case .failure(let error):
// When the any error occured, <code>result</code> will be <code>failure</code>.
}
}
This image from the readme shows an image with faces extracted:
You can find FaceCropper on Github here.
A nice example of using the new vision API.
Original article: FaceCropper – A Library That Crops Out All Faces From A Given Image Using The iOS 11 Vision API
©2017 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Over two years ago, Joshua Browder, now a junior at Stanford University, created a chatbot that could contest parking tickets in New York City and London. By June of 2016, DoNotPay had successfully contested 160,000 parking tickets — a 64 percent su…
It's difficult for soundbars to stand out: they have to be very intelligent or sweet-sounding to rise above the rest. Samsung is clearly betting on that second strategy to stand out. It just started shipping the MS750 Sound+ Soundbar it unveiled back…
LG just dropped a big hint as to what's next for its smartphone roster. The company has sent out a "save the date" teaser that hints at a V30 launch in Berlin on August 31st, right before the start of the IFA technology trade show. The image doesn'…
For one day toward the end of July, everyone will get to experience the joy of HBO's Insecure absolutely free. Starting at 6AM ET on July 23rd, viewers can pop over to the network's website or YouTube channel to binge all eight half-hour episodes of…
So much for the PC industry bouncing back after years of decline. Analysts at Gartner and IDC estimate that computer shipments fell between 3.3 and 4.3 percent in the second quarter, resuming an otherwise unbroken slump. However, the drop wasn't due…
Researchers at the University of Cambridge have found the smallest star ever discovered. It's just slightly bigger than Saturn and while its mass is similar to that of TRAPPIST-1 — which NASA recently found seven Earth-sized planets rotating around…
Today, thousands of websites and organizations are showing their support for net neutrality in hopes of preserving the open internet. Consider Engadget among them. The Federal Communication Commission, as chaired by former Verizon lawyer Ajit Pai, is…
You'd think that Amazon would have made it possible to control a Fire TV from external Alexa devices as soon as it was an option, but no — you've had to use the Fire TV itself if you wanted to play a video using your voice. At last, though, sense ha…
It's been over two years since Amazon debuted the Echo, which kickstarted the current wave of voice-controlled, virtual assistant-powered speakers. And while the company has added more devices to the Echo family, with the tiny Dot, portable Tap and s…
Microsoft's Paint 3D was introduced as part of the Windows 10 Creators update last October. The company wants to make 3D modeling as easy and accessible as using a 2D drawing program. The free Windows 10 app gives you the power to create, share and p…
Google Drive just became more useful as a means of protecting those files you can't afford to lose. A few weeks later than promised, Google has released its Backup & Sync app for Macs and Windows PCs. As before, this is a simpler option for saf…
Spaceflight company Moon Express has released its plans to mine the moon with robots and it aims to get started by 2020. The company was founded in 2010 with the aim of winning the Google Lunar Xprize — a competition to get privately funded spacecra…