- Origin repo: https://github.com/clovaai/CRAFT-pytorch
- My Environment:
- pytorch 1.8.1+cu102
- onnxruntime 1.10.0
- check requirements.txt
pip install -r requirements.txt
- Download model pth from origin repo: craftmlt25k and push to folder weights
- Run:
CUDA_VISIBLE_DEVICES=0 python3 craft2onnx.py --craftmlt25kpthpath <craft_model_path.pth> --craftonnxpath <craft_model_onnx_save_path.onnx>
- Run:
CUDA_VISIBLE_DEVICES=0 python3 infer_craft_without_refinet.py --craftonnxpath <craft_model_onnx_path.onnx> --image <image_path_inference>
- Download model pth from origin repo: refinet and push to folder weights
- Run:
CUDA_VISIBLE_DEVICES=0 python3 craft2onnx.py --craftmlt25kpthpath <craft_model_path.pth> --refinetpthpath <refinet_model_path.pth> --refinetonnxpath <refinet_model_onnx_save_path.onnx>
- Run
CUDA_VISIBLE_DEVICES=0 python3 infer_craft_with_refinet.py --craftonnxpath <craft_model_onnx_path.onnx> --refineonnxpath <refinet_model_onnx_path.onnx> --image <image_path_inference>
- Download the converted models
Model name | Used datasets | Languages | Purpose | Model ONNX Link |
---|---|---|---|---|
General | SynthText, IC13, IC17 | Eng + MLT | For general purpose | Click |
LinkRefiner | CTW1500 | - | Used with the General Model | Click |
- Convert General craft_mlt_25k to ONNX with dynamic shape
- Convert LinkRefiner to ONNX with dynamic shape
- Convert General craft_mlt_25k to TensorRT with dynamic shape
- Convert LinkRefiner to TensorRT with dynamic shape
- Convert IC15 to ONNX with dynamic shape