Vision : VNDetectRectanglesRequest Error in iOS15

The VNDetectorOption_OriginatingRequestSpecifier required option was not found" UserInfo={NSLocalizedDescription=The VNDetectorOption_OriginatingRequestSpecifier required option was not found

Facing this error in only iOS15 while finding observation.

Can you show a complete code to reproduce the issue?

let handler = VNImageRequestHandler(ciImage: ciImage, orientation: .up)

let objOfAVVisionRectangleRequest = AVVisionRectangleRequest(avInputImage: ciImage, currentProcessCompletion: completion)

try handler.perform([self.objOfAVVisionRectangleRequest])

After perform request it will return error VNDetectorOption_OriginatingRequestSpecifier required option was not found" UserInfo={NSLocalizedDescription=The VNDetectorOption_OriginatingRequestSpecifier

Not getting let observations = request.results as? [VNRectangleObservation] result for rectangleObservation. Only in iOS15.

hello, did you get an answer to your question? We are currently facing a similar issue on Monterey (v12.0.1) (was working fine on Big Sur). The models we are using were generated in CreateML.

Hello, I experienced a similar error when the request is a VNDetectBarcodesRequest child class (class BarcodeRequest: VNDetectBarcodesRequest). This only happened in iOS 15.x. I see you are using an AVVisionRectangleRequest object as your request, try using VNDetectRectanglesRequest directly instead and see if that helps.

Vision : VNDetectRectanglesRequest Error in iOS15
 
 
Q