您的位置:首页 > 编程语言 > Python开发

python人脸识别学习笔记 tensorflow dlib opencv

2019-03-17 12:08 1326 查看

dlib人脸检测API解析: dlib.get_frontal_face_detector() :https://www.geek-share.com/detail/2722785201.html

PyCharm整体缩进也是Tab键

图像边缘填充API:cv2.copyMakeBorder() : https://blog.csdn.net/weixin_35732969/article/details/83714492

sklearn中train_test_split,训练测试集分割: https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html

参数:test_size : float, int or None, optional (default=0.25)

If float, should be between 0.0 and 1.0 and represent the proportion of the dataset to include in the test split. If int, represents the absolute number of test samples. If None, the value is set to the complement of the train size. By default, the value is set to 0.25. The default will change in version 0.21. It will remain 0.25 only if 

train_size
 is unspecified, otherwise it will complement the specified 
train_size
. 0-1之间是训练集的比例,整数为训练集个数

参数:random_state : int, RandomState instance or None, optional (default=None)

If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random. 如果是int类型的就是随机数种子。

随机种子(Random Seed)是计算机专业术语,一种以随机数作为对象的以真随机数(种子)为初始条件的随机数。一般计算机的随机数都是伪随机数,以一个真随机数(种子)作为初始条件,然后用一定的算法不停迭代产生随机数。https://baike.baidu.com/item/%E9%9A%8F%E6%9C%BA%E7%A7%8D%E5%AD%90/9844665?fr=aladdin

shape与reshape: https://www.geek-share.com/detail/2717314548.html

astype() : 更改数据类型

saver,restore: https://www.jianshu.com/p/b0c789757df6

tf.argmax() : 返回最大元素索引号 https://www.geek-share.com/detail/2705864768.html & https://www.cnblogs.com/logo-88/p/9295858.html

PyCharm整体对代码缩进 Shift+Tab

saver使用 : https://tensorflow.google.cn/guide/saved_model

tensorboard使用: activate tensorflow ->进入目录 ->tensorboard --logdir=log, 浏览器进入localhost:6006(用cmd弹出的网址可能因为某种不明网络状况而进不去,当然断网也能进,但是太麻烦了)

创建文件夹:https://www.geek-share.com/detail/2700824120.html

tensorboard训练结果

 

报错:ValueError: Cannot evaluate tensor using `eval()`

https://blog.csdn.net/spadgerz/article/details/79641848

 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: