TL;DR
This paper introduces a novel approach to controllable style transfer using Implicit Neural Representations (INRs) and test-time training. By optimizing an INR network once for a specific content-style image pair, the method achieves fine-grained, pixel-wise control over stylization and allows for arbitrary resolution changes without retraining, overcoming limitations of existing methods.
What Problem Does This Paper Address?
Traditional neural style transfer methods fall into two main categories: optimization-based and learning-based. Optimization-based methods, while flexible, often suffer from unstable convergence, artifacts, and require re-optimization for each new image or control parameter. Learning-based methods, on the other hand, require extensive offline training on large datasets and struggle with generalization to unseen images, lacking fine-grained control over the stylization process. Specifically, existing methods cannot precisely control the degree of style applied at a pixel level or easily adjust image resolution without significant retraining or re-optimization. This paper aims to bridge this gap by enabling controllable, pixel-wise style transfer with arbitrary resolution manipulation through a single test-time training phase.
Methods
The core of the proposed method is an Implicit Neural Representation (INR) network, which represents an image as a continuous function mapping coordinates to RGB values. This INR network is trained at test time for a specific content-image/style-image pair. The key innovation lies in the test-time training strategy:
- INR Network Architecture: The network takes interpolated latent vectors (derived from content and style) and positional encodings of pixel coordinates as input to predict RGB values.
- Test-Time Training: The INR network is trained once for each image pair. During this training, a parameter $\alpha$ (sampled from a distribution) controls the interpolation between content and style latent vectors. By dynamically varying $\alpha$ during training, the network learns to be controllable.
- Controllable Interpolation: At inference, the $\alpha$ value can be set per pixel or per region, allowing for pixel-wise or region-wise control of the style transfer degree.
- Exponential Reweighting: To improve disentanglement between content and style and stabilize training, an exponential reweighting function is applied to the loss based on $\alpha$.
- Resolution Control: Due to the continuous nature of INRs, the network can generate images at any resolution by simply adjusting the input coordinate range during inference, without any further training.
Datasets
The paper uses the MS-COCO [26] dataset for content images and the WikiArt [35] dataset for style images. No new benchmarks are introduced.
Key Insights and Ideas
- INR for Style Transfer: Leveraging the continuous representation power of INRs is a novel and effective way to achieve fine-grained control in style transfer.
- Test-Time Training for Prior Learning: Training the INR network at test-time allows it to learn an image-pair specific prior, leading to better generalization and stability compared to traditional optimization methods.
- Pixel-wise $\alpha$ Control: The ability to control the style interpolation factor $\alpha$ at a pixel level is the key to achieving precise, localized stylization.
- Arbitrary Resolution Generation: The inherent continuous nature of INRs naturally enables generating stylized images at any desired resolution without additional training or upsampling artifacts.
- Exponential Reweighting for Disentanglement: The proposed reweighting function significantly improves the separation of content and style, leading to more predictable and controllable results.
Key Results
- Qualitative Improvements: The proposed method produces more plausible style transfer results with better texture and detail preservation compared to state-of-the-art methods like Gatys et al., STROTSS, SinIR, DTP, SANet, and AdaAttn.
- Pixel-wise Controllability: The model demonstrates superior pixel-wise control, accurately applying varying degrees of style to specific regions without affecting neighbors, as shown in Figure 3 and 22.
- Resolution Independence: The framework can generate high-fidelity images at arbitrary resolutions (e.g., 6000x12000) with high inference speed, outperforming methods that are limited to specific resolutions or rely on simple upsampling.
- Content Preservation and Stylization: Quantitative results (Table 2) show that the proposed method achieves better scores in both content preservation and stylization compared to other methods that allow inference-time interpolation.
- Disentanglement: Table 4 shows that the exponential reweighting significantly improves disentanglement, leading to larger gaps in metrics when $\alpha$ changes, indicating better control.
Limitations and Future Work
- Test-Time Training Cost: While the training is done only once per image pair, the test-time training itself can still be computationally intensive, although it's significantly faster than training large CNNs from scratch.
- Potential for Artifacts: Although the paper claims fewer artifacts than optimization-based methods, some minor artifacts might still occur, especially at extreme $\alpha$ values or very high resolutions.
- Future Work: The authors suggest exploring more advanced INR architectures and loss functions for even finer control and higher fidelity. Further investigation into optimizing the test-time training process for speed could also be beneficial. The paper also hints at potential applications in other image manipulation tasks beyond style transfer.
Summary updated