未验证 提交 a8f21e01 编写于 作者: L littletomatodonkey 提交者: GitHub

fix doc of image size (#764)

* fix doc of image size, test=document_fix

* fix doc

* fix doc
上级 6c6a87f7
......@@ -246,7 +246,7 @@ Among them, the `--model` parameter is used to specify the model name, `--pretra
**Note**:
1. If `--output_path=./inference`, then three files will be generated in the folder `inference`, they are `inference.pdiparams`, `inference.pdmodel` and `inference.pdiparams.info`.
2. You can specify the `shape` of the model input image by setting the parameter `--img_size`, the default is `224`, which means the shape of input image is `224*224`.
2. You can specify the `shape` of the model input image by setting the parameter `--img_size`, the default is `224`, which means the shape of input image is `224*224`. If you want to use `Transformer series models`, such as `DeiT_***_384`, `ViT_***_384`, you need to set `--img_size=384`.
The above command will generate the model structure file (`inference.pdmodel`) and the model weight file (`inference.pdiparams`), and then the inference engine can be used for inference:
......
......@@ -257,7 +257,8 @@ python tools/export_model.py \
**注意**
1. `--output_path`表示输出的inference模型文件夹路径,若`--output_path=./inference`,则会在`inference`文件夹下生成`inference.pdiparams``inference.pdmodel``inference.pdiparams.info`文件。
2. 可以通过设置参数`--img_size`指定模型输入图像的`shape`,默认为`224`,表示图像尺寸为`224*224`,请根据实际情况修改。
2. 可以通过设置参数`--img_size`指定模型输入图像的`shape`,默认为`224`,表示图像尺寸为`224*224`,请根据实际情况修改;如果使用`Transformer`系列模型,如`DeiT_***_384`, `ViT_***_384`等,请注意模型的输入数据尺寸,需要设置参数`img_size=384`
上述命令将生成模型结构文件(`inference.pdmodel`)和模型权重文件(`inference.pdiparams`),然后可以使用预测引擎进行推理:
......@@ -281,7 +282,6 @@ python tools/infer/predict.py \
+ `enable_calc_topk`: 是否计算预测结果的Topk精度指标,默认为`False`
+ `gt_label_path`: 图像文件名以及真值标签文件,当`enable_calc_topk`为True时生效,用于读取待预测的图像列表及其标签。
**注意**: 如果使用`Transformer`系列模型,如`DeiT_***_384`, `ViT_***_384`等,请注意模型的输入数据尺寸,需要设置参数`resize_short=384`, `resize=384`
* 如果你希望评测模型速度,建议使用该脚本(`tools/infer/predict.py`),同时开启TensorRT加速预测。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册