Download README.md from Made-In-Alexandria-AI/ApexID_MiewID_Backbone: direct link, hf CLI and curl.
- Browser
- Download file 5.6 kB
-
https://huggingface.co/Made-In-Alexandria-AI/ApexID_MiewID_Backbone/resolve/main/README.md
- Command line
-
hf download hf://Made-In-Alexandria-AI/ApexID_MiewID_Backbone/README.md
-
curl -L -o README.md https://huggingface.co/Made-In-Alexandria-AI/ApexID_MiewID_Backbone/resolve/main/README.md
license: other
license_name: upstream-miewid-msv3
license_link: https://huggingface.co/conservationxlabs/miewid-msv3
library_name: pytorch
pipeline_tag: image-feature-extraction
base_model: conservationxlabs/miewid-msv3
datasets:
- Made-In-Alexandria-AI/ApexID-Dataset
tags:
- animal-re-identification
- re-identification
- wildlife
- metric-learning
- apexid
- miewid
- efficientnet
ApexID MIEW-ID v3 encoder
Project page 路 Code 路 Dataset 路 Paper: arXiv link coming soon
This is the MIEW-ID v3 image encoder from ApexID: Hierarchical Learning for Multi-Species Animal Re-Identification, trained with the ApexID Hierarchical Loss. It maps a segmented animal image to an L2-normalized embedding, so individuals of any species can be matched by cosine similarity. In the paper it gives the highest dataset-averaged mAP (32.54%) of all fourteen configurations in the paper.
The other ApexID encoders are ApexID_ConvNext_Backbone and ApexID_MegaDescriptor_Backbone.
Model details
| Architecture | MIEW-ID v3 |
| Initialization | conservationxlabs/miewid-msv3 at revision 4f1d7f2b521149e5fe34bb85f377248ce9971a7d |
| Parameters | 51.08M |
| Embedding | 2152-d, L2-normalized |
| Input | 440 脳 440 RGB, normalized with mean (0.485, 0.456, 0.406) and std (0.229, 0.224, 0.225) |
| File | best_backbone.pt (PyTorch state dict) |
| Matching config | configs/miewid_v3/apexid_hierarchical.yaml |
Usage
Install the ApexID repository and run from its root:
import numpy as np
import torch
from PIL import Image
from huggingface_hub import hf_hub_download
from apexid.data import build_eval_transforms
from apexid.evaluation.embeddings import ApexIDModelAdapter
from apexid.utils.config import load_config
config = load_config(config_path="configs/miewid_v3/apexid_hierarchical.yaml")
weights = hf_hub_download("Made-In-Alexandria-AI/ApexID_MiewID_Backbone", "best_backbone.pt")
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = ApexIDModelAdapter.from_checkpoint(config, weights, device).model
transform = build_eval_transforms(config=config)
rgb = np.asarray(Image.open("animal.png").convert("RGB")) # a segmented foreground works best
with torch.inference_mode():
embedding = model(transform(image=rgb)["image"][None].to(device)) # shape (1, 2152)
Results
Closed-set retrieval, averaged over four external datasets (ELPephants, GCN-ID, Bristol Gorillas and private jaguar data) and five observation-disjoint split seeds, in percent. All rows use the MIEW-ID v3 backbone.
| Model | Rank-1 | mAP | mINP |
|---|---|---|---|
| Pretrained MIEW-ID v3 | 58.14 | 27.40 | 13.74 |
| ArcFace | 63.65 | 32.09 | 17.71 |
| Dynamic ArcFace | 62.72 | 31.51 | 17.31 |
| SphereFace2 | 63.40 | 31.89 | 17.78 |
| ApexID Hierarchical (this model) | 63.88 | 32.54 | 18.28 |
Transfer to ELPephants, a category absent from all animal Re-ID training, in percent:
| Model | Rank-1 | mAP |
|---|---|---|
| Original MIEW-ID v3 checkpoint | 14.12 | 4.82 |
| ApexID Hierarchical (this model) | 14.21 | 4.87 |
The project page has the full fourteen-configuration comparison, the open-set evaluation and ScoreCAM maps.
Intended use and limitations
The encoder is meant for research on individual animal re-identification: ranking a gallery of known individuals against a query image, or clustering images of unknown individuals. It works best on segmented foregrounds like those it was trained on. Absolute scores on unseen species remain low, and open-set results vary by dataset, so verify matches with an expert before acting on them.
Training data
The encoder was trained on the ApexID corpus: 132,533 curated images of 13,348 identities from 19 public animal re-identification datasets. See the dataset card for sources, licenses and splits.
License
The ApexID code is MIT-licensed. These weights are fine-tuned from conservationxlabs/miewid-msv3, which does not declare a license, so they follow whatever terms Conservation X Labs and Wild Me set for the upstream checkpoint.
Citation
@article{elkerdany2026apexid,
title = {ApexID: Hierarchical Learning for Multi-Species Animal Re-Identification},
author = {Elkerdany, Seifeldin and ElBassat, Mohamed and Abouelhamd, Gamal and
Elkady, Assem and Ghoneim, Jana and Mahmood, Matin and
Martin, Abigail Allen and de Melo, Gerard and Rueda-Toicen, Antonio},
journal = {arXiv preprint},
year = {2026}
}