Skip to content

Instantly share code, notes, and snippets.

View RanaRanvijaySingh's full-sized avatar

Rana Ranvijay Singh RanaRanvijaySingh

View GitHub Profile
android {
aaptOptions {
noCompress "tflite"
}
}
dependencies {
implementation 'org.tensorflow:tensorflow-lite-task-vision:0.1.0'
}
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black">
<ImageView
android:id="@+id/viewFinder"
android:layout_width="match_parent"
import androidx.appcompat.app.AppCompatActivity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import org.tensorflow.lite.support.image.TensorImage;
import org.tensorflow.lite.support.label.Category;