Created
August 30, 2018 10:17
-
-
Save acotilla91/5d5d48a371eb6257ae27b3e5c6db1940 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create Persons | |
for (avatarData, avatarImage) in zip(avatarDatas, avatarImages) { | |
if let faceId = AzureFaceRecognition.shared.syncDetectFaceIds(imageData: avatarData).first { | |
let person = Person() | |
person.faceId = faceId | |
person.avatar = avatarImage | |
self.persons.append(person) | |
} | |
} | |
// Create Photos | |
for (photoData, photoImage) in zip(photoDatas, photoImages) { | |
let faceIds = AzureFaceRecognition.shared.syncDetectFaceIds(imageData: photoData) | |
if !faceIds.isEmpty { | |
let photo = Photo() | |
photo.faceIds = faceIds | |
photo.image = photoImage | |
self.photos.append(photo) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment