开发者社区 > ModelScope模型即服务 > 计算机视觉 > 正文

ModelScope Windows 11使用报错怎么办?

ModelScope Windows 11使用报错怎么办?

相关版本:python==3.8 modelscope==1.8.4 mmcv-full==1.7.0

执行代码
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
model_id = 'damo/cv_mobilenet_face-2d-keypoints_alignment'
face_2d_keypoints = pipeline(Tasks.face_2d_keypoints, model=model_id)
output = face_2d_keypoints('https://modelscope.oss-cn-beijing.aliyuncs.com/test/images/keypoints_detect/test_img_face_2d_keypoints.png')
print(output)

报错:

2023-08-23 10:26:17,075 - modelscope - INFO - PyTorch version 1.11.0+cpu Found.
2023-08-23 10:26:17,079 - modelscope - INFO - Loading ast index from C:\Users\zhiyiche\.cache\modelscope\ast_indexer
2023-08-23 10:26:17,336 - modelscope - INFO - Loading done! Current index file version is 1.8.4, with md5 5c240ee9760abe1704c67ce19c8f8834 and a total number of 902 components indexed
2023-08-23 10:26:19,930 - modelscope - INFO - Model revision not specified, use the latest revision: v2.0.1
Traceback (most recent call last):
  File ".\test_modelscope.py", line 4, in <module>
    face_2d_keypoints = pipeline(Tasks.face_2d_keypoints, model=model_id)
  File "C:\Users\zhiyiche\anaconda3\envs\modelscope_py3.8\lib\site-packages\modelscope\pipelines\builder.py", line 120, in pipeline
    register_plugins_repo(cfg.safe_get('plugins'))
  File "C:\Users\zhiyiche\anaconda3\envs\modelscope_py3.8\lib\site-packages\modelscope\utils\plugins.py", line 447, in register_plugins_repo
    module_name, module_version, _ = get_modules_from_package(plugin)
  File "C:\Users\zhiyiche\anaconda3\envs\modelscope_py3.8\lib\site-packages\modelscope\utils\plugins.py", line 737, in get_modules_from_package
    data = get(package, tmpdir=tmpdir)
  File "C:\Users\zhiyiche\anaconda3\envs\modelscope_py3.8\lib\site-packages\modelscope\utils\plugins.py", line 689, in get
    target, _headers = _download_dist(url, scratch_file, index_url,
  File "C:\Users\zhiyiche\anaconda3\envs\modelscope_py3.8\lib\site-packages\modelscope\utils\plugins.py", line 550, in _download_dist
    target, _headers = urlretrieve(url, scratch_file, auth=auth)
  File "C:\Users\zhiyiche\anaconda3\envs\modelscope_py3.8\lib\site-packages\modelscope\utils\plugins.py", line 505, in urlretrieve
    res = opener.open(url, data=data)
  File "C:\Users\zhiyiche\anaconda3\envs\modelscope_py3.8\lib\urllib\request.py", line 509, in open
    req = Request(fullurl, data)
  File "C:\Users\zhiyiche\anaconda3\envs\modelscope_py3.8\lib\urllib\request.py", line 328, in __init__
    self.full_url = url
  File "C:\Users\zhiyiche\anaconda3\envs\modelscope_py3.8\lib\urllib\request.py", line 354, in full_url
    self._parse()
  File "C:\Users\zhiyiche\anaconda3\envs\modelscope_py3.8\lib\urllib\request.py", line 383, in _parse
    raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: 'pai_easycv-0.11.4-py3-none-any.whl.metadata'

展开
收起
青城山下庄文杰 2023-08-25 15:33:42 207 0
1 条回答
写回答
取消 提交回答
  • 先pip install pai-easycv==0.11.4看一下, 看起来是安装报错-此回答整理自钉群“魔搭ModelScope开发者联盟群 ①”

    2023-08-29 15:38:43
    赞同 展开评论 打赏

包含图像分类、图像生成、人体人脸识别、动作识别、目标分割、视频生成、卡通画、视觉评价、三维视觉等多个领域

热门讨论

热门文章

相关电子书

更多
《云服务器运维之Windows篇》 立即下载
TAKING WINDOWS 10 KERNEL 立即下载
ECS运维指南之Windows系统诊断 立即下载