# Predictions receiving in Unknown (8)[e,e,e,e,e,e,e,e] format from TensorflowJS Mobilenet

I have trained a mobilenet on diamond images to count diamonds in broswer. I then converted the SavedModel format to TFJS format. I have the following code in my JS file.

async function initialize() {
try{
}catch(e) {
}

classifierElement.style.display = 'block';

}

async function predictOnClick () {

const imageElement = document.getElementById('img');
let tensorImg = tf.browser.fromPixels(imageElement,3).cast('int32').resizeNearestNeighbor([640, 640]);//.expandDims();
const t4d=tensorImg.expandDims(0);
t4d.print()
data = await t4d.data()

prediction = model.executeAsync(t4d).data().then(prediction=> {
console.log("FULL STRUCTURE",prediction)})


I am getting the following in console output

The tensorflow model Non-Javascript version returns the following dict

['detection_multiclass_scores', 'detection_classes', 'detection_boxes', 'raw_detection_boxes', 'detection_scores', 'raw_detection_scores', 'detection_anchor_indices', 'num_detections'])


So how do I obtain the scores and detection boxes data from the TFJS model rather than (8)[e,e,e,e,e,e,e,e] format?

Thanks

• What data is contained in each of the e records? I.e. what do you see when you click open one of the 8 arrows? – Oxbowerce Mar 2 at 11:07
• @Oxbowerce, when I open for example 4 which i studied and came to know that those are the detection_scores, but i am getting the following: dataId: {id: 1320} dtype: "float32" id: 841 isDisposedInternal: false kept: false rankType: "2" scopeId: 783 shape: (2) [1, 1000] size: 1000 strides: [1000] isDisposed: (...) rank: (...) proto: Object – uNIKx Mar 2 at 12:40
• And when is console predictions[4], then it consoles the complete array of the predictions. – uNIKx Mar 2 at 12:42
• So if example 4 holds the detection_scores then each example links back to the list you get back in the non-js version, which is what you want right? Also have a look at this stackoverflow question. – Oxbowerce Mar 2 at 12:47
• Everytime I restart the server, this time its 4, then sometimes its 6 that holds the prediction_scores. How to resolve this ? COCOSSD has something like prediction.scores, predictions.bbox. How to know about MobileNet – uNIKx Mar 2 at 12:51