swz30 / MIRNetv2

[TPAMI 2022] Learning Enriched Features for Fast Image Restoration and Enhancement. Results on Defocus Deblurring, Denoising, Super-resolution, and image enhancement
Other
401 stars 56 forks source link

Query regarding element-wise summation #23

Closed soumik12345 closed 1 year ago

soumik12345 commented 1 year ago

Hi, I am attempting to reproduce the results of this paper in Tensorflow. I have been referring to both the implementation details in mentioned in the paper and the code in this repository for my implementation. I have a doubt regarding the SKFF (selective kernel feature fusion) block. In the paper, it has been stated that in the Fuse operation in SKFF, the multi-scale feature maps are combined using element-wise summation, however, upon referring to this line in the code, I found that it is being concatenated. Can you please clarify my doubt as to whether the features should be summed or concatenated?

cc: @swz30 @adityac8

swz30 commented 1 year ago

Hi @soumik12345

The first step of the fuse procedure starts from here (https://github.com/swz30/MIRNetv2/blob/12f366a9c0d7759aff91118187650ba2ffc18df5/basicsr/models/archs/mirnet_v2_arch.py#L41)

Before this line, all operations (concatenation, reshaping) is just to bring the L1 and L2 tensors in the correct shapes.

soumik12345 commented 1 year ago

Thanks a lot for the clarification @swz30