Remove some overlap data in val set so that train set and val set do not have overlap
(train_set, val_set)
| 262 | return new_c2w, idx |
| 263 | |
| 264 | def 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 | |
| 279 | def 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 ''' |
nothing calls this directly
no outgoing calls
no test coverage detected