预期输入:
预期输出:
Powder 250gms 10
Masala 100gms 5
chicken 500gms 6
Coco nuts 5 ltrs
Bananas 12
Carrot 10kgs
Rice 20 kgs 5
Apples 5 kg
Millet 10 kg
Dal 20kgs
Shampoo 3
您想要进行 OCR(光学字符识别)
安装这些依赖项
pip install pillow
pip install numpy
pip install pytesseract
# Import Libraries
from PIL import Image
import pytesseract
import numpy as np
# Define Filename/Path
filename = 'image_01.png'
# Open Said Image into an numpy data array
img1 = np.array(Image.open(filename))
# Process image and get text from it
text = pytesseract.image_to_string(img1)
# Do something with the output text
print(text)
您可以找到更多资源这里