首页 PaddleHub 帖子详情
视频抠人像最后一步报错TypeError,请问如何解决
收藏
快速回复
PaddleHub 问答预训练模型 1119 1
视频抠人像最后一步报错TypeError,请问如何解决
收藏
快速回复
PaddleHub 问答预训练模型 1119 1

原项目地址:https://aistudio.baidu.com/aistudio/projectdetail/1056213

运行最后一行代码时出现以下报错信息,请问如何解决?

/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/__init__.py:107: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import MutableMapping
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/rcsetup.py:20: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Iterable, Mapping
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/colors.py:53: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
from collections import Sized
/home/aistudio/work
---------------------------------------------------------------------------TypeError Traceback (most recent call last) in
8 os.environ["CUDA_VISIBLE_DEVICES"] = "0"
9
---> 10 human_seg = hub.Module('humanseg_server')
11 cap_video = cv2.VideoCapture('demo.mp4')
12 fps = cap_video.get(cv2.CAP_PROP_FPS)
TypeError: __new__() takes 1 positional argument but 2 were given

 

0
收藏
回复
全部评论(1)
时间顺序
小姐姐都是我的
#2 回复于2021-07

复现了,应该是版本迭代的问题。

把最后一part代码中的第10行改成:human_seg = hub.Module(name='humanseg_server') 即可

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户