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

购物网站运营竞价推广遇到恶意点击怎么办

购物网站运营,竞价推广遇到恶意点击怎么办,如何做钓鱼网站,企业官网图片1. LetterBox增强 当输入图片的尺寸和模型实际接收的尺寸可能不一致时,通常需要使用LetterBox增强技术。具体步骤是先将图片按比例缩放,将较长的边缩放到设定的尺寸以后,再将较短的边进行填充,最终短边的长度为stride的倍数即可。…

1. LetterBox增强

当输入图片的尺寸和模型实际接收的尺寸可能不一致时,通常需要使用LetterBox增强技术。具体步骤是先将图片按比例缩放,将较长的边缩放到设定的尺寸以后,再将较短的边进行填充,最终短边的长度为stride的倍数即可。这种方法可以保留原始图像的纵横比,同时还可以使图像更加适合目标检测算法的输入。
在YOLOv8代码中,ultralytics/data/augment.pyclass LetterBox类别实现了该功能。

import cv2
import numpy as npclass LetterBox:"""Resize image and padding for detection, instance segmentation, pose."""def __init__(self, new_shape=(640, 640), auto=False, scaleFill=False, scaleup=True, center=True, stride=32):"""Initialize LetterBox object with specific parameters."""self.new_shape = new_shapeself.auto = autoself.scaleFill = scaleFillself.scaleup = scaleupself.stride = strideself.center = center  # Put the image in the middle or top-leftdef __call__(self, labels=None, image=None):"""Return updated labels and image with added border."""if labels is None:labels = {}img = labels.get("img") if image is None else imageshape = img.shape[:2]  # current shape [height, width]new_shape = labels.pop("rect_shape", self.new_shape)if isinstance(new_shape, int):new_shape = (new_shape, new_shape)# Scale ratio (new / old)r = min(new_shape[0] / shape[0], new_shape[1] / shape[1])if not self.scaleup:  # only scale down, do not scale up (for better val mAP)r = min(r, 1.0)# Compute paddingratio = r, r  # width, height ratiosnew_unpad = int(round(shape[1] * r)), int(round(shape[0] * r))dw, dh = new_shape[1] - new_unpad[0], new_shape[0] - new_unpad[1]  # wh paddingif self.auto:  # minimum rectangledw, dh = np.mod(dw, self.stride), np.mod(dh, self.stride)  # wh paddingelif self.scaleFill:  # stretchdw, dh = 0.0, 0.0new_unpad = (new_shape[1], new_shape[0])ratio = new_shape[1] / shape[1], new_shape[0] / shape[0]  # width, height ratiosif self.center:dw /= 2  # divide padding into 2 sidesdh /= 2if shape[::-1] != new_unpad:  # resizeimg = cv2.resize(img, new_unpad, interpolation=cv2.INTER_LINEAR)top, bottom = int(round(dh - 0.1)) if self.center else 0, int(round(dh + 0.1))left, right = int(round(dw - 0.1)) if self.center else 0, int(round(dw + 0.1))img = cv2.copyMakeBorder(img, top, bottom, left, right, cv2.BORDER_CONSTANT, value=(114, 114, 114))  # add borderif labels.get("ratio_pad"):labels["ratio_pad"] = (labels["ratio_pad"], (left, top))  # for evaluationif len(labels):labels = self._update_labels(labels, ratio, dw, dh)labels["img"] = imglabels["resized_shape"] = new_shapereturn labelselse:return imgnew_shape=(640, 640)
aug = LetterBox(new_shape,center=True)labels=None
img = cv2.imread("./2.png",-1)lettered_img = aug(labels,img)cv2.imshow('v8 letter_box',lettered_img)
cv2.waitKey(0)

center=True
在这里插入图片描述

center=False
在这里插入图片描述

2 Mosaic增强

3 Mixup增强

http://www.hkea.cn/news/655998/

相关文章:

  • 系统做网站的地方百度推广登录后台登录入口
  • 集约化网站建设情况广告公司网站制作
  • 网站制作发票字节跳动广告代理商加盟
  • 义乌做网站武汉seo推广优化公司
  • 济宁哪家网站建设公司正规谷歌浏览器 免费下载
  • 有没有女的做任务的网站广东省新闻
  • seo长尾关键词优化如何做网站推广优化
  • 网站搭建服务合同seo排名赚
  • 东莞有什么比较好的网站公司苏州关键词排名系统
  • 做中国供应商免费网站有作用吗浙江网站推广运营
  • mysql8 wordpress百度推广优化是什么意思
  • 做装修广告网站好seo推广公司招商
  • 城市模拟建设游戏网站今天最新的新闻头条新闻
  • 手机网站自适应代码品牌网络营销策划方案
  • 个人网站建设在哪里百度资源搜索平台
  • 云空间免费空间北京网站优化校学费
  • 个人网站做导航网站项目推广平台有哪些
  • 威海住房建设局网站培训学校资质办理条件
  • 做趣味图形的网站免费线上培训平台
  • 女生做网站前端设计师成都网站seo
  • 濮阳建设银行官方网站搜索引擎优化的对比
  • 完全删除wordpressseo小白入门
  • 做网站常用到的css标签什么软件可以找客户资源
  • 有做销售产品的网站有哪些新闻头条今日新闻
  • 深圳自己做网站 服务器优化的近义词
  • 网站开发职业工资网站推广上首页
  • 宝安附近公司做网站建设多少钱深圳百度开户
  • 成都紧急通知seo网络营销招聘
  • 思坎普网站建设如何做营销推广
  • 太原网站优化公司有域名和服务器怎么建网站