Closed Master-cai closed 1 year ago
Hi @Master-cai ,
Thank you for your questions. I would like to answer them as follows:
Did you set up your experimental environments as I described in README (CUDA, package versions)? All the parameter settings are provided in the config files. If you already did the setups in README, I think the difference is due to the GPU architecture or the randomness of the RANSAC algorithm in OpenCV. In my case, I tested the pre-trained models on Ubuntu 16.04 with NVIDIA TESLA V100. And if you try to change the RANSAC thresholds in your environment, you might get better results. Updates: I've tried to test with modern GPUs such as NVIDIA GeForce RTX, and the results are similar to yours. For older GPUs such as NVIDIA TESLA V100 or NVIDIA Titan Xp, the results are similar to the paper's.
This is a good question. For MegaDepth, you may see that TopicFM+ (pre-trained) and TopicFM+ (reproduce) are almost similar. For the large gap between TopicFM-fast (pretrained) and TopicFM-fast (reproduce), I didn't use the data augmentation step in megadepth.py (see line 93). Using geometric augmentation might reduce the performance on MegaDepth but it increased the performance on ScanNet (as you see TopicFM-fast (reproduce) on ScanNet).
For testing, the batch_size
is set to 1 in the evaluation code. This is highly recommended. So your change of batch_size won't make any difference in this case.
I hope this will address your concerns. Thank you!
Thanks for your time and careful answers!
1. ...I've tried to test with modern GPUs such as NVIDIA GeForce RTX, and the results are similar to yours. For older GPUs such as NVIDIA TESLA V100 or NVIDIA Titan Xp, the results are similar to the paper's.
I tested on NVIDIA GeForce RTX 3090 with Ubuntu 20. It's interesting that the different GPUs can make such a difference. But when I test LoFTR, the results i got is the reported results, exactly. I 'm wondering the reason. And i will try to tune the RANSAC thresholds.
2. For the large gap between TopicFM-fast (pretrained) and TopicFM-fast (reproduce), I didn't use the data augmentation step in megadepth.py (see line 93).
Just to clarify, the TopicFM-fast model you provided are trained without data augmentation and the plus model are with it? Why not keep the fast model and plus model the same? It's a little confused.
3. For testing, the
batch_size
is set to 1 in the evaluation code. This is highly recommended. So your change of batch_size won't make any difference in this case.
I'd like to ask one more question. Why bs=1 is recommended? I test bs=2 just now and see no obvious gap of results. Howerver, the time cost doesn't decrease which is unexpected. I guess the reason is that the bottleneck is the metrics computing, am i right?
Looking forward to your reply, Thanks!
Hello @Master-cai,
batch_size
to 1 because the image size might not be the same in general. If the image size is the same for all images in the dataset, then we can increase the batch_size
. And did you change the batch_size in the evaluation code (line 87)? Let me try! Yeah, you're right. The metric computing took much longer time than the matching modelsThank you!
@TruongKhang
I will try to find the reason why they can keep the results consistent and report in this issue if i find.
3. Did you change the batch_size in the evaluation code (line 87)?
yes, according to your guidance, i change the code and it takes effect.
self.test_loader_params = {
'batch_size': args.batch_size,
'shuffle': False,
'num_workers': args.num_workers,
'pin_memory': True
}
Thanks!
@Master-cai, anyway, thank you for your engaging discussion. I think the lightning framework might not be stable until now. I also tried to train with mix-decision fp16 in the past to reduce the training time and memory. But it had some errors that I can't solve!
@TruongKhang fp16 is very unstable as its range is too small(about 1e4). I suggest you can try 'bf16', which is much more stable and have a large range(I have tried bf16 with your code, it is compatible). But it need GPU of Ampere architecture(such as GTX 30 series). I help it will help you.
Dear author, thanks for your great work! Recently i'm trying to reproduce your results, and i have some problem about it.
For training, I use your default setting(only change bs=8) to train TopicFMfast and TopicFMplus on unprocessed MegaDepth dataset. For testing, I also use the default setting to test on MegaDepth-1500 and Scannet-1500.
Here are the results, "paper" means the number you reported in your paper; "Pretrained" means tested with the weights you provided; "reproduce" means tested with the weights i trained:
MegaDepth-1500
<!DOCTYPE html>
Scannet
Here are some questions:
Thanks you again!