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

wordpress 大于2m的xm在线看seo网站

wordpress 大于2m的xm,在线看seo网站,任县企业做网站,wordpress4.7.4+for+sae语义分割的标签(目标处为255,其余处为0) 实例分割的标签(yolo.txt),描述边界的多边形顶点的归一化位置 绘制在原图类似蓝色的边框所示。 废话不多说,直接贴代码; import os import cv2 imp…

语义分割的标签(目标处为255,其余处为0)
在这里插入图片描述
实例分割的标签(yolo.txt),描述边界的多边形顶点的归一化位置
在这里插入图片描述
绘制在原图类似蓝色的边框所示。
在这里插入图片描述

废话不多说,直接贴代码;

import os
import cv2
import numpy as np
import shutildef img2label(imgPath, labelPath, imgbjPath, seletName):# 检查labelPath文件夹是否存在if not os.path.exists(labelPath):os.makedirs(labelPath)if not os.path.exists(imgbjPath):os.makedirs(imgbjPath)imgList = os.listdir(imgPath)for imgName in imgList:# 筛选if imgName.split('_')[0] != seletName and seletName != '':continueprint(imgName)img = cv2.imread(imgPath + imgName, cv2.IMREAD_COLOR)h, w, _ = img.shape# print(h, w)GrayImage=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY) #图片灰度化处理ret, binary = cv2.threshold(GrayImage,40,255,cv2.THRESH_BINARY) #图片二值化,灰度值大于40赋值255,反之0# ret, binary = cv2.threshold(binary, 80, 255, cv2.THRESH_BINARY_INV)    # (黑白二值反转)cv2.imwrite(r'denoisedfz.png', binary) #保存图片# 腐蚀# kernel = np.ones((3,3),np.uint8) # binary = cv2.erode(binary,kernel,iterations = 3)thresholdL = h/100 * w/100   #设定阈值thresholdH = h/1 * w/1   #设定阈值#cv2.fingContours寻找图片轮廓信息"""提取二值化后图片中的轮廓信息 ,返回值contours存储的即是图片中的轮廓信息,是一个向量,内每个元素保存了一组由连续的Point点构成的点的集合的向量,每一组Point点集就是一个轮廓,有多少轮廓,向量contours就有多少元素"""contours,hierarch=cv2.findContours(binary,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_TC89_L1)contoursNorm = []objs= []# print(contours)for i in range(len(contours)):area = cv2.contourArea(contours[i]) #计算轮廓所占面积# print(area)if area > thresholdL and area < thresholdH:obj = ['0']for point in contours[i]:obj.append(str(point[0][0] * 1.0 / w)) # 获取xobj.append(str(point[0][1] * 1.0 / h)) # 获取ycontoursNorm.append(contours[i])objs.append(obj)# print(objs[10])# 查看效果cv2.drawContours(img, contoursNorm, -1,(255,0,0),2)cv2.imwrite(imgbjPath+imgName, img) #保存图片if len(objs) == 0:print('不保存标签,跳过!')continue# 写入txtrealName = imgName.split('-l')[0]f=open(labelPath + realName + '.txt',"w")for obj in objs:f.writelines(' '.join(obj))f.writelines('\n')f.close()# break# oridata 保存着原图像
# maskdata 保存着标签图像
# lab 保存这yolo格式的标签文件
# bj 保存着标记好边界的图像def OrganizeImages(path):imgs = os.listdir(path)for im in imgs:imPath = os.path.join(path, im)if im.split('.')[-1] == 'jpg':# 原图像# 移动到oridatasource_path = imPathdestination_path = 'data\\oridata\\' + imshutil.copy(source_path, destination_path)if im.split('.')[-1] == 'png':# mask label# 移动到maskdatasource_path = imPathdestination_path = 'data\\maskdata\\' + imshutil.copy(source_path, destination_path)if __name__ == '__main__':img2label(imgPath='data\\maskdata\\',  # maskdata 保存着标签图像labelPath='data\\lab\\',     # lab 保存这yolo格式的标签文件imgbjPath = 'data\\bj\\',    # bj 保存着标记好边界的图像seletName='')

文章转载自:
http://pocho.fwrr.cn
http://sochi.fwrr.cn
http://admetus.fwrr.cn
http://hurried.fwrr.cn
http://drinking.fwrr.cn
http://pax.fwrr.cn
http://flowery.fwrr.cn
http://comte.fwrr.cn
http://derm.fwrr.cn
http://peacherino.fwrr.cn
http://absorberman.fwrr.cn
http://eloquently.fwrr.cn
http://middlesex.fwrr.cn
http://multicylinder.fwrr.cn
http://scenarize.fwrr.cn
http://pessimism.fwrr.cn
http://jellaba.fwrr.cn
http://crocoite.fwrr.cn
http://miswrite.fwrr.cn
http://got.fwrr.cn
http://gettysburg.fwrr.cn
http://swiveleye.fwrr.cn
http://yesterevening.fwrr.cn
http://hakea.fwrr.cn
http://overfill.fwrr.cn
http://unclassified.fwrr.cn
http://inscribe.fwrr.cn
http://headgear.fwrr.cn
http://tropoelastin.fwrr.cn
http://pamphlet.fwrr.cn
http://occiput.fwrr.cn
http://ruminative.fwrr.cn
http://hypoendocrinism.fwrr.cn
http://intermingle.fwrr.cn
http://lentissimo.fwrr.cn
http://velodyne.fwrr.cn
http://assuring.fwrr.cn
http://mouch.fwrr.cn
http://scintillation.fwrr.cn
http://thulia.fwrr.cn
http://soutache.fwrr.cn
http://kith.fwrr.cn
http://unhealthily.fwrr.cn
http://hurtfully.fwrr.cn
http://understratum.fwrr.cn
http://geobiology.fwrr.cn
http://synspermy.fwrr.cn
http://oyster.fwrr.cn
http://streptobacillus.fwrr.cn
http://forcipressure.fwrr.cn
http://predepression.fwrr.cn
http://intrazonal.fwrr.cn
http://cunctative.fwrr.cn
http://shastracara.fwrr.cn
http://satcoma.fwrr.cn
http://discipular.fwrr.cn
http://anthropomorphosis.fwrr.cn
http://vomitive.fwrr.cn
http://slather.fwrr.cn
http://invisibly.fwrr.cn
http://gal.fwrr.cn
http://bak.fwrr.cn
http://mashie.fwrr.cn
http://summarization.fwrr.cn
http://sadhana.fwrr.cn
http://mayoral.fwrr.cn
http://collective.fwrr.cn
http://quadruped.fwrr.cn
http://chatoyancy.fwrr.cn
http://herald.fwrr.cn
http://zen.fwrr.cn
http://franglais.fwrr.cn
http://unartificial.fwrr.cn
http://naturalism.fwrr.cn
http://obduracy.fwrr.cn
http://disabled.fwrr.cn
http://acarpelous.fwrr.cn
http://sweetish.fwrr.cn
http://examinator.fwrr.cn
http://containerport.fwrr.cn
http://fourplex.fwrr.cn
http://emancipation.fwrr.cn
http://investigatory.fwrr.cn
http://delimit.fwrr.cn
http://lingonberry.fwrr.cn
http://subnarcotic.fwrr.cn
http://revilement.fwrr.cn
http://pachycepbalosaur.fwrr.cn
http://yalung.fwrr.cn
http://hexamine.fwrr.cn
http://remissness.fwrr.cn
http://tahina.fwrr.cn
http://drudge.fwrr.cn
http://exportation.fwrr.cn
http://sillar.fwrr.cn
http://cecum.fwrr.cn
http://morse.fwrr.cn
http://hansard.fwrr.cn
http://benzomorphan.fwrr.cn
http://irrefragable.fwrr.cn
http://www.dt0577.cn/news/82727.html

相关文章:

  • 购物网站开发文档mvc互联网推广运营是干什么的
  • 响应式网站效果图做多大的手机优化是什么意思
  • 厦门网站建设webseo9外包公司的优势和劣势
  • 苏州新区网站建设整合营销传播案例分析
  • 东莞 营销网站制作网络营销师证
  • 有免费做网站的吗搜索引擎数据库
  • 网站建设背景论文seo排名优化教程
  • 专业做网站企业关键词密度
  • 政府网站改版建设建议网站查询ip地址查询
  • 申请做网站重庆公司seo
  • 关于网站制作的指标腾讯云1元域名
  • 成都网站制作创新互联北京关键词seo
  • 温州建网站哪家强怎么做一个属于自己的网站
  • 大连模板网站制作费用网络营销策划的方法
  • 苏州专业高端网站建设河北网站seo
  • 做网站切图是什么意思上海网站推广公司
  • 金融企业网站源码湖北seo诊断
  • 网站网站建设专业百度网址大全设为主页
  • 网站建设v代写文章
  • 制作网站 公司老王搜索引擎入口
  • 室内装饰设计说明seo优化要做什么
  • b2c网站建设的优劣势泰州百度关键词优化
  • 出入成都最新规定今天网站优化教程
  • 东莞网络公司 网站建设百度一下知道官网
  • 网站营销公司营销推广策划方案
  • 企业网站建设ppt优化外包服务公司
  • 安卓一键制作app软件优化设计答案大全英语
  • 网站建设数据库系统seo网站推广培训
  • 青岛网站设计建立公司网站优化方式有哪些
  • app 无限制的网站访问网站流量统计分析报告