/ Модель

Характеристики

Лицензия
MIT
Библиотека
pytorch
Опубликована
23 окт 2026

Ripple

Классификация изображенийИзображение → label4 профессии

RipPLE обучает 512-мерные эмбеддинги для сравнения и поиска лиц, используя норму вектора как показатель информативности изображения.

0скачиваний за 30 дней1лайквеса обновлены28 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

RipPLE — метод обучения эмбеддингов для распознавания лиц, разработанный Zhe Xu и Yandong Wen. Репозиторий содержит веса на базе IResNet-100 и SFNet-64, обученные на MS1MV2; эмбеддинг имеет размерность 512, модель принимает выровненные RGB-изображения лица размером 112×112. Направление вектора кодирует идентичность, а его норма отражает количество свидетельств во входном изображении и учитывается при оценке сходства.

Модель предназначена для проверки совпадения лиц один к одному, поиска личности среди набора изображений, извлечения признаков и оценки качества кадров внутри шаблона. Малые по модулю оценки помогают выявлять неоднозначные пары при размытии, перекрытии лица или сложном ракурсе; норму также можно использовать для ранжирования кадров и отбора признаков в задачах кластеризации и поиска.

Для обучения используется ограничение ожидаемой нормы, которое фиксирует среднюю норму в батче, сохраняя свободу индивидуальных норм. Веса и код выпущены по лицензии MIT для исследовательского использования. MS1MV2 имеет недостаточно документированный демографический состав; качество может различаться между группами и при ухудшении качества изображений. Норма не является калиброванной вероятностью, а результаты на IJB-B/IJB-C не гарантируют полевую точность; пороги следует калибровать на целевых данных.

Сценарии применения

  • проверка совпадения двух лиц на изображениях
  • поиск лица среди набора фотографий
  • извлечение эмбеддингов из выровненных изображений лиц
  • ранжирование кадров по качеству распознавания
  • поиск похожих лиц с учётом неоднозначных изображений
  • кластеризация и дедупликация фотографий лиц

Ограничения

Качество может различаться в зависимости от демографической группы, ракурса, перекрытий и качества изображений; норма эмбеддинга не является калиброванной вероятностью. Результаты на IJB-B/IJB-C не гарантируют точность в реальных условиях, поэтому пороги нужно калибровать на целевых данных.

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

RipPLE: Concentric Hypersphere Embedding for Pairwise Similarity Learning

RipPLE is a pairwise metric learning method for face recognition that keeps embeddings off the unit hypersphere. The direction of an embedding encodes identity and its norm encodes how much evidence the input provides, learned end-to-end by the pairwise loss and used at scoring time. Under occlusion, extreme pose or blur, both genuine and impostor scores converge toward zero instead of overlapping, so a small absolute score marks a pair as hard to decide rather than wrongly decided.

The norm also acts as the temperature of the loss, so an unconstrained norm hampers convergence while fixing every norm removes the evidence. RipPLE therefore introduces the expected norm constraint (ENC): only the mean norm over a training batch is anchored, and every individual norm stays free.

Model Details

Model Description

  • Developed by: Zhe Xu, Yandong Wen
  • Model type: proxy-free pairwise metric learning; 512-d embedding, input 112x112 RGB
  • Backbones: IResNet-100, SFNet-64
  • Training data: MS1MV2
  • License: MIT for code and weights; released for research use only
  • Repository: https://github.com/bili186/Ripple
  • Paper: Concentric Hypersphere Embedding for Pairwise Similarity Learning (under review, arXiv link to be added)

Each checkpoint is a plain dict with two state dicts, backbone and head; optimizer state is not included.

Released checkpoints

FileBackboneHead / anchorKey hyperparameters
iresnet100-ms1m-ripple.pthIResNet-100RipPLE (arithmetic mean ENC)L=10, lambda_=1, m=10, alpha=1e-4
sfnet64-ms1m-ripple.pthSFNet-64RipPLE (arithmetic mean ENC)L=10, lambda_=1, m=10, alpha=1e-4
iresnet100-ms1m-simple_ENC.pthIResNet-100SimPLE(enc=True) (ENC on SimPLE)L=6, lambda_=1, r=3, m=3.6, alpha=5e-4
sfnet64-ms1m-simple_ENC.pthSFNet-64SimPLE(enc=True) (ENC on SimPLE)L=6, lambda_=1, r=3, m=3.6, alpha=5e-4
iresnet100-ms1m-ripple-gm-exp.pthIResNet-100RipPLE_GM (geometric-mean ENC, exponential norm map)L=9, lambda_=0.1, m=6, alpha=1e-4
iresnet100-ms1m-ripple-gm-polar.pthIResNet-100RipPLE_GM (geometric-mean ENC, polar norm map)L=9, lambda_=1, m=8.1, alpha=2e-4
iresnet100-ms1m-ripple-p.pthIResNet-100RipPLE_P (per-pair ENC)L=10, lambda_=1, m=10, alpha=1e-4

All heads use wrap_mode: polarlike except -gm-exp, which uses explike, and b_theta=0.3. The matching training config of every run is in configs/.

Scoring

Similarity is the generalized inner product

S(x1, x2) = ||x1|| * ||x2|| * (cos(x1, x2) - b_theta),   b_theta = 0.3

Template features are fused from the original and flipped image with equal 0.5/0.5 weights; multi-image templates use media-deduplicated weights. A pair with a small absolute score is ambiguous.

Uses

Direct Use

  • 1:1 face verification (TAR at low FAR)
  • 1:N identification (TPIR@FPIR, rank-1)
  • Embedding extraction for arbitrary aligned face image folders
  • Image-level quality ranking inside a template: the norm is monotonically related to input evidence

Downstream Use

The embeddings can serve as features for clustering, deduplication, template aggregation or quality-aware retrieval pipelines.

Out-of-Scope Use

  • Surveillance, identity tracking or any use without informed consent of the subjects
  • Law enforcement, border control, hiring, housing, insurance or other high-stakes decisions about individuals
  • Any application where a false match can cause harm without human review
  • Demographic-fairness-critical deployments: no fairness guarantee is claimed for any subgroup

Bias, Risks, and Limitations

  • MS1MV2 is a large web-collected dataset whose demographic composition is not documented in detail; accuracy may differ across age, gender, ethnicity, pose and image quality
  • Low-resolution, heavily occluded or compressed images have small embedding norms; the resulting scores shrink toward zero, which reflects uncertainty but also means thresholds calibrated on clean data can behave differently on degraded data
  • The norm is a learned scalar, not a calibrated probability, and it should not be used to delete images in production without an audit
  • Reported numbers follow the IJB-B/IJB-C protocols and are not a guarantee of field performance

Recommendations

Treat outputs as similarity evidence, not as identity verification, in any consequential setting. Calibrate the threshold on target-domain data, keep a human in the loop for reject decisions, and comply with local biometric data regulations.

How to Get Started

git clone https://github.com/bili186/Ripple.git
cd Ripple
conda env create -f environment.yml
conda activate ripple

Download a checkpoint and its config, then run evaluation:

mkdir -p project/ripple_pretrained/checkpoint
cp configs/iresnet100-ms1m-ripple.yml project/ripple_pretrained/config.yml
cp checkpoints/iresnet100-ms1m-ripple.pth \
   project/ripple_pretrained/checkpoint/best_model_CB_ACC.pth

CUDA_VISIBLE_DEVICES=0 python main_test.py \
    --cfg_path config/test/ijbc.yml \
    --proj_dir project/ripple_pretrained \
    --model_path project/ripple_pretrained/checkpoint/best_model_CB_ACC.pth

For feature extraction on a folder of images:

python main_inference.py --image_dir <your_images> \
    --proj_dir project/ripple_pretrained

Loading the weights directly:

import yaml
import torch
from opensphere.utils.build_helper import build_from_args

cfg = yaml.safe_load(open('configs/iresnet100-ms1m-ripple.yml'))
state = torch.load('checkpoints/iresnet100-ms1m-ripple.pth', map_location='cpu')
backbone = build_from_args(dict(cfg['model']['backbone']), 'opensphere.module.backbone')
head = build_from_args(dict(cfg['model']['head']), 'opensphere.module.head')
backbone.load_state_dict(state['backbone'])
head.load_state_dict(state['head'])
backbone.eval()
head.eval()

Training Details

Training Data

MS1MV2 (InsightFace-style aligned 112x112 crops).

Training Procedure

  • Optimizer: SGD, lr 0.1 (head lr 0.01), momentum 0.9, weight decay 5e-4, MultiStepLR with milestones at 80k/140k/200k/240k steps, gamma 0.1
  • Schedule: 240k iterations, batch size 128 per GPU
  • Precision: automatic mixed precision (fp16)
  • Pair sampling: proxy-free pairwise batches, MoCo-style EMA feature bank of 524,288 entries with momentum 0.999
  • Augmentation: horizontal flip; low-resolution, crop and photo degradation with probability 0.2 each
  • Loss: asymmetric BCE on pairwise logits (positive weight alpha) plus the anchoring term of the chosen head

Evaluation

Testing Data, Factors & Metrics

  • Data: IJB-B and IJB-C
  • Protocols: 1:1 verification (TAR@FAR=1e-6/1e-5/1e-4) and 1:N identification (rank-1, TPIR@FPIR=1e-2)
  • Template aggregation: media-deduplicated weighting, original + flipped image fusion

Results

IResNet-100, trained on MS1MV2 for 240k steps. Numbers of compared methods are quoted from their papers.

MethodIJB-B 1e-6IJB-B 1e-5IJB-B 1e-4IJB-C 1e-6IJB-C 1e-5IJB-C 1e-41:N top1 (B/C)1:N TPIR@1e-2 (B/C)
SimPLE49.8791.1394.7890.3094.3496.2795.54 / 96.8185.92 / 92.88
SimPLE+ENC51.8991.8895.3590.5594.6196.6695.42 / 96.7884.34 / 93.01
RipPLE44.7292.5795.5092.1395.0996.8295.41 / 96.7587.21 / 93.89
RipPLE-P44.6392.1995.3790.1994.9396.6795.05 / 96.3485.29 / 93.29
RipPLE-GM38.7692.0195.2090.7594.7896.5895.27 / 96.5887.32 / 93.30

Quality filtering with the RipPLE-P norm, discarding the lowest-norm fraction of template frames, moves TAR@FAR=1e-4 from 94.71 to 98.37 on IJB-B and from 96.60 to 99.47 on IJB-C.

Environmental Impact

Compute hours and carbon emissions were not tracked for these runs. Training used 2 GPUs with mixed precision.

Citation

@inproceedings{wen2023simple,
  title     = {Pairwise Similarity Learning is SimPLE},
  author    = {Wen, Yandong and Liu, Weiyang and Feng, Yao and Raj, Bhiksha and Singh, Rita and Weller, Adrian and Black, Michael J. and Sch{\"o}lkopf, Bernhard},
  booktitle = {ICCV},
  year      = {2023}
}

@article{liu2022spherefacer,
  title     = {SphereFace Revived: Unifying Hyperspherical Face Recognition},
  author    = {Liu, Weiyang and Wen, Yandong and Raj, Bhiksha and Singh, Rita and Weller, Adrian},
  journal   = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year      = {2022}
}

The RipPLE paper is under review; its BibTeX entry will be added upon release.

Model Card Contact

Zhe Xu, Yandong Wen. Please open an issue at https://github.com/bili186/Ripple.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · pytorch · image-classification

Нельзя запустить

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
cb6d2ac

0 моделей