TensorBoard

FSFM-3C Models (Pre-trained/Fine-tuned Vision Transformers)

FSFM is the CVPR 2025 face security foundation model based on self-supervised facial representation learning. FS-VFM is the scalable FS-VFM extension.

[Paper FSFM: A Generalizable Face Security Foundation Model via Self-Supervised Facial Representation Learning]

Project

GitHub Repository

Environment

Git clone our repository, create a Python environment, and activate it using the following commands:

conda create -n fsfm3c python=3.9
conda activate fsfm3c
pip install -r requirements.txt

Model Loading

import models_vit
from huggingface_hub import hf_hub_download
CKPT_SAVE_PATH = [your checkpoint storage path]
CKPT_NAME = [checkpoint name]
hf_hub_download(local_dir=CKPT_SAVE_PATH,
                repo_id='Wolowolo/fsfm-3c',
                filename=CKPT_NAME)
model = models_vit.__dict__['vit_base_patch16'](
    num_classes=2,
    drop_path_rate=0.1,
    global_pool=True,
)
checkpoint = torch.load(os.path.join(CKPT_SAVE_PATH, CKPT_NAME), map_location='cpu')
model.load_state_dict(checkpoint['model'])

Intended Use

These models are intended for research on face security tasks, including deepfake detection, face anti-spoofing, and diffusion-generated face detection. Users should evaluate suitability, limitations, and applicable dataset licenses for their own research settings.

Model Variants

  • FSFM ViT-B
  • FS-VFM ViT-S
  • FS-VFM ViT-B
  • FS-VFM ViT-L

Citation

If this repository or its released models are useful for your research, please cite the corresponding paper.

FSFM (CVPR 2025):

@inproceedings{wang2025fsfm,
  title={Fsfm: A generalizable face security foundation model via self-supervised facial representation learning},
  author={Wang, Gaojian and Lin, Feng and Wu, Tong and Liu, Zhenguang and Ba, Zhongjie and Ren, Kui},
  booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
  pages={24364--24376},
  year={2025}
}

FS-VFM (extended technical version; arXiv technical report):

@misc{wang2025scalablefacesecurityvision,
  title={Scalable Face Security Vision Foundation Model for Deepfake, Diffusion, and Spoofing Detection},
  author={Gaojian Wang and Feng Lin and Tong Wu and Zhisheng Yan and Kui Ren},
  year={2025},
  eprint={2510.10663},
  archivePrefix={arXiv},
  primaryClass={cs.CV},
  url={https://arxiv.org/abs/2510.10663}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Spaces using Wolowolo/fsfm-3c 4

Papers for Wolowolo/fsfm-3c