Skip to content

Commit

Permalink
allow face detection on simulators (#199)
Browse files Browse the repository at this point in the history
Face detection fails on simulator until now
  • Loading branch information
JohnEstropia committed Jul 6, 2023
1 parent 17baa9a commit c7cba8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/BrightroomEngine/Core/EditingStack.CropModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ extension EditingStack {
}

request.revision = VNDetectFaceRectanglesRequestRevision2
#if targetEnvironment(simulator)
request.usesCPUOnly = true
#endif
let handler = VNImageRequestHandler(ciImage: image, orientation: .up, options: [:])
do {
try handler.perform([request])
Expand Down

0 comments on commit c7cba8d

Please sign in to comment.