Skip to content

Compare the classification results from different standard CoreML models and Firebase MLKit

License

Notifications You must be signed in to change notification settings

MSWagner/CoreML-Classification-Comparison

Repository files navigation

CoreML-Classification-Comparison

Compare the classification results from different standard CoreML models and Firebase MLKit. You can search for public images with tags on Flickr or you can use images from your library or the camera to compare the different models.

Prerequisites

  • Xcode: 9.4.1
  • Swift: 4.1
  • iOS: 11.4

Setup

  • run 'pod install' in your terminal
  • add your 'GoogleService-Info.plist' from Firebase
  • add your Flickr APIKey and Secret in Config.Flickr
  • open 'CoreML-Classification-Comparison.xcworkspace' in Xcode
Download CoreML models:

Drop the models in CoreML-Classification-Comparison/Utilities/MLModels and build the project

Add new CoreML models:

Drop the new CoreML model in the project and add the model to the MLModelType enum. Then you can add your additional CoreMLViewModel with your new model type in the init of the ImageProcessingViewModel.

You can find additional models also here: https://github.com/likedan/Awesome-CoreML-Models

Features

Flickr Image Search

You can search for images on Flickr with adding text into the searchbar. The minimum character count is 3. From then on the images will updated live and you have the possibilty to go through the differnt pages for a tag.

If you select an image, you will be forwarded to the classification screen.



Image classification

You can classify the selected image with different CoreML models or Firebase MLKit. In the settings you can set the precision for results, which should be shown on the screen and saved, if you press the save button. You can also preprocess the images for the CoreML models to the recommended input image size and you have the option to see the resized images.

The saved images (flickr urls and classification results) are stored localy and remote in Firestore. You can search for the stored results on the right tabBarButton.

MLTypes MLKit Results Settings

Stored Result Search

You can search for stored classification results and linked images from Flickr.


Library / Camera Support

If you want to classify your own picture, you can click on the red camera button in the TabBar. It's also possible to preprocess an image from the camera.



License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Compare the classification results from different standard CoreML models and Firebase MLKit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published