UserWarning from torchvision
Author: majunze2001Created Jun 29, 2022Updated Jun 25, 2026
LabelsPR WELCOME
I am running the demo in the readme, but I got several warnings.
import easyocr
reader = easyocr.Reader(['en'])
result = reader.readtext(imgpath + 'sample.png', detail = 0)
print(result)And I got the following warnings:
warnings.warn(
C:\Users\22612\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\models\_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead.
warnings.warn(
C:\Users\22612\AppData\Local\Programs\Python\Python39\lib\site-packages\torchvision\models\_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and will be removed in 0.15. The current behavior is equivalent to passing `weights=None`.
warnings.warn(msg)```Source: JaidedAI/EasyOCR