modify 1:1 比对方式
This commit is contained in:
Binary file not shown.
@ -35,9 +35,6 @@ def find_samebox_in_array(arr, target):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def extract_data(datapath):
|
||||
'''
|
||||
0/1_track.data 数据读取
|
||||
@ -71,7 +68,7 @@ def extract_data(datapath):
|
||||
|
||||
boxes, feats, tboxes, tfeats = [], [], [], []
|
||||
|
||||
if line.find("box:") >= 0 and line.find("output_box:") < 0:
|
||||
if line.find("box:") >= 0 and line.find("output_box:")<0 and line.find("out_boxes")<0:
|
||||
box = line[line.find("box:") + 4:].strip()
|
||||
# if len(box)==6:
|
||||
boxes.append(str_to_float_arr(box))
|
||||
@ -122,7 +119,9 @@ def extract_data(datapath):
|
||||
for line in lines:
|
||||
line = line.strip() # 去除行尾的换行符和可能的空白字符
|
||||
if not line: # 跳过空行
|
||||
continue
|
||||
tracking_flag = False
|
||||
continue
|
||||
|
||||
if tracking_flag:
|
||||
if line.find("tracking_") >= 0:
|
||||
tracking_flag = False
|
||||
@ -176,8 +175,10 @@ def read_tracking_output(filepath):
|
||||
boxes.append(data)
|
||||
if data.size == 256:
|
||||
feats.append(data)
|
||||
|
||||
assert(len(feats)==len(boxes)), f"{filepath}, len(feats)!=len(boxes)"
|
||||
|
||||
|
||||
if len(feats) != len(boxes):
|
||||
return np.array([]), np.array([])
|
||||
|
||||
return np.array(boxes), np.array(feats)
|
||||
|
||||
@ -331,7 +332,6 @@ def read_similar(filePath):
|
||||
line = line[:-1]
|
||||
Dict = {}
|
||||
|
||||
|
||||
if not line:
|
||||
if len(one2one_list): SimiDict['one2one'] = one2one_list
|
||||
if len(one2n_list): SimiDict['one2n'] = one2n_list
|
||||
|
Reference in New Issue
Block a user