Python
digta
这个作者很懒,什么都没留下…
展开
-
python截取二进制文件
接到任务,截取dat文件,每个数据784个字节,现要取一定百分比的数据主要涉及了python文件读写,命令行参数使用# -*- coding: utf-8 -*-import sysimport osif __name__ == "__main__": datPath = sys.argv[1] pst = sys.argv[2] k = float(ps原创 2016-08-23 10:53:03 · 3938 阅读 · 0 评论 -
TensorFlow .tfrecords训练文件生成、使用
.tfrecords训练文件的生成#-*- coding:utf-8 -*-import osimport tensorflow as tfimport matplotlib.pyplot as pltimport numpy as npimport cv2def extract_image(filename, resize_height, resize_width):原创 2017-11-06 19:04:03 · 819 阅读 · 0 评论 -
tensorflow中的global_step等概念的理解
tensorflow中的global_step等概念的理解一、 global_step参考stackoverflow答主的回答 global_step refer to the number of batches seen by the graph. Everytime a batch is provided, the weights are updated in the di原创 2017-10-30 10:42:10 · 8590 阅读 · 0 评论 -
python模糊图片过滤
最近在做人脸识别清洗样本的工作,发现经过人脸对齐后存在部分图片十分模糊,所以用opencv滤了一下。原理就是使用了cv2.Laplacian()这个方法,代码如下。图片越模糊,imageVar的值越小,图像越模糊。#-*-coding:utf-8-*-import sysreload(sys)sys.setdefaultencoding('utf-8')import osimport cv原创 2017-11-14 17:21:55 · 4895 阅读 · 1 评论