SOTAVerified

PromptStyler: Prompt-driven Style Generation for Source-free Domain Generalization

2023-07-27ICCV 2023Code Available1· sign in to hype

Junhyeong Cho, Gilhyun Nam, Sungyeon Kim, Hunmin Yang, Suha Kwak

Code Available — Be the first to reproduce this paper.

Reproduce

Code

Abstract

In a joint vision-language space, a text feature (e.g., from "a photo of a dog") could effectively represent its relevant image features (e.g., from dog photos). Also, a recent study has demonstrated the cross-modal transferability phenomenon of this joint space. From these observations, we propose PromptStyler which simulates various distribution shifts in the joint space by synthesizing diverse styles via prompts without using any images to deal with source-free domain generalization. The proposed method learns to generate a variety of style features (from "a S* style of a") via learnable style word vectors for pseudo-words S*. To ensure that learned styles do not distort content information, we force style-content features (from "a S* style of a [class]") to be located nearby their corresponding content features (from "[class]") in the joint vision-language space. After learning style word vectors, we train a linear classifier using synthesized style-content features. PromptStyler achieves the state of the art on PACS, VLCS, OfficeHome and DomainNet, even though it does not require any images for training.

Tasks

Benchmark Results

DatasetModelMetricClaimedVerifiedStatus
DomainNetPromptStyler (CLIP, ViT-L/14)Average Accuracy65.5Unverified
DomainNetPromptStyler (CLIP, ViT-B/16)Average Accuracy59.4Unverified
DomainNetPromptStyler (CLIP, ResNet-50)Average Accuracy49.5Unverified
Office-HomePromptStyler (CLIP, ViT-L/14)Average Accuracy89.1Unverified
Office-HomePromptStyler (CLIP, ViT-B/16)Average Accuracy83.6Unverified
Office-HomePromptStyler (CLIP, ResNet-50)Average Accuracy73.6Unverified
PACSPromptStyler (CLIP, ViT-L/14)Average Accuracy98.6Unverified
PACSPromptStyler (CLIP, ViT-B/16)Average Accuracy97.2Unverified
PACSPromptStyler (CLIP, ResNet-50)Average Accuracy93.2Unverified
VLCSPromptStyler (CLIP, ViT-B/16)Average Accuracy82.9Unverified
VLCSPromptStyler (CLIP, ViT-L/14)Average Accuracy82.4Unverified
VLCSPromptStyler (CLIP, ResNet-50)Average Accuracy82.3Unverified

Reproductions