Mamba-ST: State Space Model for Efficient Style Transfer (WACV 2025)
June 24, 2025 ยท View on GitHub
Authors: Filippo Botti, Alex Ergasti, Leonardo Rossi, Tomaso Fontanini, Claudio Ferrari, Massimo Bertozzi and Andrea Prati
ArXiv
This repository is the official implementation of Mamba-ST: State Space Model for Efficient Style Transfer. This paper explores a novel design of Mamba, called Mamba-ST, to perform style transfer.
Results presentation
Framework
Experiment
Requirements
In order to run the project please install the environment by following these commands:
conda create -n mambast
pip install -r requirements.txt
conda activate mambast
You can find the random images used in order to generated the results inside ./data folder. Please modify all the .sh files with the correct path for your checkpoints and images before running the following instructions.
Evaluation
sh scripts/eval.sh
# Before executing evalution code in order to calculate the metrics,
# please duplicate the content and style images to match the number of stylized images first.
# (40 styles, 20 contents -> 800 style images, 800 content images)
python evaluation/copy_inputs.py --cnt PATH_FOR_CONTENT_IMAGES --sty PATH_FOR_STYLE_IMAGES
sh evaluation/eval.sh
Testing
sh scripts/test.sh
Training
Style dataset is WikiArt collected from WIKIART
content dataset is COCO2014
sh scripts/train.sh
Code explanation
The full model (fig. 2(a)) can be found at MambaST.py. In this file you can find the whole architecture.
The Mamba Encoder/Decoder (fig. 2 (b) and fig. 2 (c)) module can be found at mamba.py
Finally, our VSSM's implementation (both with a single input and with two input merged for style transfer) can be found at mamba_arch.py. If you want you can also find VSSM with different scans direction inside single_direction_mamba_arch.py and double_direction_mamba_arch.py.
Reference
If you find our work useful in your research, please cite our paper using the following BibTeX entry ~ Thank you ^ . ^. Paper Link pdf
@inproceedings{botti2025mamba,
author={Botti, Filippo and Ergasti, Alex and Rossi, Leonardo and Fontanini, Tomaso and Ferrari, Claudio and Bertozzi, Massimo and Prati, Andrea},
booktitle={2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
title={Mamba-ST: State Space Model for Efficient Style Transfer},
year={2025},
volume={},
number={},
pages={7797-7806},
keywords={Measurement;Fuses;Computational modeling;Memory management;Transformers;Diffusion models;Mathematical models;State-space methods;Time complexity;Streams;mamba;style transfer;state space model},
doi={10.1109/WACV61041.2025.00757}
}