摘要: import tensorflow as tfimport osos.environ["CUDA_VISIBLE_DEVICES"] = '0' #指定第一块GPU可用config = tf.ConfigProto()config.gpu_options.per_process_gpu_memory 阅读全文
posted @ 2019-10-14 23:45 tangjunjun 阅读(2772) 评论(0) 推荐(0) 编辑
摘要: 线性soft-nms: 高斯nms: 阅读全文
posted @ 2019-09-30 16:32 tangjunjun 阅读(902) 评论(0) 推荐(1) 编辑
摘要: """nms输入的数据为box的左上角x1,y1与右下角x2,y2+confidence,rows=batch_size,line=[x1,y1,x2,y2,confidence];首先将batch_size按照已给的confidence从大到小排序,将最大confidence的box保存,而后与其它batch_size-1个boxes进行iou,得到新的batch_size-1个iou(conf... 阅读全文
posted @ 2019-09-28 21:18 tangjunjun 阅读(816) 评论(0) 推荐(0) 编辑
摘要: import numpy as nppath_txt_data = 'C:/Users/51102/Desktop/my_yolo/data/box/train.txt'def input_data(path_txt_data): # 读取文件,其中文件格式为2.bmp 69,172,270,330,2 150,141,229,284,2 285,201,327,331,3 258,198,29... 阅读全文
posted @ 2019-09-25 22:42 tangjunjun 阅读(1777) 评论(0) 推荐(0) 编辑
摘要: 添加一个数与添加多维数组的结果,如下: 1.增加多维度 阅读全文
posted @ 2019-09-24 19:58 tangjunjun 阅读(3165) 评论(0) 推荐(0) 编辑
摘要: 正确的做法: 阅读全文
posted @ 2019-09-21 09:44 tangjunjun 阅读(4185) 评论(0) 推荐(1) 编辑
摘要: 有可能你保存了图片的数据,但是没法用cv.imshow将其图片打印出来,其原因可参考博客 阅读全文
posted @ 2019-09-20 16:54 tangjunjun 阅读(4939) 评论(0) 推荐(0) 编辑
摘要: 总结:二者用法一致。a=np.array([[[[10,8,3,9],[5,6,7,8]]],[[[1,2,3,4],[5,6,7,8]]],[[[1,2,3,4],[5,6,7,8]]]] )print('a=',a)print('a.shape=',a.shape)c=np.minimum(a[...,:2], a[...,2:]) # 说明在对应位置找最小值print('c=',c)pri... 阅读全文
posted @ 2019-09-19 19:51 tangjunjun 阅读(2639) 评论(0) 推荐(0) 编辑
摘要: class A(): def __init__(self,b): self.b=b # def __iter__(self): # 这个函数可以用,表示迭代标志,但也可以省略 # return self def __next__(self): if self.b<10: self.b=self.b+2 else: raise StopIteration self.d=self.b+10 retur 阅读全文
posted @ 2019-09-19 00:03 tangjunjun 阅读(5637) 评论(0) 推荐(0) 编辑
摘要: import numpy as npimport tensorflow as tfsess=tf.Session()a=np.zeros((1,2,3,4))b=np.ones((1,2,3,4))c1 = tf.concat([a, b], axis=-1) # 倒数第一维度增加,其它不变d1=sess.run(c1)print('d1=',d1)print('d1.shape=',d1.sha 阅读全文
posted @ 2019-09-18 23:12 tangjunjun 阅读(2758) 评论(0) 推荐(0) 编辑
https://rpc.cnblogs.com/metaweblog/tangjunjun