The latest models of machine learning are being announced one after another, but which one is the best? It’s easy to compare with CoreML-Models, so I tried the summit decisive battle.

MLBoy
4 min readJan 7, 2022

I compared various latest image classification models

I compared the latest (announced in 2021) image classification model with CoreML Model, which allows us to try machine learning models just by dropping images.

There are so many models that I don’t know which one to use

I want to incorporate a machine learning model into an app.
If possible, I want to choose the model that best suits the service of my app.
For example, the models that Apple officially distributes for iOS are a few years old, and there are several.

There are many custom converted models for iOS on GitHub.

Now, which model should we use?

Research is active in the field of machine learning, and many models with the latest structure are announced at each conference.

[Ranking of image classification from Paper with code]

There are various indicators

The correct answer rates of models are ranked by data sets such as ImageNet, but
the score is just an average of 1000 classification images, the models in top group have small differences between each other, the parameters of the model are various, and even if we compare it, which one is really suitable for our application I think it’s hard to tell.

In CoreML-Models , drop images onto models and compare

CoreML-Models shares multiple machine learning model files, including the latest models, so we can try image classification by simply downloading the model file and dropping the image.

CoreML-Models

With this, we can easily compare various models with the image data we want to use.
Also, if we look at the model file, parameters such as model size and input size are easy to understand.

Google-Research FaceBook-Research … I compared various models

I compared the models in CoreML-Models.
This time, I will compare the following three.

ResNet50

A model that is also officially distributed by Apple. Announced in 2015. Size 102.6MB.

VisionTransformer

The model announced by Google in 2021. Size 347.5 MB.
ICLR Paper: https://arxiv.org/abs/2010.11929

DeiT

The model announced by FaceBook in 2021. Size 350.5 MB
ICML2021 Paper: https://arxiv.org/abs/2012.12877

Conformer

Announced in 2021. 94.1 MB
ICCV21 Paper https://arxiv.org/abs/2105.03889

Links to the CoreML model download page and the original project from CoreML-Models .

Now the decisive battle begins

data 1

Suddenly, the smallest size Conformer appears as a dark hose.

Was this affordable for any model?

data 3

Oops, DeiT is just right. On the contrary, ResNet and Conformer who had been doing well dropped out.

Comparison conclusion

Simply, the overall ImageNet score is not proportional to the model accuracy.
There are various sizes and attributes of the objects in the image. Each model seems to have strengths and weaknesses.
It doesn’t mean that the model size should be large.

So, it seems good to try testing with the data that your application gives to the model, then choose the model.

Easily incorporate the most suitable model into your app

Let’s compare models with CoreML-Models, mmclassification, etc. and incorporate the model that suits your service.

CoreML Model is easy to use on your app!

🐣

I’m a freelance engineer.
Work consultation
Please feel free to contact us with a brief development description.
rockyshikoku@gmail.com

I am making an app that uses Core ML and ARKit.
We send machine learning / AR related information.

GitHub

Twitter
Medium

--

--