frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How can I get the output of each layer?

Now, I am trying to run the python version mtcnn(https://github.com/DuinoDu/mtcnn) which I am going to use it for face detection on NCS, I successfully compiled the graph file. From the demo on the github, it needs the output of different layer, like the conv4-2, conv6-2, conv6-3 and prob1 .etc, how can I get the result of each layer. I try to compile it without the -in and -on option, but the output of the graph result are the same, is there any examples running the mtcnn?

Comments

  • 3 Comments sorted by Votes Date Added
  • @fengping I assume that you are using one of the caffe models listed in the GitHub link you provided. To get the output of a layer, you can generate a graph file specifying the output node that you desire.

    Using one of the prototxt files in the GitHub link as an example:

    name: "PNet"
    input: "data"
    input_dim: 1
    input_dim: 3
    input_dim: 12
    input_dim: 12

    layer {
    name: "conv1"
    type: "Convolution"
    bottom: "data"
    top: "conv1"
    param {
    lr_mult: 1
    decay_mult: 1
    }
    param {
    lr_mult: 2
    decay_mult: 0
    }
    ....

    You can use this command to generate a graph file that outputs at the layer "conv1": mvNCCompile -w det1.caffemodel det1.prototxt -on conv1 -s 12
    More information on the mvNCCompile tool can be found at: https://movidius.github.io/ncsdk/tools/compile.html.

  • @Tome_at_Intel
    yes, if I want to get the result of each layer, I shall compile it to generate different graphs, and load it one by one to get the result of each layer, right?

  • @Tome_at_Intel
    I tried the way you mentioned, but the out of graph.GetResult() is quite different result with PNet.forward(). So, I can't match the result to the demo in mtcnn.

Sign In or Register to comment.