Coder Social home page Coder Social logo

Comments (13)

rlaphoenix avatar rlaphoenix commented on July 29, 2024 1

You tried to use BasicSR code to run the model. You need to use the code from this specific repository.

from hat.

chxy95 avatar chxy95 commented on July 29, 2024 1

@dkobayas-cyber The blog means to add the three modules to the system path.

from hat.

chxy95 avatar chxy95 commented on July 29, 2024

https://github.com/XPixelGroup/HAT#installation

from hat.

fanke123 avatar fanke123 commented on July 29, 2024

请问这个问题解决了吗,我匹配了requirement.txt还是会报这个错

from hat.

chaishuhang avatar chaishuhang commented on July 29, 2024

同样的问题

from hat.

1144181135 avatar 1144181135 commented on July 29, 2024

You tried to use BasicSR code to run the model. You need to use the code from this specific repository.

image
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

from hat.

chxy95 avatar chxy95 commented on July 29, 2024

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.

from hat.

xu1zhiyuan avatar xu1zhiyuan commented on July 29, 2024

Is it solved, please? I'm having the same issue too
请问解决了吗?我也遇到相同的问题了

from hat.

xu1zhiyuan avatar xu1zhiyuan commented on July 29, 2024

You tried to use BasicSR code to run the model. You need to use the code from this specific repository.

image 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

https://blog.csdn.net/qq_41620742/article/details/129267462

from hat.

dkobayas-cyber avatar dkobayas-cyber commented on July 29, 2024

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.

message-full.txt

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.
        ********************************************************************************

!!

from hat.

chxy95 avatar chxy95 commented on July 29, 2024

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.

image 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

https://blog.csdn.net/qq_41620742/article/details/129267462

from hat.

dkobayas-cyber avatar dkobayas-cyber commented on July 29, 2024

@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...

from hat.

dkobayas-cyber avatar dkobayas-cyber commented on July 29, 2024

@chxy95 I was misunderstanding something because of a mistranslation. The model works perfectly after the modifications. Thanks!

from hat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.