
常用代码
所思即所得
潜龙勿用 见龙在田 终日乾乾 或跃在渊 飞龙在天 亢龙有悔
展开
-
如何计算自己的图片数据集的均值和方差
import numpy as npimport pickledef load_CIFAR_batch(filename): """ load single batch of cifar """ with open(filename, 'rb') as f: datadict = pickle.load(f,encoding='latin1') ...原创 2019-04-24 20:46:13 · 6994 阅读 · 1 评论 -
detection
import osfrom PIL import Imageimport syssys.path.append('/home/xm/桌面/caohuifinger')from utils import parse_voc_xml,mkdir_if_not_existclass_names = ['finger']os.environ['data_root'] = data_root ...原创 2018-09-06 23:21:03 · 195 阅读 · 0 评论 -
mouse select
#include "opencv2/core/core.hpp" #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <tchar.h>#include <...原创 2018-09-06 18:22:19 · 213 阅读 · 0 评论 -
xml转化成txt
import osimport sysimport xml.etree.ElementTree as ETimport globdef xml_to_txt(indir,outdir): os.chdir(indir) annotations = os.listdir('.') annotations = glob.glob(str(annotations)+'...转载 2018-09-06 17:30:43 · 3244 阅读 · 1 评论 -
使用python将某一类型的图片格式放入某一文件夹内
import osimport shutilpath = '/home/xm/桌面/finger'list = os.listdir(path)for i in range(0,len(list)): files = list[i] if files[-4:] == 'tiff': file_path = '/home/xm/桌面/finger/' + files print...原创 2018-09-04 11:57:44 · 660 阅读 · 0 评论 -
文件内图片全部重命名
参考:https://blog.youkuaiyun.com/zhyh1435589631/article/details/51788350import ospath = r'C:\Users\Administrator\Desktop\pos'filelist = os.listdir(path)total_num = len(filelist)i = 0path_new = r'C:\Us...转载 2018-08-21 14:32:37 · 582 阅读 · 0 评论 -
如何通过鼠标采集图片数据集
合成图片原创 2019-04-24 20:54:21 · 711 阅读 · 0 评论