Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于帧数问题 #3

Open
Iceeteeea opened this issue May 16, 2023 · 6 comments
Open

关于帧数问题 #3

Iceeteeea opened this issue May 16, 2023 · 6 comments

Comments

@Iceeteeea
Copy link

作者您好!
代码中给出的demo原视频为329帧,而上色后的结果是326帧,有办法可以使输入和输出的帧数保持一致吗?

@zhaoyuzhi
Copy link
Owner

您好,可以单独把CPNet(前三帧/后三帧)输出提出来,具体是这里的几行(316-323):

bgr_minus3 = save_img(tensor_L = img_original_l[center_id - 3], tensor_ab = cpnet_frames[center_id - 3], save_name = img_paths[center_id - 3].split('\\')[-1], opt = opt)

@Iceeteeea
Copy link
Author

谢谢,除此以外,我还发现上色后的结果偶尔会出现帧与帧之间不连续的问题,这该怎么解决呢?
屏幕截图 2023-05-16 150311
如图,这是上色后的连续三帧,但是原视频的37894.jpg并不是这个内容

@zhaoyuzhi
Copy link
Owner

这个测试之前是在windows机器上做的

刚才在Ubuntu机器上试验了一下,顺序确实不对,可能是读文件时候list顺序被打乱了,需要再fix一下代码。可能windows没这个问题

@Iceeteeea
Copy link
Author

谢谢解答,我试一下

@zhaoyuzhi
Copy link
Owner

return ret

这里改成:

return sorted(ret)

即可

@Iceeteeea
Copy link
Author

感谢:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants