Abstract

Although GIFs have been popular on the Internet, they suffer from slow download speed due to the reliance on old coding schemes, which lead to large file sizes. To solve this problem, we propose a novel super-resolution approach (Figure 1) for GIFs, which uses two high-resolution frames (the first and last frames) together with the low-resolution data to generate a high-resolution GIF. The two single frames are very small compared with the size of the GIFs, so the approach requires little extra cost while delivering an impressive performance boost. This is motivated by the unique characteristics of GIFs — they are usually much shorter than videos but have quite diverse and dynamic content. To validate the approach, we collected a new super-resolution dataset for GIFs, the first dataset devoted to GIF super-resolution, containing significantly more sequences than previous video super-resolution datasets. Experiments show that our algorithm significantly outperforms popular video super-resolution baselines while achieving at least 80× speedup on CPU.

Diagram of the GIF SR method
Figure 1: Diagram of our GIF SR method.

Dataset

We collected a GIF dataset named GIFSR, available here. Some sample GIFs are shown in Figure 2. The category distribution and average length (frame number) are shown in Table 1.

Emotion set
Emotion Set
Action set
Action Set
Scene set
Scene Set
Animation set
Animation Set
Animal set
Animal Set

Figure 2: Sample GIFs in the GIFSR dataset, by category.

Frame number distribution
Figure 3: Distribution of frame numbers in the GIFSR dataset.
Category distribution table
Table 1: Category distribution and average frame count in GIFSR.

Our Method

We use the block diagram in Figure 4 to illustrate our method. \(F_i\) is the iteration result of the \(i\)-th frame, and \(f_i\) is the Bicubic Interpolation (BI) result of the \(i\)-th frame. \(\rho_f, \gamma_f, \rho_b, \gamma_b\) are coefficients of the temporal operator.

Block diagram
Figure 4: Block diagram of our model.

Using the forward operator, the GIF Super-Resolution algorithm is proposed as Algorithm 1.

Algorithm

Experiments

Implementing our method on the GIFSR dataset, we obtained an average PSNR of 22.53. Example result frames are shown in Figure 5. Per-category PSNR is shown in Table 3, and a comparison with VSRnet on the GIFSR emotion set is shown in Table 4.

Per-category PSNR
Table 3: PSNR for different categories in GIFSR with (HR, LR) = (128, 32).
PSNR comparison
Table 4: PSNR comparison of Bicubic, VSRnet, and ours on the GIFSR emotion set.
Sample result 1 Sample result 2 Sample result 3
Figure 5: Sample results of our method on the GIFSR dataset.

Time consumption and file-size compression are reported in Tables 5 and 6.

Execution time
Table 5: Execution time (s) of Bicubic, VSRnet, and ours on the GIFSR emotion set.
File size
Table 6: File-size comparison (HR frames size / all input files size).

Acknowledgement

We are very thankful to Shih-Fu Chang for his insightful suggestions and comments. L. Cao would like to thank Ding Liu for the discussions on video super-resolution.