ljzycmd / SimDeblur

Simple framework for image and video deblurring, implemented by PyTorch
MIT License
306 stars 38 forks source link

No object names xxx found in backbone registry! #5

Closed INVOKERer closed 2 years ago

INVOKERer commented 3 years ago

I cannot run mscnn and srn model with the error:

Traceback (most recent call last):
  File "train.py", line 28, in <module>
    main()
  File "train.py", line 23, in main
    trainer = Trainer(cfg)
  File "/deblur/SimDeblur/simdeblur/engine/trainer.py", line 69, in __init__
    self.model = self.build_model(cfg).to(self.device)
  File "/deblur/SimDeblur/simdeblur/engine/trainer.py", line 305, in build_model
    model = build_backbone(cfg.model)
  File "/SimDeblur/simdeblur/model/build.py", line 26, in build_backbone
    return build(cfg, BACKBONE_REGISTRY)
  File "/SimDeblur/simdeblur/model/build.py", line 21, in build
    ret = registry.get(name)(**args)
  File "/SimDeblur/utils/registry.py", line 34, in get
    raise KeyError("No object names {} found in {} registry!".format(name, self._name))
KeyError: 'No object names MSResNet found in backbone registry!'
ljzycmd commented 3 years ago

HI, for those models MSCNN and SRN, which require multi-scale inputs and multi-scale outputs for loss computation, some modifications to the default Trainer class are needed. So I developed a new trainer class for MSCNN and SRN in the projects folder. You can get more information at https://github.com/ljzycmd/SimDeblur/tree/main/projects/mscnn#readme.

INVOKERer commented 3 years ago

thanks for your answer.

ljzycmd commented 2 years ago

Hi, we upgrade our training pipeline. And now, we can train and test SRN like other methods done before. Thus you don't need to adopt the Trainer in the project folder. Meanwhile, we have released the checkpoint of SRN, and you can have a try!