Video classification TensorFlow Lite model(i3d) with 5D input on android

Need to run a sign language video classification model(i3d) on android, that takes 5 dimension ( 1 3 64 224 224),examples/lite/examples/image_classification/android at master · tensorflow/examples · GitHub , but failes. But runs on PC with python3.7.


This is the error. I think it is due to the input size. In opencv we can concat frames and convert it to a numpy array to get the size as (1 64 224 224 3) then transpose it to (1 3 64 224 224). No idea on how it can be done with Java.


1 Like

What is the exact type of the input tensor buffer that you’re using in the Java code?
Based on the error message, your Java buffer size is 576 bytes, which suggests that your buffer type / size doesn’t match what’s expected by your model.

1 Like

Adding on what YYoon said, the example from TensorFlow/Examples is not meant to run with whatever tflite file you insert into the project. You have to do a lot of changes, but it is a good start without the need to write all the boilerplate code for the camera for example.

First of all I have not seen a 5th dimension. If you had input of [1,224,224,3] or [1,3,224,224] for the image your job would have been more easy. So what is this 5th dimension? You have to provide more info and a notebook to check. If this is a 3D dimension I have not found a camera that can provide this type of information. What are the inputs at the notebook? Are they 3D images?

1 Like