java - Android TensorFlow - E/Surface:queueBuffer:错误队列缓冲区到 SurfaceTexture,-32
问题描述
也许错误就像墙纸崩溃时出现错误 - queueBuffer: error queuing buffer to SurfaceTexture
但是当我尝试在 tensorflow 过程中匹配缓冲区时出现此错误
private static final int TF_OD_API_INPUT_SIZE = 448;
使用我自己的 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 ://github.com/tensorflow/tensorflow/issues/24190,https : //github.com/amitshekhariitbhu/Android-TensorFlow-Lite-Example/issues/6
解决方案
推荐阅读
- python - 如何将批处理数据集转换为 numpy
- linux - 如何为 linux 编译 droidcam 32 位
- wix - 使用从 RegistrySearch 设置的自定义操作属性为补丁 (.msp) 设置 INSTALLDIR
- vba - Powershell Wscript.Shell 弹出窗口超时不超时
- database-backups - 使用 codeigniter 4 进行数据库备份
- python - Python:如何计算入口点和点之间的运行差异?
- python - 数据框熊猫错误:在 groupby.rank 中没有要聚合的数字类型
- c - 运行并发子进程
- vscode-settings - 我的 keybindings.json 对 VSCode 没有影响
- swift - 快速按给定时间将日期排序为最接近的日期