码迷,mamicode.com
首页 > 编程语言 > 详细

python 读shell

时间:2018-12-05 21:51:09      阅读:262      评论:0      收藏:0      [点我收藏+]

标签:读取   ndt   line   shel   return   tensor   ast   txt   set   

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

标签:读取   ndt   line   shel   return   tensor   ast   txt   set   

原文地址:http://blog.51cto.com/chenwenming/2326721

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!