Open P66094125 opened 3 years ago
Hi @P66094125,
For only SuperPoint, it is not necessary to sample to the same length. It is used in our DeepFEPE paper when connecting to the downstream task.
I think the indexing may need update. torch.index_select — PyTorch 1.9.1 documentation https://pytorch.org/docs/stable/generated/torch.index_select.html
Sorry I don't have a way to test it at this moment.
Thank you for your answer, eric-yyjau.
hi, eric-yyjau
why need to crop to the same length?
crop to the same length
by the way, here is the error about it:
Traceback (most recent call last): File "train4.py", line 150, in
args.func(config, output_dir, args)
File "train4.py", line 102, in train_joint
train_agent.train()
File "C:\Users\User\Desktop\python\STUDY_CNN_imagematching\pytorch-superpoint-master-venv\Train_model_frontend.py", line 277, in train
loss_out = self.train_val_sample(sample_train, self.n_iter, True)
File "C:\Users\User\Desktop\python\STUDY_CNN_imagematching\pytorch-superpoint-master-venv\Train_model_heatmap.py", line 315, in train_val_sample
self.desc_params
File "C:\Users\User\Desktop\python\STUDY_CNN_imagematching\pytorch-superpoint-master-venv\utils\loss_functions\sparse_loss.py", line 243, in batch_descriptor_loss_sparse
homographies[i].type(torch.float32), options)
File "C:\Users\User\Desktop\python\STUDY_CNN_imagematching\pytorch-superpoint-master-venv\utils\loss_functions\sparse_loss.py", line 186, in descriptor_loss_sparse
uv_a = uv_a[choice]
IndexError: The shape of the mask [1000] at index 0 does not match the shape of the indexed tensor [873, 2] at index 0