Model reference · open weights

cvlface_adaface_vit_base_kprpe_webface

Available as managed deployment Embeddings minchul · community Embeddings 1 variants 1k dl/mo

cvlface_adaface_vit_base_kprpe_webface is an open-weight embedding model from minchul. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Released byminchul
TypeEmbedding models
TaskEmbeddings
Parameters (lead)115M
Runs withtransformers
Released2024-06-06
Popularity1k downloads / month
LicenceUnknown

About

What cvlface_adaface_vit_base_kprpe_webface is

CVLFace Pretrained Model (ADAFACE VIT BASE KPRPE WEBFACE12M)

🌎 GitHub • 🤗 Hugging Face


1. Introduction

Model Name: ADAFACE VIT BASE KPRPE WEBFACE12M

Related Paper: KeyPoint Relative Position Encoding for Face Recognition (https://arxiv.org/abs/2403.14852)

Read the full model card

Please cite the orignal paper and follow the license of the training dataset.

2. Quick Start

from transformers import AutoModel
from huggingface_hub import hf_hub_download
import shutil
import os
import torch
import sys

# helpfer function to download huggingface repo and use model
def download(repo_id, path, HF_TOKEN=None):
    os.makedirs(path, exist_ok=True)
    files_path = os.path.join(path, 'files.txt')
    if not os.path.exists(files_path):
        hf_hub_download(repo_id, 'files.txt', token=HF_TOKEN, local_dir=path, local_dir_use_symlinks=False)
    with open(os.path.join(path, 'files.txt'), 'r') as f:
        files = f.read().split('\n')
    for file in [f for f in files if f] + ['config.json', 'wrapper.py', 'model.safetensors']:
        full_path = os.path.join(path, file)
        if not os.path.exists(full_path):
            hf_hub_download(repo_id, file, token=HF_TOKEN, local_dir=path, local_dir_use_symlinks=False)

# helpfer function to download huggingface repo and use model
def load_model_from_local_path(path, HF_TOKEN=None):
    cwd = os.getcwd()
    os.chdir(path)
    sys.path.insert(0, path)
    model = AutoModel.from_pretrained(path, trust_remote_code=True, token=HF_TOKEN)
    os.chdir(cwd)
    sys.path.pop(0)
    return model

# helpfer function to download huggingface repo and use model
def load_model_by_repo_id(repo_id, save_path, HF_TOKEN=None, force_download=False):
    if force_download:
        if os.path.exists(save_path):
            shutil.rmtree(save_path)
    download(repo_id, save_path, HF_TOKEN)
    return load_model_from_local_path(save_path, HF_TOKEN)

if __name__ == '__main__':

    HF_TOKEN = 'YOUR_HUGGINGFACE_TOKEN'
    path = os.path.expanduser('~/.cvlface_cache/minchul/cvlface_adaface_vit_base_kprpe_webface12m')
    repo_id = 'minchul/cvlface_adaface_vit_base_kprpe_webface12m'
    model = load_model_by_repo_id(repo_id, path, HF_TOKEN)

    # input is a rgb image normalized.
    from torchvision.transforms import Compose, ToTensor, Normalize
    from PIL import Image
    img = Image.open('path/to/image.jpg')
    trans = Compose([ToTensor(), Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])])
    input = trans(img).unsqueeze(0)  # torch.randn(1, 3, 112, 112)

    # KPRPE also takes keypoints locations as input
    aligner = load_model_by_repo_id('minchul/cvlface_DFA_mobilenet', path, HF_TOKEN)
    aligned_x, orig_ldmks, aligned_ldmks, score, thetas, bbox = aligner(input)
    keypoints = orig_ldmks  # torch.randn(1, 5, 2)
    out = model(input, keypoints)

From the published model card. Full card on the HuggingFace links in the sidebar.

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys cvlface-adaface-vit-base-kprpe-webface for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (cvlface-adaface-vit-base-kprpe-webface below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/embeddings \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"cvlface-adaface-vit-base-kprpe-webface","input":"text to embed"}'

Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms