Giter Site home page Giter Site logo

Comments (4)

ZhangGongjie avatar ZhangGongjie commented on May 26, 2024

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!

from meta-detr.

SamXiaosheng avatar SamXiaosheng commented on May 26, 2024

from meta-detr.

ZhangGongjie avatar ZhangGongjie commented on May 26, 2024

感谢提问,抱歉回复的有些慢,最近太忙了 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

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

from meta-detr.

ZhangGongjie avatar ZhangGongjie commented on May 26, 2024

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.

from meta-detr.

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.