@@ -202,3 +202,45 @@ And the output look like this:
202202| Max | 1.689 | 591.983 |
203203+--------+------------+---------+
204204```
205+
206+ ## generate_md_table
207+
208+ This tool can be used to generate supported-backends markdown table.
209+
210+ ### Usage
211+
212+ ``` shell
213+ python tools/generate_md_table.py \
214+ ${YML_FILE} \
215+ ${OUTPUT} \
216+ --backends ${BACKENDS}
217+ ```
218+
219+ ### Description of all arguments
220+
221+ - ` yml_file: ` input yml config path
222+ - ` output: ` output markdown file path
223+ - ` --backends: ` output backends list. If not specified, it will be set 'onnxruntime' 'tensorrt' 'torchscript' 'pplnn' 'openvino' 'ncnn'.
224+
225+ ### Example:
226+
227+ Generate backends markdown table from mmocr.yml
228+
229+ ``` shell
230+ python tools/generate_md_table.py tests/regression/mmocr.yml tests/regression/mmocr.md --backends onnxruntime tensorrt torchscript pplnn openvino ncnn
231+ ```
232+
233+ And the output look like this:
234+
235+ | model | task | onnxruntime | tensorrt | torchscript | pplnn | openvino | ncnn |
236+ | :----------------------------------------------------------------------------------- | :-------------- | :---------: | :------: | :---------: | :---: | :------: | :--: |
237+ | [ DBNet] ( https://github.com/open-mmlab/mmocr/tree/main/configs/textdet/dbnet ) | TextDetection | Y | Y | Y | Y | Y | Y |
238+ | [ DBNetpp] ( https://github.com/open-mmlab/mmocr/tree/main/configs/textdet/dbnetpp ) | TextDetection | Y | Y | N | N | Y | Y |
239+ | [ PANet] ( https://github.com/open-mmlab/mmocr/tree/main/configs/textdet/panet ) | TextDetection | Y | Y | Y | Y | Y | Y |
240+ | [ PSENet] ( https://github.com/open-mmlab/mmocr/tree/main/configs/textdet/psenet ) | TextDetection | Y | Y | Y | Y | Y | Y |
241+ | [ TextSnake] ( https://github.com/open-mmlab/mmocr/tree/main/configs/textdet/textsnake ) | TextDetection | Y | Y | Y | N | N | N |
242+ | [ MaskRCNN] ( https://github.com/open-mmlab/mmocr/tree/main/configs/textdet/maskrcnn ) | TextDetection | Y | Y | Y | N | N | N |
243+ | [ CRNN] ( https://github.com/open-mmlab/mmocr/tree/main/configs/textrecog/crnn ) | TextRecognition | Y | Y | Y | Y | N | Y |
244+ | [ SAR] ( https://github.com/open-mmlab/mmocr/tree/main/configs/textrecog/sar ) | TextRecognition | Y | N | Y | N | N | N |
245+ | [ SATRN] ( https://github.com/open-mmlab/mmocr/tree/main/configs/textrecog/satrn ) | TextRecognition | Y | Y | Y | N | N | N |
246+ | [ ABINet] ( https://github.com/open-mmlab/mmocr/tree/main/configs/textrecog/abinet ) | TextRecognition | Y | Y | Y | N | N | N |
0 commit comments