Request for PaddleOCR Korean Model in .pdparams Format

#1
by ChangHyunBae - opened

Hello,

I hope this message finds you well. I recently discovered that RapidOCR utilizes the Korean model that you've graciously provided, and I wanted to reach out with a question.

We are currently using RapidOCR with your Korean model for text recognition tasks. However, we've identified the need for additional fine-tuning to better adapt the model to our specific dataset.

After thoroughly searching through the PaddleOCR repository, I found that Korean pretrained models are only available up to PP-OCRv3_rec, while PP-OCRv4_rec doesn't seem to have a Korean-specific pretrained model available.

I was wondering if your model might be available in .pdparams format (rather than just ONNX) so that we could use it as a pretrained model for further training? This would be incredibly helpful for our fine-tuning process.

Thank you so much for providing the Korean inference model to the community. Your contribution has been invaluable to our work.

I would greatly appreciate any guidance or assistance you might be able to provide.

Best regards,

By carefully analyzing the PaddleOCR code repository, you can download the korean_PP-OCRv4_rec training model through the following link: https://paddleocr.bj.bcebos.com/PP-OCRv4/multilingual/korean_PP-OCRv4_rec_train.tar . I hope it will be helpful to you.

This comment has been hidden

Thank you so much! I really appreciate your help.

I tried running inference using the model (link)[https://paddleocr.bj.bcebos.com/PP-OCRv4/multilingual/korean_PP-OCRv4_rec_train.ta] that you provided, but it doesn't recognize Korean text at all.
When I ran the same sample image using the ONNX model in the current repo with RapidOCR, it recognized the text accurately.

Also, I can't find https://paddleocr.bj.bcebos.com/PP-OCRv4/multilingual/korean_PP-OCRv4_rec_train.tar anywhere in PaddleOCR documentation. Could you tell me where you found this link?

I converted the model downloaded from your link to an inference model using the code below, then ran inference using the second code:

# config.yaml_path is included on above link
# inf_save_dir is where to save inferece model
python3 tools/export_model.py -c {config.yaml_path} -o Global.save_inference_dir={inf_save_dir}

I used the following code for inference(append below line on inferece.yaml on inf_save_dir)

Global:
  model_name:  PP-OCRv4_server_rec
ocr = PaddleOCR(
    ocr_version="PP-OCRv4", 
    use_doc_orientation_classify=False, 
    use_doc_unwarping=False,
    use_textline_orientation=False, 
    text_recognition_model_dir=inf_save_dir,
    text_recognition_model_name="PP-OCRv4_server_rec",
)
result = ocr.predict(image_path)

I'm sorry that I didn't explain it clearly and caused you trouble. This link is indeed not published in the official documentation of PaddleOCR, but we can infer it from its code and historically released model links. Based on my experience in developing the pdftable project, first, in paddleocr.py, you can get the download address of the korean_PP-OCRv4_rec inference model, and then refer to the model list released by OCRv4_rec, we can infer the download link address of the training model.

Reference URL:
https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.7/paddleocr.py#L101-L101

https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.7/doc%2Fdoc_ch%2Fmodels_list.md

https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.7/doc%2Fdoc_ch%2Fmodels_list.md#L88-L88

Thank you so much for the detailed response
It seems like it was in a previous release and has since been removed, which is why I couldn't find it.

I'll work on resolving this issue properly.

Thank you again!

Sign up or log in to comment