JaidedAI / EasyOCR

Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
https://www.jaided.ai
Apache License 2.0
23k stars 3.03k forks source link

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

Open tommedema opened 6 months ago

tommedema commented 6 months ago

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

Wang-Yu-Qing commented 5 months ago

+1

nywhere commented 4 months ago

+1

Tawan-Tan commented 2 months ago

+1