Questions tagged [mlmodel]

98 questions
7
votes
1 answer

Machine Learning Error when loading mlmodel "No known class for loading model type > MLModelType_pipelineClassifier"

I have created a mlmodel with Playground and imported into my Xcode project though when it runs I'm getting this error. The error is also flagged here in the code of the mlmodel. ObjectClassifier[24610:8307770] [coreml] MLModelAsset: …
uplearned.com
  • 3,393
  • 5
  • 44
  • 59
5
votes
1 answer

Which HuggingFace summarization models support more than 1024 tokens? Which model is more suitable for programming related articles?

If this is not the best place to ask this question, please lead me to the most accurate one. I am planning to use one of the Huggingface summarization models (https://huggingface.co/models?pipeline_tag=summarization) to summarize my lecture video…
5
votes
0 answers

Swift failing to open CoreML model

I'm trying to use a CoreMl model I created, but I'm getting an error on it (which I don't get with other models). The error is thrown by the following line: let compiled = try MLModel.compileModel(at: URL(fileURLWithPath:…
Ben A.
  • 874
  • 7
  • 23
4
votes
1 answer

How to make a MLModel updatable in Swift CoreML?

I'm trying to implement the new CoreML 3 feature of updatable Models into my App, but I can't figure it out. Im creating a Neural Network with 2 layers in Keras and convert it to a core ML Model. Then I include the model into my iOS Project.…
Seb
  • 1,586
  • 1
  • 11
  • 15
3
votes
0 answers

MLModel crash app on init due to memory issue

I'm seeing unexpected behavior with models I'm converting from Keras/TensorFlow/PyTorch etc. When calling a simple init on an MLModel, without predicting or doing anything else, the app memory on some models spikes to 2-3GB. self.myModel =…
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
3
votes
1 answer

Machine Learning model Wrong Prediction

I have a machine learning classifier from create ML. The model is trained with 3400 samples and overall is impressive in how accurate it is. However The model ever so often makes a prediction that is wrong and I can't seem to figure out how I add…
Charlie
  • 222
  • 3
  • 20
3
votes
3 answers

Download Custom CoreML Model and Load for Usage [Swift]

I am creating an app based on Neural Network and the CoreML model size is of around 150MB. So, it's obvious that I can't ship it within the app. To overcome this issue, I came to know about this article, mentioning that you can download and compile…
Sohil R. Memon
  • 9,404
  • 1
  • 31
  • 57
3
votes
2 answers

Model class generation disabled: disabled in project (CoreML Code Generation Language set to "none"

I've downloaded this project from apple's developers' website: https://developer.apple.com/documentation/vision/recognizing_objects_in_live_capture But I'm getting this error(?) under the Model Class when I inspect the mlmodel object. Is there…
Amir A.Eitan
  • 183
  • 1
  • 12
2
votes
0 answers

DeepLabV3 MLMultiArray output conversion to Image is super slow

I'm using the DeepLabV3 MLModel provided by Apple from this link: https://developer.apple.com/machine-learning/models/. Seems like the actual prediction is quick. I'm running it on a stream of CIImages which I convert to CVPixelBuffers…
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
2
votes
2 answers

The size of byte buffer and the shape do not match.I am facing this error while integrating my Ml model in android app

I am making my first ML integrated android app and I am trying to add this ocr model into my app. But I am facing this error Caused by: java.lang.IllegalArgumentException: The size of byte buffer and the shape do not match. at…
Amandeep
  • 31
  • 2
  • 4
2
votes
1 answer

Can VNImageRequestHandler accepts MLMultiArray as an input? (Without converting to UIImage)

I have two MLModels in my app. The first one is generating an MLMultiArray output which is meant to be used as the second model input. As I'm trying to make things as performance-best as possible. I was thinking about using VNImageRequestHandler to…
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
2
votes
0 answers

Is it possible to predict a batch of images with coremltools mlmodel?

Is it possible to predict a batch in mlmodel? If yes, how? I convert a keras model to mlmodel, as presented in the documentation: import coremltools as ct image_input = ct.ImageType(name='input', shape=(1, 224, 224, 3)) model =…
jonb
  • 845
  • 1
  • 13
  • 36
2
votes
1 answer

Pre-heat CoreML MLModel

I'm seeing up to 3x-4x slower results on my first prediction on my MLModel. Seems like once you run the first prediction it's heating the model. Couldn't find any official information about it. What is the right way to pre-heat my model? Call it on…
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
2
votes
1 answer

New error running MLModels in swift after Xcode 12 update

After upgrading to Xcode 12 and Swift 5.3 my MLmodel no longer seems to work correctly I had no issues before. I'm sure it's a simple fix that I just don't understand how to fix. let WpredictionModel = _14Win() func calculateWin() { guard let…
kris63
  • 31
  • 2
2
votes
2 answers

Problem when converting Pytorch Image Classifier to mlmodel: Returns same softmax output regardless of img

I trained and tested an image classifier (Resnet34, Fast.ai, 3 classes) using pytorch and learn.predict() works as expected. When I convert pytorch -> onnx -> mlmodel it predicts the same softmax values regardless of the image I submit. Here's my…
Stev3
  • 158
  • 1
  • 8
1
2 3 4 5 6 7