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

Function remove_overlap_data

dataset_loaders/load_7Scenes.py:264–277  ·  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

262 return new_c2w, idx
263
264def remove_overlap_data(train_set, val_set):
265 ''' Remove some overlap data in val set so that train set and val set do not have overlap '''
266 train = train_set.gt_idx
267 val = val_set.gt_idx
268
269 # find redundant data index in val_set
270 index = np.where(np.in1d(val, train) == True) # this is a tuple
271 # delete redundant data
272 val_set.gt_idx = np.delete(val_set.gt_idx, index)
273 val_set.poses = np.delete(val_set.poses, index, axis=0)
274 for i in sorted(index[0], reverse=True):
275 val_set.c_imgs.pop(i)
276 val_set.d_imgs.pop(i)
277 return train_set, val_set
278
279def fix_coord(args, train_set, val_set, pose_avg_stats_file='', rescale_coord=True):
280 ''' 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