{"repo":"JunyaoHu/common_metrics_on_video_quality","free":true,"listed":false,"github":"https://github.com/JunyaoHu/common_metrics_on_video_quality","clone":"git clone https://github.com/JunyaoHu/common_metrics_on_video_quality.git","description":"You can easily calculate FVD, PSNR, SSIM, LPIPS for evaluating the quality of generated or predicted videos.","language":"Python","stars":585,"topics":["fvd","metrics","psnr","pytorch","ssim","video","video-generation","video-prediction"],"license":null,"category":"media-processing","readme_excerpt":"common metrics on video quality Introduction You can easily calculate the following video quality metrics for video generation and video preiction tasks: - FVD : Frechét Video Distance - SSIM : Structural Similarity Index Measure - LPIPS : Learned Perceptual Image Patch Similarity - PSNR : Peak-Signal-to-Noise Ratio Installation Version reference: numpy-1.26.4 opencv-python-4.10.0.84 scipy-1.13.1 tqdm-4.67.1 einops-0.8.0 Evaluation Example For example, we evaluated 8 pairs of videos, each with 30 frames, 3 channels, and a size of 64x64. Run the following code demo.py to calculate the four metrics. The key content of demo.py is: In the example, a all-zero matrix of [8x30x3x64x64] and a all-one matrix of [8x30x3x64x64], their $\\mathrm{FVD}(\\mathit{frames A}, \\mathit{frames B})$ is about 151 (Due to different pytorch versions, the number may fluctuate around 1). If we set only final=False , We can calculate: - FVD: $\\mathrm{FVD} n(\\mathit{frames A}, \\mathit{frames B}) = \\mathrm{FVD}(\\mathit{frames A}[:n], \\mathit{frames B}[:n]), 10 \\le n \\le T $ - PSNR/SSIM/LPIPS: $\\mathrm{F} n(\\mathit{frames A}, \\mathit{frames B}) = \\mathrm{avg}(\\mathrm{F}(\\mathit{frames A}[i], \\mathit{frames B}[i])), \\mathrm{F}=\\{\\mathrm{PSNR}, \\mathrm{SSIM}, \\mathrm{LPIPS}\\}, 0 \\le i \\le n - 1, 1 \\le n \\le T $ Comparison with orginal Tensorflow FVD metric If you want to use the original version of FVD which comes from Tensorflow, and compare FVD result with this repo's implementation: You should create a tens","default_branch":null,"files":null,"tree":[],"storefront":"/r/JunyaoHu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/JunyaoHu/common_metrics_on_video_quality/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}