EasyOCR icon indicating copy to clipboard operation
EasyOCR copied to clipboard

Macos M1 CPUs and GPUs get different results

Open tuilp1a opened this issue 1 year ago • 2 comments

Environment

Macos 14.1 M1 Pro Part of My Image

image

Code

import easyocr

if __name__ == '__main__':
    start_time = time.time()
    reader = easyocr.Reader(['ch_sim', 'en'], gpu=False)  # this needs to run only once to load the model into memory
    result = reader.readtext(r'./images/idalog/screen/qun.screen.0.png', detail = 0)
    end_time = time.time()
    print("time: {:.2f} seconds".format(end_time - start_time))

Result

CPU

'请点击查看错误日志详情', '收到', '回复' time: 5.74 seconds

GPU

'请点击查看错误日志详情', '收鼢', '鼢复' time: 8.63 seconds

The CPU works well, but the GPU has some problems!

Thank you for all your hard work!

tuilp1a avatar Dec 09 '23 16:12 tuilp1a

I had the same problem with another language and dataset doing my dissertation. Also our production systems display this behavior, I believe it is related to the word size used in gpu vs cpu, and the precision on the convolution operation of the neural network.

vfbsilva avatar Dec 29 '23 13:12 vfbsilva

+1

841660202 avatar Apr 30 '24 06:04 841660202