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

Name DAT is not found, use name: DAT_basicsr! #1

Open
AIisCool opened this issue Aug 7, 2023 · 14 comments
Open

Name DAT is not found, use name: DAT_basicsr! #1

AIisCool opened this issue Aug 7, 2023 · 14 comments

Comments

@AIisCool
Copy link

AIisCool commented Aug 7, 2023

Name DAT is not found, use name: DAT_basicsr!
Traceback (most recent call last):
  File "C:\DAT-main\basicsr\test.py", line 44, in <module>
    test_pipeline(root_path)
  File "C:\DAT-main\basicsr\test.py", line 34, in test_pipeline
    model = build_model(opt)
  File "C:\Python310\lib\site-packages\basicsr\models\__init__.py", line 26, in build_model
    model = MODEL_REGISTRY.get(opt['model_type'])(opt)
  File "C:\Python310\lib\site-packages\basicsr\models\sr_model.py", line 22, in __init__
    self.net_g = build_network(opt['network_g'])
  File "C:\Python310\lib\site-packages\basicsr\archs\__init__.py", line 22, in build_network
    net = ARCH_REGISTRY.get(network_type)(**opt)
  File "C:\Python310\lib\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 'DAT' found in 'arch' registry!"

@zhengchen1999
Copy link
Owner

Hi.
Thanks for your interest in our work.
I think the reason for your error is that Dependencies are not prepared. This project needs to be installed locally. Perform the following steps in sequence on the terminal.

git clone https://github.com/zhengchen1999/DAT.git
cd DAT
conda create -n DAT python=3.8
conda activate DAT
pip install -r requirements.txt
python setup.py develop

After that, you can run the program normally.
If you have any other problem, please let us know. Thanks.

@Julesaiyy
Copy link

Thank you very much for your wonderful work. May I ask why did I follow the prompts and still encounter the above situation? Looking forward to your reply.

@Asubayo
Copy link

Asubayo commented Aug 10, 2023

I just tried it and got the same traceback logs.
Even though it is specified in requirements.txt, I had to manually run conda install pytorch==1.8.0 torchvision==0.9.0 cudatoolkit=11.1 -c pytorch -c conda-forge

@zhengchen1999
Copy link
Owner

zhengchen1999 commented Aug 10, 2023

Sorry for the late reply.

I think you didn't run the command python setup.py develop and set up environment successfully.

Can you provide the conda env after you run the command?

PS:
In some GPU servers (most do not need), pytorch needs to be installed separately.
For example in 3090 GPU server, the complete commands is

conda create -n DAT python=3.8
conda activate DAT
pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio===0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt (delete torch==1.8.0 and torchvision in requirements.txt)
python setup.py develop

I run these commands locally, and can install the environment successfully without issue.

@Julesaiyy
Copy link

I am using an A5000 single GPU training and have followed the steps to achieve results. I am not sure what the problem is, but still cannot be solved?

@zhengchen1999
Copy link
Owner

zhengchen1999 commented Aug 11, 2023

Is your pytorch installed successfully? (running other projects successfully).
Can you provide the log after running the command python setup.py develop?

@Julesaiyy
Copy link

Is your pytorch installed successfully? (running other projects successfully). Can you provide the log after running the command python setup.py develop?

And I believe Python has been successfully installed, and other projects can also be used normally.

@zhengchen1999
Copy link
Owner

Is your conda env newly built? Judging from the log, your setup is successful. There is a possibility that you have installed BasicSR before, which caused a conflict.

@Julesaiyy
Copy link

Is your conda env newly built? Judging from the log, your setup is successful. There is a possibility that you have installed BasicSR before, which caused a conflict.

According to your prompt, I have successfully resolved this issue. I hope future users will remember my painful lesson: never install basicsr on your own beforehand, as it will cause conflicts. Once again, I am grateful for the author's patient assistance and this impressive work.

@1024AILab
Copy link

python setup.py develop

Hello, may I ask you use one gpu A5000, How long does it take to train?

@1024AILab
Copy link

Hello, How long does it takes to train?

@turbowenxuan
Copy link

Sorry for the late reply.

I think you didn't run the command python setup.py develop and set up environment successfully.

Can you provide the conda env after you run the command?

PS: In some GPU servers (most do not need), pytorch needs to be installed separately. For example in 3090 GPU server, the complete commands is

conda create -n DAT python=3.8
conda activate DAT
pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio===0.8.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt (delete torch==1.8.0 and torchvision in requirements.txt)
python setup.py develop

I run these commands locally, and can install the environment successfully without issue.

Is this the same operation in the Linux system? I rented a server from the Internet to run this project. But the problem is No object named 'DAT' found in 'arch' registry!

@zhengchen1999
Copy link
Owner

Linux operates like this. Your issue, still not successfully installed. It's recommended that you reinstall a new environment (executing python setup.py develop in the old environment might always fail).

@zhengchen1999
Copy link
Owner

zhengchen1999 commented Mar 28, 2024

Hello, How long does it takes to train?

It can be seen from the log (in experiments file), there will be an estimated time corresponding to it.

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

6 participants