News for hackers. Stuff that matters.
Re:Apple Create ML: Creating an Image Classifier Model by jagged-chisel on Monday November 30, 2020 @09:44AM (#25254209)
For the ML-impaired, how portable is this process? Does it work on other ML platforms? Are the digital assets (specifically this MLMODEL file/bundle) easily transmuted to work with, say, TF?
Re:Apple Create ML: Creating an Image Classifier Model by mumblemumble on Monday November 30, 2020 @10:28AM (#25254723)
It's not a pre-existing standard, but it is a documented format. It's based on protocol buffers, so I would expect it's fairly easy to write your own reader if necessary.

https://apple.github.io/coremltools/coremlspecification/

Re:Apple Create ML: Creating an Image Classifier Model by Someone on Monday November 30, 2020 @11:47AM (#25255767)
That project also has code for converting from quite a few formats (https://coremltools.readme.io/docs) to CoreML.

Having that (3-clause BSD-licensed) code will help in writing the reverse converters.

Re:Apple Create ML: Creating an Image Classifier Model by thebruce87m on Monday November 30, 2020 @09:48AM (#25254252)
I’m also ML impaired, but would people really train the model on a Mac? Surely you would want to train in the cloud or on something with a proper discrete GPU. It seems that a better article would be how to take e.g. yolo and convert it.
Re:Apple Create ML: Creating an Image Classifier Model by yeldarb on Monday November 30, 2020 @10:25AM (#25254696)
Apple's main goal with Create ML is to make something app developers can use to add machine learning powered features to their apps. So it makes sense that they'd want something that you can train with the hardware you already have as an app developer.

It's actually pretty performant. I trained an object detector (from scratch) on my 2016 MBP in about 6 hours[1].

As of macOS 11 also support transfer learning for object detection which starts from pre-trained weights and should converge more quickly if your dataset is similar to COCO[2] but I haven't tested it out yet.

[1] https://blog.roboflow.com/createml/ [2] https://blog.roboflow.com/coco-dataset/

Re:Apple Create ML: Creating an Image Classifier Model by seek3r on Monday November 30, 2020 @10:00AM (#25254387)
The article is not explicit about it but I think they’re using transfer learning. They take a general model trained, for instance, on ImageNet and use it to train a more specialised model to classify whatever you want. The training of the specialised model is way faster than the training of the general model.
Re:Apple Create ML: Creating an Image Classifier Model by bfieidhbrjr on Monday November 30, 2020 @09:58AM (#25254366)
Typically the model is pre-trained and you're just training the last layer, or adding a new layer, which is much much less computationally expensive.
Re:Apple Create ML: Creating an Image Classifier Model by fastball on Monday November 30, 2020 @09:58AM (#25254360)
Presumably this can be trained on the neural engines on iPhone/iPad chips and the new M1s.

Also my Macbook Pro has an 8GB GPU.

Re:Apple Create ML: Creating an Image Classifier Model by stephenr on Monday November 30, 2020 @09:57AM (#25254348)
people do run Macs in datacenters, so if you wanted to have it run in a dc I’m sure you could. Secondly all pro level Macs have discrete graphics, so I’m not sure what you mean by “proper discrete gpu”
Re:Apple Create ML: Creating an Image Classifier Model by sliken on Monday November 30, 2020 @02:38PM (#25257954)
Not sure what you mean by "all pro level macs". But the macbook pro M1 has no discrete GPU. It does however have a "neural processor" to accelerate ML.
Re:Apple Create ML: Creating an Image Classifier Model by stephenr on Monday November 30, 2020 @03:05PM (#25258266)
Ah right I always forget about the 13” Ugly step sister - it was igpu only for the intel models too.

However the other pro lines (MBP15/16 iMac Pro; Mac Pro) are all equipped with dGPUs

Re:Apple Create ML: Creating an Image Classifier Model by junipertea on Monday November 30, 2020 @10:27AM (#25254722)
Discrete nvidia GPU with CUDA. While there is Tensorflow compiled for radeon GPUs, majority of libraries are based on CUDA
Re:Apple Create ML: Creating an Image Classifier Model by dagmx on Monday November 30, 2020 @11:06AM (#25255181)
Tensorflow was recently released for Metal
Re:Apple Create ML: Creating an Image Classifier Model by skwb on Monday November 30, 2020 @05:56PM (#25260113)
Has there been any major updates to using TF for AMD GPUs recently? Or is it still too much of a headache to do it?
Re:Apple Create ML: Creating an Image Classifier Model by stephenr on Monday November 30, 2020 @10:36AM (#25254819)
... The models created by this are designed to be used in apps for on-device ML, on Macs, iPhones, iPads, etc.
Re:Apple Create ML: Creating an Image Classifier Model by seek3r on Monday November 30, 2020 @10:02AM (#25254417)
I did a quick Google search (so maybe I’m missing something) but there is no official support for converting Core ML — which is the foundation for Create ML — models to Tensorflow or PyTorch. You need to look for third-party libraries. Although there exist libraries to convert Tensorflow models to Core ML.
Re:Apple Create ML: Creating an Image Classifier Model by yeldarb on Monday November 30, 2020 @10:20AM (#25254637)
You can convert CoreML models to ONNX which is widely supported cross-platform for doing inference. https://github.com/onnx/onnxmltools
Re:Apple Create ML: Creating an Image Classifier Model by therealmarv on Monday November 30, 2020 @02:16PM (#25257656)
sorry my lack of understanding: So you think an image classifier trained on Create ML can be exported to another framework of not?
Re:Apple Create ML: Creating an Image Classifier Model by yeldarb on Monday November 30, 2020 @03:17PM (#25258402)
It’s not entirely clear to me exactly what was meant by the grandparent post by converting to PyTorch or Tensorflow.

There are two discrete concepts: training and inference. You can think of training a bit like the source code and inference a bit like running the compiled binary. The different frameworks have their own serialization formats for their model weights.

If the goal is to do inference using CoreML weights trained in CreateML on non-Apple platforms (eg on a server or android device), converting them to ONNX is a way to do that.

You probably won’t be able to pick up training on another framework though.