Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to upgrade the depreciated versions #30

Open
Ganeshkumar1010 opened this issue Nov 21, 2022 · 8 comments
Open

Need to upgrade the depreciated versions #30

Ganeshkumar1010 opened this issue Nov 21, 2022 · 8 comments

Comments

@Ganeshkumar1010
Copy link

Interpreter - Which is depreciated and need some solution for this.
image

@vasantharaj1972
Copy link

Upgrade the following packages in gradle(app) file

implementation 'com.google.mlkit:face-detection:16.1.5'
...
implementation('org.tensorflow:tensorflow-lite:+') { changing = true }
implementation('org.tensorflow:tensorflow-lite-gpu:+') { changing = true }
implementation('org.tensorflow:tensorflow-lite-support:+') { changing = true }

@atharvakale31
Copy link
Owner

@binayshaw7777 You updated this in the last pull, right? Or are these more recent ones?

@binayshaw7777
Copy link
Contributor

@atharvakale31 I already updated the Gradle in my last PR, well the changes mentioned by @vasantharaj1972 didn't work for me when I was using it, it was crashing.

@binayshaw7777
Copy link
Contributor

@vasantharaj1972 please check #28

@vasantharaj1972
Copy link

Hi Binayshaw,

My Gradle setting file content is

plugins {
id 'com.android.application'
}

android {
compileSdkVersion 29
buildToolsVersion "30.0.2"

defaultConfig {
    applicationId "com.atharvakale.facerecognition"
    minSdkVersion 21
    targetSdkVersion 29
    versionCode 3
    versionName "1.2"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
aaptOptions {
    noCompress "tflite"
}

buildTypes {
    release {

        minifyEnabled true
        shrinkResources true

// proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'

implementation 'com.google.mlkit:face-detection:16.1.5'

implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.navigation:navigation-fragment:2.3.2'
implementation 'androidx.navigation:navigation-ui:2.3.2'
implementation 'com.google.code.gson:gson:2.8.6'
def lottieVersion = "3.4.0"
implementation "com.airbnb.android:lottie:$lottieVersion"
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.squareup.picasso:picasso:2.71828'
// CameraX core library using the camera2 implementation
def camerax_version = "1.0.0-rc01"
// The following line is optional, as the core library is included indirectly by camera-camera2
implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"
// If you want to additionally use the CameraX Lifecycle library
implementation "androidx.camera:camera-lifecycle:${camerax_version}"
// If you want to additionally use the CameraX View class
implementation "androidx.camera:camera-view:1.0.0-alpha20"
// If you want to additionally use the CameraX Extensions library
implementation "androidx.camera:camera-extensions:1.0.0-alpha20"
implementation 'com.android.volley:volley:1.2.1'
implementation('org.tensorflow:tensorflow-lite:+') { changing = true }
implementation('org.tensorflow:tensorflow-lite-gpu:+') { changing = true }
implementation('org.tensorflow:tensorflow-lite-support:+') { changing = true }
implementation 'br.com.simplepass:loading-button-android:1.14.0'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

@binayshaw7777
Copy link
Contributor

binayshaw7777 commented Mar 5, 2023

@vasantharaj1972
Is it working in your case?
If it's not working, try pulling the new changes, it seems your one is outdated.

Change to:
compileSdkVersion 33 buildToolsVersion "30.0.3" targetSdkVersion 33

Also change tensorflow dependencies, I don't remember the exact article where I found out those were the main issues.

New:
implementation 'org.tensorflow:tensorflow-lite-task-vision:0.3.0' implementation 'org.tensorflow:tensorflow-lite-support:0.3.0' implementation 'org.tensorflow:tensorflow-lite:0.0.0-nightly-SNAPSHOT'

@vasantharaj1972
Copy link

@binayshaw7777
It is working for me and the mentioned one is latest and updated one.
image

@binayshaw7777
Copy link
Contributor

@vasantharaj1972 cool, I'll test out your changes and let you know.
You can contribute via PR, you can ask @atharvakale31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants