Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
let request = VNCoreMLRequest(model: model) { [weak self] (request, error) -> Void in
self?.handleModelRequest(request: request, forIndex: index)
// Como escalamos la imagen para adecuarla al
// tamaño esperado por el modelo.
request.imageCropAndScaleOption = .scaleFit
let handler = VNImageRequestHandler(ciImage: image)
try handler.perform([ request ])
catch let error
print("No se puede ejecutar la operación con Vision. \(error.localizedDescription)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.