Benchmarking of GPEN, an image restoration method.

Benchmarking of GPEN, an image restoration method.
type: practicallevel: medium

Runtime

Image size: (512, 512, 3)
Pytorch==1.12.1, Torchvision==0.13.1

CPU

CPU config: Intel Xeon(R) CPU E5-2640 v3 @ 2.60GHz × 16

WorkflowGPEN (original repo)Re-arranged version
Real-ESRGAN1.12151.0924
Pre-processing0.23900.0388
Restoration1.90601.3512
Post-processing1.67010.0254
Total (without Real-ESRGAN)3.8151 1.4153
Total4.93692.5078

CPU config: 2.8 GHz Quad-Core Intel Core i7

WorkflowGPEN (original repo)Re-arranged version
Real-ESRGAN4.25154.0423
Pre-processing0.80130.0645
Restoration6.83225.3539
Post-processing6.39690.0186
Total (without Real-ESRGAN)14.0304 5.4370
Total18.29239.4841

GPU

GPU config: NVIDIA TITAN V/PCIe/SSE2

WorkflowGPEN (original repo)Re-arranged version
Real-ESRGAN0.04210.0430
Pre-processing0.03210.0281
Restoration0.05890.0558
Post-processing0.13890.0270
Total (without Real-ESRGAN)0.2299 0.1109
Total0.27220.1539

CPU Memory usage

Memory usage was tested by iterating through all 3000 samples of the CelebA-LQ dataset. All images are (512,512,3). PID was used to measure the memory usage of the python script.

CPU config: Intel Xeon(R) CPU E5-2640 v3 @ 2.60GHz × 16

ModelCPU Memory usageVisualisation
GPEN (with Real-ESRGAN)starts at 5.43GB, slowly increases, can go upto 5.70GBlink
GPEN (without Real-ESRGAN)starts at 5.43GB, slowly increases, can go upto 5.75GBlink
Re-arranged (with Real-ESRGAN)~5.32GB, no sign of memory leakagelink
Re-arranged (without Real-ESRGAN)~5.13GB, no sign of memory leakagelink

Performance

InputGPEN (w/o Real-ESRGAN)GPEN (w/ Real-ESRGAN)Re-arranged version