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 中 Elias Delta 编码详情 2023-08-08
- Centos7下安装python环境 2023-09-04
- Python基础学习之函数和代码复用详解 2022-09-02
- centos系统 anaconda3(python3)安装pygrib 2023-09-04
- Python爬取当网书籍数据并数据可视化展示 2023-08-11
- CentOS 7.5 安装 Python3.7 2023-09-03
- 基于Python实现股票数据分析的可视化 2023-08-04
- 四步教你学会打包一个新的Python模块 2022-10-20
- python的环境conda简介 2022-10-20
- ubuntu 18 python3.6 的安装与 python2的版本切换 2023-09-03