About index_map.npy
JasonW-00 opened this issue · comments
After training on my new data, it seems that Index_map is needed for testing, so I made it separately. Does index_map have any special significance? If I run Nerface with a new dataset, I find that just making index_map.npy according to the code streamlined for testing does not work well,just like this:
n_train = N-6 # training set length
n_val = 5
n_test = 1
indices = train_val_partition(N, n_train, n_val, n_test) # train val test indices
map = -np.ones((N,2))
map[:,0] = np.arange(N)
for mode in indices.keys(): # Train Val Test
if mode == 'test':
continue
idxs = indices[mode]
for i, idx in enumerate(tqdm(idxs)) :
if mode == 'train': map[idx,1] = i
np.save(os.path.join(args.target, 'index_map.npy'), map)
These codes are from real_to_nerf.py, I removed the code not related to generating index_map.npy。
Hi, this is just a mapping between temporal index of a frame and it's index in the training set.
I used it to retrieve latent codes of specific timestamps, or to be able to run through all latent codes in a temporal manner.