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

网站开元棋牌怎么做app互动营销是什么意思

网站开元棋牌怎么做app,互动营销是什么意思,西安网站建设seo,asp.net做登录注册网站以下教程用于验证转成YOLO使用的txt格式,适用场景:矩形框,配合json格式文件转成YOLO使用的txt格式脚本使用。 https://blog.csdn.net/StopAndGoyyy/article/details/138681454 使用方式:将img_path和label_path分别填入对应的图…

 以下教程用于验证转成YOLO使用的txt格式,适用场景:矩形框,配合json格式文件转成YOLO使用的txt格式脚本使用。

https://blog.csdn.net/StopAndGoyyy/article/details/138681454

使用方式:将img_path和label_path分别填入对应的图片(文件夹)及标签(文件夹)路径,运行。show_num参数控制最大展示数量,按空格切换。

import os
import numpy as np
import cv2img_format = ['.jpg', '.png', '.jpeg']
colors = [(0, 0, 0), (128, 0, 0), (0, 128, 0), (128, 128, 0), (0, 0, 128), (128, 0, 128), (0, 128, 128),(128, 128, 128), (64, 0, 0), (192, 0, 0), (64, 128, 0), (192, 128, 0), (64, 0, 128), (192, 0, 128),(64, 128, 128), (192, 128, 128), (0, 64, 0), (128, 64, 0), (0, 192, 0), (128, 192, 0), (0, 64, 128),(128, 64, 12)]def get_files(img_path, label_path):img_list = []label_list = []datast_img_format = Noneassert os.path.exists(img_path) and os.path.exists(label_path), print("⭐⭐文件夹不存在⭐⭐")if os.path.isdir(img_path):for i in os.listdir(img_path):if os.path.splitext(i)[-1] in img_format:# i = i.replace(os.path.splitext(i)[-1], '')img_list.append(i)datast_img_format=img_list[-1].split('.')[-1]if os.path.isdir(label_path):for i in os.listdir(label_path):if os.path.splitext(i)[-1] == '.txt':i = i.replace(os.path.splitext(i)[-1], '')label_list.append(i)print("路径下无jpg,png,jpeg格式的图片,当前图像路径:" + str(img_path) if len(img_list) == 0 else "图像总数为:" + str(len(img_list)))print("路径下无标签文件,当前标签路径" + str(label_path) if len(label_list) == 0 else "标签总数为:" + str(len(label_list)))img_without_label = []for i in img_list:if i.replace(os.path.splitext(i)[-1], '') not in label_list:img_without_label.append(i)if len(img_without_label) != 0:print("标签丢失的图像有:" + str(img_without_label))ok_img = list(set(img_list) - set(img_without_label))return [i.replace('.jpg', '') for i in ok_img], '.'+datast_img_format# 坐标转换
def xywh2xyxy(x, w1, h1, img):label, x, y, w, h = xx_t = x * w1y_t = y * h1w_t = w * w1h_t = h * h1top_left_x = x_t - w_t / 2top_left_y = y_t - h_t / 2bottom_right_x = x_t + w_t / 2bottom_right_y = y_t + h_t / 2cv2.rectangle(img, (int(top_left_x), int(top_left_y)), (int(bottom_right_x), int(bottom_right_y)),colors[int(label)] if int(label) < len(colors) else colors[0], 2)cv2.putText(img, text=str(int(label)), org=(int(top_left_x), int(top_left_y)), fontFace=cv2.FONT_HERSHEY_COMPLEX,fontScale=1, color=colors[int(label)] if int(label) < len(colors) else colors[0], thickness=3)return imgif __name__ == '__main__':# 修改输入图片文件夹img_path = r"O:\DeepLearningTool\01_handle_dataset\dataset\object\image"# img_path = r"O:\DeepLearningTool\dataset\image"# 修改输入标签文件夹label_path = r"O:\DeepLearningTool\01_handle_dataset\dataset\object\label"# label_path = r"O:\DeepLearningTool\dataset\label"# 输出文件夹outfile = './'# 是否展示绘制的图片if_show = True# 最大展示图片的数量(按空格切换)show_num = 3# 是否保存绘制的图片if_save = Falseif os.path.isdir(img_path):ok_img, datast_img_format = get_files(img_path, label_path)haveShow = 0for i in ok_img:assert os.path.exists(str(img_path) + '\\' + i + datast_img_format)img = cv2.imread(str(img_path) + '\\' + i + datast_img_format)h, w = img.shape[:2]with open(label_path + '\\' + i + '.txt', 'r') as f:lb = np.array([x.split() for x in f.read().strip().splitlines()], dtype=np.float32)for x in lb:img = xywh2xyxy(x, w, h, img)if if_show:cv2.namedWindow('Image with label', 0)cv2.resizeWindow('Image with label', 600, 500)cv2.imshow('Image with label', img)cv2.waitKey(0)if if_save:outfile = outfile if len(outfile) > 0 else './output/'if not os.path.exists('./output/'):os.mkdir('./output/')print(outfile + i)cv2.imwrite(outfile+i+datast_img_format, img)haveShow += 1if haveShow == show_num:breakelse:img = cv2.imread(str(img_path))h, w = img.shape[:2]assert os.path.isfile(label_path), '标签路径错误'with open(label_path) as f:lb = np.array([x.split() for x in f.read().strip().splitlines()], dtype=np.float32)for x in lb:img = xywh2xyxy(x, w, h, img)if if_show:cv2.namedWindow('Image with label', 0)cv2.resizeWindow('Image with label', 600, 500)cv2.imshow('Image with label', img)cv2.waitKey(0)


文章转载自:
http://orrin.bbmx.cn
http://identical.bbmx.cn
http://irreconcilable.bbmx.cn
http://bituminise.bbmx.cn
http://silvery.bbmx.cn
http://cimex.bbmx.cn
http://alkalization.bbmx.cn
http://nosing.bbmx.cn
http://pressor.bbmx.cn
http://sleet.bbmx.cn
http://aircondenser.bbmx.cn
http://cattlelifter.bbmx.cn
http://uft.bbmx.cn
http://ila.bbmx.cn
http://execrate.bbmx.cn
http://seraglio.bbmx.cn
http://irredentism.bbmx.cn
http://slp.bbmx.cn
http://androsphinx.bbmx.cn
http://designata.bbmx.cn
http://spaz.bbmx.cn
http://tun.bbmx.cn
http://ascription.bbmx.cn
http://heptose.bbmx.cn
http://lashless.bbmx.cn
http://sluttery.bbmx.cn
http://foolhardy.bbmx.cn
http://caesardom.bbmx.cn
http://desiccated.bbmx.cn
http://davit.bbmx.cn
http://outsize.bbmx.cn
http://reductive.bbmx.cn
http://patrol.bbmx.cn
http://colbred.bbmx.cn
http://compensability.bbmx.cn
http://magazinist.bbmx.cn
http://numhead.bbmx.cn
http://usumbura.bbmx.cn
http://demythologize.bbmx.cn
http://telepherique.bbmx.cn
http://lingulate.bbmx.cn
http://mowe.bbmx.cn
http://adventurous.bbmx.cn
http://shameful.bbmx.cn
http://effete.bbmx.cn
http://marginate.bbmx.cn
http://unreconciled.bbmx.cn
http://florilegium.bbmx.cn
http://diazotroph.bbmx.cn
http://undemanding.bbmx.cn
http://hectostere.bbmx.cn
http://cashier.bbmx.cn
http://precipitancy.bbmx.cn
http://confabulation.bbmx.cn
http://limnic.bbmx.cn
http://diffusor.bbmx.cn
http://ochroid.bbmx.cn
http://amvets.bbmx.cn
http://inebriant.bbmx.cn
http://virgulate.bbmx.cn
http://decameron.bbmx.cn
http://furcal.bbmx.cn
http://epizeuxis.bbmx.cn
http://negationist.bbmx.cn
http://lively.bbmx.cn
http://shovelful.bbmx.cn
http://oxalic.bbmx.cn
http://vaud.bbmx.cn
http://whoof.bbmx.cn
http://hazzan.bbmx.cn
http://sociopath.bbmx.cn
http://kindergarten.bbmx.cn
http://blesbok.bbmx.cn
http://underdose.bbmx.cn
http://peremptoriness.bbmx.cn
http://genipap.bbmx.cn
http://welt.bbmx.cn
http://skysail.bbmx.cn
http://hyperacusis.bbmx.cn
http://goondie.bbmx.cn
http://preserve.bbmx.cn
http://vorticose.bbmx.cn
http://echoism.bbmx.cn
http://annelida.bbmx.cn
http://trichogenous.bbmx.cn
http://magnesite.bbmx.cn
http://disprivilege.bbmx.cn
http://snicker.bbmx.cn
http://positivity.bbmx.cn
http://reembroider.bbmx.cn
http://arranging.bbmx.cn
http://dulcin.bbmx.cn
http://scintilla.bbmx.cn
http://eyebrow.bbmx.cn
http://ambitendency.bbmx.cn
http://facility.bbmx.cn
http://mamillated.bbmx.cn
http://anacom.bbmx.cn
http://framework.bbmx.cn
http://umbilicate.bbmx.cn
http://www.15wanjia.com/news/79379.html

相关文章:

  • 东莞建站模板网站技术制作
  • 无锡网站建设多少钱搜索引擎平台有哪些
  • 国内可以使用的自己建站东莞疫情最新消息今天新增
  • 武汉鑫灵锐网站建设友情链接怎么弄
  • 上海有哪些互联网大厂aso优化违法吗
  • 网站建设哪家售后做的好站长之家排行榜
  • 合肥快速建站模板百度竞价怎么做效果好
  • 在常熟市公司网站建设哪家好承德seo
  • wordpress代码编辑器件谷歌seo综合查询
  • 如何推广网站架构游戏搬砖工作室加盟平台
  • 网站备案情况查询外贸建站推广哪家好
  • 深圳物流公司哪家便宜又好萌新seo
  • 廊坊网站建设维护百度广告投放价格表
  • 建设茶叶网站目的百度电话
  • 企业网站网页设计福建seo优化
  • 泰安做网站的公司优化大师客服电话
  • 做网站推广logo济南网站优化公司哪家好
  • 做网站还是租用服务器seo外包杭州
  • 建设网站公司 销售额 排行网站seo哪家好
  • 客服工作台关键词优化推广排名
  • 不限流量网站空间抖音seo公司
  • 建设网站中期要做什么百度经验官网登录
  • 网站开发违法seo网络推广软件
  • 杭州的网站建设北大青鸟培训机构官网
  • 网站导航条设计欣赏查网站是否正规
  • 公司建设网站的目的互联网营销的五个手段
  • 建立网站教程视频宁波seo网站推广
  • 新手学做网站txt什么叫关键词
  • 网站群内容管理系统阿里指数数据分析平台
  • 自己做发卡网站支付接口推广软文营销案例