BIGWangYuDong / UWEnhancement

137 stars 29 forks source link

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

Open starandharry opened 2 years ago

starandharry commented 2 years ago

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 commented 2 years ago

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

starandharry commented 2 years ago

ummm why does it happen and how could I solve it

SonJinseon commented 2 years ago

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 commented 2 years ago

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

BIGWangYuDong commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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

wwwwwwww706 commented 1 year ago

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

hellow,have you solve it?i have same problem

Ynqqq2022 commented 9 months ago

另一个问题,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 commented 4 months ago

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