Skip to content

Commit dcc677a

Browse files
author
Persie
committed
fix
1 parent ff1c7c1 commit dcc677a

File tree

1 file changed

+7
-0
lines changed
  • android/src/main/java/com/vladih/computer_vision/flutter_vision/models

1 file changed

+7
-0
lines changed

android/src/main/java/com/vladih/computer_vision/flutter_vision/models/Yolo.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import android.util.Log;
99

1010
import org.tensorflow.lite.Interpreter;
11+
import org.tensorflow.lite.Tensor;
1112
import org.tensorflow.lite.gpu.CompatibilityList;
1213
import org.tensorflow.lite.gpu.GpuDelegate;
1314

@@ -57,6 +58,12 @@ public Yolo(Context context,
5758
this.rotation = rotation;
5859
}
5960

61+
62+
public Tensor getInputTensor() {
63+
if (interpreter == null) return null;
64+
return this.interpreter.getInputTensor(0);
65+
}
66+
6067
public void initialize_model() throws Exception {
6168
AssetManager asset_manager = null;
6269
MappedByteBuffer buffer;

0 commit comments

Comments
 (0)