0

Hello i am trying to learn python Currently i want to extract text from images like captcha. But i tried ocr-pytesseract and 1 more which i dont remember name. When i try to extract text from image 1 it works fine but when i want to extract text from image it gives me nothing. Any advice ? Thank you! And here is my code.

from PIL import Image
from pytesseract import pytesseract

path_to_tesseract = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
pytesseract.tesseract_cmd = path_to_tesseract

path_to_image = 'alz.png'
img = Image.open(path_to_image)

#image to text
text = pytesseract.image_to_string(img)
print(text)

image_1image 2

1 Answer 1

1

I used yolov5 and with 100 images dataset I have achieved 60% accuracy on test data.

Example image

1
  • i will try in couple hours thank you! but since i am newbie is there any guide for it ? :)
    – murty
    Dec 9, 2022 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.