test_txt = /home/zcm/tensorf/siamfc-tf-master/data/Biker/groundtruth.txtdef load_label_set(label_dir):label_folder = open(label_dir, r)trainlines = label_folder.read().splitlines() #返回每一行的数据...
test_txt = '/home/zcm/tensorf/siamfc-tf-master/data/Biker/groundtruth.txt'
def load_label_set(label_dir):
label_folder = open(label_dir, "r")
trainlines = label_folder.read().splitlines() #返回每一行的数据
for line in trainlines:
line = line.split(" ") #按照空格键分割每一行里面的数据
box = [float(line[0]), float(line[1]), float(line[2]), float(line[3])]#box读取标签ground_truth
label_folder.close()
return train_box
#train_box = load_train_test_set(test_txt)
本文标题为:python 读shell
- python线程池ThreadPoolExecutor与进程池ProcessPoolExecutor 2023-09-04
- Python Pandas如何获取和修改任意位置的值(at,iat,loc,iloc) 2023-08-04
- Python实现将DNA序列存储为tfr文件并读取流程介绍 2022-10-20
- Python 保存数据的方法(4种方法) 2023-09-04
- CentOS7 安装 Python3.6 2023-09-04
- windows安装python2.7.12和pycharm2018教程 2023-09-03
- python中defaultdict用法实例详解 2022-10-20
- Python之路-Python中的线程与进程 2023-09-04
- 在centos6.4下安装python3.5 2023-09-04
- python中列表添加元素的几种方式(+、append()、ext 2022-09-02