raise KeyError(f"No object named '{name}' found in '{self._name}' registry!")
作者: nianliu26创建于 2024年5月24日更新于 2026年3月24日
- When correctly installing basicsr and running the project normally, if the project is not run for one day, it will report the same error again. I am sure that the Python annotation for the registration class has been correctly added to the class name, and the file containing the class also ends with _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. The im2tensor function seems to lack the ability to handle single-channel gray-scale image inputs, and developers need to handle such situations themselves (such as setting the flag parameter to gray-scale image in the imfrombytes function and then expanding the resulting dimensions). This seems to contradict the original intention of the framework's development.
内容来源: XPixelGroup/BasicSR