Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

there is a little bug in q2l_infer.py #47

Open
Chord-19 opened this issue Jul 24, 2023 · 8 comments
Open

there is a little bug in q2l_infer.py #47

Chord-19 opened this issue Jul 24, 2023 · 8 comments

Comments

@Chord-19
Copy link

there is a little bug in q2l_infer.py which leads to args.resume will be covered by the "resume " in config.json, and make some people can not repreduct paper's results。
for example:

  1. when I train a model ,save its checkpoints in path_1,I use the sentence to begin test:
    python q2l_infer.py -a 'Q2L-R101-448'
    --config path_1/config.json
    --resume path_1/model_best.pth.tar

  2. then the origin args.resume will be replaced by the codes:
    def parser_args(): if args.config: with open(args.config, 'r') as f: cfg_dict = json.load(f) for k,v in cfg_dict.items(): setattr(args, k, v) return args
    3.this may lead model initial without checkpoints.

  3. I write the issue because I find some people confuse to get the right results.

@Zhong1015
Copy link

Hello, I noticed your comment on CSDN where you pointed out some issues. I see that you've been recently researching this paper, and I'm just starting to delve into this area. I've encountered some difficulties and was hoping to ask you some pressing questions and engage in a discussion. Could we exchange some thoughts?

@Chord-19
Copy link
Author

Chord-19 commented Oct 26, 2023 via email

@Zhong1015
Copy link

https://github.com/curt-tigges/query2label

------------------ Original ------------------ From: Zhong1015 @.> Date: Tue,Oct 17,2023 0:26 PM To: SlongLiu/query2labels @.> Cc: Chord-19 @.>, Author @.> Subject: Re: [SlongLiu/query2labels] there is a little bug in q2l_infer.py (Issue #47) Hello, I noticed your comment on CSDN where you pointed out some issues. I see that you've been recently researching this paper, and I'm just starting to delve into this area. I've encountered some difficulties and was hoping to ask you some pressing questions and engage in a discussion. Could we exchange some thoughts? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Thank you for your reply. I've also seen this blog and its code, but it's a bit cumbersome to use. I would prefer to use the code provided by the original paper's authors. However, in the training part, I can't achieve the expected results; I only get a result of 3.7. I can only obtain normal results in the inference part. I'm not sure where the issue might be.

@Chord-19
Copy link
Author

Chord-19 commented Oct 29, 2023 via email

@Zhong1015
Copy link

The blog’s codes are easy to use with a little revise in data loader script, I do not use the paper’s origin code.

------------------ Original ------------------ From: Zhong1015 @.> Date: Fri,Oct 27,2023 10:54 AM To: SlongLiu/query2labels @.> Cc: Chord-19 @.>, Author @.> Subject: Re: [SlongLiu/query2labels] there is a little bug in q2l_infer.py (Issue #47) https://github.com/curt-tigges/query2label … ------------------ Original ------------------ From: Zhong1015 @.> Date: Tue,Oct 17,2023 0:26 PM To: SlongLiu/query2labels @.> Cc: Chord-19 @.>, Author @.> Subject: Re: [SlongLiu/query2labels] there is a little bug in q2l_infer.py (Issue #47) Hello, I noticed your comment on CSDN where you pointed out some issues. I see that you've been recently researching this paper, and I'm just starting to delve into this area. I've encountered some difficulties and was hoping to ask you some pressing questions and engage in a discussion. Could we exchange some thoughts? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.> Thank you for your reply. I've also seen this blog and its code, but it's a bit cumbersome to use. I would prefer to use the code provided by the original paper's authors. However, in the training part, I can't achieve the expected results; I only get a result of 3.7. I can only obtain normal results in the inference part. I'm not sure where the issue might be. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.>

The evaluation metrics provided in that blog post, after my verification, turned out to be incorrect. There is a decrease of 3-4 percentage points compared to the actual mAP (mean Average Precision), which is very troubling for me.

@ly-pear
Copy link

ly-pear commented May 21, 2024

Hello, may I ask how to solve this bug

@djdll
Copy link

djdll commented Sep 26, 2024

我想问--config这个参数在推理时必须给嘛,直接给定--resume好像也可以推理,结果貌似也是正确的

@Zhong1015
Copy link

我想问--config这个参数在推理时必须给嘛,直接给定--resume好像也可以推理,结果貌似也是正确的

config应当只是方便进行快速修改参数的一种推断方式,事实上直接在源文件内调整也是没问题的,只需指定resume指向对应的权重文件都能够获得理想的效果。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants