Commit 6d84f948 authored by chenych's avatar chenych
Browse files

update test.py in README and default params in main.py

parent 93c5eac2
......@@ -136,14 +136,15 @@ bash ./train_multi.sh
如没有预训练模型, 可从 参考资料 中提供的模型下载, 选择模型对应的config后进行效果验证。
如果想要查看预测效果(预测结果输出到图片上), 请执行:
如果想要查看预测效果(预测结果输出到图片上), 请执行(其余参数与训练config参数需一致, 详情请参考代码里面的参数配置):
以 r50_hybrid_branch_lambda1_group6_t1500_dp0_mqs_lft_deformable_detr_plus_iterative_bbox_refinement_plus_plus_two_stage_12eps 为例:
python test.py --pre_trained_model /path/r50_hybrid_branch_lambda1_group6_t1500_dp0_mqs_lft_deformable_detr_plus_iterative_bbox_refinement_plus_plus_two_stage_12eps.pth --coco_path /path/coco/data --two_stage --num_queries_one2many 1500 --mixed_selection --look_forward_twice
```
python test.py --pre_trained_model <checkpoint path> --coco_path <coco path>
```
其余对应参数与训练模型参数需一致, 详情请参考代码里面的参数配置:
#### 多卡推理
```
......
......@@ -204,12 +204,12 @@ def get_args_parser():
# dataset parameters
parser.add_argument("--dataset_file", default="coco")
parser.add_argument("--coco_path", default="/public/DL_DATA/COCO2017", type=str)
parser.add_argument("--coco_path", default="/home/datasets/COCO2017", type=str)
parser.add_argument("--coco_panoptic_path", type=str)
parser.add_argument("--remove_difficult", action="store_true")
parser.add_argument(
"--output_dir", default="", help="path where to save, empty for no saving"
"--output_dir", default="./results", help="path where to save, empty for no saving"
)
parser.add_argument(
"--device", default="cuda", help="device to use for training / testing"
......
......@@ -74,7 +74,7 @@ def get_parser():
parser.add_argument("--two_stage", default=False, action="store_true")
parser.add_argument("--dataset_file", default="coco")
parser.add_argument("--coco_path", default="/home/datasets/COCO2017", type=str)
parser.add_argument("--save_path", default="./result", type=str)
parser.add_argument("--save_path", default="./result_img", type=str)
parser.add_argument(
"--cache_mode",
default=False,
......
......@@ -8,6 +8,6 @@ echo "Training start ..."
# coco_path是训练数据集地址,数据是coco format
sh <config path> --coco_path <coco path>
# example
# sh ./configs/two_stage/deformable-detr-hybrid-branch/12eps/r50_hybrid_branch_lambda1_group6_t1500_dp0_mqs_lft_deformable_detr_plus_iterative_bbox_refinement_plus_plus_two_stage.sh \
# sh ./configs/two_stage/deformable-detr-hybrid-branch/12eps/r50_hybrid_branch_lambda1_group6_t1500_dp0_mqs_lft_deformable_detr_plus_iterative_bbox_refinement_plus_plus_two_stage.sh
echo "Training finished."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment