All Projects → Neno0o → TFLite-Android-Helper

Neno0o / TFLite-Android-Helper

Licence: Apache-2.0 license
TensorFlow Lite Helper for Android to help getting started with TesnorFlow.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to TFLite-Android-Helper

Keras-Application-Zoo
Reference implementations of popular DL models missing from keras-applications & keras-contrib
Stars: ✭ 31 (+24%)
Mutual labels:  ml, image-classification
Hub
A library for transfer learning by reusing parts of TensorFlow models.
Stars: ✭ 3,007 (+11928%)
Mutual labels:  ml, image-classification
Image classifier
CNN image classifier implemented in Keras Notebook 🖼️.
Stars: ✭ 139 (+456%)
Mutual labels:  ml, image-classification
eyepetizer kotlin
一款仿开眼短视频App,分别采用MVP、MVVM两种模式实现。一、组件化 + Kotlin + MVP + RxJava + Retrofit + OkHttp 二、组件化 + Kotlin + MVVM + LiveData + DataBinding + Coroutines + RxJava + Retrofit + OkHttp
Stars: ✭ 83 (+232%)
Mutual labels:  coroutines
hana-ml-samples
This project provides code examples for SAP HANA Predictive and Machine Learning scenarios and is educational content. It covers simple Predictive Analysis Library SQL examples as well as complete SAP HANA design-time “ML scenario”-application content or HANA-ML Python Notebook examples.
Stars: ✭ 67 (+168%)
Mutual labels:  ml
sgscript
SGScript Scripting Engine
Stars: ✭ 60 (+140%)
Mutual labels:  coroutines
CS-7641-assignments
CS 7641 - All the code
Stars: ✭ 135 (+440%)
Mutual labels:  ml
flutter-vision
iOS and Android app built with Flutter and Firebase. Includes Firebase ML Vision, Firestore, and Storage
Stars: ✭ 45 (+80%)
Mutual labels:  ml
favorite-research-papers
Listing my favorite research papers 📝 from different fields as I read them.
Stars: ✭ 12 (-52%)
Mutual labels:  image-classification
ros2-tensorflow
ROS2 nodes for computer vision tasks in Tensorflow
Stars: ✭ 41 (+64%)
Mutual labels:  image-classification
MNIST
Handwritten digit recognizer using a feed-forward neural network and the MNIST dataset of 70,000 human-labeled handwritten digits.
Stars: ✭ 28 (+12%)
Mutual labels:  image-classification
mqtt
Kotlin cross-platform, coroutine based, reflectionless MQTT 3.1.1 & 5.0 client & server
Stars: ✭ 31 (+24%)
Mutual labels:  coroutines
kglib
TypeDB-ML is the Machine Learning integrations library for TypeDB
Stars: ✭ 523 (+1992%)
Mutual labels:  ml
Polyel-Framework
⚡️ Voltis Core: A PHP framework based on Swoole from the ground up
Stars: ✭ 22 (-12%)
Mutual labels:  coroutines
mildnet
Visual Similarity research at Fynd. Contains code to reproduce 2 of our research papers.
Stars: ✭ 76 (+204%)
Mutual labels:  ml
zpy
Synthetic data for computer vision. An open source toolkit using Blender and Python.
Stars: ✭ 251 (+904%)
Mutual labels:  ml
server-framework
纯C的分布式服务器框架通用模板,跨平台,模块动态加载,tcp/可靠UDP,协程RPC,日志,集群建立
Stars: ✭ 24 (-4%)
Mutual labels:  coroutines
deep-learning
Projects include the application of transfer learning to build a convolutional neural network (CNN) that identifies the artist of a painting, the building of predictive models for Bitcoin price data using Long Short-Term Memory recurrent neural networks (LSTMs) and a tutorial explaining how to build two types of neural network using as input the…
Stars: ✭ 43 (+72%)
Mutual labels:  image-classification
webtrekk-android-sdk-v5
Webtrekk Android SDK V5
Stars: ✭ 13 (-48%)
Mutual labels:  coroutines
AlphaTree-graphic-deep-neural-network
AI Roadmap:机器学习(Machine Learning)、深度学习(Deep Learning)、对抗神经网络(GAN),图神经网络(GNN),NLP,大数据相关的发展路书(roadmap), 并附海量源码(python,pytorch)带大家消化基本知识点,突破面试,完成从新手到合格工程师的跨越,其中深度学习相关论文附有tensorflow caffe官方源码,应用部分含推荐算法和知识图谱
Stars: ✭ 2,221 (+8784%)
Mutual labels:  image-classification

TensorFlow Lite Helper for Android

This library helps with getting started with TensorFlow Lite on Android. Inspired by TensorFlow Lite Android image classification example.

This is an experimental library and subject to change. It's written entirely in Kotlin and powered by TensorFlow Lite.

The library provides helper class for Image Classification at the minimum usage. In future releases, the library may provide helpers for Object Detection and Smart Reply.

Download

Gradle

implementation 'com.neno0o.tflitehelper:imageclassification:0.0.1'

Maven

<dependency>
  <groupId>com.neno0o.tflitehelper</groupId>
  <artifactId>imageclassification</artifactId>
  <version>0.0.1</version>
  <type>pom</type>
</dependency>

Add TensorFlow Lite library

implementation "org.tensorflow:tensorflow-lite:latest_version"

Usage

Image Classification

To get started with Image Classification, get instance by providing your model and label paths in the asset folder to create factory method

private lateinit var imageClassification: ImageClassification

imageClassification = ImageClassification.create(
                classifierModel = ClassifierModel.QUANTIZED,
                assetManager = assets,
                modelPath = MODEL_PATH,
                labelPath = LABEL_PATH
            )

To classify (recognize) an image, call classifyImage with bitmap..

val results = imageClassification.classifyImage(bitmap)

The results are list of Recognizable.

The sample app uses Coroutines while initializing ImageClassification and when calling classifyImage to not block the main thread.

val results = async { imageClassification.classifyImage(bitmap) }

withContext(Dispatchers.Main) {
    object_name.text = results.await().toString()
}

Check out the sample app for more details.

ImageClassification uses default input size 224, you should override this value depending on your model. Also, you can override the number of results that will be returned, and the default confidence threshold.

imageClassification = ImageClassification.create(
                classifierModel = ClassifierModel.QUANTIZED,
                assetManager = assets,
                modelPath = MODEL_PATH,
                labelPath = LABEL_PATH,
                inputSize = YOUR_MODEL_INPUT_SIZE,
                numberOfResults = 10,
                confidenceThreshold = .5f
            )

To configure the Interpreter via the Interpreter.Options, create instance of Interpreter.Options alongside its configurations such as the number of threads that are used to configure the Interpreter, and use it in create method.

private lateinit var imageClassification: ImageClassification

val interpreterOptions = Interpreter.Options()
interpreterOptions.setNumThreads(4)
interpreterOptions.setUseNNAPI(true) // If Android device supports NNAPI

imageClassification = ImageClassification.create(
                classifierModel = ClassifierModel.QUANTIZED,
                assetManager = assets,
                modelPath = MODEL_PATH,
                labelPath = LABEL_PATH,
                interpreterOptions = interpreterOptions
            )

License

Copyright 2019 Ahmed Gamal. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].