From f3ca963843a52bab9004626ce706ad88fbcbfba3 Mon Sep 17 00:00:00 2001 From: zkyseu <118790294+zkyseu@users.noreply.github.com> Date: Thu, 15 Dec 2022 10:56:45 +0800 Subject: [PATCH] Update README.md --- README.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 40c280c..2e53ad0 100644 --- a/README.md +++ b/README.md @@ -193,8 +193,30 @@ python tools/train.py -c configs/scnn/resnet50_tusimple.py \ ``` ### Inference/Demo -```Shell -# Coming soon +See `tools/detect.py` for detailed information. +``` +python tools/detect.py --help + +usage: detect.py [-h] [--img IMG] [--show] [--savedir SAVEDIR] + [--load_from LOAD_FROM] + config + +positional arguments: + config The path of config file + +optional arguments: + -h, --help show this help message and exit + --img IMG The path of the img (img file or img_folder), for + example: data/*.png + --show Whether to show the image + --savedir SAVEDIR The root of save directory + --load_from LOAD_FROM + The path of model +``` +To run inference on example images in `./images` and save the visualization images in `vis` folder: +``` +python tools/detect.py configs/scnn/resnet50_tusimple.py --img images\ + --load_from model.pth --savedir ./vis ``` ## License