Skip to content

Commit 5605f3e

Browse files
authored
Update ONNXRT layoutlmv2 example README (#1448)
Signed-off-by: yuwenzho <yuwen.zhou@intel.com>
1 parent cd1f9e2 commit 5605f3e

File tree

2 files changed

+4
-5
lines changed
  • examples/onnxrt/nlp/huggingface_model/token_classification/layoutlmv2/quantization

2 files changed

+4
-5
lines changed

examples/onnxrt/nlp/huggingface_model/token_classification/layoutlmv2/quantization/ptq_dynamic/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@ Export the [nielsr/layoutlmv2-finetuned-funsd](https://huggingface.co/nielsr/lay
2222
python prepare_model.py --input_model="nielsr/layoutlmv2-finetuned-funsd" --output_model="layoutlmv2-finetuned-funsd-exported.onnx"
2323
```
2424

25-
> Note: To export LayoutLMv2, please install [detectron2](https://github.com/facebookresearch/detectron2) first.
25+
> Note: To export LayoutLMv2, please install [detectron2](https://github.com/facebookresearch/detectron2) with `python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'` first. Also, you should probably install tesseract with something like: `conda install -c conda-forge tesseract`.
2626
2727
# Run
2828

2929
## 1. Quantization
3030

31-
Static quantization with QOperator format:
31+
Dynamic quantization:
3232

3333
```bash
3434
bash run_quant.sh --input_model=./layoutlmv2-finetuned-funsd-exported.onnx \ # onnx model path as *.onnx
35-
--output_model=/path/to/model_tune \
36-
--quant_format="QOperator"
35+
--output_model=/path/to/model_tune
3736
```
3837

3938
## 2. Benchmark

examples/onnxrt/nlp/huggingface_model/token_classification/layoutlmv2/quantization/ptq_static/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Export the [nielsr/layoutlmv2-finetuned-funsd](https://huggingface.co/nielsr/lay
2222
python prepare_model.py --input_model="nielsr/layoutlmv2-finetuned-funsd" --output_model="layoutlmv2-finetuned-funsd-exported.onnx"
2323
```
2424

25-
> Note: To export LayoutLMv2, please install [detectron2](https://github.com/facebookresearch/detectron2) first.
25+
> Note: To export LayoutLMv2, please install [detectron2](https://github.com/facebookresearch/detectron2) with `python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'` first. Also, you should probably install tesseract with something like: `conda install -c conda-forge tesseract`.
2626
2727
# Run
2828

0 commit comments

Comments
 (0)