Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature dimension #3

Closed
kingloo2014 opened this issue Jul 13, 2015 · 7 comments
Closed

feature dimension #3

kingloo2014 opened this issue Jul 13, 2015 · 7 comments

Comments

@kingloo2014
Copy link

Hi, why the features stored in the matlab matrix is 256 dimensions? but fc1-layer in the network's output number is 512. I cannot understand which layer's output treat as the terminal feature!

@AlfredXiangWu
Copy link
Owner

The "eltwise6" layer is treated as the feature layer for face images. The operations of "slice6" and "eltwise6" layer are similar to the activation function such as ReLU or sigmoid.

@kingloo2014
Copy link
Author

another quesion is that why images in the CASIA database should be resized into 144_144, while the faces in the LFW database should be resized into 128_128. If execute the step like this , the input of network will have different size, is it resonable or necessary?

@AlfredXiangWu
Copy link
Owner

layers {
name: "data"
type:DATA
top: "data"
top: "label"
data_param{
source: "/mnt/wuxiang/User/team01/data/lmdb/CASIA_WebFace_align_3_train_lmdb"
backend: LMDB
batch_size: 64
}
transform_param {
scale: 0.00390625
crop_size: 128
mirror: true
}
include: { phase: TRAIN }
}

As is shown in "transform_param", the crop_size is set to 128, which means the inputs of CNN are cropped from 144x144 to 128x128 randomly for training. This data augmentation trick is widely used in ILSVRC competition. Therefore, the real input of CNN is 128, and the test image should be resized to 128x128.

@kingloo2014
Copy link
Author

hi, I'm so sorry for disturbe you again. I want to know whether the trianing sample is pair of two faces or a single faces!

@kingloo2014
Copy link
Author

hello,I'm sorry to disturb you again. Three problem need to consult you.
1.I want to know how to prepare the training samples. The input layer of the model is the pair of face images or a single face image?
2.And your validated samples are the same source with the training samples?
3.If I resize the aligned face smaller, the test result will be same as your result?
----- 原始邮件 -----
发件人:Alfred Xiang Wu notifications@github.com
收件人:AlfredXiangWu/face_verification_experiment face_verification_experiment@noreply.github.com
抄送人:kingloo2014 kinglord2006@sina.com
主题:Re: [face_verification_experiment] feature dimension (#3)
日期:2015年07月13日 16点32分

layers {

name: "data"

type:DATA

top: "data"

top: "label"

data_param{

  source: "/mnt/wuxiang/User/team01/data/lmdb/CASIA_WebFace_align_3_train_lmdb"

  backend: LMDB

  batch_size: 64

}

transform_param {

scale: 0.00390625

crop_size: 128

mirror: true

}

include: { phase: TRAIN }

}

As is shown in "transform_param", the crop_size is set to 128, which means the inputs of CNN are cropped from 144x144 to 128x128 randomly for training. This data augmentation trick is widely used in ILSVRC competition. Therefore, the real input of CNN is 128, and the test image is resized to 128x128.


Reply to this email directly or view it on GitHub.

@AlfredXiangWu
Copy link
Owner

I am sorry to reply you so long.

  1. For my model, I use single face image for training and don't use verification signal.
  2. The validation set is constructed by selecting 10000 images randomly from WebFace dataset.
  3. The size of images might influence the results due to the different resolution

If any questions, welcome to contact me by sending email to alfredxiangwu@gmail.com.

@naranjuelo
Copy link

Hi,

Taking into account that the feature layer is 'eltwise6', I have problems to get your code working. This layer's shape size is 2, so there are some lines that will crush, for example:

features_shape = (len(image_list), shp[1], shp[2], shp[3]).

Should I remove shp[2] and shp[3] ? I thought this could be the solution but I'm not very sure if the results are correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants