jinze1994 / deepid1 Goto Github PK
View Code? Open in Web Editor NEWImplementation of DeepID1 using tensorflow.
Implementation of DeepID1 using tensorflow.
余弦值越接近1,两向量夹角越小,那么predict.py 中最后一行:
print(np.mean((pre_y < (true_mean + false_mean)/2) == testY.astype(bool)))
小于号是否应该改成大于号呢?
答主您好,您的代码使用的数据是一个人有几十甚至上百张图像,而原文是讲一个人的图片处理成120张,60对图片送入网络训练,最后得到的特征向量也是120*160大小的,需要有一个降维的操作,并且没有使用余弦相似度的计算方式。
我的问题是:
1 原文的处理图片的方式是否在面对每个人有大量图片的数据集时是不必要的
2 使用余弦相似度和原文的联合贝叶斯得到的结果相差会太大吗
3 最后阈值选择的合理性在哪,我通过验证集迭代一个阈值列表来得到真正例率/假正例率最高的阈值,效果为什么比较差
麻烦答主解答我的一点疑惑,感谢!
你好,我下载不了数据集
您好,很感谢您的代码。我有一个问题想请教,由于我的机器运行vec.py代码时候内存不够大,因此导致了无法将所有的训练数据保存到dataset.pkl中,因此我适当的减小了训练数据集后将vec.py运行通过。之后直接利用30000.ckpt进行预测,可是在saver.restore(sess, '/home/weihua/git/tensorflow/faceID/DeepID1-master/checkpoint/30000.ckpt')这一步总是报错,请问是不是因为恢复的深度模型中的数据必须是与完整的数据集匹配对应上才能进行预测呢?
其中的一部分可能有关的报错为:
InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [1273] rhs shape= [1283] [[Node: save/Assign_11 = Assign[T=DT_FLOAT, _class=["loc:@loss/nn_layer/biases/Variable"], use_locking=true, validate_shape=true,......
非常感谢
deepid1.py 中
def accuracy(y_estimate, y_real):
with tf.name_scope('accuracy'):
with tf.name_scope('correct_prediction'):
correct_prediction = tf.equal(tf.argmax(y,1), tf.argmax(y_,1))
with tf.name_scope('accuracy'):
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
tf.scalar_summary('accuracy', accuracy)
return accuracy
形参y_estimate, y_real 好像在函数体中没有出现
使用我自己的数据集时,图片经过crop之后,很多张图脸都没了...
导致最后效果很差,请问如何解决呢?
谢谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.