Incubator-mxnet: How to construct a special CNN used in the area of person re-identification?

Created on 18 May 2016  路  4Comments  路  Source: apache/incubator-mxnet

I'm trying to construct a CNN using MXNet, but the structure is a little strange like the picture below:
image
There are two input pictures and each goes through two convolution layers and two pooling layers. Then the two flow will be combined into one and the computation process following the paper:
image
image
I looked through the document and cannot find a solution.
My problems are mainly two respects:
a. do I need to write the operators by myself? and how?
b. if so, what is the best way to construct the data as the input?. Cause the picture in the dataset I use only has a label telling which person it belongs to, but the CNN I hope to construct should give an output that indicates whether two input pictures belongs to the same person.

Most helpful comment

Hi,
a) I'm quite sure the answer is yes, you need to write the operator by yourself. Here you can find how to write a new layer.
b)Seems like your problem is the dataset. In the same paper there are some references to Re-ID Databases, like CUHK03, CUHK01, VIPeR

Hope it helps.
Cheers!

All 4 comments

Hi,
a) I'm quite sure the answer is yes, you need to write the operator by yourself. Here you can find how to write a new layer.
b)Seems like your problem is the dataset. In the same paper there are some references to Re-ID Databases, like CUHK03, CUHK01, VIPeR

Hope it helps.
Cheers!

a) You can try to use mx. symbol.Concat mx.symbol.maximum + - * / and other symbol, to implement "cross-input neighborhood difference". If it is impossible, you have to write the operator.

b) You can combine the pair of two image to one 120x160 image. If the two image is same person set the train label to 1, else set train label to 0. Then use mx.symbol.SliceChannel to slice 120x160 image to two 60x160 data, at the begin of the network.

Thank you guys!!! I will try to make the operator by myself and construct the dataset used for this issue. Sorry for the late reaction because of the tough busy time recently. I really appreciate your answers!

Hi, I'm trying to implement the same layer in caffe, I made a similar layer but it seems doesn't work.
Did you implement it?

Was this page helpful?
0 / 5 - 0 ratings