Guest User

Untitled

a guest
May 27th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. let image = UIImage(named:"catinmood")
  2. do {
  3. let pixelBuffer = image.pixelBuffer(width: 227, height:227)
  4. let classifierRequestHandler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer!, options: [:])
  5. try classifierRequestHandler.perform(classificationRequest!)
  6. } catch {
  7. print("something went terribly wrong during classification")
  8. }
Add Comment
Please, Sign In to add comment