"src/vscode:/vscode.git/clone" did not exist on "6c41008a9271d6ce6aaaa90d26309e52011ae8bd"
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 ...@@ -136,14 +136,15 @@ bash ./train_multi.sh
如没有预训练模型, 可从 参考资料 中提供的模型下载, 选择模型对应的config后进行效果验证。 如没有预训练模型, 可从 参考资料 中提供的模型下载, 选择模型对应的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> python test.py --pre_trained_model <checkpoint path> --coco_path <coco path>
``` ```
其余对应参数与训练模型参数需一致, 详情请参考代码里面的参数配置:
#### 多卡推理 #### 多卡推理
``` ```
......
...@@ -204,12 +204,12 @@ def get_args_parser(): ...@@ -204,12 +204,12 @@ def get_args_parser():
# dataset parameters # dataset parameters
parser.add_argument("--dataset_file", default="coco") 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("--coco_panoptic_path", type=str)
parser.add_argument("--remove_difficult", action="store_true") parser.add_argument("--remove_difficult", action="store_true")
parser.add_argument( 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( parser.add_argument(
"--device", default="cuda", help="device to use for training / testing" "--device", default="cuda", help="device to use for training / testing"
......
...@@ -74,7 +74,7 @@ def get_parser(): ...@@ -74,7 +74,7 @@ def get_parser():
parser.add_argument("--two_stage", default=False, action="store_true") parser.add_argument("--two_stage", default=False, action="store_true")
parser.add_argument("--dataset_file", default="coco") parser.add_argument("--dataset_file", default="coco")
parser.add_argument("--coco_path", default="/home/datasets/COCO2017", type=str) 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( parser.add_argument(
"--cache_mode", "--cache_mode",
default=False, default=False,
......
...@@ -8,6 +8,6 @@ echo "Training start ..." ...@@ -8,6 +8,6 @@ echo "Training start ..."
# coco_path是训练数据集地址,数据是coco format # coco_path是训练数据集地址,数据是coco format
sh <config path> --coco_path <coco path> sh <config path> --coco_path <coco path>
# example # 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." 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