CnOCR: Awesome Chinese/English OCR Python toolkits based on PyTorch. It comes with 20+ well-trained models for different application scenarios and can be used directly after installation. 【基于 PyTorch/MXNet 的中文/英文 OCR Python 包。】
Traceback (most recent call last):
File "C:\Users\18154\Desktop\slg\test.py", line 2, in
from cnocr import CnOcr
File "C:\Users\18154\Desktop\slg\venv\Lib\site-packages\cnocr__init__.py", line 21, in
from .cn_ocr import CnOcr, gen_model
File "C:\Users\18154\Desktop\slg\venv\Lib\site-packages\cnocr\cn_ocr.py", line 31, in
from cnocr.models.ocr_model import OcrModel
File "C:\Users\18154\Desktop\slg\venv\Lib\site-packages\cnocr\models\ocr_model.py", line 34, in
from .mobilenet import gen_mobilenet_v3
File "C:\Users\18154\Desktop\slg\venv\Lib\site-packages\cnocr\models\mobilenet.py", line 25, in
from torchvision.models.mobilenetv2 import ConvBNActivation
ImportError: cannot import name 'ConvBNActivation' from 'torchvision.models.mobilenetv2' (C:\Users\18154\Desktop\slg\venv\Lib\site-packages\torchvision\models\mobilenetv2.py)
Traceback (most recent call last): File "C:\Users\18154\Desktop\slg\test.py", line 2, in
from cnocr import CnOcr
File "C:\Users\18154\Desktop\slg\venv\Lib\site-packages\cnocr__init__.py", line 21, in
from .cn_ocr import CnOcr, gen_model
File "C:\Users\18154\Desktop\slg\venv\Lib\site-packages\cnocr\cn_ocr.py", line 31, in
from cnocr.models.ocr_model import OcrModel
File "C:\Users\18154\Desktop\slg\venv\Lib\site-packages\cnocr\models\ocr_model.py", line 34, in
from .mobilenet import gen_mobilenet_v3
File "C:\Users\18154\Desktop\slg\venv\Lib\site-packages\cnocr\models\mobilenet.py", line 25, in
from torchvision.models.mobilenetv2 import ConvBNActivation
ImportError: cannot import name 'ConvBNActivation' from 'torchvision.models.mobilenetv2' (C:\Users\18154\Desktop\slg\venv\Lib\site-packages\torchvision\models\mobilenetv2.py)
python:3.11.2 torchvision:0.15.1