You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys, I really appreciate all of your video compression work. I cannot thank you guys enough. I was wondering how I can measure the size of my compressed video. Any help or suggestions would be greatly appreciated :) Thanks.
During runtime, generate a bitstream or file and check its size. This is non-differentiable.
During training, compute the differentiable rate via the method below.
Just like with the VAE image compression models, the rate in bpp can be measured via the cross-entropy between the actual symbols and their "predicted" distributions. Whenever the predicted distribution matches, the bit cost for encoding that symbol is low. This is effectively a sum of the log-likelihoods. Since these models minimize loss = R + lambda D, you may find the calculation for rate R (measured in bpp) in the RateDistortionLoss class in examples/train_video.py.
I apologize for writing my question, I will make sure to write it in discussion moving forward. I liked your first suggestion and looking at the evaluation code I think that this has already been implemented. However, when I check the size of the binary file it is much, much smaller than the mp4 file produced by h265. Hence, I think I did something wrong. What could I have done wrong?
Activity
YodaEmbedding commentedon Jan 3, 2023
Two ways:
During runtime, generate a bitstream or file and check its size. This is non-differentiable.
During training, compute the differentiable rate via the method below.
Just like with the VAE image compression models, the rate in bpp can be measured via the cross-entropy between the actual symbols and their "predicted" distributions. Whenever the predicted distribution matches, the bit cost for encoding that symbol is low. This is effectively a sum of the log-likelihoods. Since these models minimize
loss = R + lambda D, you may find the calculation for rateR(measured in bpp) in theRateDistortionLossclass inexamples/train_video.py.Note: This question is best asked in Discussions.
Zayn-Rekhi commentedon Jan 3, 2023
I apologize for writing my question, I will make sure to write it in discussion moving forward. I liked your first suggestion and looking at the evaluation code I think that this has already been implemented. However, when I check the size of the binary file it is much, much smaller than the mp4 file produced by h265. Hence, I think I did something wrong. What could I have done wrong?
YodaEmbedding commentedon Jan 4, 2023
Perhaps one of these may help:
#190 (comment)
#190 (comment) (first bullet point)