feixue94 / imp-release

[CVPR 2023] IMP: iterative matching and pose estimation with transformer-based recurrent module
https://feixue94.github.io/
Other
138 stars 11 forks source link

Hello author, I would like to ask you about the problem of model training code #3

Closed xiaodongqq closed 1 year ago

xiaodongqq commented 1 year ago

Hello author, I am glad that you can reply to my previous questions. When I generated the corresponding key points and descriptors according to the readme you provided, I reported the following errors during training under Windows, 1686907570197 1686907582871

which could not be solved. Could you please tell me how to solve this problem? Thank you very much

feixue94 commented 1 year ago

Hi, it seems like the input is None. can you print the values of input, e.g., keypoints, scores, and descriptors

Uchan1996 commented 1 year ago

I got this error too. This error happens at the following code, which corresponds to the line 214 of the file layers.py. message = torch.einsum('bhnm,bdhm->bdhn', prob, value) The cause of this error is that the prob is None. Could you please fix the code to address this error?

Uchan1996 commented 1 year ago

This error happens at the layer SharedAttentionalPropagation. So, If you train GM instead of DGNNS or AdaGMN, the training works.

Uchan1996 commented 1 year ago

I got the following error, even if I train a GM. FileNotFoundError: [Errno 2] No such file or directory: '/data/datasets/object_recognition/sain/MegaDepth_undistorted/training_data/matches_sep_spp/0183/16115.npy' I think dump_megadepth.py does not generate 16115.npy.

feixue94 commented 1 year ago

sorry for the late reply. I am a little bit busy these days and will test the code and fix bugs as soon as possible. Thank you very much your patience.

feixue94 commented 1 year ago

I just fixed the bugs in training DGNNS and AdaGMN.

feixue94 commented 1 year ago

I got the following error, even if I train a GM. FileNotFoundError: [Errno 2] No such file or directory: '/data/datasets/object_recognition/sain/MegaDepth_undistorted/training_data/matches_sep_spp/0183/16115.npy' I think dump_megadepth.py does not generate 16115.npy.

you might need to dump the training data first.

Uchan1996 commented 1 year ago

I dumped the training data, which took a few days, and then I ran the train.py.

The assets/mega_scene_nmatches_spp.npy has the number of valid pairs for each scene. It says the scene 0183 has 16515 pairs, and the build_dataset_from_offline method in megadepth.py randomly samples 80 pair ids. However, the dump_megadepth.py generates only 15687 pairs in the folder of matches_sep_spp/0183. I think this is the cause of this error.

Could you please check whether the dumping and training code work correctly from the begining to the end, if you have chance.

feixue94 commented 1 year ago

Dear all,

Sorry for the late reply. The code for dumping data and training model is tested and bugs are fixed now. The readme file is also updated. Please do a tiny test on 3 scenes for dumping data and training model before using full scenes for training because this could save your time if there is something wrong.

feixue94 commented 1 year ago

I am going to close this. If you have any questions, feel free to reopen it.