jshtok / RepMet

Few-shot detection for visual categories
Apache License 2.0
110 stars 18 forks source link

A problem about testing with fine-tune #9

Closed wcg5262 closed 4 years ago

wcg5262 commented 4 years ago

Hi, @jshtok: Thanks for your code. I have a problem. When I input: python fpn/few_shot_benchmark.py --test_name=RepMet_inloc --Nshot=1 --Nway=5 --Nquery_cat=10 --Nepisodes=500 --do_finetune=1 --num_finetune_epochs=5 --lr=5e-4 It will report error: 图片 I found this because when balance_classes() is done in loader.py, 图片

Could you explain this to me? I am grateful.

jshtok commented 4 years ago

Hi,

You mentioned (in the email version of this ticket) you have the setting cfg.dataset.NUM_CLASSES=127 but in the .yaml configuration file it is set dataset: NUM_CLASSES: 122 so the NUM_CLASSES should be 122. I don't expect this error to happen if the NUM_CLASSES is correct, please check if this is the case.

wcg5262 commented 4 years ago

@jshtok Thank you for your answer. I have solved this problem. I am a beginner in meta-learning. I would also like to ask you why there is no fine-tune part of the test. If don't do fine-tune, isn't it a zero-shot?

jshtok commented 4 years ago

Hi, You can activate the fine-tune in test by setting do_finetune=1, please read the readme.md for detail.s But even without fine-tuning, this is few-shot and not zeros-shot because the detector uses the few samples. It is called zero-shot learning when not one visual example is available.

wcg5262 commented 4 years ago

@jshtok Hi, I understand the meaning of zero and few, what I don't understand is that in this project, when do_finetune=0, is there any network fine-tuning during the test? Such as running: python fpn/few_shot_benchmark.py --test_name=RepMet_inloc --Nshot=1 --Nway=5 --Nquery_cat=10 --Nepisodes=500 I found in this case, only the detector is detecting.

jshtok commented 4 years ago

Hi,

No fine-tuning is done when do_finetune==0. What happens is that the feature vectors of the few shot support examples are computed and serve as representatives for the detector

On Fri, Nov 8, 2019 at 1:42 PM wcg5262 notifications@github.com wrote:

@jshtok https://github.com/jshtok Hi, I understand the meaning of zero and fe, what I don't understand is that in this project, when do_finetune=0, is there any network fine-tuning during the test? Such as running: python fpn/few_shot_benchmark.py --test_name=RepMet_inloc --Nshot=1 --Nway=5 --Nquery_cat=10 --Nepisodes=500 I found in this case, only the detector is detecting.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jshtok/RepMet/issues/9?email_source=notifications&email_token=ACOBU6VZN66VNNELVAZ42FDQSVGBXA5CNFSM4JJVBXTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDQWTKI#issuecomment-551643561, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOBU6UJVIY5X6U7WEYY2H3QSVGBXANCNFSM4JJVBXTA .

wcg5262 commented 4 years ago

@jshtok I am grateful for your patient answer.