MCPcopy Create free account
hub / github.com/ActiveVisionLab/DFNet / remove_overlap_data

Function remove_overlap_data

dataset_loaders/load_Cambridge.py:262–275  ·  view source on GitHub ↗

Remove some overlap data in val set so that train set and val set do not have overlap

(train_set, val_set)

Source from the content-addressed store, hash-verified

260 return new_c2w, idx
261
262def remove_overlap_data(train_set, val_set):
263 ''' Remove some overlap data in val set so that train set and val set do not have overlap '''
264 train = train_set.gt_idx
265 val = val_set.gt_idx
266
267 # find redundant data index in val_set
268 index = np.where(np.in1d(val, train) == True) # this is a tuple
269 # delete redundant data
270 val_set.gt_idx = np.delete(val_set.gt_idx, index)
271 val_set.poses = np.delete(val_set.poses, index, axis=0)
272 for i in sorted(index[0], reverse=True):
273 val_set.c_imgs.pop(i)
274 val_set.d_imgs.pop(i)
275 return train_set, val_set
276
277def fix_coord(args, train_set, val_set, pose_avg_stats_file='', rescale_coord=True):
278 ''' fix coord for 7 Scenes to align with llff style dataset '''

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected