TonyHongtaoWu / RainMamba

[ACM MM'24 Oral] RainMamba: Enhanced Locality Learning with State Space Models for Video Deraining
MIT License
62 stars 6 forks source link

hilbert_curve #1

Closed clelevo closed 2 months ago

clelevo commented 2 months ago

我想在其他视频数据集上应用RainMamba,该如何得到hilbert_curve_large_scale.pt和hilbert_curve_small_scale.pt

TonyHongtaoWu commented 2 months ago

您好,您可以使用路径中code/VRDS/mmedit/models/derainers/derainer.py中的100行至135行的函数并结合下面代码来生成对应clip大小的三维希尔伯特曲线(只需要调整时间帧数nf和特征图尺寸HW)。下列前四行代码和234、235行可以互相代替。

result_large_scale = self.hilbert_curve_large_scale() hilbert_curve_large_scale = result_large_scale['hilbert_curve_large_scale'].to(device) result_small_scale = self.hilbert_curve_small_scale() hilbert_curve_small_scale = result_small_scale['hilbert_curve_small_scale'].to(device)

self.save_hilbert_curve_large_scale(hilbert_curve_large_scale) self.save_hilbert_curve_small_scale(hilbert_curve_small_scale)

clelevo commented 2 months ago

感谢您的杰出工作与及时回复!

TonyHongtaoWu commented 2 months ago

欢迎随时交流!🤗