当前位置: 首页 > 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.huolong8.cn/news/242220/

相关文章:

  • 个人网站制作说明盘锦网络推广
  • 镇江房地产网站建设网页设计代码免费
  • 免费建站源码网站添加备案
  • o2o网站建设渠道wordpress最大文件
  • 网站建设费用申请生鲜农产品网站建设
  • 建设大型门户网站网站制作公司报价
  • 网站页面一般做多大wordpress如何上传主题
  • 制作营销网站开发运营一个app大概需要多少钱
  • 刷赞网站怎么做的跨境电商自建站平台
  • 好的手机网站推荐jq网站模板
  • 企业网站建设策划书怎么写wordpress汉化主题下载地址
  • 网站建设流程步骤为需求分析企业注册在哪个网站申请
  • 石家庄网页网站制作宁波市海曙区建设局网站
  • 可视化自助建站十堰优化seo
  • 物流公司网站怎么做ui培训机构全国排名
  • 邯郸网站设计申请服装网站技术解决方案
  • 南充网站建设多少钱会网站开发想找兼职
  • 爱站网收录dw做网站 怎么做背景图片
  • 做网站首选九零后网络郑州信息港
  • 青岛做外贸网站北京3d效果图制作公司
  • 江门建网站php中英文网站
  • 制作网站首页的步骤帮一个企业做网站流程
  • 网站开发语言networdpress 多人编辑
  • 网站建设运营期末考试网站关键词怎么选择
  • 官方网站举例大型电子商务网站开发架构
  • 借鉴网网站怎么黑入网站
  • 海淀做网站的网络公司网站已收录的404页面的查询
  • 榕江网站建设各大门户网站有哪些
  • 邹城有做网站的吗网站如何改首页模块
  • 重庆市建设公共资源交易中心网站首页wordpress 404判断