I am trying to run VNDetectHumanRectanglesRequest from apple developer Vision library
The error is rising when i request.upperBodyOnly = false
let requestHandler = VNImageRequestHandler(cgImage: image, orientation: orientation, options: [:])
let request1 = VNDetectHumanRectanglesRequest()
request1.upperBodyOnly = false
request1.usesCPUOnly = true
request1.revision = revision
Is there any other way to set upperBodyOnly to false?
without the upperBodyOnly line, the script is running fine.
With upperBodyOnly = false
, the following error is raised.
libc++abi.dylib: terminating with uncaught exception of type NSException while using upperBodyOnly for VNdetectHumanRectanglesRequest
EDIT: For all looking for the solution, VNDetectHumanRectanglesRequest has two revisions 1 and 2. upperBodyOnly = true is implemented only for revision 2. If you give revision 1, this error is raised