- 博客(10)
- 收藏
- 关注
原创 按照列表的第一个元素排序
file_list = sorted(file_list, key=lambda x:int(x[1]))(50条消息) python中如何对列表进行排序_巫山云的专栏-CSDN博客_python对列表进行排序
2021-11-19 14:25:33
845
原创 labelme json2txt
import jsonimport os name2id = {'hero':0,'sodier':1,'tower':2}#标签名称 def convert(img_size, box): dw = 1. / (img_size[0]) dh = 1. / (img_size[1]) x = (box[0] + box[2]) / 2.0 - 1 y = (box[1] + box[3]) / 2.0 - 1 w = box[2] - box[0].
2021-11-18 10:29:42
400
原创 heatmap
import numpy as npimport matplotlib as mplfrom PIL import Image, ImageFont, ImageDrawimport matplotlib.pyplot as pltimport cv2img = Image.open("/home/wangliuan/intern/yuxi/ByteTrack-y/tools/save/bgimg.jpg")# img = img.load()img_rgb = img.convert(.
2021-11-18 09:22:10
212
原创 heatmap
import numpy as npimport matplotlib as mplfrom PIL import Image, ImageFont, ImageDrawimport matplotlib.pyplot as pltimport cv2img = Image.open("/home/wangliuan/intern/yuxi/ByteTrack-y/tools/save/bgimg.jpg")# img = img.load()img_rgb = img.convert(.
2021-11-18 08:57:48
92
原创 MOT17每个tracklet的热力图
import numpy as npimport cv2filepath = '/home/wangliuan/intern/yuxi/ByteTrack-y/tools/datasets/mot/train/MOT17-05-FRCNN/gt/gt.txt'file_list = []with open(filepath, 'r') as fp: for eachline in fp.readlines(): eachline = eachline.rstrip().s.
2021-11-17 10:18:12
2180
原创 9.2 label_json
import refrom numpy import *import cv2import numpy as npimport osimport jsonimport sysregister_name = []register_hsi = []register_rgb = []file_path = r'/home/wangliuan/intern/yuxi/pytorch-3dunet-master-zr_rgb_and_hsi/pytorch3dunet/datasets/da.
2021-11-17 09:31:23
80
原创 label_company
import refrom numpy import *import cv2import numpy as npimport osimport jsonimport sysfrom label_json import Label_Jsonregister_name = []register_hsi = []register_rgb = []file_path = r'/home/wangliuan/intern/yuxi/pytorch-3dunet-master-zr_rgb.
2021-11-17 09:30:53
508
原创 label_json
import refrom numpy import *import cv2import numpy as npimport osimport jsonregister_name = []register_hsi = []register_rgb = []class Label_Json: def find_matrix(rootname, name, namelist): idx = -1 exact_match = -1 .
2021-11-17 09:30:27
170
原创 图像配准 仿射变换
import refrom numpy import *import cv2import numpy as npimport osimport jsondef getlabelingdata(file): with open(file, encoding='utf-8') as f: contents = json.load(f) # print(contents) dict = contents['markResult']['obje.
2021-11-17 09:29:48
289
原创 python 算法
1.汉诺塔def hanoi(n, a, b, c): if n > 0: hanoi(n-1, a, c ,b) print('moving from {} to {}'.format(a, c)) hanoi(n-1, b, a, c)2.列表查找def line_search(li, val): for index, x in enumerate(li): if x == val:
2021-11-16 16:40:10
486
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人