DeepID with caffe

1,290 views
Skip to first unread message

陈力

unread,
Mar 31, 2015, 11:45:53 PM3/31/15
to caffe...@googlegroups.com
Does anyone have done the deepID face reco with caffe before?

Attached is the convnet structure and my prototxt which I know have a lot of problems.

At first I thought it would not be hard then I find that the Max-pooling layer 3 and the Convolutional layer 4 are both connect to the Deep hidden identity feartures, and at the same time the Max-pooling layer3 is connected to the Convolutional layer 4.

All the examples are single-layer-connection, so I am a little bit confused.

Also the last two layers, the softmax layer is the loss layer of course, but how to represent the DeepID layer, it not the pooling or the convolution....


Any help will be appreciated, thanks
]WH2K`U}9~24@ZG`MOS5486.jpg
DeepID_train.prototxt

glasses cat

unread,
Apr 1, 2015, 4:16:27 AM4/1/15
to caffe...@googlegroups.com

The DeepID layer are both connected with "pool3" and "conv4" layer, so  try to add an bottom item to the  "ip1" layer like this(bottom: "pool3").

Best,
Max

在 2015年4月1日星期三 UTC+8上午11:45:53,陈力写道:

陈力

unread,
Apr 1, 2015, 10:52:03 PM4/1/15
to caffe...@googlegroups.com
so instead of just:
layers {
  name: "ip1"
  type: INNER_PRODUCT
  bottom: "conv4"
  top: "ip1"
  blobs_lr: 1
  blobs_lr: 2
  inner_product_param {
    num_output: 160
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}

now I add another layer like:
layers {
  name: "ip1"
  type: INNER_PRODUCT
  bottom: "pool3"
  top: "ip1"
  blobs_lr: 1
  blobs_lr: 2
  inner_product_param {
    num_output: 160
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}

since both layers are named 'ip1', the net will connect to both of them right?

glasses cat

unread,
Apr 2, 2015, 3:17:32 AM4/2/15
to caffe...@googlegroups.com
Modify your ip1 layer like the following:
 
layers {
  name: "ip1"
  type: INNER_PRODUCT
  bottom: "conv4"
  bottom: "pool3"
  top: "ip1"
  blobs_lr: 1
  blobs_lr: 2
  inner_product_param {
    num_output: 160
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}
 

在 2015年4月2日星期四 UTC+8上午10:52:03,陈力写道:

Jun-ya Norimatsu

unread,
Apr 8, 2015, 11:20:21 PM4/8/15
to caffe...@googlegroups.com
Hi,

How about is this?

layers {
  name: "pool3_flat"
  type: FLATTEN
  bottom: "pool3"
  top: "pool3_flat"
}
layers {
  name: "conv4_flat"
  type: FLATTEN
  bottom: "conv4"
  top: "conv4_flat"
}
layers {
  name: "concat"
  type: CONCAT
  bottom: "pool3_flat"
  bottom: "conv4_flat"
  top: "concat"

}

layers {
  name: "ip1"
  type: INNER_PRODUCT
  bottom: "concat"

  top: "ip1"
  blobs_lr: 1
  blobs_lr: 2
  inner_product_param {
    num_output: 160
    weight_filler {
      type: "xavier"
    }
    bias_filler {
      type: "constant"
    }
  }
}

--
Jun-ya Norimatsu

2015年4月1日水曜日 12時45分53秒 UTC+9 陈力:

deqiu wang

unread,
May 9, 2015, 3:22:52 AM5/9/15
to caffe...@googlegroups.com
你好,请问关于DeepID的文件配置解决了吗,我也比较迷茫那个倒数两层的全连接该怎么配置,特此向您请教,谢谢

在 2015年4月1日星期三 UTC+8上午11:45:53,陈力写道:
Does anyone have done the deepID face reco with caffe before?

StevenL

unread,
May 10, 2015, 1:19:50 AM5/10/15
to caffe...@googlegroups.com
HI ,do you know how to add PR patch? (I supposed you said two local connected layer)?

See below:

Dale Song

unread,
Jun 1, 2016, 3:53:53 AM6/1/16
to Caffe Users
It's ok

在 2015年4月9日星期四 UTC+8上午11:20:21,Jun-ya Norimatsu写道:
Reply all
Reply to author
Forward
0 new messages