I have successfully fine-tuned a CRAFT model using the training script provided in the EasyOCR's CRAFT training documentation, and obtained a file named CRAFT_clr_amp_48.pth. However, I am unsure how to integrate this fine-tuned model into EasyOCR for text detection purposes.
Could you please provide guidance or examples on how to use a fine-tuned .pth model with EasyOCR for text detection?
What I Tried
Following the model API documentation, I set the model_storage_directory="./saved_models/test" in the Reader class and placed the .pth file in the test folder (this worked fine for recognition fine-tuning).
Result
It displayed the following message and seemed to download a new CRAFT .pth file, which was then used:
Downloading detection model, please wait. This may take several minutes depending upon your network connection.
Since craft_mlt_25k.pth was downloaded, I renamed my fine-tuned model to craft_mlt_25k.pth and executed it. However, I received the following message and craft_mlt_25k.pth was re-downloaded:
MD5 hash mismatch, possible file corruption. Re-downloading the detection model, please wait. This may take several minutes depending upon your network connection.
I then specified my fine-tuned model's .pth file in the detector parameter.
Result
No error was produced, but there was no change in detection accuracy. It seemed unlikely to make a difference since it's a boolean value.