关于使用 读光-文字检测-DBNet行检测模型-中英-通用领域,版本问题
pip install modelscope
Successfully installed certifi-2025.4.26 charset-normalizer-3.4.1 colorama-0.4.6 idna-3.10 modelscope-1.25.0 requests-2.32.3 tqdm-4.67.1 urllib3-2.4.0
pip install numpy
Successfully installed numpy-2.2.5
pip install packaging
Successfully installed packaging-25.0
pip install addict
Successfully installed addict-2.4.0
pip install setuptools
Successfully installed setuptools-79.0.1
pip install datasets
Successfully installed aiohappyeyeballs-2.6.1 aiohttp-3.11.18 aiosignal-1.3.2 attrs-25.3.0 datasets-3.5.0 dill-0.3.8 filelock-3.18.0 frozenlist-1.6.0 fsspec-2024.12.0 huggingface-hub-0.30.2 multidict-6.4.3 multiprocess-0.70.16 pandas-2.2.3 propcache-0.3.1 pyarrow-19.0.1 python-dateutil-2.9.0.post0 pytz-2025.2 pyyaml-6.0.2 six-1.17.0 typing-extensions-4.13.2 tzdata-2025.2 xxhash-3.5.0 yarl-1.20.0
如果用了最新版本还是不能运行就用下面的版本再次尝试
卸载所有版本
pip uninstall -y modelscope numpy packaging addict setuptools datasets
安装指定版本
pip install modelscope==1.11.0 numpy==2.1.3 packaging==24.2 addict==2.4.0 setuptools==79.0.0 datasets==2.14.6
安装完成后,报错:
ModuleNotFoundError: No module named ‘torch’
就访问下面链接
https://pytorch.org/
选择自己适合的类型,我这用的CPU做演示,所以就选了 windows + pip + python + cpu
pip install torch torchvision torchaudio
Successfully installed MarkupSafe-3.0.2 jinja2-3.1.6 mpmath-1.3.0 networkx-3.4.2 sympy-1.13.3 torch-2.7.0 torchaudio-2.7.0 torchvision-0.22.0
如果还遇到报错就按下面一个一个加上去:
pip install transformers
Successfully installed regex-2024.11.6 safetensors-0.5.3 tokenizers-0.21.1 transformers-4.51.3
pip install sentencepiece
Successfully installed sentencepiece-0.2.0
pip install opencv-python
Successfully installed opencv-python-4.11.0.86
pip install tf_slim
Successfully installed absl-py-2.2.2 tf_slim-1.1.0
pip install tensorflow
pip install pyclipper
pip install shapely