You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sys.platform: darwin
Python: 3.10.15 (main, Oct 3 2024, 02:24:49) [Clang 14.0.6 ]
CUDA available: False
MUSA available: False
numpy_random_seed: 2147483648
GCC: Apple clang version 15.0.0 (clang-1500.3.9.4)
PyTorch: 2.0.0
PyTorch compiling details: PyTorch built with:
from mmocr.apis import MMOCRInferencer
import matplotlib.pyplot as plt
if name == 'main':
infer = MMOCRInferencer(det='dbnetpp', rec='crnn',device="cpu")
img_path = "images/bad2.png"
result = infer('img_path', return_vis=True)
plt.figure(figsize=(9, 16))
plt.imshow(result['visualization'][0])
plt.show()
Reproduces the problem - command or script
from mmocr.apis import MMOCRInferencer
import matplotlib.pyplot as plt
if name == 'main':
infer = MMOCRInferencer(det='dbnetpp', rec='crnn',device="cpu")
img_path = "images/bad2.png"
result = infer('img_path', return_vis=True)
plt.figure(figsize=(9, 16))
plt.imshow(result['visualization'][0])
plt.show()
Reproduces the problem - error message
Traceback (most recent call last):
File "/Users/macbookc23551/PycharmProjects/mmocr/main.py", line 5, in
infer = MMOCRInferencer(det='dbnetpp', rec='crnn',device="cpu")
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/apis/inferencers/mmocr_inferencer.py", line 69, in init
self.textdet_inferencer = TextDetInferencer(
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/apis/inferencers/base_mmocr_inferencer.py", line 65, in init
super().init(
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/infer/infer.py", line 180, in init
self.model = self._init_model(cfg, weights, device) # type: ignore
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/infer/infer.py", line 483, in _init_model
model = MODELS.build(cfg.model)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/registry/build_functions.py", line 98, in build_from_cfg
obj_cls = registry.get(obj_type)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/registry/registry.py", line 451, in get
self.import_from_location()
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/registry/registry.py", line 376, in import_from_location
import_module(loc)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/models/init.py", line 2, in
from .common import * # NOQA
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/models/common/init.py", line 2, in
from .backbones import * # NOQA
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/models/common/backbones/init.py", line 2, in
from .clip_resnet import CLIPResNet
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/models/common/backbones/clip_resnet.py", line 4, in
from mmdet.models.backbones import ResNet
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmdet/models/init.py", line 2, in
from .backbones import * # noqa: F401,F403
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmdet/models/backbones/init.py", line 2, in
from .csp_darknet import CSPDarknet
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmdet/models/backbones/csp_darknet.py", line 11, in
from ..layers import CSPLayer
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmdet/models/layers/init.py", line 3, in
from .bbox_nms import fast_nms, multiclass_nms
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmdet/models/layers/bbox_nms.py", line 5, in
from mmcv.ops.nms import batched_nms
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmcv/ops/init.py", line 2, in
from .active_rotated_filter import active_rotated_filter
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmcv/ops/active_rotated_filter.py", line 10, in
ext_module = ext_loader.load_ext(
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmcv/_ext.cpython-310-darwin.so, 0x0002): Symbol not found: __ZNK3c105Error4whatEv
Referenced from: <7C1A4097-6119-3DEF-8A7A-6BB83B78C991> /opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmcv/_ext.cpython-310-darwin.so
Expected in: <3F9923D2-81A5-3EC8-9739-EC0C1C816132> /opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/torch/lib/libc10.dylib
Additional information
I just use the official demo
The text was updated successfully, but these errors were encountered:
Prerequisite
Task
I'm using the official example scripts/configs for the officially supported tasks/models/datasets.
Branch
main branch https://github.com/open-mmlab/mmocr
Environment
sys.platform: darwin
Python: 3.10.15 (main, Oct 3 2024, 02:24:49) [Clang 14.0.6 ]
CUDA available: False
MUSA available: False
numpy_random_seed: 2147483648
GCC: Apple clang version 15.0.0 (clang-1500.3.9.4)
PyTorch: 2.0.0
PyTorch compiling details: PyTorch built with:
TorchVision: 0.15.0
OpenCV: 4.10.0
MMEngine: 0.10.5
MMOCR: 1.0.1+
Reproduces the problem - code sample
from mmocr.apis import MMOCRInferencer
import matplotlib.pyplot as plt
if name == 'main':
infer = MMOCRInferencer(det='dbnetpp', rec='crnn',device="cpu")
img_path = "images/bad2.png"
result = infer('img_path', return_vis=True)
plt.figure(figsize=(9, 16))
plt.imshow(result['visualization'][0])
plt.show()
Reproduces the problem - command or script
from mmocr.apis import MMOCRInferencer
import matplotlib.pyplot as plt
if name == 'main':
infer = MMOCRInferencer(det='dbnetpp', rec='crnn',device="cpu")
img_path = "images/bad2.png"
result = infer('img_path', return_vis=True)
plt.figure(figsize=(9, 16))
plt.imshow(result['visualization'][0])
plt.show()
Reproduces the problem - error message
Traceback (most recent call last):
File "/Users/macbookc23551/PycharmProjects/mmocr/main.py", line 5, in
infer = MMOCRInferencer(det='dbnetpp', rec='crnn',device="cpu")
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/apis/inferencers/mmocr_inferencer.py", line 69, in init
self.textdet_inferencer = TextDetInferencer(
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/apis/inferencers/base_mmocr_inferencer.py", line 65, in init
super().init(
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/infer/infer.py", line 180, in init
self.model = self._init_model(cfg, weights, device) # type: ignore
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/infer/infer.py", line 483, in _init_model
model = MODELS.build(cfg.model)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/registry/build_functions.py", line 232, in build_model_from_cfg
return build_from_cfg(cfg, registry, default_args)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/registry/build_functions.py", line 98, in build_from_cfg
obj_cls = registry.get(obj_type)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/registry/registry.py", line 451, in get
self.import_from_location()
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmengine/registry/registry.py", line 376, in import_from_location
import_module(loc)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/models/init.py", line 2, in
from .common import * # NOQA
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/models/common/init.py", line 2, in
from .backbones import * # NOQA
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/models/common/backbones/init.py", line 2, in
from .clip_resnet import CLIPResNet
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmocr/models/common/backbones/clip_resnet.py", line 4, in
from mmdet.models.backbones import ResNet
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmdet/models/init.py", line 2, in
from .backbones import * # noqa: F401,F403
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmdet/models/backbones/init.py", line 2, in
from .csp_darknet import CSPDarknet
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmdet/models/backbones/csp_darknet.py", line 11, in
from ..layers import CSPLayer
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmdet/models/layers/init.py", line 3, in
from .bbox_nms import fast_nms, multiclass_nms
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmdet/models/layers/bbox_nms.py", line 5, in
from mmcv.ops.nms import batched_nms
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmcv/ops/init.py", line 2, in
from .active_rotated_filter import active_rotated_filter
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmcv/ops/active_rotated_filter.py", line 10, in
ext_module = ext_loader.load_ext(
File "/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext
ext = importlib.import_module('mmcv.' + name)
File "/opt/miniconda3/envs/mmocr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmcv/_ext.cpython-310-darwin.so, 0x0002): Symbol not found: __ZNK3c105Error4whatEv
Referenced from: <7C1A4097-6119-3DEF-8A7A-6BB83B78C991> /opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/mmcv/_ext.cpython-310-darwin.so
Expected in: <3F9923D2-81A5-3EC8-9739-EC0C1C816132> /opt/miniconda3/envs/mmocr/lib/python3.10/site-packages/torch/lib/libc10.dylib
Additional information
I just use the official demo
The text was updated successfully, but these errors were encountered: