I've created a small image classification model using Create ML with around 350 image labels. However, for the iOS app I'm making that could scale to over 100,000 labels (and likely much more) - each with over a hundred images for training/testing. Is there any way to scale to that level using Create ML? I've started teaching myself TensorFlow and researching various cloud services like Google Colab for the training because I think I'll need to go that route... and then convert that to Core ML. I'd appreciate any thoughts / recommendations.

Wow, 100,000 classes! That’s a hard problem – in fact, it’s something which would be at the research cutting edge. Is there any structure to your classes? That might be something you could exploit.

It’s definitely worth having a look at the literature here — these tend to be called “extreme classification tasks”

For instance http://manikvarma.org/pubs/bengio19.pdf

This is a review which covers some of the problems in this area. However, if you have a natural hierarchy to your labels, you might consider having a hierarchy of classifiers. Let’s say we’re talking about animals; you might have a classifier from “animal” to “bird”, “mammal”, “reptile”, etc etc etc, then from “bird” to bird species

That way each classifier is only predicting among, say, 1,000 classes – which is a more tractable problem

If there is no class hierarchy, and you're looking to recognize individual identifiable objects, you may want to check out algorithms behind similar image search, where you calculate an embedding for an image, then find N nearest embedding from the known images, and derive your class/object from them.

Tagged with: