kepengxu / PGTFormer

[IJCAI'24] Beyond Alignment: Blind Video Face Restoration via Parsing-Guided Temporal-Coherent Transformer
https://kepengxu.github.io/projects/pgtformer
Other
184 stars 22 forks source link

实测处理视频很慢 #17

Closed juntaosun closed 2 months ago

juntaosun commented 2 months ago

看到代码中,好像是每次处理都要送入3帧。 如果是这样,速度肯定比 CodeFormer 至少慢3倍,实测下来也证实了。

        # 将当前帧添加到缓冲区
        frame_buffer.append(frame)

        # 如果缓冲区中有三帧,进行处理
        if len(frame_buffer) == 3:

我认为,除了提升效果,提升速度也是至关重要的。 后续是否支持只需输入一帧,就能得到较好的结果?

感谢分享~


[ From Google Translate ] From the code, it seems that 3 frames are fed in for each processing. If so, the speed must be at least 3 times slower than CodeFormer, which is confirmed by actual measurement.

# Add the current frame to the buffer
frame_buffer.append(frame)

# If there are three frames in the buffer, process
if len(frame_buffer) == 3:

I think that in addition to improving the effect, improving the speed is also crucial. Will it be possible to get better results by only inputting one frame in the future?

Thanks for sharing~

juntaosun commented 2 months ago

https://kepengxu.github.io/projects/pgtformer/

yimikai commented 1 month ago

有人实测过效果真的好么?