两类junk


junk_index1 = np.argwhere(gl==-1)
junk_index2 = np.intersect1d(query_index, camera_index)
intersect1d(x, y) 计算x和y中的公共元素,并返回有序结果.即同一camera下的相同id为第二类 junk
junk_index = np.append(junk_index2, junk_index1) #.flatten())

# remove junk_index
mask = np.in1d(index, junk_index, invert=True) # 即保留junk 的index
index = index[mask]

np.in1d(x,y)# 返回x和y的交集

你可能感兴趣的:(torch代码)