我已经安装了 craft-text- detector 但无法导入
craft_structure
:
pip install craft-text-detector
from craft_structure.detection import detect, get_detector
输出:
Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_33796\44427766.py in <module>
1 import torch
----> 2 from craft_structure.detection import detect, get_detector
3
4 device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
5 craft = get_detector("models/craft_mlt_25k.pth", device)
ModuleNotFoundError: No module named 'craft_structure'
我不相信您要导入的东西存在于此。该包与“craft_struct”没有任何关系。请参阅此处了解可用功能。