EasyOCR icon indicating copy to clipboard operation
EasyOCR copied to clipboard

TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

Open tommedema opened this issue 2 years ago • 3 comments

Given this python code:

    import cv2
    import easyocr
    from PIL import Image

    # Initialize EasyOCR Reader
    reader = easyocr.Reader(['en'], detect_network = 'dbnet18')

    # Read the image
    image = cv2.imread(image_path)
    if image is None:
        raise ValueError("Image not found or unable to load.")
    print(f"Image dimensions (HxW): {image.shape[0]}x{image.shape[1]}")

    # Use EasyOCR to detect text regions
    horizontal_list, _ = reader.detect(image)

I get:

TypeError: Cannot convert a MPS Tensor to float64 dtype as the MPS framework doesn't support float64. Please use float32 instead.

On Macbook Air 15" Apple M2 chipset

tommedema avatar Jan 07 '24 09:01 tommedema

+1

Wang-Yu-Qing avatar Feb 22 '24 11:02 Wang-Yu-Qing

+1

nywhere avatar Mar 04 '24 15:03 nywhere

+1

Tawan-Tan avatar May 20 '24 04:05 Tawan-Tan