关于使用 读光-文字检测-DBNet行检测模型-中英-通用领域,版本问题

关于使用 读光-文字检测-DBNet行检测模型-中英-通用领域,版本问题

bash 复制代码
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

bash 复制代码
pip install numpy

Successfully installed numpy-2.2.5

bash 复制代码
pip install packaging

Successfully installed packaging-25.0

bash 复制代码
pip install addict

Successfully installed addict-2.4.0

bash 复制代码
pip install setuptools

Successfully installed setuptools-79.0.1

bash 复制代码
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

如果用了最新版本还是不能运行就用下面的版本再次尝试

卸载所有版本

bash 复制代码
pip uninstall -y modelscope numpy packaging addict setuptools datasets

安装指定版本

bash 复制代码
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'

就访问下面链接

bash 复制代码
https://pytorch.org/

选择自己适合的类型,我这用的CPU做演示,所以就选了 windows + pip + python + cpu

bash 复制代码
 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

如果还遇到报错就按下面一个一个加上去:

bash 复制代码
 pip install transformers

Successfully installed regex-2024.11.6 safetensors-0.5.3 tokenizers-0.21.1 transformers-4.51.3

bash 复制代码
pip install sentencepiece

Successfully installed sentencepiece-0.2.0

bash 复制代码
pip install opencv-python

Successfully installed opencv-python-4.11.0.86

bash 复制代码
pip install tf_slim

Successfully installed absl-py-2.2.2 tf_slim-1.1.0

bash 复制代码
pip install tensorflow
bash 复制代码
pip install pyclipper
bash 复制代码
pip install shapely
相关推荐
leisoo80977 小时前
100GBA股股票数据怎么存ClickHouseRedisMySQLJSON完整对比
大数据·linux·服务器·开发语言·python
WangYan20227 小时前
基于XGBoost与AI的生态—地学多源数据建模:植被与土地利用识别、土壤碳氮空间预测、生物多样性驱动机制、土壤微生物功能预测、生态退化与风险识别
python·机器学习·xgboost
金銀銅鐵10 小时前
[Python] 借助 turtle 逐字展示唐诗《金缕衣》
python
Python大数据分析@12 小时前
使用大模型MCP采集数据,爬虫已经无门槛
python·网络爬虫
quantdash_cc12 小时前
告别自建 Requests/BS4 网页爬虫:基于 QuantDash 搭建零维保的高性能量化行情流水线
开发语言·爬虫·python·pandas·量化·quantdash
65岁退休Coder12 小时前
LangChain v1.3.4 笔记 - 07 补充:链式调用 LCEL
后端·python·langchain
卷无止境12 小时前
FastAPI 部署在 Nginx 后面到底该怎么配
后端·python
半亩码田12 小时前
C#转Python第3.1篇:Python 的 class 没有访问修饰符?面向对象的另一条路
开发语言·python·c#
Wzx19801213 小时前
python沙箱和docker沙箱你选对了吗?
开发语言·python·docker
Python私教13 小时前
签名 URL 刷新导致审批失效?别急着删掉所有 query
python·安全