If you like LVFace, please give us a star ⭐ on GitHub for the latest update.
This is the official PyTorch implementation for the inference of LVFace .Drawing inspiration from the massive data support, multi - stage training paradigm, and Transformer architecture of large - model technology, this method, based on Large Vision Transformer, has carried out progressive optimization of the face clustering space through multiple stages on massive datasets.
News
🔥🔥🔥 We have released the training weights of LVFace, aiming to support relevant research that relies on facial features. (August, 2025 UTC)
🎉🎉🎉 LVFace has been recommended as
ICCV Highlight
. (July, 2025 UTC)
🎉🎉🎉 LVFace is accepted by
ICCV 2025
. (July, 2025 UTC)
🔥🔥🔥 We have updated our arXiv report. Please click
here
to view it. (March, 2025 UTC)
🎉🎉🎉 LVFace secured
1st place
in the ICCV 2021 Masked Face Recognition (MFR)-Ongoing Challenge (academic track). (December, 2024 UTC)
Requirements
All required dependencies are listed in
requirements.txt
:
2. Download Pretrained Models
Download the ONNX-format pretrained weights from the
LVFace Pretrained Models
section, then place them in a directory (e.g.,
./LVFace_model/
).
3. Run Inference
Execute the
inference_onnx.py
script to perform feature extraction and similarity calculation. A complete workflow example:
## Initialize the inferencer from inference_onnx.py
inferencer = LVFaceONNXInferencer(
model_path="./models/vit_b_dp005_mask_005.onnx", # Path to your ONNX model
use_gpu=True# Set to False for CPU-only inference
)
## Extract feature from local image
feat1 = inferencer.infer_from_image("path/to/image1.jpg")
## Extract feature from URL
feat2 = inferencer.infer_from_url("https://example.com/image1.jpg")
## Calculate cosine similarity
similarity = inferencer.calculate_similarity(feat1, feat2)
print(f"Similarity score: {similarity:.6f}") # Output example: 0.892345
Note
: The
LVFaceONNXInferencer
class is defined in
inference_onnx.py
, which handles ONNX model loading, image preprocessing, feature extraction, and similarity calculation in a unified interface. Ensure the model path and image paths are correctly specified before running.
Model Evaluation
Evaluation Steps
Modify the test dataset path (e.g., IJB-C, IJB-B) in the corresponding evaluation script (
eval_ijbc.py
).
Run the evaluation with pretrained model weights using the commands below:
The code of LVFace is released under the MIT License. There is no limitation for both academic and commercial usage.
The models downloaded from our repo follow the above license policy (which is for non-commercial research purposes only).
Citation
If you find this work useful, please cite our paper and give us a star ⭐:
@article{you2025lvface,
title={LVFace: Progressive Cluster Optimization for Large Vision Models in Face Recognition},
author={You, Jinghan and Li, Shanglin and Sun, Yuanrui and Wei, Jiangchuan and Guo, Mingyu and Feng, Chao and Ran, Jiao},
journal={arXiv preprint arXiv:2501.13420},
year={2025}
}
Acknowledgments
We sincerely thank
Professor Deng Jiankang
for his valuable guidance and insights throughout the research.
We also appreciate the
InsightFace
for their excellent and research support.
Runs of bytedance-research LVFace on huggingface.co
38.2K
Total runs
379
24-hour runs
1.7K
3-day runs
3.7K
7-day runs
-641
30-day runs
More Information About LVFace huggingface.co Model
LVFace huggingface.co is an AI model on huggingface.co that provides LVFace's model effect (), which can be used instantly with this bytedance-research LVFace model. huggingface.co supports a free trial of the LVFace model, and also provides paid use of the LVFace. Support call LVFace model through api, including Node.js, Python, http.
LVFace huggingface.co is an online trial and call api platform, which integrates LVFace's modeling effects, including api services, and provides a free online trial of LVFace, you can try LVFace online for free by clicking the link below.
bytedance-research LVFace online free url in huggingface.co:
LVFace is an open source model from GitHub that offers a free installation service, and any user can find LVFace on GitHub to install. At the same time, huggingface.co provides the effect of LVFace install, users can directly use LVFace installed effect in huggingface.co for debugging and trial. It also supports api for free installation.