I tried to get the models from
https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/models_list.md
(the "high" accurancy models)
and converted them to 'onnx' format using 'paddle2onnx'
paddle2onnx --model_dir model_dir \
--model_filename inference.pdmodel \
--params_filename inference.pdiparams \
--save_file model.onnx
And used them as:
ocr = await Ocr.create({
models:{
detectionPath: path.resolve(__dirname,'assets', 'ch_PP-OCRv4_det_server_infer.onnx'),
recognitionPath: path.resolve(__dirname,'assets', 'ch_PP-OCRv4_rec_server_infer.onnx'),
dictionaryPath: path.resolve(__dirname,'assets', 'chars.txt'),
}
});
But the recognition is not working. If I remove them and use the defaults, it works again.
I tried to get the models from
https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.7/doc/doc_ch/models_list.md
(the "high" accurancy models)
and converted them to 'onnx' format using 'paddle2onnx'
And used them as:
But the recognition is not working. If I remove them and use the defaults, it works again.