Hi,everyone
I invoke ssd-mobilenet model in my own android project,the model has been convert to dlc by the following script:
SNPE.NeuralNetworkBuilder builder = null; try { File modelDir = mApplication.getApplicationContext().getExternalFilesDir("models"); File file = new File(modelDir, modelName); builder = new SNPE.NeuralNetworkBuilder(mApplication) .setDebugEnabled(false) .setRuntimeOrder(NeuralNetwork.Runtime.DSP) .setModel(file) .setCpuFallbackEnabled(true) .setUseUserSuppliedBuffers(true); } catch (IllegalStateException e) { Log.e("SNPE", e.getMessage(), e); } catch (IOException e) { e.printStackTrace(); } NeuralNetwork mNeuralNetwork = builder.build(); final String inputLayer = mNeuralNetwork.getInputTensorsNames().iterator().next();
final FloatTensor tensor = mNeuralNetwork.createFloatTensor( mNeuralNetwork.getInputTensorsShapes().get(inputLayer)); float[] input = loadRgbBitmapAsFloat(bitmap); final Map<String, FloatTensor> inputs = new HashMap<>(); tensor.write(input, 0, input.length); inputs.put(inputLayer, tensor); mNeuralNetwork.execute(inputs);
It really works.However,I found that the result after execute has only one node:detection_classes:0,no detection_boxes and detection_scores.
I wonder why and how should I get the correct result? Thanks