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

KeyError: 'DCPDehazeSimple is already registered in network' #12

Open
starandharry opened this issue Feb 19, 2022 · 15 comments
Open

KeyError: 'DCPDehazeSimple is already registered in network' #12

starandharry opened this issue Feb 19, 2022 · 15 comments

Comments

@starandharry
Copy link

Hello I would like to run the waternet, I just prepared the directory structure like waternet/ce, then run the train.py and there is an error, would you like to tell more details how to make it? Thanks a lot~

@BIGWangYuDong
Copy link
Owner

Seem this error may be because DCPDehazeSimple has registered two times in the code.

@starandharry
Copy link
Author

ummm why does it happen and how could I solve it

@SonJinseon
Copy link

me also have same problem when run test.py and train.py.
So I run test_UWModels/test_UIEC2Net.py and it works well in my pc.
But codes not working in university computer.
Results are just all black image not enhanced image.
Same messages are printed in conda but I don't know why results are different.

@starandharry
Copy link
Author

another question, KeyError: 'WaterNet is not in the network registry', how to solve it?

@BIGWangYuDong
Copy link
Owner

me also have same problem when run test.py and train.py.
seems train and test file need to check, I'll check this later.

@BIGWangYuDong
Copy link
Owner

please check whether you have load the checkpoint successfully

me also have same problem when run test.py and train.py. So I run test_UWModels/test_UIEC2Net.py and it works well in my pc. But codes not working in university computer. Results are just all black image not enhanced image. Same messages are printed in conda but I don't know why results are different.

@SonJinseon
Copy link

I solve it. The reason is cuda version. My university computer use 3090 and my pc use 1060. cuda 10.1 is compatible with 1060 but not 3090. So just change cuda version 11.0 and it works well without problem

@sevenzero70
Copy link

me also have same problem when run test.py and train.py

Please, could you tell me if you have sovle this problem? I have the same question……

@hwan0806
Copy link

me also have same problem when run test.py and train.py

Please, could you tell me if you have sovle this problem? I have the same question……

We solve that problem by upgrading cuda version. so I recommend to upgrade cuda 11.x if your GPU is rtx 30xx.
Docker is preffered for cuda version issues.

@HPrivs
Copy link

HPrivs commented Sep 5, 2022

open ./core/Registry.py and change the parameter

def register_module(self, name=None, force=False, module=None):

def register_module(self, name=None, force=True, module=None):

@Dangerous0926
Copy link

I solve it. The reason is cuda version. My university computer use 3090 and my pc use 1060. cuda 10.1 is compatible with 1060 but not 3090. So just change cuda version 11.0 and it works well without problem

How do you do?

@aaaaatong
Copy link

maybe the problems is "from UW.utils.XXX import XXX" delete the UW

@wwwwwwww706
Copy link

另一个问题,KeyError:“WaterNet不在网络注册表中”,如何解决?

hellow,have you solve it?i have same problem

@Ynqqq2022
Copy link

Ynqqq2022 commented Jan 19, 2024

另一个问题,KeyError:“WaterNet不在网络注册表中”,如何解决?

hellow,have you solve it?i have same problem

I delete all '_ init _.py' files in core floders and import WaterNet manually in train.py to registry WaterNet. It's same to Optimizer and Loss.

@LixingWh
Copy link

I encountered this problem when running test.py "KeyError: 'DCPDehazeSimple is already registered in network'", may I ask what is the final solution?

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