EasyOCR
EasyOCR copied to clipboard
compute_ratio_and_resize passes a PIL constant to a cv2 function
utils.py contains the following code https://github.com/JaidedAI/EasyOCR/blob/c999505ef6b43be1c4ee36aa04ad979175178352/easyocr/utils.py#L566-L577
Note that Image is part of PIL https://github.com/JaidedAI/EasyOCR/blob/c999505ef6b43be1c4ee36aa04ad979175178352/easyocr/utils.py#L7-L8
Since both of these map to an integer, this is not a type error. However PIL maps LANCZOS to 1 (https://github.com/python-pillow/Pillow/blob/e47877587fb8aa1853ef7473285a2964f5e98520/src/PIL/Image.py#L158-L164 ), while a 1 means bilinear interpolation in opencv (https://docs.opencv.org/3.4/da/d54/group__imgproc__transform.html )
Good find. Did you try changing the code so it passes an integer value of 4 to the openCV function? If so, did you see any performance differences?
I'm going to test this and see if it improves anything.