megvii-research / TLC

Test-time Local Converter
Other
225 stars 10 forks source link

How can I test my own dehazing network #10

Open chonghaozhan opened 1 year ago

chonghaozhan commented 1 year ago

Thank you for your sharing. If I have a trained dehazing network ready, How can I incorporate TLC into my test code

achusky commented 1 year ago

Hi, thanks for your interest.

When inference with TLC, you need to modify your Model . In details, you need to create a new LocalModel which inherit Local_Base and YourModel. For example, for MPRNet w/ TLC (named MPRNetLocal), we need to: 1、import MPRNet 2、create MPRNetLocal which inherit Local_Base and MPRNet 3、set training size 4、inference with MPRNetLocal with proper base_size

For MPRNet, the training size is (1, 3, 256, 256) and the base size is 1.5 times lager than training size (i.e., 384). You can tu ne this hyper-parameter in your dataset.

Note: The current Local_Base only supports global avgpool and Instance Normalization.

chonghaozhan commented 1 year ago

Thanks for your reply.