Skip to content

Commit

Permalink
Feat: Update the dependencies for the MediaPipe Task samples (#397)
Browse files Browse the repository at this point in the history
* feat: migrate audio classification dependencies

* feat: migrate audio classification dependencies

* feat: migrate face detection dependencies

* feat: migrate face landmarks dependencies

* feat: migrate face stylizer dependencies

* feat: remove dowload later files

* feat: remove dowload later files

* feat: migrate gesture recognizer dependencies

* feat: migrate hand landmarks dependencies

* feat: remove dowload later files

* feat: migrate image classification dependencies

* feat: migrate image embedder dependencies

* feat: migrate image generation dependencies

* feat: remove dowload later files

* feat: migrate category masks dependencies

* feat: migrate category masks dependencies

* feat: migrate interactive segmentation dependencies

* feat: migrate language detection dependencies

* feat: migrate llm inference dependencies

* feat: migrate objects detection dependencies

* feat: migrate pose landmarkers dependencies

* feat: remove dowload later files

* feat: migrate text classifier dependencies

* feat: migrate text embedder dependencies
  • Loading branch information
st-vinhthai authored May 21, 2024
1 parent aa29525 commit 52afa02
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion examples/audio_classifier/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'

// Mediapipe Library
implementation 'com.google.mediapipe:tasks-audio:0.10.0'
implementation 'com.google.mediapipe:tasks-audio:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/face_detector/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,6 @@ dependencies {
androidTestImplementation "androidx.test:runner:1.4.0"
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"

implementation 'com.google.mediapipe:tasks-vision:0.10.0'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'

}
2 changes: 1 addition & 1 deletion examples/face_landmarker/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

// MediaPipe Library
implementation 'com.google.mediapipe:tasks-vision:0.10.0'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/face_stylizer/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'

implementation 'com.google.mediapipe:tasks-vision:0.10.5'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity
import com.google.mediapipe.examples.facestylizer.databinding.ActivityMainBinding
import com.google.mediapipe.framework.image.ByteBufferExtractor
import kotlin.jvm.optionals.getOrNull


class MainActivity : AppCompatActivity(),
Expand Down Expand Up @@ -112,8 +113,9 @@ class MainActivity : AppCompatActivity(),
Toast.makeText(this, error, Toast.LENGTH_SHORT).show()
}

@OptIn(ExperimentalStdlibApi::class)
private fun onResult(result: FaceStylizationHelper.ResultBundle) {
if (result.stylizedFace == null) {
if (result.stylizedFace == null || result.stylizedFace.stylizedImage().getOrNull() == null) {
onError("Failed to stylize image")
return
}
Expand Down
2 changes: 1 addition & 1 deletion examples/gesture_recognizer/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

// Mediapipe Library
implementation 'com.google.mediapipe:tasks-vision:0.10.0'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/hand_landmarker/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

// MediaPipe Library
implementation 'com.google.mediapipe:tasks-vision:0.10.0'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/image_classification/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,5 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

implementation 'com.google.mediapipe:tasks-vision:0.10.0'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/image_embedder/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'

implementation 'com.google.mediapipe:tasks-vision:0.10.0'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/image_generation/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.google.mediapipe:tasks-vision-image-generator:0.10.5.2'
implementation 'com.google.mediapipe:tasks-vision-image-generator:0.10.14'
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'com.google.truth:truth:1.1.3'

implementation 'com.google.mediapipe:tasks-vision:0.10.0'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'com.google.truth:truth:1.1.3'

implementation 'com.google.mediapipe:tasks-vision:0.10.0'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/interactive_segmentation/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

// MediaPipe Library
implementation 'com.google.mediapipe:tasks-vision:0.1.0-alpha-11'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
Expand Down
2 changes: 1 addition & 1 deletion examples/language_detector/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

implementation 'com.google.mediapipe:tasks-text:0.10.0'
implementation 'com.google.mediapipe:tasks-text:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/llm_inference/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ dependencies {
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")

implementation ("com.google.mediapipe:tasks-genai:0.10.11")
implementation ("com.google.mediapipe:tasks-genai:0.10.14")

testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
Expand Down
2 changes: 1 addition & 1 deletion examples/object_detection/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,5 @@ dependencies {
androidTestImplementation "androidx.test:runner:1.4.0"
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"

implementation 'com.google.mediapipe:tasks-vision:0.10.2'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/pose_landmarker/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

// MediaPipe Library
implementation 'com.google.mediapipe:tasks-vision:0.10.0'
implementation 'com.google.mediapipe:tasks-vision:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/text_classification/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

// MediaPipe Library
implementation 'com.google.mediapipe:tasks-text:0.10.0'
implementation 'com.google.mediapipe:tasks-text:0.10.14'
}
2 changes: 1 addition & 1 deletion examples/text_embedder/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'

implementation 'com.google.mediapipe:tasks-text:0.10.0'
implementation 'com.google.mediapipe:tasks-text:0.10.14'
}

0 comments on commit 52afa02

Please sign in to comment.