GithubHelp home page GithubHelp logo

rafiuddinkhan / custom-image-classification-android Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 9.0 23.07 MB

Custom image classification:- model trained with teachablemachine with google and deployed in android application

Java 100.00%
image-classification teachablemachine tensorflowlite ssd customtraining

custom-image-classification-android's Introduction

Custom Image Classification(Fruits Classification) in Android device trained in teachablemachine with google.

Screen Shot 2020-02-15 at 6 57 55 PM

Overview

Custom Image Classification to continuously classify whatever it sees from the android device's back camera. Inference is performed using the TensorFlow Lite Java API. The demo app classifies frames in real-time, displaying the top most probable classifications. It allows the user to choose between a floating point or quantized model optimization.

These instructions walk you through training,building and running the demo on an Android device.

Model

The training platform used for training custom image classifier is the teachablemachine with google. This is an exciting platform for learning the deeplearning training process just at a click by just uploading the different class of dataset or using webcam, then train it quite easily. Finally, after training you can export the model of your choice. I have exported it to tensorflowlite version as I have to run this on android device. you can choose whatever format you want and download the model.

Training

Requirements

  • Image dataset of different classes(for custom training) (you can download the fruit dataset collected:) Fruit

  • Android Studio 3.2 (installed on a Linux, Mac or Windows machine)

  • Android device in developer mode with USB debugging enabled

  • USB cable (to connect Android device to your computer)

Build and run

Step 1. Upload the dataset(custom dataset)

Prepare and upload the dataset to the teachablemachine with google site and define the number of classes accordingly. Train the image classification model over there and finally, export the model in the form of tensorflowlite format.

Step 2. Clone this repository for image classification using deep learning

Clone this GitHub repository to your computer and save it to the folder of your choice. This the java code for android application.

Step 3. Build the Android Studio project

Select Build -> Make Project and check that the project builds successfully. You will need Android SDK configured in the settings. You'll need at least SDK version 23. The build.gradle file will prompt you to download any missing libraries. you have to put the fruits.tflite to the asset folder of the android structure project directory and change the labels according to the number of class you have trained.

Step 4. Install and run the app

Connect the Android device to the computer and be sure to approve any ADB permission prompts that appear on your phone. Select Run -> Run app. Select the deployment target in the connected devices to the device on which the app will be installed. This will install the app on the device.

custom-image-classification-android's People

Contributors

rafi54 avatar rafiuddinkhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

custom-image-classification-android's Issues

Hi I need help of yours

I have started learning image classification . I have train the model but i am getting this error
Unable to acquire a buffer item, very likely client tried to acquire more than maxImages buffer

I am developing using android

Adding new model

Hi, I am unable to replace the current tflite filewith the one which I trained. Even if I replace the app is not giving outputs. I need some guidance.

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.