Abstract
Image sentiment transfer is a novel computer vision task that seeks to modify the emotional "vibe" of an image—for instance, transforming a gloomy scene into a cheerful one—while strictly preserving the original semantic content. Traditional global style transfer methods often struggle with this task, as sentiment is frequently tied to specific objects rather than the entire frame. We propose SentiGAN, a framework that performs sentiment transfer at the object level. By combining hybrid object masking with a novel content disentanglement loss, SentiGAN ensures that different image elements are transformed using appropriate emotional cues. Our evaluations show that SentiGAN significantly outperforms global transfer baselines in both automated sentiment classification and human preference studies.
Introduction: The Challenge of Sentiment
While significant progress has been made in style transfer (e.g., artistic stylization) and image-to-image translation (e.g., seasonal changes), sentiment transfer presents a subtler challenge. Sentiment is not a uniform global filter; it is inherently local. To make a neutral landscape appear "positive," one might need to brighten the water while simultaneously making a bird's plumage more vibrant.
Existing global methods apply a single reference style to the entire image, often resulting in unrealistic artifacts, "petrified" textures, or uneven color blotches. Furthermore, standard Generative Adversarial Networks (GANs) often fail to disentangle color from content, inadvertently altering the shape or texture of objects when only a color shift was intended.
Methodology: The SentiGAN Framework
The authors address these challenges through a two-step pipeline designed to handle the complexity of human emotion in pixels.
1. Hybrid Object Masking
To perform object-level transfer, the model must first identify and isolate specific objects. Because standard segmentation models are limited to fixed categories, the authors propose a hybrid approach. They combine a semantic segmentation model with an attention-based image captioning model. By leveraging the "attention maps" generated during captioning (e.g., the regions the model focuses on when generating the word "bird"), they can produce high-quality masks for an open vocabulary of nouns, extending beyond standard training sets.
2. SentiGAN Architecture
At the core of the framework is SentiGAN, which builds upon the MUNIT architecture with several key innovations:
- Object-Level Supervision: Training losses are focused on masked objects, ensuring that the style of a reference object (e.g., a vibrant parrot) is only applied to the corresponding input object.
- Content Disentanglement Loss: This novel loss function is designed to separate spatial information (edges and textures) from global color information. This forces the model to maintain the original "shape" while adopting the "color distribution" of the reference.
- Content Alignment: During inference, the model aligns the statistical mean and standard deviation of the input’s color channels with the reference image to ensure a faithful and consistent emotional shift.
Datasets and Evaluation
The researchers utilized a filtered version of the Visual Sentiment Ontology (VSO) dataset. To ensure data quality, they used their masking module to verify that the nouns in the labels (e.g., "classic rose") actually appeared prominently in the images. The final benchmark consists of 107,601 images covering 96 nouns and 174 adjectives.
Key Results
SentiGAN was compared against several baselines, including standard MUNIT and versions without the disentanglement loss.
- Quantitative Performance: SentiGAN achieved a sentiment classification "True Positive/Negative" rate of 0.558, outperforming the standard MUNIT (0.530).
- User Preference: In a human study, SentiGAN’s object-level strategy was preferred 67.2% of the time, compared to 28.8% for global methods.
- Sentiment Consistency: SentiGAN achieved a "hit rate" of 0.226 in capturing the specific mood of a reference image, nearly double that of the baseline MUNIT (0.129).
Conclusion and Future Work
SentiGAN demonstrates that sentiment transfer is most effective when treated as an object-oriented task. By disentangling color statistics from spatial content, the model achieves dramatic emotional shifts without sacrificing realism. Future work aims to move toward language-guided transfer, allowing users to specify desired moods through natural language prompts rather than reference images.
Summary updated