Benchmark against other IQA packages #24
-
Do you know how the SSIM implementation in PIQA compares in speed with piq and pytorch_ssim? In CPU and GPU? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @pythonmobile, I use a very simple script to benchmark my implementations against other IQA packages (piq, kornia, pytorch_msssim, ...). For instance, on my machine,
where the
The performance boost comes from separating the 2-dimensional convolution kernel into two 1-dimensional kernels and applying them successively (see separable kernels), which makes GPU convolutions faster and allows to compute the SSIM for 3 or 4-dimensional images! Unfortunately, CPUs are not nearly as good for convolutions as GPUs, leading this optimization to actually increase the runtime on CPUs.
SSIM is the only metric for which this separation trick is implemented. For the other metrics, PIQA's implementation are faster on both GPU and CPU.
|
Beta Was this translation helpful? Give feedback.
Hello @pythonmobile,
I use a very simple script to benchmark my implementations against other IQA packages (piq, kornia, pytorch_msssim, ...). For instance, on my machine,
where the
value
is the output of each method (for consistency) andtime
is the average runtime (in ms) over 420 one-image batches. The gap is larger if we activate Just-In-Time compilation (see #JIT):