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

网站建设使用技术南京app研发公司

网站建设使用技术,南京app研发公司,wordpress 目录扫描,企业网站建设排名网址目录 MOT15数据集格式简介 gt可视化 本人修改的GT可视化代码#xff1a; MOT15数据集格式简介 以下内容转自#xff1a;【目标跟踪】MOT数据集GroundTruth可视化-腾讯云开发者社区-腾讯云 MOT15数据集下载#xff1a;https://pan.baidu.com/s/1foGrBXvsanW8BI4eybqfWg?…目录 MOT15数据集格式简介 gt可视化 本人修改的GT可视化代码 MOT15数据集格式简介 以下内容转自【目标跟踪】MOT数据集GroundTruth可视化-腾讯云开发者社区-腾讯云 MOT15数据集下载https://pan.baidu.com/s/1foGrBXvsanW8BI4eybqfWg?pwd8888 以下为一行gt示例 1,1,1367,393,73,225,1,-1,-1,-1 各列数据对应含义如下 frame,id,bb_left,bb_top,bb_width,bb_height,conf,x,y,z 复制 frame:图片帧idid目标idbb_leftbbox左上角坐标xbb_topbbox左上角坐标ybb_widthbbox的宽度bb_heightbbox的高度conf置信度x三维坐标系x值对于二维任务填充为-1y三维坐标系y值对于二维任务填充为-1z三维坐标系z值对于二维任务填充为-1 gt可视化 由于是跟踪任务因此在可视化检测框的同时进一步添加箭头用来标识目标的运动轨迹。 处理思路是读取一张图片后同时读取两张图片的gt若两张图片同时包含同一个目标则用箭头连接前一帧bbox的中心点和后一帧bbox的中心点。 只能跟踪一个人 import osimport cv2 def match_obj(obj_list, obj_id):try:index obj_list.index(obj_id)except:index -1return indexif __name__ __main__:dir_arB:\data\track\MOT15\train\ADL-Rundle-6img_dirrB:\data\track\MOT15\train\ADL-Rundle-6/txt_paths files [%s/%s % (i[0].replace(\\, /), j) for i in os.walk(dir_a) for j in i[-1] if j.endswith((gt.txt, .xpng))]img_i1track_showTrueimg cv2.imread(img_dir/img1/ 0000{:02d}.jpg.format(img_i))img2 imgfor txt_path in txt_paths:with open(txt_path, r) as f:lines f.readlines()object_list []center_list []for line in lines:img_id line.split(,)[0]if img_id str(img_i):object_id line.split(,)[1]object_list.append(object_id)x, y, w, h int(line.split(,)[2]), int(line.split(,)[3]), int(line.split(,)[4]), int(line.split(,)[5])center1 (int(int(x) int(w) / 2), int(int(y) int(h) / 2))center_list.append(center1)if img_id str(int(img_i) 1):img_i1img cv2.imread(img_dir /img1/ 0000{:02d}.jpg.format(img_i))object_id line.split(,)[1]index match_obj(object_list, object_id)x, y, w, h int(line.split(,)[2]), int(line.split(,)[3]), int(line.split(,)[4]), int(line.split(,)[5])center2 (int(int(x) int(w) / 2), int(int(y) int(h) / 2))if index ! -1:img2 cv2.rectangle(img, (x, y), (x w, y h), (0, 0, 255))img2 cv2.arrowedLine(img2, center_list[index], center2, (0, 255, 255), 1, 8, 0, 0.5)if track_show:cv2.imshow(sdf,img)cv2.waitKey(0) 本人修改的GT可视化代码 import sys import base64 import os from collections import OrderedDictimport cv2 import shutil import glob module_path os.path.abspath(os.path.join(..)) if module_path not in sys.path:sys.path.append(module_path) import jsonif __name__ __main__:dir_arB:\data\track\MOT15\trainimg_dirrB:\data\track\MOT15\train/txt_paths [%s/%s % (i[0].replace(\\, /), j) for i in os.walk(dir_a) for j in i[-1] if j.endswith((gt.txt, .xpng))]version 3.16.7flags {}lineColor [0, 255, 0, 128]fillColor [255, 0, 0, 128]track_showTruesave_jsonFalsefor xmlpathName in txt_paths:xmlpathNamexmlpathName.replace(\\,/)dancetrack_namexmlpathName.split(/)[-3]img_info OrderedDict()with open(xmlpathName) as fs:lines fs.readlines()# lines sorted(lines)for line in lines:line line.replace(\n, )line_info line.split(,)frame line_info[0]frame_image_name {:06d}.format(int(frame)) .jpgbox [int(line_info[2]), int(line_info[3]), int(line_info[2]) int(line_info[4]),int(line_info[3]) int(line_info[5]),int(line_info[1])]if frame_image_name in img_info:img_info[frame_image_name].append(box)else:img_info[frame_image_name] [box]for image_name in img_info.keys():print(image_name)dic {}dic[version] versiondic[flags] flagsdic[shapes] []img_path dancetrack_name/img1/ image_nameimg_new_name dancetrack_name _ image_nameimg_new_path img_dir img_pathimg cv2.imread(img_new_path)imageHeight, imageWidth, _ img.shapefor box in img_info[image_name]:shape {}shape[label] personshape[line_color] Noneshape[fill_color] Nonex1 int(box[0])y1 int(box[1])x2 int(box[2])y2 int(box[3])if track_show:cv2.rectangle(img, (x1, y1), (x2, y2), (0,0,255), 1)cv2.putText(img, t: str(box[4]), (x1,y120), cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0,0,255), 2)shape[points] [[x1, y1], [x2, y2]]shape[shape_type] rectangleshape[flags] {}dic[shapes].append(shape)if track_show:cv2.putText(img, image_name, (20, 40), cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0, 255, 0), 1)cv2.imshow(sdf,img)cv2.waitKey(0)if save_json:dic[lineColor] lineColordic[fillColor] fillColordic[imagePath] img_new_namedic[imageData] base64.b64encode(open({}.format(img_new_path), rb).read()).decode(utf-8)dic[imageHeight] imageHeightdic[imageWidth] imageWidthfw open({}json.format(img_new_path.replace(img_new_path.split(.)[-1], )), w)json.dump(dic, fw)fw.close() 可视化效果如图所示 在这里插入图片描述
http://www.yutouwan.com/news/242220/

相关文章:

  • 企业网站的建设多少钱设计素材网站哪个最好用
  • 做设计不进设计公司网站网上卖建材的平台
  • 海南省建设人力资源网站嘉兴网络科技有限公司
  • 济南seo网站关键词排名沧州市青县建设局网站
  • 辽宁建设执业继续教育协会网站2003 您的安全设置不允许网站使用安装
  • 资阳市建设局网站如何构建一个电子商务网站
  • 重庆江津做网站北京做网站建设
  • 中国建设银行官企业网站不建议网站
  • 网站编辑是网页制作么网站常用的优化方法
  • 陕西最好的云营销网站建设公司网站开发技术期中试题
  • 华茂达建设集团网站外贸建站有哪些公司
  • 网站打开文件按钮怎么做网站举报官网
  • 网站如何做百度才会收录wordpress添加评论框
  • 一个大型网站建设得多少钱wordpress做门户网站
  • 酒类网站如何做合肥网站建设推广服务
  • 网站推广员需要做什么做网站可以卖钱吗
  • 做液压的公司网站凡客精选带货达人
  • 专业做网站推广的公司霸州网站设计
  • 站长工具站长怎么做网站的百度排名
  • 网站添加锚点本地打开WordPress慢
  • 建站 discuz好的设计作品网站
  • 大良网站建设如何苏州网站的优化
  • 做网站卖机械杭州做网站的优质公司
  • 网站建设站长之家开网店卖什么适合新手
  • 在哪个网站上可以学做衣服动态时钟html代码
  • .net网站开发软件WordPress部署百度广告
  • 临清轴承网站建设梅州网站建
  • 北京做网站多少钱合理青海网站建设哪家好
  • 建网站需要多钱目前最新的营销方式有哪些
  • 网站备案必须是企业吗网站一键生成手机网站