Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raise KeyError(f"No object named '{name}' found in '{self._name}' registry!") #683

Open
nianliu26 opened this issue May 24, 2024 · 0 comments

Comments

@nianliu26
Copy link

  1. 正确安装basicsr,并正常运行过的项目,中间有一天没跑该项目,再跑又会报这个错误,并且我确定已经再类名上正确添加注册类的python注解,类所在文件也是以_model.py结尾。
    Traceback (most recent call last):
    File "/mnt/hdd1/denghui/DNN/myReal-ESRGAN/realesrgan/train.py", line 14, in
    train_pipeline(root_path)
    File "/mnt/hdd1/denghui/anaconda3/envs/pytorch/lib/python3.11/site-packages/basicsr/train.py", line 124, in train_pipeline
    model = build_model(opt)
    ^^^^^^^^^^^^^^^^
    File "/mnt/hdd1/denghui/anaconda3/envs/pytorch/lib/python3.11/site-packages/basicsr/models/init.py", line 26, in build_model
    model = MODEL_REGISTRY.get(opt['model_type'])(opt)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/mnt/hdd1/denghui/anaconda3/envs/pytorch/lib/python3.11/site-packages/basicsr/utils/registry.py", line 71, in get
    raise KeyError(f"No object named '{name}' found in '{self._name}' registry!")
    KeyError: "No object named 'MedicalSR' found in 'model' registry!"
  2. im2tensor函数,似乎没有处理单通道灰度图片输入的能力,需要开发者自己对相关情况进行一定的处理(如:在imfrombytes函数中对flag参数设置为灰度图,再将出结果的维度进行扩展),这似乎与此框架开发初衷相悖
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant