1:n modified
This commit is contained in:
@ -205,10 +205,13 @@ def extract_data_realtime(datapath):
|
||||
if line.endswith(','):
|
||||
line = line[:-1]
|
||||
ftlist = [float(x) for x in line.split()]
|
||||
if len(ftlist) != 265: continue
|
||||
|
||||
if len(ftlist) != 265:
|
||||
continue
|
||||
boxes.append(ftlist[:9])
|
||||
feats.append(ftlist[9:])
|
||||
|
||||
|
||||
trackerboxes = np.array(boxes)
|
||||
trackerfeats = np.array(feats)
|
||||
|
||||
@ -381,14 +384,21 @@ def read_similar(filePath):
|
||||
if Flag_1ton:
|
||||
label = line.split(':')[0].strip()
|
||||
value = line.split(':')[1].strip()
|
||||
|
||||
bcd = label.split('_')[-1]
|
||||
if len(bcd)<8: continue
|
||||
|
||||
Dict['barcode'] = ''
|
||||
if label.find("_") > 0:
|
||||
bcd = label.split('_')[-1]
|
||||
if len(bcd)>=10 and bcd.isdigit():
|
||||
Dict['barcode'] = bcd
|
||||
|
||||
|
||||
|
||||
Dict['event'] = label
|
||||
Dict['barcode'] = bcd
|
||||
Dict['similar'] = float(value.split(',')[0])
|
||||
Dict['type'] = value.split(',')[1]
|
||||
|
||||
if value.find("=")>0:
|
||||
Dict['type'] = value.split('=')[-1]
|
||||
else:
|
||||
Dict['type'] = value.split(',')[-1]
|
||||
one2n_list.append(Dict)
|
||||
|
||||
if len(one2one_list): SimiDict['one2one'] = one2one_list
|
||||
|
Reference in New Issue
Block a user