RETHINED: A New Benchmark and Baseline for Real-Time High-Resolution Image Inpainting On Edge Devices
Marcelo Sanchez, Gil Triginer, Ignacio Sarasua, Lara Raad, Coloma Ballester
TL;DR
Real-time high-resolution image inpainting on edge devices is challenging due to memory and latency constraints. The authors propose RETHINED, a lightweight pipeline that combines a CNN-based coarse restoration with a NeuralPatchMatch texture refinement and an attention-guided upscaling step to generate HR inpainting, aided by model re-parameterization for latency reduction. Key contributions include the first real-time HR on-edge baseline, the NeuralPatchMatch mechanism with an attention transfer module, and the DF8K-Inpainting dataset for free-form HR masks. The work demonstrates up to 100x speedups over prior mobile methods while maintaining competitive LR quality and superior HR detail, enabling practical deployment of HR inpainting on diverse edge devices and providing a new benchmark for future research.
Abstract
Existing image inpainting methods have shown impressive completion results for low-resolution images. However, most of these algorithms fail at high resolutions and require powerful hardware, limiting their deployment on edge devices. Motivated by this, we propose the first baseline for REal-Time High-resolution image INpainting on Edge Devices (RETHINED) that is able to inpaint at ultra-high-resolution and can run in real-time ($\leq$ 30ms) in a wide variety of mobile devices. A simple, yet effective novel method formed by a lightweight Convolutional Neural Network (CNN) to recover structure, followed by a resolution-agnostic patch replacement mechanism to provide detailed texture. Specially our pipeline leverages the structural capacity of CNN and the high-level detail of patch-based methods, which is a key component for high-resolution image inpainting. To demonstrate the real application of our method, we conduct an extensive analysis on various mobile-friendly devices and demonstrate similar inpainting performance while being $\mathrm{100 \times faster}$ than existing state-of-the-art methods. Furthemore, we realease DF8K-Inpainting, the first free-form mask UHD inpainting dataset.
