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

Syncnet loss does not converge #146

Open
kavita-gsphk opened this issue May 13, 2024 · 19 comments
Open

Syncnet loss does not converge #146

kavita-gsphk opened this issue May 13, 2024 · 19 comments

Comments

@kavita-gsphk
Copy link

I am training syncnet on avspeech dataset with train_syncnet_sam.py . My training loss is stuck at 0.69 even after 500k steps. Lr and bs are 5e-5 and 64 , respectively.

I have gone through all the issues, but I haven't found any workable solution. If anyone has any suggestions, it will be a great help.

Screenshot 2024-05-13 at 14 39 28

For preprocessing, I followed all the steps suggested here except the video split part. My videos average length is 7.1s (videos are in range 0-15s) and total length of training dataset is roughly 30.5hr

@waptak
Copy link

waptak commented May 24, 2024

I have the same issue , it's always around 0.69

@linqiu0-0
Copy link

How long does it take to train 500k steps?

@openalldoors
Copy link

需要更多高质量的训练集 我降到0.37了

@linqiu0-0
Copy link

需要更多高质量的训练集 我降到0.37了

请问你用了多少数据,训练了多少batch,大概需要多久呀?

@openalldoors
Copy link

2万个不到5秒的视频文件 跑了36万step 我中途修改了一下训练集 增加了一些高质量的训练数据。按照作者的说法我的训练集数据可能还远远不够 。我先试试吧 毕竟炼丹靠玄学

@linqiu0-0
Copy link

非常感谢!请问你的batch size是多少呢?是的 炼丹靠玄学😂

@openalldoors
Copy link

16

@linqiu0-0
Copy link

linqiu0-0 commented May 27, 2024

#30 那我觉得你和这个issue里面的loss progress还挺相似的, 希望就在眼前

@kavita-gsphk
Copy link
Author

@linqiu0-0 it took around 4.6 days to finish 500k steps

@kavita-gsphk
Copy link
Author

@openalldoors, which dataset are you using for high quality? So, are you saying if I include a more high-quality dataset, then the loss will converge?

@openalldoors
Copy link

@openalldoors, which dataset are you using for high quality? So, are you saying if I include a more high-quality dataset, then the loss will converge?
1、你可以从B站筛选到符合条件的视频,自己再处理,这会消耗大量的时间。
2、加入更多的高质量数据集,可以显著加速loss的收敛,前提是你的数据集确实是高质量,而不是你以为是高质量。

@1129571
Copy link

1129571 commented Jun 3, 2024

@openalldoors, which dataset are you using for high quality? So, are you saying if I include a more high-quality dataset, then the loss will converge?,您使用哪个数据集来获得高质量?所以,你是说如果我包括一个更高质量的数据集,那么损失就会收敛?
1、你可以从B站筛选到符合条件的视频,自己再处理,这会消耗大量的时间。
2、加入更多的高质量数据集,可以显著加速loss的收敛,前提是你的数据集确实是高质量,而不是你以为是高质量。

请教一下,您说的高质量数据集标准是什么,另外学习率是多少,感激不尽

@openalldoors
Copy link

视频的码率够不够 声音是否同步 更重要的是 视频每一帧里面的脸有没有 是不是同一个人,是不是有多人?

@1129571
Copy link

1129571 commented Jun 3, 2024

视频的码率够不够 声音是否同步 更重要的是 视频每一帧里面的脸有没有 是不是同一个人,是不是有多人?

感谢,码率、人脸我都检查过,全1080p,音画syncnet_python检测我省略了,通过降低学习率过了0.69的坎。但现在训练很慢,160w steps才到了0.44左右,而且貌似有过拟合的趋势,看见你的恢复怀疑是数据集质量的问题,能请教一下您的音画同步步骤吗

@openalldoors
Copy link

音画syncnet检测别省 除非你有百分之百的把握 你可以试着看看eval的log 如果eval数据异常的话 loss值会异常 显著大于1 (大于6也是有可能的)你需要去排查。

@jibingyangsf
Copy link

2万个不到5秒的视频文件 跑了36万step 我中途修改了一下训练集 增加了一些高质量的训练数据。按照作者的说法我的训练集数据可能还远远不够 。我先试试吧 毕竟炼丹靠玄学

请问 作者这套源码 不需要调整网络结构和损失函数 就可以直接训练384吗?

@jibingyangsf
Copy link

视频的码率够不够 声音是否同步 更重要的是 视频每一帧里面的脸有没有 是不是同一个人,是不是有多人?

感谢,码率、人脸我都检查过,全1080p,音画syncnet_python检测我省略了,通过降低学习率过了0.69的坎。但现在训练很慢,160w steps才到了0.44左右,而且貌似有过拟合的趋势,看见你的恢复怀疑是数据集质量的问题,能请教一下您的音画同步步骤吗

这直接用syncnet_python 去跑 一个开源项目 AV offset 0 就代表同步了。我也有个问题 作者的源代码确定可以不用改就能跑288或者384 512的训练吗? 不是说网络结构和损失函数都要和96*96 有区别吗?这里你懂不?

@1129571
Copy link

1129571 commented Jun 3, 2024

音画syncnet检测别省 除非你有百分之百的把握 你可以试着看看eval的log 如果eval数据异常的话 loss值会异常 显著大于1 (大于6也是有可能的)你需要去排查。

感谢分享经验,我目前是train0.42,eval0.45-0.43波动,因为显存小训练慢所以还不太好判断。

@openalldoors
Copy link

要看eval 每一条的输出 看均值看不出问题来

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

6 participants