Closed claymore07 closed 9 months ago
Hello @claymore07, thanks for your feedback! I just added support for this in b5e5d524776f06cf43472d9d75bb5feb00b791ed .
from hezar.models import Model
model = Model.load("hezarai/crnn-fa-64x256-license-plate-recognition") # CRNN
text = model.predict("../assets/license_plate_ocr_example.jpg", return_scores=True)
print(text)
The output now includes a score
field for each sample in the batch that represents the mean confidence over all characters:
[{'text': '۷۷۹۷۷س۷۵', 'score': 0.9834718108177185}]
This feature be included in the next release of Hezar but if you want to try it urgently, you can install Hezar from source (main
branch):
git clone https://github.com/hezarai/hezar.git
cd hezar
pip install ".[vision]"
Thanks a lot for your comprehensive response
Hi, First of all, Thank you for your great work. I'm using "crnn-fa-64x256-license-plate-recognition" for license plate OCR, It works really well, however, I need a confidence level for read text, like EasyOCR. Is there a way to get this value alongside the license plate text? Best Regards