当前位置: 首页 > news >正文

猪八戒里面做网站骗子很多免费行情软件app合集

猪八戒里面做网站骗子很多,免费行情软件app合集,域名注册商平台,百度新闻源网站一、NMS是什么#xff1f; NMS#xff08;non maximum suppression#xff09;即非极大值抑制#xff0c;广泛应用于传统的特征提取和深度学习的目标检测算法中。 NMS原理是通过筛选出局部极大值得到最优解。 在2维边缘提取中体现在提取边缘轮廓后将一些梯度方向变化率较小…一、NMS是什么 NMSnon maximum suppression即非极大值抑制广泛应用于传统的特征提取和深度学习的目标检测算法中。 NMS原理是通过筛选出局部极大值得到最优解。 在2维边缘提取中体现在提取边缘轮廓后将一些梯度方向变化率较小的点筛选掉避免造成干扰。 在三维关键点检测中也起到重要作用筛选掉特征中非局部极值。 在目标检测方面如Yolo和RCNN等模型中均有使用可以将较小分数的输出框过滤掉,同样在三维基于点云的目标检测模型中亦有使用。 二、示例 1.opencv示例 查看opencv源码可以知道canny算子中使用了nms即对sobel等梯度计算方法生成的梯度矩阵中的点求取局部极大值。 其计算方法是比较中心点与其邻域的梯度值如果为最大值则保留不是的话为0。 源码可见 Canny算法解析opencv源码实现及实例 //读取图片Mat img imread(true.jpg);Mat Grayimg;resize(img, img, Size(400, 600), 0, 0, INTER_LINEAR);cvtColor(img, Grayimg, COLOR_RGB2GRAY); //转为灰度图Canny(Grayimg, Grayimg, 100, 300, 3);imshow(picture0, img);imshow(picture, Grayimg);waitKey(0);return 0;2.PCL示例 点云关键点特征提取算法经常会使用nms提取极大值点。 如3D SIFT关键点检测中需要计算尺度空间中像素点的26邻域的极值点。 算法原理参考 PCL 3D-SIFT关键点检测(Z方向梯度约束) pcl::SIFTKeypointpcl::PointXYZ, pcl::PointWithScale sift; pcl::PointCloudpcl::PointWithScale result; sift.setInputCloud(cloud_xyz); pcl::search::KdTreepcl::PointXYZ::Ptr tree(new pcl::search::KdTreepcl::PointXYZ()); sift.setSearchMethod(tree); sift.setScales(0.01f, 7, 20); sift.setMinimumContrast(0.001f); sift.compute(result); 3.目标检测中nms示例 nms在深度学习领域常用于对box的得分进行极大值筛选在rcnnyolo, pointnet等模型中广泛使用。 其算法流程大致为 1计算所有box的得分。 2排序依次与得分高的box的IOU进行对比如果大于设定的阈值就删除该框。 在yolo源代码detect.py可见 pred non_max_suppression(pred, conf_thres, iou_thres, classes, agnostic_nms, max_detmax_det) conf_thres:置信度即得分score的阈值yolo为0.25。 iou_thres重叠度阈值为0.45 classes类别数可以设置保留哪一类的box agnostic_nms:是否去除不同类别之间的框,默认false max_det:一张图片中最大识别种类的个数默认300def non_max_suppression(prediction, conf_thres0.25, iou_thres0.45, classesNone, agnosticFalse, multi_labelFalse,labels(), max_det300):Runs Non-Maximum Suppression (NMS) on inference resultsReturns:list of detections, on (n,6) tensor per image [xyxy, conf, cls]nc prediction.shape[2] - 5 # number of classesxc prediction[..., 4] conf_thres # candidates# Checksassert 0 conf_thres 1, fInvalid Confidence threshold {conf_thres}, valid values are between 0.0 and 1.0assert 0 iou_thres 1, fInvalid IoU {iou_thres}, valid values are between 0.0 and 1.0# Settingsmin_wh, max_wh 2, 4096 # (pixels) minimum and maximum box width and heightmax_nms 30000 # maximum number of boxes into torchvision.ops.nms()time_limit 10.0 # seconds to quit afterredundant True # require redundant detectionsmulti_label nc 1 # multiple labels per box (adds 0.5ms/img)merge False # use merge-NMSt time.time()output [torch.zeros((0, 6), deviceprediction.device)] * prediction.shape[0]for xi, x in enumerate(prediction): # image index, image inference# Apply constraints# x[((x[..., 2:4] min_wh) | (x[..., 2:4] max_wh)).any(1), 4] 0 # width-heightx x[xc[xi]] # confidence# Cat apriori labels if autolabellingif labels and len(labels[xi]):l labels[xi]v torch.zeros((len(l), nc 5), devicex.device)v[:, :4] l[:, 1:5] # boxv[:, 4] 1.0 # confv[range(len(l)), l[:, 0].long() 5] 1.0 # clsx torch.cat((x, v), 0)# If none remain process next imageif not x.shape[0]:continue# Compute confx[:, 5:] * x[:, 4:5] # conf obj_conf * cls_conf# Box (center x, center y, width, height) to (x1, y1, x2, y2)box xywh2xyxy(x[:, :4])# Detections matrix nx6 (xyxy, conf, cls)if multi_label:i, j (x[:, 5:] conf_thres).nonzero(as_tupleFalse).Tx torch.cat((box[i], x[i, j 5, None], j[:, None].float()), 1)else: # best class onlyconf, j x[:, 5:].max(1, keepdimTrue)x torch.cat((box, conf, j.float()), 1)[conf.view(-1) conf_thres]# Filter by classif classes is not None:x x[(x[:, 5:6] torch.tensor(classes, devicex.device)).any(1)]# Apply finite constraint# if not torch.isfinite(x).all():# x x[torch.isfinite(x).all(1)]# Check shapen x.shape[0] # number of boxesif not n: # no boxescontinueelif n max_nms: # excess boxesx x[x[:, 4].argsort(descendingTrue)[:max_nms]] # sort by confidence# Batched NMSc x[:, 5:6] * (0 if agnostic else max_wh) # classesboxes, scores x[:, :4] c, x[:, 4] # boxes (offset by class), scoresi torchvision.ops.nms(boxes, scores, iou_thres) # NMSif i.shape[0] max_det: # limit detectionsi i[:max_det]if merge and (1 n 3E3): # Merge NMS (boxes merged using weighted mean)# update boxes as boxes(i,4) weights(i,n) * boxes(n,4)iou box_iou(boxes[i], boxes) iou_thres # iou matrixweights iou * scores[None] # box weightsx[i, :4] torch.mm(weights, x[:, :4]).float() / weights.sum(1, keepdimTrue) # merged boxesif redundant:i i[iou.sum(1) 1] # require redundancyoutput[xi] x[i]if (time.time() - t) time_limit:print(fWARNING: NMS time limit {time_limit}s exceeded)break # time limit exceededreturn output
http://wiki.neutronadmin.com/news/182326/

相关文章:

  • 南宁网站制作费用深圳网络推广服务是什么
  • 三门峡建设环境局网站什么网站可以做调察问卷
  • wordpress建外贸网站北京个人网站备案
  • 福建亨立建设集团有限公司网站怎么开发一个微信商城
  • 定制化网站一般价格绍兴seo推广公司
  • 沭阳网站设计中国石油大学网页设计与网站建设
  • 泊头市网站建设网站的功能
  • 廉江手机网站建设公司济南万速网站建设
  • 服务号不认证可做微网站吗深圳网站建设icxun
  • 网站建设的因素网站的优点和缺点
  • 天河区门户网站教育局板块郑州同济医院收费高吗
  • 网站建设个人工作总结福田欧曼行星
  • 那些网站可以做宣传wordpress退出代码
  • 企业网站建设太原网站建设儿童网站模板
  • 无锡企业自助建站系统多语言网站怎么实现
  • allintitle:湛江网站建设 seowordpress分类自定义文字
  • 个人注册一个小公司要多少钱张家港网站建设优化
  • 大庆做流产油城女子网站企业网站系统
  • 八亿wap建站网站优化seo培
  • 做视频网站 投入购物网站功能报价
  • 广西住房与建设厅网站首页跨境电商saas
  • 淮南市网站开发的方式电商平台项目商业计划书
  • 凡科免费建站wordpress注册
  • 网站查询关键词排名软件无锡 网站建设
  • 镇江企业网站湖南做网站 地址磐石网络
  • wordpress ip 改变重庆网站seo方法
  • 深圳网络营销十年乐云seo专家长沙百度首页优化
  • 新乡市建设路小学网站网站建设现状 数据
  • 成都打鱼网站建设短网址生成器是什么意思
  • 网站建设及维修合同范本网站推广公司黄页