image-matching-toolbox
image-matching-toolbox copied to clipboard
How do I add my own methods to test?
I copied the loftr code to add the required files, but when running my code failed: KeyError: 'block_type' Self. block_type = config['block_type'], which is the argument in my code
The information your provided is not sufficient for me to understand what the situation is.
For example, I replaced "attention" in "loftr" with "quardtree attention". Then I put the code in your code like "loftr".
model = immatch.dictclass_name loftr.py line23 self.model = LoFTR_(config=conf)
KeyError: 'block_type' https://github.com/Tangshitao/QuadtreeAttention
Might be related to missing config of 'block_type' in the config file. Can you check whether this block_type is used in your model and has been configured in the conf? Btw, next time can you post the full error? It is out of track where this key error happens.
Ok, thank you. The problem has been solved. It is indeed a configuration problem. But the test results are all 0. What do you think might be the problem?
Make sure you load the pretrained weights properly. You can also debug by just by printing the number of matches , something like that ... If your problem is solved then please close the issue.