8df5470cf8ce9f1a3b7e34fd6bd6b24be42523d8,src/data/dataset_merge.py,,main,#Any#,65
Before Change
// param1+=0.05
X = []
for id_item in all_id_list:
X.append(id_item[2])
X = np.array(X)
emap = {}
for id_item in _id_list:
y = id_item[2]
After Change
if len(args.exclude)>0:
if os.path.isdir(args.exclude):
_path_imgrec = os.path.join(args.exclude, "train.rec")
_path_imgidx = os.path.join(args.exclude, "train.idx")
_imgrec = mx.recordio.MXIndexedRecordIO(_path_imgidx, _path_imgrec, "r") // pylint: disable=redefined-variable-type
_ds_id = len(rec_list)
_id_list = []
s = _imgrec.read_idx(0)
header, _ = mx.recordio.unpack(s)
assert header.flag>0
print("header0 label", header.label)
header0 = (int(header.label[0]), int(header.label[1]))
//assert(header.flag==1)
imgidx = range(1, int(header.label[0]))
seq_identity = range(int(header.label[0]), int(header.label[1]))
pp=0
for identity in seq_identity:
pp+=1
if pp%10==0:
print("processing ex id", pp)
embedding = get_embedding(args, _imgrec, identity, image_size, model)
//print(embedding.shape)
_id_list.append( (_ds_id, identity, embedding) )
if test_limit>0 and pp>=test_limit:
break
//X = []
//for id_item in all_id_list:
// X.append(id_item[2])
//X = np.array(X)
//param1 = 0.3
//while param1<=1.01:
// emap = {}
// for id_item in _id_list:
// y = id_item[2]
// sim = np.dot(X, y.T)
// //print(sim.shape)
// //print(sim)
// idx = np.where(sim>=param1)[0]
// for j in idx:
// emap[j] = 1
// exclude_removed = len(emap)
// print(param1, exclude_removed)
// param1+=0.05
X = []
for id_item in all_id_list:
X.append(id_item[2])
X = np.array(X)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: deepinsight/insightface
Commit Name: 8df5470cf8ce9f1a3b7e34fd6bd6b24be42523d8
Time: 2018-01-25
Author: guojia@gmail.com
File Name: src/data/dataset_merge.py
Class Name:
Method Name: main
Project Name: deepinsight/insightface
Commit Name: d92a6bcda0fce7a629563bac912d5fbc05ec2aa5
Time: 2018-01-25
Author: guojia@gmail.com
File Name: src/data/dataset_merge.py
Class Name:
Method Name: main
Project Name: sentinel-hub/eo-learn
Commit Name: 9056208ea104828630f15b4e9e49da8e02755f75
Time: 2018-08-02
Author: tomi.slijepcevic@gmail.com
File Name: core/eolearn/core/eoexecution.py
Class Name: EOExecutor
Method Name: run