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

the training data of Meta fintuning how to extract? #19

Open
SamXiaosheng opened this issue Feb 28, 2022 · 4 comments
Open

the training data of Meta fintuning how to extract? #19

SamXiaosheng opened this issue Feb 28, 2022 · 4 comments

Comments

@SamXiaosheng
Copy link

the training data of Meta fintuning how to extract?could you open the script code for processing the Meta-fintuning training data ?

@ZhangGongjie
Copy link
Owner

Sorry, I didn't understand your question. You may use Chinese to describe your question and I can translate it into English so that everyone else would still understand.

Sorry for late reply, have a nice day!

@SamXiaosheng
Copy link
Author

SamXiaosheng commented Apr 18, 2022 via email

@ZhangGongjie
Copy link
Owner

ZhangGongjie commented Apr 25, 2022

感谢提问,抱歉回复的有些慢,最近太忙了 T T

以 MS-COCO 数据集为例,训练的指令是 ./scripts/run_experiments_coco.sh,其实Line9-24是base-training stage,Line48-67是few-shot-fintuning stage。Line48-67的命令结束后将自动执行few-shot inference。

如果要单独在novel classes上执行 inference ,直接可以执行:

python -u main.py \
--dataset_file coco_base \
--backbone resnet101 \
--num_feature_levels 1 \
--enc_layers 6 \
--dec_layers 6 \
--hidden_dim 256 \
--num_queries 300 \
--batch_size 2 \
--category_codes_cls_loss \
--resume path/to/checkpoint.pth/generated/by/few-shot-fintuning \
--fewshot_finetune \
--fewshot_seed ${fewshot_seed} \
--num_shots ${num_shot} \
--eval \
2>&1 | tee ${FS_FT_DIR}/log_inference.txt

其中加粗部分为需要需要特别注意的指令。希望可以帮到你!

@ZhangGongjie
Copy link
Owner

ZhangGongjie commented Apr 25, 2022

Question: After training, how to perform inference?

Answer:

Let's take MS-COCO as an example. The training & inference scripts are in ./scripts/run_experiments_coco.sh, of which Lines 9-24 refer to "base-training stage", and Lines 48-67 refer to "few-shot-finetuning stage". Lines 48-67 will also perform inference after finetuning is done.

If user wishes to perform inference, simply run:

python -u main.py \
--dataset_file coco_base \
--backbone resnet101 \
--num_feature_levels 1 \
--enc_layers 6 \
--dec_layers 6 \
--hidden_dim 256 \
--num_queries 300 \
--batch_size 2 \
--category_codes_cls_loss \
--resume path/to/checkpoint.pth/generated/by/few-shot-fintuning \
--fewshot_finetune \
--fewshot_seed ${fewshot_seed} \
--num_shots ${num_shot} \
--eval \
2>&1 | tee ${FS_FT_DIR}/log_inference.txt

Note that user should set --eval and --resume path/to/checkpoint.pth/generated/by/few-shot-fintuning correctly.

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

2 participants