关于使用 读光-文字检测-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
相关推荐
VW_4043 小时前
csdn-2026-11-23-第一站踩坑
爬虫·python
yiangL_3 小时前
课后作业4:基于 Python 的古诗词词云可视化(P205)
开发语言·python
Dmz丶3 小时前
前端转 AI 100 天 Day 52:RAG 项目实战(一)——从零搭建企业知识库
python
卷无止境7 小时前
用 SimPy 做离散事件仿真:时钟不走步,事件自己排队
后端·python
撸码猿8 小时前
数据采集场景的语序点选验证码:90.2% 整词准确率的本地 OCR 实践
python·ocr
用户0332126663678 小时前
使用 Python 在 Excel 中创建折线图和条形图
python·excel
木子欢儿9 小时前
Ubuntu 26.04 LTS 安装Python 3.12
linux·运维·服务器·python·ubuntu
Wellijohn10 小时前
Python 异步并发:我把 5 个坑踩完了,你照着抄模板就行
python
AI创界者10 小时前
Python 进阶实战(六十二章):分布式定时任务、异步工作流与幂等补偿机制实战
人工智能·python·aigc
炸薯条!11 小时前
Python面向对象基础:类与对象、实例方法、魔法方法和属性详解
java·开发语言·python