cvlab-epfl / disk

Disk code release
Apache License 2.0
313 stars 43 forks source link

question about using triplet instead of pair of images as training data #7

Open ConvMech opened 3 years ago

ConvMech commented 3 years ago

Hi,

Thank you again for open-sourcing your training code. When trying to reproduce the training result, I wonder why you choose to use "triplet tuples" rather than "pair of images" for training. Any specific reason for this design?

Looking forward to hearing from you

jatentaki commented 3 years ago

Please have a look at section 4.Optimization in the paper. In short, this way we get more supervision per detection, since each feature is detected once (incurring unet forward/backward computational costs) and then used in matching twice. This is a perf optimization and I am pretty sure it could be replaced with just slower learning rate/accumulating gradients over more batches if using image pairs.

ConvMech commented 3 years ago

@jatentaki Thank you for your quick response. I have a follow-up question: looks like when trying to convert the colmap output to the dataset ('pairs': covisible_pairs(images) in colmap2dataset.py), we only generate pairs of images. Could you also share the part where you convert them to the merged dataset.json which uses three images ids tuples as the input?

poplar1993 commented 2 years ago

@jatentaki Thank you for your quick response. I have a follow-up question: looks like when trying to convert the colmap output to the dataset ('pairs': covisible_pairs(images) in colmap2dataset.py), we only generate pairs of images. Could you also share the part where you convert them to the merged dataset.json which uses three images ids tuples as the input?

yes, I have the same question. Do you have solved it ?

jatentaki commented 2 years ago

Hello, I'm sorry for missing this topic. Unfortunately I don't have the script anymore, but it worked by taking a pair (a, b) and then adding a 3rd image c, sampled uniformly at random from covisible pairs of either a or b (but not necessarily both). I will try to recreate such a script and upload it to the repository but it may not be immediate.