I am trying to use tensorflow.js to predict output from pre-trained object detection model, but I am getting error in model.predict(inputImage) which is
Uncaught (in promise) Error: Input tensor count mismatch,the graph model has 425 placeholders, while there are 1 input tensors.
I am using
- tensorflowjs version - 1.0.1
- tensorflow - 2.0.0-dev20190404
Html "https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]"
I am using SSD_Mobilenet_V2 model and downloaded it from 'http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_coco_2018_03_29.tar.gz'
I used this command to convert tf model into web format
tensorflowjs_converter --input_format tf_saved_model ./saved_model ./tfjs_saved_modelSSDMobilenetV2
Getting error in this line of javascript code:
const boxes = await model.predict(processedImage);
The processedImage is tf.tensor3d of shape (300,300,3).