diff --git a/android/app/build.gradle b/android/app/build.gradle index daff98b53..dc8165c8e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -126,10 +126,10 @@ android { versionCode 50 versionName "0.8.1" setProperty("archivesBaseName", applicationId + "-v" + versionName + "+" + versionCode) + manifestPlaceholders = [ GMAPS_API_KEY:project.env.get("GMAPS_API_KEY") ] // Detox Android setup testBuildType System.getProperty('testBuildType', 'debug') testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - manifestPlaceholders = [ GMAPS_API_KEY:project.env.get("GMAPS_API_KEY") ] // Detox end } diff --git a/android/build.gradle b/android/build.gradle index c70ef60a8..fa3b3c78d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -11,6 +11,8 @@ buildscript { kotlinVersion = "1.6.20" // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. ndkVersion = "23.1.7779620" + // This specifies which tensorflow-lite version to use for our vision-plugin. + tensorflowVersion = "2.4.0" } repositories { google() diff --git a/env.example b/env.example index 1f289ccb5..a76b73205 100644 --- a/env.example +++ b/env.example @@ -26,6 +26,7 @@ ANDROID_MODEL_FILE_NAME=small_inception_tf1.tflite ANDROID_TAXONOMY_FILE_NAME=small_export_tax.csv IOS_MODEL_FILE_NAME=small_inception_tf1.mlmodel IOS_TAXONOMY_FILE_NAME=small_export_tax.json +CV_MODEL_VERSION=1.0 # Fastlane IOS_PROVISIONING_PROFILE_NAME="provisioning profile name" diff --git a/src/components/Camera/ARCamera/FrameProcessorCamera.js b/src/components/Camera/ARCamera/FrameProcessorCamera.js index 87696a596..8c0ab1549 100644 --- a/src/components/Camera/ARCamera/FrameProcessorCamera.js +++ b/src/components/Camera/ARCamera/FrameProcessorCamera.js @@ -5,6 +5,7 @@ import React, { useEffect } from "react"; import { Platform } from "react-native"; +import Config from "react-native-config"; import * as REA from "react-native-reanimated"; import { useFrameProcessor @@ -24,6 +25,7 @@ type Props = { animatedProps: any }; +const version = Config.CV_MODEL_VERSION; // Johannes: when I copied over the native code from the legacy react-native-camera on Android // this value had to be a string. On iOS I changed the API to also accept a string (was number). // Maybe, the intention would look clearer if we refactor to use a number here. @@ -62,7 +64,7 @@ const FrameProcessorCamera = ( { // Reminder: this is a worklet, running on the UI thread. try { const results = InatVision.inatVision( frame, { - version: "1.0", + version, modelPath: dirModel, taxonomyPath: dirTaxonomy, confidenceThreshold @@ -73,7 +75,7 @@ const FrameProcessorCamera = ( { REA.runOnJS( onClassifierError )( classifierError ); } }, - [confidenceThreshold] + [version, confidenceThreshold] ); return (