toummHus / HAIR

The Official Implementation for "HAIR: Hypernetworks-based All-in-One Image Restoration".
https://arxiv.org/abs/2408.08091
59 stars 7 forks source link

How to implement fixed encoder? #1

Open Heisenberg-Don opened 2 months ago

Heisenberg-Don commented 2 months ago

Interesting work!

How did you freeze the encoders? I can't determine which part of your implementation handles this operation.

Heisenberg-Don commented 2 months ago

BTW, could you share the 5-degradation dataset settings?

toummHus commented 2 months ago

Thanks for your interest. The code "nn.Sequential(*[TransformerBlock ...])" will produce a fixed encoder layer and "HyLevel(...)" produces a dynamical layer. The word "fixed" in the paper means that the weights of this module is fixed during inference.

For the 5-degradation setting, you can refer the code of IDR. And maybe we will upload this in the new version.

toummHus commented 2 months ago

In addition, all the classes with a prefix of "Hy" like "HyConv2d" are dynamical during inference. We will add detailed comments in a future release.