Giter Club home page Giter Club logo

Comments (14)

wolf943134497 avatar wolf943134497 commented on July 21, 2024 1

Hey, can you try with my example command in readme for evaluating patch2pix+superglue on aachen? Please inform me here if you succeed with it. Thanks~

I will try with your example command for evaluating patch2pix+superglue on aachen, I'll give you feedback. Thanks~

@GrumpyZhou Hi The code runs successfully! Thanks~

from image-matching-toolbox.

TruongKhang avatar TruongKhang commented on July 21, 2024 1

Thank you so much for your engaging discussion! I wish you the best in your research :D

from image-matching-toolbox.

GrumpyZhou avatar GrumpyZhou commented on July 21, 2024

Hi @wolf943134497,

Yes, i tested patch2pix+superglue on aachen as shown in the paper. I have not encountered this error before. Can you show me your config for patch2pix+superglue on aachen and the command for the evaluation ?

from image-matching-toolbox.

wolf943134497 avatar wolf943134497 commented on July 21, 2024

Hi @wolf943134497,

Yes, i tested patch2pix+superglue on aachen as shown in the paper. I have not encountered this error before. Can you show me your config for patch2pix+superglue on aachen and the command for the evaluation ?

Hi Thanks for your quick reply!

I just use the config as follows:

default: &default
class: 'Patch2PixRefined'
ckpt: 'image-matching-toolbox/third_party/patch2pix/pretrained/patch2pix_pretrained.pth'
imsize: 1024
coarse_default: &coarse_default
name: 'SuperGlue'
weights: 'outdoor'
sinkhorn_iterations: 50
max_keypoints: 4096
nms_radius: 4
imsize: 1024
aachen:
<<: *default
match_threshold: 0.1
imsize: 1600
rthres: 48
coarse:
<<: *coarse_default
match_threshold: 0.1
imsize: 1600


my code :
# Initialize Model
config_file = 'configs/patch2pix+superglue.yml'
with open(config_file, 'r') as f:
args = yaml.load(f, Loader=yaml.FullLoader)['aachen']
class_name = args['class']
model = immatch.dictclass_name
print('model:',model)
matcher = lambda im1, im2: model.match_pairs(im1, im2)

dataset_dir = Path('data')
im_dir = dataset_dir / 'images/'
output_dir = Path('output')

# Load db & query pairs
db_pairs_path = output_dir / 'pairs-db-covis20.txt'
query_pairs_path = output_dir / 'pairs-query-vlad20.txt'
pair_list = load_pairs(db_pairs_path, query_pairs_path)
if not pair_list:
    return


# Match pairs
match_pairs_exporth5(pair_list, matcher, im_dir, output_dir) 


# Extract keypoints

process_matches_and_keypoints_exporth5(
    pair_list, output_dir, output_dir )

# Localization
#init_empty_sfm(args)
result_sfm = Path('output') / 'result_sfm'
empty_sfm = Path('output') / 'sfm_base'
result_dir = output_dir
colmap = 'colmap'
reconstruct_database_pairs(result_sfm, empty_sfm, im_dir, db_pairs_path, result_dir, colmap)
localize_queries(result_sfm, dataset_dir, query_pairs_path, result_dir)

if name == 'main':
parser = argparse.ArgumentParser(description='Localize Aachen Day-Night')
parser.add_argument('--gpu', '-gpu', type=str, default=0)
parser.add_argument('--config', type=str, default=None)
parser.add_argument('--prefix', type=str, default=None)

args = parser.parse_args()

eval_aachen(args)

I just want to get the localize_queries results, and test the pipeline is right or not.

I get init_empty_sfm by sfm. I follow the pipeline as hloc, and just change the matcher. The feature and matches can import the colmap database.

Thanks!

from image-matching-toolbox.

GrumpyZhou avatar GrumpyZhou commented on July 21, 2024

Um so you used my code to generate the matches and used original hloc repo to import matches and features? Am i understanding it correctly?

from image-matching-toolbox.

wolf943134497 avatar wolf943134497 commented on July 21, 2024

Um so you used my code to generate the matches and used original hloc repo to import matches and features? Am i understanding it correctly?

sorry for the unclear description, I use your code to generate the matches and use your script localize_sfm_helper.py to import matches and features, the hloc are also your repo.

only the pairs-db-covis20.txt,pairs-query-vlad20.txt and init_empty_sfm generate by original hloc repo.

Thanks!

from image-matching-toolbox.

GrumpyZhou avatar GrumpyZhou commented on July 21, 2024

I don't understand in your posted code

reconstruct_database_pairs(result_sfm, empty_sfm, im_dir, db_pairs_path, result_dir, colmap)
localize_queries(result_sfm, dataset_dir, query_pairs_path, result_dir)

In the original code, the input argument is different from what you are using:

Apart from this, i also found something not correct in your config, since to evaluate patch2pix + superglue on aachen, you need to perform quantization (we also mentioned it in the paper).
Without quantization, errors might occur during the triangulation or you get much worse accuracy. This is because patch2pix regressed matches are not repeatable compared to keypoint-based methods.

So to help you get this out, i will update the repo by including the configuration that i used and the running command tonight or tomorrow. Since i still need to work on something else before i touch this.

from image-matching-toolbox.

wolf943134497 avatar wolf943134497 commented on July 21, 2024

I don't understand in your posted code

reconstruct_database_pairs(result_sfm, empty_sfm, im_dir, db_pairs_path, result_dir, colmap)
localize_queries(result_sfm, dataset_dir, query_pairs_path, result_dir)

In the original code, the input argument is different from what you are using:

Apart from this, i also found something not correct in your config, since to evaluate patch2pix + superglue on aachen, you need to perform quantization (we also mentioned it in the paper).
Without quantization, errors might occur during the triangulation or you get much worse accuracy. This is because patch2pix regressed matches are not repeatable compared to keypoint-based methods.

So to help you get this out, i will update the repo by including the configuration that i used and the running command tonight or tomorrow. Since i still need to work on something else before i touch this.

I also change the the function variables in localize_sfm_helper.py, just write it directly in your code. I also perform quantization by set qt_psize = 48, qt_dthres = 4 ,sc_thres = 0.25 in code. I will check my code and h5 file.

Looking forward to your updates, Thanks for your great works again, it is very meaningful !

from image-matching-toolbox.

GrumpyZhou avatar GrumpyZhou commented on July 21, 2024

Hey, can you try with my example command in readme for evaluating patch2pix+superglue on aachen? Please inform me here if you succeed with it. Thanks~

from image-matching-toolbox.

wolf943134497 avatar wolf943134497 commented on July 21, 2024

Hey, can you try with my example command in readme for evaluating patch2pix+superglue on aachen? Please inform me here if you succeed with it. Thanks~

I will try with your example command for evaluating patch2pix+superglue on aachen, I'll give you feedback. Thanks~

from image-matching-toolbox.

TruongKhang avatar TruongKhang commented on July 21, 2024

Hi @GrumpyZhou, I wonder how long your program takes to evaluate on Aachen DayNight v1.1 dataset? My current running is to match 140952 pairs estimated in 50 hours. That's too long.

from image-matching-toolbox.

GrumpyZhou avatar GrumpyZhou commented on July 21, 2024

Hi @TruongKhang,

I do not remember the exact time now but yes it was taking a lot of time (* days) to run the whole evaluation on Aachen due to the large number of pairs.

from image-matching-toolbox.

TruongKhang avatar TruongKhang commented on July 21, 2024

Thank you @GrumpyZhou. Also, I have one more question. I wonder how to get the results Local Feature Evaluation on Night-time Queries from the table in your paper. This current code produced the results of Full Localization with HLOC, am I right?

from image-matching-toolbox.

GrumpyZhou avatar GrumpyZhou commented on July 21, 2024

Hi @TruongKhang ,

I just uploaded the config in this commit e3801b6 .

from image-matching-toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.