摘要: import numpy as np ''' 目标检测中常用到NMS,在faster R-CNN中,每一个bounding box都有一个打分,NMS实现逻辑是: 1,按打分最高到最低将BBox排序 ,例如:A B C D E F 2,A的分数最高,保留。从B-E与A分别求重叠率IoU,假设B、D与A的IoU大于阈值,那么B和D可以认为是重复标记去除 3,余下C E F,重复前面两步。 ''' d 阅读全文
posted @ 2019-08-22 09:08 青牛梦旅行 阅读(2838) 评论(0) 推荐(0)
摘要: def compute_iou(rec1, rec2): """ computing IoU :param rec1: (y0, x0, y1, x1), which reflects (top, left, bottom, right) :param rec2: (y0, x0, y1, x1) :return: scala value of IoU """ # computing area o 阅读全文
posted @ 2019-08-22 09:07 青牛梦旅行 阅读(4369) 评论(0) 推荐(0)
摘要: import sys h, w = input().strip().split() h = int(h) w = int(w) img = [] for i in range(h): line = sys.stdin.readline().strip() line = list(map(int, line.split(' '))) img.append(line) kernel = [] m = 阅读全文
posted @ 2019-08-22 09:05 青牛梦旅行 阅读(1052) 评论(0) 推荐(0)
摘要: # 给一个字符串,按如下规则把它翻译成字符串:1翻译成a,2翻译成b,...25翻译成z;一个数可以有多种翻译方式,比如122可以翻译成abb和kb还可以翻译成aw即3种翻译方式。计算一个数字有几种翻译方式class Solution(object): def numDecodings(self, s): """ :type s: str :rtype: int """ s = str(s) di 阅读全文
posted @ 2019-08-22 09:03 青牛梦旅行 阅读(263) 评论(0) 推荐(0)