Skip to content

Instantly share code, notes, and snippets.

@boaerosuke
Created August 16, 2017 16:33
Show Gist options
  • Select an option

  • Save boaerosuke/8c278e8cce16df23918f67a0b713847c to your computer and use it in GitHub Desktop.

Select an option

Save boaerosuke/8c278e8cce16df23918f67a0b713847c to your computer and use it in GitHub Desktop.
//scaled image to 28x28
UIImage *scaledCanvasImage = [self imageWithImage:self.drawingCanvas.image scaledToSize:CGSizeMake(28, 28)];
self.imageToDetect = [[CIImage alloc]initWithImage:scaledCanvasImage];
MLModel *ml_model = [[[keras_mnist_cnn alloc] init] model];
VNCoreMLModel *vnc_core_ml_model = [VNCoreMLModel modelForMLModel: ml_model error:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment