I'm receiving this fatal exception in iOS 13 beta 1 when using my Core ML image classification model
MTLDebugValidateMTLPixelFormat, line 1388: error 'pixelFormat (11) is not a valid MTLPixelFormat.'
MTLDebugValidateMTLPixelFormat:1388: failed assertion `pixelFormat (11) is not a valid MTLPixelFormat.'
guard let drawingImage = canvasView.currentDrawing.rasterized()?.cgImage,
let model = try? VNCoreMLModel(for: Symbols().model)
else { return }
let classificationRequest = VNCoreMLRequest(model: model) { [weak self] (request, error) in
self?.processClassifications(for: request, error: error)
}
classificationRequest.imageCropAndScaleOption = .centerCrop
let handler = VNImageRequestHandler(cgImage: drawingImage)
try? handler.perform([classificationRequest]) //crashes here