[Mobile] Number of elements in buffer is changed when running InferenceSession #21945
Labels
api:Javascript
issues related to the Javascript API
platform:mobile
issues related to ONNX Runtime mobile; typically submitted using template
platform:web
issues related to ONNX Runtime web; typically submitted using template
Describe the issue
Hi all,
After a long search I end up opening a GitHub Issue. We are able to run our
Expo 51.0.31
app withreact-native 0.74.5
on ios perfectly. Recently we tried to do so on a Galaxy Tab A (SM-T510) with Android version 10. Here it appears that the input buffer is modified byonnxruntime-react-native 1.19.0
. It is visible with the following code outline.Here
inputs
is the tensorwith console output
If I then do
I get
during inference. This stops our model from running on android. The model used is yolov8n. Everything runs fine on ios.
I have not been able to find a similar issue. Is this known to be related to something, or known to have a solution? Any help would be appreciated!
To reproduce
{
"name": "handenscanzorg_app",
"main": "expo-router/entry",
"version": "1.0.0",
"scripts": {
"start": "expo start --dev-client",
"reset-project": "node ./scripts/reset-project.js",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web",
"test": "jest --watchAll",
"lint": "expo lint"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo-google-fonts/amatic-sc": "^0.2.3",
"@expo-google-fonts/inter": "^0.2.3",
"@expo/config-plugins": "~8.0.0",
"@expo/vector-icons": "^14.0.0",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-navigation/native": "^6.0.2",
"@tensorflow/tfjs": "^4.20.0",
"@tensorflow/tfjs-react-native": "^1.0.0",
"base64-arraybuffer": "^1.0.2",
"expo": "^51.0.31",
"expo-asset": "^10.0.9",
"expo-camera": "~15.0.15",
"expo-constants": "~16.0.2",
"expo-dev-client": "~4.0.25",
"expo-font": "~12.0.7",
"expo-gl": "~14.0.2",
"expo-image-manipulator": "~12.0.5",
"expo-image-picker": "~15.0.7",
"expo-linking": "~6.3.1",
"expo-router": "~3.5.23",
"expo-screen-orientation": "~7.0.5",
"expo-splash-screen": "~0.27.5",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.7",
"onnxruntime-react-native": "1.19.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.5",
"react-native-canvas": "^0.1.40",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "~2.16.1",
"react-native-reanimated": "~3.10.1",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-svg": "15.2.0",
"react-native-svg-transformer": "^1.4.0",
"react-native-view-shot": "^3.8.0",
"react-native-webview": "13.8.6"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/jest": "^29.5.12",
"@types/react": "~18.2.45",
"@types/react-native": "^0.73.0",
"@types/react-test-renderer": "^18.0.7",
"jest": "^29.2.1",
"jest-expo": "~51.0.4",
"react-test-renderer": "18.2.0",
"typescript": "~5.3.3"
},
"private": true
}
npm install with legacy deps.
Urgency
No response
Platform
Android
OS Version
10
ONNX Runtime Installation
Released Package
Compiler Version (if 'Built from Source')
No response
Package Name (if 'Released Package')
onnxruntime-react-native
ONNX Runtime Version or Commit ID
1.19.0
ONNX Runtime API
JavaScript
Architecture
Other / Unknown
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: