Open Univercp opened 1 year ago
请问这个问题解决了吗,我匹配了requirement.txt还是会报这个错
You tried to use BasicSR code to run the model. You need to use the code from this specific repository.
同样的问题
You tried to use BasicSR code to run the model. You need to use the code from this specific repository.
I follow the installation from https://github.com/XPixelGroup/HAT#installation, and run the HAT/test.py, and then this bug appear. I cannot understand "use the code from this specific repository". How can I solve this problem? Thank you
This error occurs because there is a problem with the basicsr environment. The reason may be
1) the hat environment is not installed correctly (python setup.py develop
is not implemented), referring to https://github.com/XPixelGroup/HAT#installation.
2) there are more than one basicsr existing in the current environment, and the wrong library is used.
Is it solved, please? I'm having the same issue too 请问解决了吗?我也遇到相同的问题了
You tried to use BasicSR code to run the model. You need to use the code from this specific repository.
I follow the installation from https://github.com/XPixelGroup/HAT#installation, and run the HAT/test.py, and then this bug appear. I cannot understand "use the code from this specific repository". How can I solve this problem? Thank you
I'm having the same problem. When I run python setup.py develop
, I get a long warning message like the one below at the beginning. @chxy95, do you think this is the root cause? II'm not sure if it helps, but I also attach the full messages on the terminal.
depot/cfrueh/apps/env_hat/lib/python3.8/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!
********************************************************************************
Requirements should be satisfied by a PEP 517 installer.
If you are using pip, you can try `pip install --use-pep517`.
********************************************************************************
!!
dist.fetch_build_eggs(dist.setup_requires)
running develop
/depot/cfrueh/apps/env_hat/lib/python3.8/site-packages/setuptools/command/develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``easy_install``.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://github.com/pypa/setuptools/issues/917 for details.
********************************************************************************
!!
easy_install.initialize_options(self)
/depot/cfrueh/apps/env_hat/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
I am not certain if the reported error is due to the installation order of Pytorch and BasicSR environment. Generally, in a clean conda environment, I would install Pytorch first, then execute the hat environment installation. I have never encountered the error reported. If you have encountered similar issues and are certain that the installation process is correct, you may refer to the following blog to see if it can be resolved.
You tried to use BasicSR code to run the model. You need to use the code from this specific repository.
I follow the installation from https://github.com/XPixelGroup/HAT#installation, and run the HAT/test.py, and then this bug appear. I cannot understand "use the code from this specific repository". How can I solve this problem? Thank you
@chxy95 Thanks for the link. If I understand correctly, I need to change the lines:
import hat.arch
import hat.data
import hat.models
into
from hat.models import *
Is my understanding correct? I'm not sure in which file I need to make this modification. Do I need to do it only in train.py
and test.py
? Any other code in which I need to make this modification?
By the way, I printed the MODEL_REGISTRY
variable by:
from basicsr.utils.registry import MODEL_REGISTRY
print(MODEL_REGITSTRY._obj_map)
and it shows:
{'SRModel': basicsr.models.sr_model.SRModel,
'VideoBaseModel': basicsr.models.video_base_model.VideoBaseModel,
'VideoRecurrentModel': basicsr.models.video_recurrent_model.VideoRecurrentModel,
'VideoRecurrentGANModel': basicsr.models.video_recurrent_gan_model.VideoRecurrentGANModel,
'SRGANModel': basicsr.models.srgan_model.SRGANModel,
'VideoGANModel': basicsr.models.video_gan_model.VideoGANModel,
'SwinIRModel': basicsr.models.swinir_model.SwinIRModel,
'EDVRModel': basicsr.models.edvr_model.EDVRModel,
'StyleGAN2Model': basicsr.models.stylegan2_model.StyleGAN2Model,
'HiFaceGANModel': basicsr.models.hifacegan_model.HiFaceGANModel,
'ESRGANModel': basicsr.models.esrgan_model.ESRGANModel
It seems like some models are successfully registered but not the HATModel
for some reason...
@dkobayas-cyber The blog means to add the three modules to the system path.
@chxy95 I was misunderstanding something because of a mistranslation. The model works perfectly after the modifications. Thanks!
Hello,when I train my custom dataset ,it will happens like:
No object named 'HATModel' found in 'model' registry!"
how can I slove it.