关于使用 读光-文字检测-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
相关推荐
CodeCraft Studio4 分钟前
借助Aspose.HTML控件,在 Python 中将 HTML 转换为 Markdown
开发语言·python·html·markdown·aspose·html转markdown·asposel.html
悠哉悠哉愿意23 分钟前
【电赛学习笔记】MaxiCAM 项目实践——与单片机的串口通信
笔记·python·单片机·嵌入式硬件·学习·视觉检测
封奚泽优28 分钟前
使用Python实现单词记忆软件
开发语言·python·random·qpushbutton·qtwidgets·qtcore·qtgui
Goona_1 小时前
拒绝SQL恐惧:用Python+pyqt打造任意Excel数据库查询系统
数据库·python·sql·excel·pyqt
xw33734095642 小时前
彩色转灰度的核心逻辑:三种经典方法及原理对比
人工智能·python·深度学习·opencv·计算机视觉
倔强青铜三2 小时前
为什么 self 与 super() 成了 Python 的永恒痛点?
人工智能·python·面试
墨尘游子2 小时前
目标导向的强化学习:问题定义与 HER 算法详解—强化学习(19)
人工智能·python·算法
小白学大数据3 小时前
基于Python的新闻爬虫:实时追踪行业动态
开发语言·爬虫·python
freed_Day3 小时前
python面向对象编程详解
开发语言·python
普郎特3 小时前
张三:从泥水匠到包工头的故事 *—— 深入浅出讲解 `run_in_executor()` 的工作原理*
python