guoqing bakeup
This commit is contained in:
@ -79,18 +79,21 @@ def extract_data(datapath):
|
||||
feats.append(str_to_float_arr(feat))
|
||||
|
||||
if line.find("output_box:") >= 0:
|
||||
box = str_to_float_arr(line[line.find("output_box:") + 11:].strip())
|
||||
tboxes.append(box) # 去掉'output_box:'并去除可能的空白字符
|
||||
index = find_samebox_in_array(boxes, box)
|
||||
assert(len(boxes)>=0 and len(boxes)==len(feats)), f"{datapath}, {datapath}, len(boxes)!=len(feats)"
|
||||
|
||||
assert(len(boxes)==len(feats)), f"{datapath}, {datapath}, len(boxes)!=len(feats)"
|
||||
box = str_to_float_arr(line[line.find("output_box:") + 11:].strip())
|
||||
index = find_samebox_in_array(boxes, box)
|
||||
if index >= 0:
|
||||
tboxes.append(box) # 去掉'output_box:'并去除可能的空白字符
|
||||
|
||||
# feat_f = str_to_float_arr(input_feats[index])
|
||||
feat_f = feats[index]
|
||||
norm_f = np.linalg.norm(feat_f)
|
||||
feat_f = feat_f / norm_f
|
||||
tfeats.append(feat_f)
|
||||
|
||||
|
||||
|
||||
|
||||
if len(boxes): bboxes.append(np.array(boxes))
|
||||
if len(feats): ffeats.append(np.array(feats))
|
||||
if len(tboxes): trackerboxes = np.concatenate((trackerboxes, np.array(tboxes)))
|
||||
|
Reference in New Issue
Block a user