bassatbassat commited on
Commit
c84e606
路
verified 路
1 Parent(s): 0fc78f4

docs: model card and links

Browse files
Files changed (3) hide show
  1. README.md +107 -1
  2. best_metadata.json +0 -8
  3. config_resolved.yaml +0 -0
README.md CHANGED
@@ -1,3 +1,109 @@
1
  ---
2
- license: mit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: other
3
+ license_name: upstream-miewid-msv3
4
+ license_link: https://huggingface.co/conservationxlabs/miewid-msv3
5
+ library_name: pytorch
6
+ pipeline_tag: image-feature-extraction
7
+ base_model: conservationxlabs/miewid-msv3
8
+ datasets:
9
+ - Made-In-Alexandria-AI/ApexID-Dataset
10
+ tags:
11
+ - animal-re-identification
12
+ - re-identification
13
+ - wildlife
14
+ - metric-learning
15
+ - apexid
16
+ - miewid
17
+ - efficientnet
18
  ---
19
+ # ApexID MIEW-ID v3 encoder
20
+
21
+ [Project page](https://mia-ai-team.github.io/ApexID-Hierarchical-Learning-for-Multi-Species-Animal-Re-Identification-Official-Repo/) 路 [Code](https://github.com/MIA-AI-Team/ApexID-Hierarchical-Learning-for-Multi-Species-Animal-Re-Identification-Official-Repo) 路 [Dataset](https://huggingface.co/datasets/Made-In-Alexandria-AI/ApexID-Dataset) 路 Paper: arXiv link coming soon
22
+
23
+ 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.
24
+
25
+ The other ApexID encoders are [ApexID_ConvNext_Backbone](https://huggingface.co/Made-In-Alexandria-AI/ApexID_ConvNext_Backbone) and [ApexID_MegaDescriptor_Backbone](https://huggingface.co/Made-In-Alexandria-AI/ApexID_MegaDescriptor_Backbone).
26
+
27
+ ## Model details
28
+
29
+ | | |
30
+ | --- | --- |
31
+ | Architecture | MIEW-ID v3 |
32
+ | Initialization | [conservationxlabs/miewid-msv3](https://huggingface.co/conservationxlabs/miewid-msv3) at revision `4f1d7f2b521149e5fe34bb85f377248ce9971a7d` |
33
+ | Parameters | 51.08M |
34
+ | Embedding | 2152-d, L2-normalized |
35
+ | Input | 440 脳 440 RGB, normalized with mean (0.485, 0.456, 0.406) and std (0.229, 0.224, 0.225) |
36
+ | File | `best_backbone.pt` (PyTorch state dict) |
37
+ | Matching config | [`configs/miewid_v3/apexid_hierarchical.yaml`](https://github.com/MIA-AI-Team/ApexID-Hierarchical-Learning-for-Multi-Species-Animal-Re-Identification-Official-Repo/blob/main/configs/miewid_v3/apexid_hierarchical.yaml) |
38
+
39
+ ## Usage
40
+
41
+ Install the [ApexID repository](https://github.com/MIA-AI-Team/ApexID-Hierarchical-Learning-for-Multi-Species-Animal-Re-Identification-Official-Repo) and run from its root:
42
+
43
+ ```python
44
+ import numpy as np
45
+ import torch
46
+ from PIL import Image
47
+ from huggingface_hub import hf_hub_download
48
+
49
+ from apexid.data import build_eval_transforms
50
+ from apexid.evaluation.embeddings import ApexIDModelAdapter
51
+ from apexid.utils.config import load_config
52
+
53
+ config = load_config(config_path="configs/miewid_v3/apexid_hierarchical.yaml")
54
+ weights = hf_hub_download("Made-In-Alexandria-AI/ApexID_MiewID_Backbone", "best_backbone.pt")
55
+
56
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
57
+ model = ApexIDModelAdapter.from_checkpoint(config, weights, device).model
58
+ transform = build_eval_transforms(config=config)
59
+
60
+ rgb = np.asarray(Image.open("animal.png").convert("RGB")) # a segmented foreground works best
61
+ with torch.inference_mode():
62
+ embedding = model(transform(image=rgb)["image"][None].to(device)) # shape (1, 2152)
63
+ ```
64
+
65
+ ## Results
66
+
67
+ 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.
68
+
69
+ | Model | Rank-1 | mAP | mINP |
70
+ | --- | ---: | ---: | ---: |
71
+ | Pretrained MIEW-ID v3 | 58.14 | 27.40 | 13.74 |
72
+ | ArcFace | 63.65 | 32.09 | 17.71 |
73
+ | Dynamic ArcFace | 62.72 | 31.51 | 17.31 |
74
+ | SphereFace2 | 63.40 | 31.89 | 17.78 |
75
+ | **ApexID Hierarchical (this model)** | 63.88 | 32.54 | 18.28 |
76
+
77
+ Transfer to ELPephants, a category absent from all animal Re-ID training, in percent:
78
+
79
+ | Model | Rank-1 | mAP |
80
+ | --- | ---: | ---: |
81
+ | Original MIEW-ID v3 checkpoint | 14.12 | 4.82 |
82
+ | ApexID Hierarchical (this model) | 14.21 | 4.87 |
83
+
84
+ The [project page](https://mia-ai-team.github.io/ApexID-Hierarchical-Learning-for-Multi-Species-Animal-Re-Identification-Official-Repo/) has the full fourteen-configuration comparison, the open-set evaluation and ScoreCAM maps.
85
+
86
+ ## Intended use and limitations
87
+
88
+ 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.
89
+
90
+ ## Training data
91
+
92
+ 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](https://huggingface.co/datasets/Made-In-Alexandria-AI/ApexID-Dataset) for sources, licenses and splits.
93
+
94
+ ## License
95
+
96
+ The ApexID code is MIT-licensed. These weights are fine-tuned from [conservationxlabs/miewid-msv3](https://huggingface.co/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.
97
+
98
+ ## Citation
99
+
100
+ ```bibtex
101
+ @article{elkerdany2026apexid,
102
+ title = {ApexID: Hierarchical Learning for Multi-Species Animal Re-Identification},
103
+ author = {Elkerdany, Seifeldin and ElBassat, Mohamed and Abouelhamd, Gamal and
104
+ Elkady, Assem and Ghoneim, Jana and Mahmood, Matin and
105
+ Martin, Abigail Allen and de Melo, Gerard and Rueda-Toicen, Antonio},
106
+ journal = {arXiv preprint},
107
+ year = {2026}
108
+ }
109
+ ```
best_metadata.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "backbone_path": "outputs/apexid_miewid_msv3_bhca_scsf2_ablation_e6_v2_rgb/checkpoints/best_backbone.pt",
3
- "best_epoch": 149,
4
- "best_metric": 0.437681265222002,
5
- "full_model_path": "outputs/apexid_miewid_msv3_bhca_scsf2_ablation_e6_v2_rgb/checkpoints/best_full_model.pt",
6
- "mode": "max",
7
- "monitor": "known/mAP"
8
- }
 
 
 
 
 
 
 
 
 
config_resolved.yaml DELETED
The diff for this file is too large to render. See raw diff