首页 > 解决方案 > Android TensorFlow - E/Surface:queueBuffer:错误队列缓冲区到 SurfaceTexture,-32

问题描述

也许错误就像墙纸崩溃时出现错误 - queueBuffer: error queuing buffer to SurfaceTexture

但是当我尝试在 tensorflow 过程中匹配缓冲区时出现此错误

private static final int TF_OD_API_INPUT_SIZE = 448;

源代码:https ://github.com/tensorflow/examples/blob/master/lite/examples/object_detection/android/app/src/main/java/org/tensorflow/lite/examples/detection/DetectorActivity.java

使用我自己的 model.tflite 时出现错误我已尝试将我的模型用于imageClassification及其工作https://github.com/tensorflow/examples/blob/master/lite/examples/image_classification/android/app/src/main /java/org/tensorflow/lite/examples/classification/tflite/ClassifierFloatMobileNet.java#L60 但是当我尝试objectDetection的模型时..我收到了这个错误

Process: org.tensorflow.lite.examples.detection, PID: 30742
    java.lang.IllegalArgumentException: Cannot copy to a TensorFlowLite tensor (input_2) with 602112 bytes from a Java Buffer with 1080000 bytes.

所以我private static final int TF_OD_API_INPUT_SIZE = 448; 用 602112 从 Java 缓冲区修改了直到,在匹配之后,我得到了一个新错误

2020-08-26 13:10:23.716 1313-1662/? E/Surface: queueBuffer: error queuing buffer to SurfaceTexture, -32
2020-08-26 13:10:23.716 1313-1662/? E/Camera3-OutputStream: returnBufferCheckedLocked: Stream 1: Error queueing buffer to native window: Broken pipe (-32)
2020-08-26 13:10:23.969 952-11504/? E/OppoHalAssist: oppoHalAssistClearBuffer buffer is empty

我从这个https://colab.research.google.com/github/tensorflow/tensorflow/blob/master/tensorflow/lite/g3doc/tutorials/model_maker_image_classification.ipynb制作了一个模型

仍然没有解决,:https ://github.com/tensorflow/tensorflow/issues/24190,https : //github.com/amitshekhariitbhu/Android-TensorFlow-Lite-Example/issues/6

标签: javapythonandroidtensorflow

解决方案


推荐阅读