GithubHelp home page GithubHelp logo

nkgfirecream / frutify-ios Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shawonashraf/frutify-ios

0.0 1.0 0.0 2.34 MB

iOS app for Fruit Image Classifier in https://github.com/ShawonAshraf/CSE499Project

Swift 81.00% Jupyter Notebook 8.94% Python 10.06%

frutify-ios's Introduction

Frutify-iOS

iOS application for Fruit Image Classifier

Description

Binary image classification of fruits. The trained model can determine whether a fruit is fresh / rotten from the given image. The app can use the camera to take images or, can load an image from the images stored on the device.

Categories Trained on so far

  • Apple(fresh + rotten)
  • Mango(fresh + rotten)
  • Orange(fresh + rotten)
  • Banana(fresh + rotten)

Screenshots

Correct predictions

Real : Fresh, Predicted : Fresh Real : Fresh, Predicted: Fresh Real : Fresh, Predicted: Fresh
Imgur Imgur Imgur
Real : Fresh, Predicted : Fresh Real : Rotten, Predicted : Rotten Real : Fresh, Predicted : Fresh
Imgur Imgur Imgur

Wrong predcictions

Real : Fresh, Predicted : Rotten Real : Fresh, Predicted : Rotten
Imgur Imgur

Dependencies

For training

For app

  • Swift 4
  • iOS 11.2 SDK / iOS 11.1 SDK
  • Xcode 9.2 / 9.1
  • macOS 10.13.1+

Supported devices and platforms

  • Any device running iOS 11.1+

Model evaluation details

Details regarding model evaluation (accuracy, confusion matrix) can be found here as iPython Notebook

Usage

Clone the repo or download as a zip

For training

  • If you don't want to train on a new dataset and want to use what's already available, skip to next part.
  • Save your data (images to train on) inside the folder image_data
  • Loading dataset into a dataframe
python data_to_df.py
  • Create model and train
python predict.py
  • It'll create a model and mlmodel to use with the iOS application.

For app

  • Create a Single view iOS app in Xcode with camera view.
  • Add the coreml model you got from training or if you skipped training, download the mlmodel from release section of the repo. link
  • Initiate the model inside your swift code and run inference on images captured or in the way you have defined image input on your app.
  • If you wish to use the existing app, just import the mlmodel into project directory and build.
  • Best if you can test on a device instead of an emulator.

References

frutify-ios's People

Contributors

shawonashraf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.