This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2: Caffe SSD model output does not match TIDL output

Part Number: TDA2

Hi,

I'm running our own ssd model(not caffe-jacinto based) using the eve host emulation.The input resolution of the image is 480x270. The SSD network contains four heads. I have set  keep_top_k as 5 to output only five boxes.

My detection layer is as follows:

layer {
name: "detection_out"
type: "DetectionOutput"
bottom: "mbox_loc"
bottom: "mbox_conf_flatten"
bottom: "mbox_priorbox"
top: "detection_out"
include {
phase: TEST
}
detection_output_param {
num_classes: 2
share_location: true
background_label_id: 0
nms_param {
nms_threshold: 0.45
top_k: 100
}
code_type: CENTER_SIZE
keep_top_k: 5
confidence_threshold: 0.1
}
}

This is the python script being used to read and print the SSD output from Bin file:

import numpy as np
bbox = np.fromfile("trace_dump_54_140x1.y", dtype=np.float32)
reshapedbox = np.reshape(bbox,[5,7])
print reshapedbox

When I run the script, the output is as follows:

[[0. 1. 0.9999695 0.49767017 0.86217594 0.50364757 1.0235895 ]
[1.  1. 0.9999695 0.4310913   0.8820838   0.4368931   1.0036817 ]
[2.  1. 0.9999695 0.36486337 0.8434374   0.36978766  0.9579961 ]
[3.  1. 0.9999695 0.2893248   0.8660821   0.29530218  0.98064077]
[4.  1. 0.9999695 0.24571767 0.8706877   0.25169504  0.9869671 ]]

The caffe output I got from the model is:

[[[[0.         1.         0.9980788  0.8675699  0.4135536  0.921327 0.5036046 ]
   [0.         1.         0.9775522  0.7183735  0.4759325  0.754390 0.5347565]]]]

Both in tidl and caffe the last four index corresponds to the coordinates xmin, ymin, xmax and ymax. As you could see the outputs are too different. Is it expected when models are not trained using caffe-jacinto?

I verified the caffe output by plotting the bounding box over the image and it's correct.

Thanks in advance,

Navinprashath.R.R

  • We have validated the models trained using caffe-jacinto only. The detection layer is implemented as per the definition of caffe-jacinto layer
    Use caffe-jacinto and eaxmple models in caffe-jacito-models folder to used SSD feature of TIDL