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

About the dataset of this code #2

Open
ZLZhangLi opened this issue Oct 23, 2017 · 6 comments
Open

About the dataset of this code #2

ZLZhangLi opened this issue Oct 23, 2017 · 6 comments

Comments

@ZLZhangLi
Copy link

I am glad to see your code.Would you mind to give me the dataset about the code,because I'm very interested in your code and I want to run it.Thank you very much.

@chenzeyuczy
Copy link
Owner

chenzeyuczy commented Oct 25, 2017

In my experiment, CASIA WEBFACE is used for training while LFW dataset is used for test. As for the former one, you can apply for it online, while the latter one can be download directly. Sorry for reply so late due to the terrible Internet connection.

@ZLZhangLi
Copy link
Author

Would you mind telling me your email address? I'd like to consult you

@chenzeyuczy
Copy link
Owner

Please feel free to discuss on this issue, since I've switched to a more stable proxy.

@ZLZhangLi
Copy link
Author

It's my pleasure to have your reply. Because I have just begun to study deep learning, I couldn't run it at present. I have generated LFW-lmdb and webfece-lmdb,but I can't generated caffemodel. I don't know these pkl file and how to generate it.
code start
data_file = './test/feature_55_47_' + str(iter_time) + '.pkl'
model_file = './model/deploy.prototxt'
weight_file = './result/deepid2_55_47_iter_' + str(iter_time) + '.caffemodel'
feat, labels = getFeat(model_file, weight_file)
saveData(feat, labels, data_file)

data_file = './test/feature_' + str(iter_time) + '.pkl'
data_file = './test/feature_55_47_' + str(iter_time) + '.pkl'
feature, labels = loadData(data_file)

code end
Could you tell me how to use you code in detail?
Looking forward to your reply.

@chenzeyuczy
Copy link
Owner

Since forward pass of CNN on a large batch of images is quite time-consuming, the pkl files save the feature of test images for the sake of computation acceleration in the subsequent part.
During the testing phase, I'll manage to reuse the feature extracted from CNN and then calculate the best threshold and accuracy on test set.

@ZLZhangLi
Copy link
Author

I am very glad to get you reply.Now I want to ask you another question.
code start.
net = caffe.Net(model_file, caffe.TEST)
net.copy_from(weight_file)

# Read lmdb file.
net_config = caffe.proto.caffe_pb2.NetParameter()
with open(model_file, 'r') as f:
	text_format.Merge(str(f.read()), net_config)
	f.close()
lmdb_file = net_config.layer[1].data_param.source

env = lmdb.open(lmdb_file, readonly=False)  
num_pair = env.stat()['entries'] / 2
env.close()

code end.
I have already generated caffemodel and lfw-55-47-lmdb at delopy.prototxt. I try to run the feat_test.py,but the result display that

num_pair = env.stat()['entries'] / 2
lmdb.Error: Attempt to operate on closed/deleted/dropped object.

but my lfw-55-47-lmdb file is generated by sample_mix_lfw.txt, Would you mind telling me ? Thank you very much.

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

2 participants