PaddleSeg icon indicating copy to clipboard operation
PaddleSeg copied to clipboard

paddleseg2.8.0使用ppmattingV2报错“No loss specified in the configuration file”,安装回paddleseg2.7.0后正常

Open kevinfu1717 opened this issue 1 year ago • 4 comments

问题确认 Search before asking

Bug描述 Describe the Bug

paddleseg2.8.0使用ppmattingV2报错“No loss specified in the configuration file”,安装回paddleseg2.7.0后正常 '''

参考官网进行paddleseg初始化:

    import paddle
    from paddleseg.cvlibs import manager, Config
    from paddleseg.utils import get_sys_env, logger
    env_info = get_sys_env()
    place = 'gpu' if env_info['Paddle compiled with cuda'] and env_info[
        'GPUs used'] else 'cpu'
    paddle.set_device(place)
    if not args.cfg:
        raise RuntimeError('No configuration file specified.')
    print('args.cfg:',args.cfg)
    self.cfg = Config(args.cfg) ## 报错位置

‘’‘ 报错说仔细检测config文件,“No loss specified in the configuration file”

复现环境 Environment

  • PaddlePaddle:2.4.2
  • PaddleSeg: 2.8.0
  • Python: 3.9.16
  • Cuda:11

Bug描述确认 Bug description confirmation

  • [X] 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • [ ] 我愿意提交PR!I'd like to help by submitting a PR!

kevinfu1717 avatar May 15 '23 08:05 kevinfu1717

👌🏻 我们会尽快修复

juncaipeng avatar May 15 '23 12:05 juncaipeng

出现同问题&已解决 按照https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.8/Matting/docs/quick_start_en.md 步骤运行时出现报错“No loss specified in the configuration file” 解决:先在PaddleSeg目录下安装pip install e . 之后再进Matting目录下安装,之后运行正常

hh710955213 avatar Jun 13 '23 07:06 hh710955213

出现同问题&已解决 按照https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.8/Matting/docs/quick_start_en.md 步骤运行时出现报错“No loss specified in the configuration file” 解决:先在PaddleSeg目录下安装pip install e . 之后再进Matting目录下安装,之后运行正常

@hh710955213 我在用你的解决方法,还是没办法正常运行

cokobu avatar Oct 28 '23 07:10 cokobu

出现同问题&已解决 按照https://github.com/PaddlePaddle/PaddleSeg/blob/release/2.8/Matting/docs/quick_start_en.md 步骤运行时出现报错“No loss specified in the configuration file” 解决:先在PaddleSeg目录下安装pip install e . 之后再进Matting目录下安装,之后运行正常

@hh710955213 我在用你的解决方法,还是没办法正常运行

(py37pd)@localhost /data1//PaddleSeg/Matting $ll configs/ppmattingv2/ppmattingv2-stdc1-human_512 总用量 38072 drwxrwxr-x. 2 4096 11月 16 15:45 ./ drwxrwxrwx. 3 4096 11月 16 15:45 ../ -rw-rw-r--. 1 238 11月 16 15:45 deploy.yaml -rw-rw-r--. 1 35830940 11月 16 15:45 model.pdiparams -rw-rw-r--. 1 44600 11月 16 15:45 model.pdiparams.info -rw-rw-r--. 1 3095020 11月 16 15:45 model.pdmodel (py37pd)@localhost /data1//PaddleSeg/Matting $ll pretrained_models/ppmattingv2-stdc1-human_512.pdparams -rw-rw-r--. 1 35944216 11月 8 2022 pretrained_models/ppmattingv2-stdc1-human_512.pdparams

你看看是不是 这个文件ppmattingv2-stdc1-human_512.pdparams【就是wget 下载的那个文件】和 你单独下载的 model.pdiparams 不一样造成的,命名方式真的有点迷,,就是模型对应【感觉只有一直泡在这里和维护的人不容易出错,第一次用的人,太容易出错了】

aiXia121 avatar Nov 16 '23 08:11 aiXia121