ykdai / Flare7K

Official Implementation of "Flare7K: A Phenomenological Nighttime Flare Removal Dataset"
https://ykdai.github.io/projects/Flare7K
Other
119 stars 16 forks source link

Training using U_Net #20

Closed JZhu1208 closed 4 months ago

JZhu1208 commented 4 months ago

Hello, when I wanted to use U_Net for training, I modified the following parameters: In 'uformer_flare7kpp_baseline_option', change the parameter 'type' of 'network_g' to 'U_Net' for training. The error reported is:

Traceback (most recent call last): File "basicsr/train.py", line 217, in train_pipeline(root_path) File "basicsr/train.py", line 126, in train_pipeline model = build_model(opt) File ".../basicsr/models/init.py", line 26, in build_model model = MODEL_REGISTRY.get(opt['model_type'])(opt) File ".../basicsr/models/sr_model.py", line 22, in init self.net_g = build_network(opt['network_g']) File ".../basicsr/archs/init.py", line 25, in build_network net = ARCH_REGISTRY.get(network_type)(**opt) TypeError: init() got an unexpected keyword argument 'img_size'

How to solve this problem? If I want to use U_Net to train the network, are there any more steps required? I am looking forward to your reply.

ykdai commented 4 months ago

The configs in option.yml's network_g should match the network's args. For example, if the unet is initialized by using 'UNet(img_ch)', you should remove the 'img_size' and 'output_ch' in yml.

JZhu1208 commented 4 months ago

okay, thank you for your help.

clue3clue32 commented 1 month ago

Have you successfully trained the network? I would like to inquire about the specific settings.