achusky

Results 22 comments of achusky

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`....

Hi, could you please provide more information about your case? For example, which particular model was utilized for which tasks? Also, could you kindly supply an example input and the...

Hi, thank you for providing the information. Regarding your setting, "I set the TLC sizes to 256 and 32," I have a question. Why are there two numbers for the...

Hi, sorry for the late reply. The size mismatch issue is caused by the **downsampled features and upsampled features** from the 'UNet-like' skip connection. A toy example is: (1) input...

Hi, thank you for your interest. To set the hyper-parameters of TLC, you can choose a base size that is 1x to 2x (default is 1.5x) of the training size...

Thanks for your interest. Yes, the extra computation cost mainly comes from fully connected (FC) layers in SE. However, the detailed MACs are determined by the implementation. In detail, when...

你好,感谢关注我们的工作。 你对于论文的理解是对的。而代码实现是将池化核设置为训练时特征图大小的1.5倍: https://github.com/megvii-research/TLC/blob/main/basicsr/models/archs/local_arch.py#L133-L137 该部分核心代码分为两部分: 1. 首先设置base_size, 通常为train_size的1.5倍 2. 使用train_size创建特征图,进行一次forward来设置kernel_size,此时kernel_size会被设置为训练时特征图大小的1.5倍(或者说以base_size作为原始输入时特征图的大小)。 在进行相关设定之后,kernel_size将固定不变,与推理时的输入图像大小无关。 希望我的回答能解决你的疑惑,也欢迎继续留言探讨。

是的,需要使用Conv实现的全连接层来处理(C,H,W)的输出。你可以将训练好的nn.Linear中的weight经过变换之后载入到重新实现的nn.Conv2d当中,并取消torch.flatten操作。

抱歉这么迟才回复。 你的理解是对的。目前实现的avgpool默认步长(stride)是1,因此[代码](https://github.com/megvii-research/TLC/blob/main/basicsr/models/archs/local_arch.py#L30-L33)中的stride应该是固定为1。之前打印参数对应的代码有误,现在已经修改。 感谢指出该问题。

推理速度与模型本身、输入图像大小和推理硬件都相关。 对于720x1280的输入分辨率,MPRNet原模型在Nvidia 2080Ti GPU上的推理时间就需要1.6秒,额外使用TLC的话需要1.7秒(加速优化版)或2.0秒(论文的实现)。具体测速结果可以查看[论文](https://arxiv.org/pdf/2112.04491.pdf) Table A1。 如果GPU性能不够好或者图像分辨率较高的情况下,一张图需要3-4秒也是正常的。