richardlamo / ImageClassifierTester

This is a iOS app to allow the developer to test various Image Classifiers simultaneously. Various Image classifiers has already been added and you can simply add new ones to test.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImageClassifierTester

This is an iOS App to test the accuracy of multiple image classifiers. This demo already includes the following classifiers.

  • MobileNetV2
  • Resnet50FP16
  • Squeezenet
  • MNIST Classifier (Digit Classifier)

The above models and more can be found under Apple's Core ML Models.

How it works

The App works by taking photo within the app using the camera on your iOS device. Using that photo it then makes predictions via each classifier requested. It puts all the top result from each classification to display in a Table View.

For example:

As you can see, the result also includes the confidence result in percentage of each classifier.

Adding a new model for testing.

To test a custom or new image classifier, you must implement this in Apple's mlmodel format.

Once you have your model then all you have to do is add the following statement using the new model in ImageClassifierViewController.imagePickerController(..). See the Comment for exact location.

if let model = try? <Your Model Class Name>(configuration: MLModelConfiguration()).model { detect(image: convertedImage, mlModel: model, classifier: <Your classifer name as a string>) }

Once you've done that then you will see your classifier's results added to the Table View.

See the following video on how it works.

Image Classifier

About

This is a iOS app to allow the developer to test various Image Classifiers simultaneously. Various Image classifiers has already been added and you can simply add new ones to test.

License:GNU General Public License v3.0


Languages

Language:Swift 100.0%