Questions tagged [mlmodel]

98 questions
0
votes
0 answers

How to add a pretrained ML Core model to Flutter app?

I have a pretrained .mlmodel file, but when I add to my Runner, I can't access it from AppDelegate.swift. I have my app written in Flutter. Also it works with a different project written in Swift.
0
votes
0 answers

How to visualize timeseries model prediction in Grafana

I created my own timeseries model and I exported it. By now I'm visualizing real data in a local Grafana dashboard (I'm not using Grafana Cloud), using Influxdb as data source. How can I visualize also my model predictions in the same dashboard?…
AT181903
  • 11
  • 4
0
votes
1 answer

CoreMl issue with xcode , multiple resources named 'coremldata.bin' in target 'AppModule'

I am working on my swift playgrounds project. I added the FitnessMoves.mlmodelc file to my playgrounds project. But the i get the multiple resources named 'coremldata.bin' in target 'AppModule' error from xcode. The error disappears when i change 3…
0
votes
0 answers

Convert UIImage to MLMultiArray with 4 dimension shape

I have tried to convert UIImage into MLMultiArray to pass as input to CoreML model. It's successful with 3 dimension of shape. But I don't know how to do with 4 dimension of shape. shape like: [1, 3, 512, 512] the input of model Thank. func…
0
votes
0 answers

typeerror: Image input, 'imagePath' must be of type PIL.Image.Image in the input dict

Good morning everyone, I have my .mlmodel trained on license plates with size of 1920x1080. My video test is also in the same resolution, when I am running the code it returns this error: typeerror: Image input, 'imagePath' must be of type…
0
votes
0 answers

I am facing an error while using MLmodel in iOS

Error Name: "Failed to load Core ML model." UserInfo={NSLocalizedDescription=Failed to load Core ML model.} //Code /* 5. Declare a function for image classification */ func detect(image: CIImage) { let config = MLModelConfiguration() …
0
votes
1 answer

how to convert imagenet/mobilenet_v2_130_224/classification into mlmodel

i m very new to this but I am trying to solve the issue somehow. this is my convert.py file import numpy as n import tensorflow as tf import coremltools as ct print(n.__version__) print(tf.__version__) print(ct.__version__) loaded_model =…
asduskun
  • 17
  • 5
0
votes
0 answers

Converting a Caffe Model into MLModel

I am following a course on Udemy and now the instructor is converting her Caffe Model into MLModel on Python 2.7 ( I know very outdated). She created this .py file for that import coremltools caffe_model = ('oxford102.caffemodel',…
asduskun
  • 17
  • 5
0
votes
1 answer

Transform boundingBox according to angle and rotation

I am trying to implement a plastic cards detector using Vision ML Model which was trained on a custom data set. I am drawing rectangles according to bounding boxes coordinates over the camera view and it works like a charm. BUT. It doesn't react to…
0
votes
1 answer

CoreML output image size is not the same as the model prediction output image size

I tried to change the existing MLModel (https://drive.google.com/file/d/16JEWh48fgQc8az7avROePOd-PYda0Yi2/view?usp=sharing) output size from 2048x2048 (existing output size) to 1024x1024. I used this script to change the output image size: spec =…
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
0
votes
1 answer

How to convert MLMultiArray to UIImage on Swift?

Im working on CoreML project. I have an image that needs to be stylized using a mlmodel. I'm using CoreMLHelpers for this. Im having an issue getting the output. func prediction(input: MLModelProviderInput) throws -> MLModelProviderOutput { …
Ryan Aluvihare
  • 225
  • 1
  • 2
  • 9
0
votes
1 answer

Memory Crash when detecting object with MLModel

I have made an MLModel in CreateML that will detect hockey pucks in images. I use the camera on the phone to take a video, and while it is being recorded, I convert each frame to a CGImage and try to detect pucks in each frame. At first when I…
Alex Aghajanov
  • 294
  • 4
  • 17
0
votes
1 answer

If I train a custom tokenizer on my dataset, I would still be able to leverage a pre-trained model weight

This is a declaration, but I'm not sure it is correct. I can elaborate. I have a considerably large dataset (23Gb). I'd like to pre-train the Roberta-base or XLM-Roberta-base, so my language model would fit better to be used in further downstream…
0
votes
1 answer

Which all metrics to use in Fine Tuning Masked Language Modelling and use validation data using Pytorch Trainer API

I am training a MLM model using Pytorch Trainer API. Here is my initial code. data_collator = DataCollatorForWholeWordMask(tokenizer=tokenizer, mlm=True, mlm_probability=0.15) class SEDataset(torch.utils.data.Dataset): def __init__(self,…
MAC
  • 1,345
  • 2
  • 30
  • 60
0
votes
0 answers

ImportError: No module named speech_recognition

Getting ImportError: No module named speech_recognition, Code Snippet: # for speech-to-text import speech_recognition as sr # for text-to-speech from gtts import gTTS # for language model import transformers import os import time # for…