Open devalnor opened 2 months ago
This is not possible to get confidence, because it combines a few results with different confidence
In EasyOCR, when extracting text from images in paragraph mode, the confidence scores are typically included in the results. However, if they are missing, it might be due to the version of EasyOCR you're using or the specific settings and parameters passed to the readtext
function.
Possible solution:-
detail
parameter that controls the level of detail in the output. By setting detail=1
, you should get confidence scores along with the bounding boxes and text.
import easyocr
reader = easyocr.Reader(['en'], gpu=True)
results = reader.readtext('path_to_image', detail=1, paragraph=True)
for result in results: bbox, text, confidence = result print(f"Bounding Box: {bbox}, Text: {text}, Confidence: {confidence}")
3. Verify the output structure
4. Check for Paragraph Mode Limitations:
If you're specifically working in paragraph mode and confidence scores are not included, it might be due to how the paragraph mode processes text.
Hope this helps
Thanks
When extract text from images in paragraph mode, the confidence scores for the detected text are not included in the results.
Only
bbox
andtext
are in results.Any idea of how to solve this?