Reputation: 21
I'm training some faster rcnn models with only one class on my own data set. The training goes fine but when I export model for inference and try to used it on android sample app (TF Detect), I'm getting the following exception:
11-28 10:56:27.002 15666 16593 E AndroidRuntime: FATAL EXCEPTION: inference 11-28 10:56:27.002 15666 16593 E AndroidRuntime: Process: org.tensorflow.demo, PID: 15666 11-28 10:56:27.002 15666 16593 E AndroidRuntime: java.nio.BufferOverflowException 11-28 10:56:27.002 15666 16593 E AndroidRuntime: at java.nio.HeapFloatBuffer.put(HeapFloatBuffer.java:179) 11-28 10:56:27.002 15666 16593 E AndroidRuntime: at org.tensorflow.Tensor.writeTo(Tensor.java:488) 11-28 10:56:27.002 15666 16593 E AndroidRuntime: at org.tensorflow.contrib.android.TensorFlowInferenceInterface.fetch(TensorFlowInferenceInterface.java:478) 11-28 10:56:27.002 15666 16593 E AndroidRuntime: at org.tensorflow.contrib.android.TensorFlowInferenceInterface.fetch(TensorFlowInferenceInterface.java:432) 11-28 10:56:27.002 15666 16593 E AndroidRuntime: at org.tensorflow.demo.TensorFlowObjectDetectionAPIModel.recognizeImage(TensorFlowObjectDetectionAPIModel.java:167)
at the following line of code from TensorFlowObjectDetectionAPIModel class:
inferenceInterface.fetch(outputNames[0], outputLocations);
I tried these two models:
faster_rcnn_resnet101_pets faster_rcnn_inception_v2_pets
Do you have any idea about what is causing this exception?
Regards,
Upvotes: 1
Views: 345
Reputation: 11
I am using FasterRcnn, I've solved same issue by changing value of MAX_RESULTS from 100 to 500 in TensorFlowObjectDetectionAPIModel.java (TensorFlow android example app)
Problem is RCNN returns more output than SSD
Sorry, this is my first answer
Upvotes: 1