摘要: # 图像平移image1='C:\\Users\\10107472\\Desktop\\myfile\\tensorflow-yolov\\read.jpg'img = cv.imread(image1,0)rows,cols = img.shapeprint('image_original=',img.shape)M = np.float32([[1,0,100],[0,1,50]]) #... 阅读全文
posted @ 2019-09-05 17:58 tangjunjun 阅读(3730) 评论(0) 推荐(0)
摘要: y = tf.tile(tf.range(2, dtype=tf.int32)[:, tf.newaxis], [2,3]) # tf.tile(input,[a,b]) 输入数据,按照对应维度将矩阵重复a次和b次y1=tf.range(2, dtype=tf.int32)y2=tf.range(2, dtype=tf.int32)[:, tf.newaxis] # 将一维度矩阵增加一维度,列为1 阅读全文
posted @ 2019-08-29 17:44 tangjunjun 阅读(1445) 评论(0) 推荐(0)
摘要: NMS代码说明(来自Fast-RCNN) 个人觉得NMS包含很多框,其坐标为(x1,y1,x2,y2),每个框对应了一个score,我们将按照score得分降序,并将第一个最高的score的框(我们叫做标准框)作为标准框与其它框对比,即计算出其它框与标准框的IOU值,然后设定阈值,与保留框的最大数量 阅读全文
posted @ 2019-08-21 11:09 tangjunjun 阅读(3259) 评论(2) 推荐(1)
摘要: a=[1,2,5,9,7,3]a=np.array(a)order = a.argsort() # 从小到大排序,并返回索引值print('order=',order)order1= a.argsort()[::-1] # 从大到小排序,并返回索引值 print('order1=',order1) 阅读全文
posted @ 2019-08-21 08:43 tangjunjun 阅读(988) 评论(0) 推荐(0)
摘要: import osdir_list = os.listdir('C:\\Users\\10107472\\Desktop\\practice\\JPEGImages')i=0f1=open('C:\\Users\\10107472\\Desktop\\practice\\train1.txt','r 阅读全文
posted @ 2019-08-08 15:04 tangjunjun 阅读(481) 评论(0) 推荐(0)
摘要: a=np.array([1,2,3,4])a=a[np.newaxis,:] #固定行,相当于1行多列b=np.array([2,4,6]) b=b[:,np.newaxis] #固定列,相当与多行1列print(a)print(b)c=a/b #将会产生三行四列print(c) 阅读全文
posted @ 2019-08-06 11:51 tangjunjun 阅读(277) 评论(0) 推荐(0)
摘要: import osdef list_dir(file_dir): f=open('C:\\Users\\10107472\\Desktop\ok.txt','w') #打开文件 ''' 通过 listdir 得到的是仅当前路径下的文件名,不包括子目录中的文件,如果需要得到所有文件需要递归 ''' # 阅读全文
posted @ 2019-08-02 17:05 tangjunjun 阅读(294) 评论(0) 推荐(0)
摘要: import numpy as npa=np.array([[11,12,13,14,15,16,17,18],[21,22,23,24,25,26,27,28],[31,32,33,34,35,36,37,38],[41,42,43,44,45,46,47,48]])print(a)b=a[:,::-1] #表示从最后一列开始,每隔1列就取,相当于倒叙print(b) b1=a[:,::-... 阅读全文
posted @ 2019-08-02 09:28 tangjunjun 阅读(688) 评论(0) 推荐(0)
摘要: class Fab(object): def __init__(self ,max ): self.max =max self.n =0 self.a=0 self.b =1 def __iter__(self): #迭代器,表示为容器,相当于声明 return self def __next__( 阅读全文
posted @ 2019-07-30 13:26 tangjunjun 阅读(457) 评论(0) 推荐(0)
摘要: m21文件代码 m22文件代码 阅读全文
posted @ 2019-07-28 22:22 tangjunjun 阅读(1574) 评论(0) 推荐(0)
https://rpc.cnblogs.com/metaweblog/tangjunjun