chenzeyuczy / DeepID2

Implementation of DeepID2
MIT License
18 stars 8 forks source link

About the dataset of this code #2

Open ZLZhangLi opened 7 years ago

ZLZhangLi commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

chenzeyuczy commented 7 years ago

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

ZLZhangLi commented 7 years ago

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_5547' + str(iter_time) + '.pkl' model_file = './model/deploy.prototxt' weight_file = './result/deepid2_55_47iter' + 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 commented 7 years ago

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 commented 7 years ago

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.