Image Feature Extraction
TensorRT
ONNX
PyTorch
computer-vision
image-retrieval
animal-re-identification
cat-identification
Instructions to use RicePasteM/MeowID-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TensorRT
How to use RicePasteM/MeowID-Base with TensorRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Add MeowID model card
Browse files- .gitattributes +2 -0
- README.md +158 -0
- assets/logo.png +3 -0
- assets/meowid-pipeline.png +3 -0
.gitattributes
CHANGED
|
@@ -35,3 +35,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
artifacts/MeowID-Base/ecpose.engine filter=lfs diff=lfs merge=lfs -text
|
| 37 |
artifacts/MeowID-Base/meowid_base.engine filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
artifacts/MeowID-Base/ecpose.engine filter=lfs diff=lfs merge=lfs -text
|
| 37 |
artifacts/MeowID-Base/meowid_base.engine filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
assets/logo.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
assets/meowid-pipeline.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,161 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
pipeline_tag: image-feature-extraction
|
| 4 |
+
tags:
|
| 5 |
+
- computer-vision
|
| 6 |
+
- image-retrieval
|
| 7 |
+
- animal-re-identification
|
| 8 |
+
- cat-identification
|
| 9 |
+
- pytorch
|
| 10 |
+
- onnx
|
| 11 |
+
- tensorrt
|
| 12 |
---
|
| 13 |
+
|
| 14 |
+
<p align="center">
|
| 15 |
+
<img src="assets/logo.png" alt="MeowID" width="420">
|
| 16 |
+
</p>
|
| 17 |
+
|
| 18 |
+
<h1 align="center">MeowID: A Dual-Expert Retrieval System for Individual Cat Identification</h1>
|
| 19 |
+
|
| 20 |
+
<p align="center">
|
| 21 |
+
<img alt="Version" src="https://img.shields.io/badge/version-0.3.0-11bfae">
|
| 22 |
+
<img alt="Embedding" src="https://img.shields.io/badge/embedding-512D-0875c1">
|
| 23 |
+
<img alt="PyTorch" src="https://img.shields.io/badge/PyTorch-supported-ee4c2c">
|
| 24 |
+
<img alt="ONNX" src="https://img.shields.io/badge/ONNX-supported-005ced">
|
| 25 |
+
<img alt="TensorRT" src="https://img.shields.io/badge/TensorRT-supported-032b4a">
|
| 26 |
+
</p>
|
| 27 |
+
|
| 28 |
+
<p align="center">
|
| 29 |
+
<strong>TL;DR:</strong> MeowID prioritizes fine-grained facial evidence, augments it with whole-cat context, and falls back to whole-cat retrieval when a usable face is unavailable.
|
| 30 |
+
</p>
|
| 31 |
+
|
| 32 |
+
<div align="center">
|
| 33 |
+
Zhangchi Hu<sup>1,2,*,†</sup>,
|
| 34 |
+
Yi Shang<sup>2,*</sup>,
|
| 35 |
+
Haocheng Yang<sup>4,2,*</sup>,
|
| 36 |
+
Qiwei Hu<sup>5,*</sup>,
|
| 37 |
+
and Yuzheng Li<sup>3,*</sup>
|
| 38 |
+
</div>
|
| 39 |
+
|
| 40 |
+
<p></p>
|
| 41 |
+
|
| 42 |
+
<div align="center"><sub>
|
| 43 |
+
<sup>1</sup> Department of Electronic Engineering and Information Science, University of Science and Technology of China<br>
|
| 44 |
+
<sup>2</sup> School of Intelligent Software Engineering, Hefei University of Technology<br>
|
| 45 |
+
<sup>3</sup> School of Software Engineering, Sun Yat-sen University<br>
|
| 46 |
+
<sup>4</sup> School of Computer Science, Northwestern Polytechnical University<br>
|
| 47 |
+
<sup>5</sup> College of Biological Sciences and Technology, Beijing Forestry University
|
| 48 |
+
</sub></div>
|
| 49 |
+
|
| 50 |
+
<p align="center">
|
| 51 |
+
<sup>*</sup> Equal contribution <sup>†</sup> Project leader
|
| 52 |
+
</p>
|
| 53 |
+
|
| 54 |
+
## Model overview
|
| 55 |
+
|
| 56 |
+
MeowID is a face-priority, dual-expert retrieval system for identifying individual cats in unconstrained photographs. It combines separately parameterized face and whole-cat encoders while keeping their embedding galleries route-specific.
|
| 57 |
+
|
| 58 |
+
- When a usable aligned face is available, the face expert produces the primary representation and receives a gated whole-cat correction.
|
| 59 |
+
- When facial evidence is unavailable, the system falls back to the whole-cat expert.
|
| 60 |
+
- New identities can be enrolled through embedding extraction and gallery insertion without retraining the recognition models.
|
| 61 |
+
- All retrieval embeddings are L2-normalized, 512-dimensional vectors.
|
| 62 |
+
|
| 63 |
+
## Method pipeline
|
| 64 |
+
|
| 65 |
+
<p align="center">
|
| 66 |
+
<img src="assets/meowid-pipeline.png" alt="MeowID method pipeline" width="100%">
|
| 67 |
+
</p>
|
| 68 |
+
|
| 69 |
+
The whole-cat expert produces an embedding for every image. A valid ECPose detection activates PetFace-style face alignment, the face expert, and validation-guided whole-cat hint fusion. Queries are compared only with the gallery associated with their selected route.
|
| 70 |
+
|
| 71 |
+
## Repository contents
|
| 72 |
+
|
| 73 |
+
| Path | Contents | Intended use |
|
| 74 |
+
| --- | --- | --- |
|
| 75 |
+
| `artifacts/MeowID-Base/` | MeowID-Base and ECPose weights in PyTorch, ONNX, and TensorRT formats | End-to-end identification and deployment |
|
| 76 |
+
| `artifacts/ECSeg/` | ECSeg-X segmentation weights | Whole-cat instance extraction and cropping |
|
| 77 |
+
| `artifacts/training_init/` | Whole-cat and face expert initialization checkpoints | Training and reproduction |
|
| 78 |
+
| `artifacts/**/SHA256SUMS` | Published SHA256 checksums | Artifact integrity verification |
|
| 79 |
+
|
| 80 |
+
The TensorRT engines were built for the reference RTX 3090 environment. Rebuild them from the ONNX artifacts when the GPU architecture, TensorRT version, or batch profile changes.
|
| 81 |
+
|
| 82 |
+
## Inference capabilities
|
| 83 |
+
|
| 84 |
+
| Capability | Details |
|
| 85 |
+
| --- | --- |
|
| 86 |
+
| Face localization | ECPose with 9 cat-face landmarks |
|
| 87 |
+
| Face alignment | PetFace-style three-point similarity alignment with a landmark-crop fallback |
|
| 88 |
+
| Recognition | Separate DINOv3-based face and whole-cat experts |
|
| 89 |
+
| Fusion | Validation-guided, gated whole-cat residual for the face route |
|
| 90 |
+
| Retrieval | Route-specific galleries with normalized inner-product similarity |
|
| 91 |
+
| Backends | PyTorch, ONNX Runtime CPU/CUDA, and TensorRT FP16/FP32 |
|
| 92 |
+
| Whole-cat cropping | ECSeg-X instance segmentation with masks, boxes, and padded crops |
|
| 93 |
+
|
| 94 |
+
## Minimal Python usage
|
| 95 |
+
|
| 96 |
+
```python
|
| 97 |
+
from cat_recognition import MeowID
|
| 98 |
+
|
| 99 |
+
model = MeowID(
|
| 100 |
+
"artifacts/MeowID-Base",
|
| 101 |
+
backend="tensorrt",
|
| 102 |
+
device="cuda:0",
|
| 103 |
+
registry="registries/demo",
|
| 104 |
+
)
|
| 105 |
+
|
| 106 |
+
model.register(
|
| 107 |
+
"cat_001",
|
| 108 |
+
["images/cat_001_a.jpg", "images/cat_001_b.jpg"],
|
| 109 |
+
)
|
| 110 |
+
|
| 111 |
+
prediction = model.search("images/query.jpg", top_k=5)[0]
|
| 112 |
+
print("route:", prediction.embedding.route)
|
| 113 |
+
for match in prediction.matches:
|
| 114 |
+
print(match.cat_id, match.score)
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
The package accepts file paths, directories, glob patterns, PIL images, RGB NumPy arrays, and iterables of supported inputs.
|
| 118 |
+
|
| 119 |
+
## Reference results
|
| 120 |
+
|
| 121 |
+
Offline retrieval on the ICW test set:
|
| 122 |
+
|
| 123 |
+
| Route | Top-1 | mAP |
|
| 124 |
+
| --- | ---: | ---: |
|
| 125 |
+
| Whole-cat expert | 51.34% | 59.00% |
|
| 126 |
+
| Cat-face expert | 78.80% | 83.32% |
|
| 127 |
+
| MeowID-Base hard routing | **75.93%** | **80.45%** |
|
| 128 |
+
|
| 129 |
+
End-to-end batch-1 measurements on one RTX 3090 over 2,846 ICW test images include image decoding, preprocessing, ECPose, alignment, embedding extraction, and routing:
|
| 130 |
+
|
| 131 |
+
| Backend | Mean latency | Throughput |
|
| 132 |
+
| --- | ---: | ---: |
|
| 133 |
+
| PyTorch FP32 | 94.23 ms | 10.61 images/s |
|
| 134 |
+
| ONNX Runtime CPU | 478.67 ms | 2.09 images/s |
|
| 135 |
+
| ONNX Runtime CUDA | 79.88 ms | 12.51 images/s |
|
| 136 |
+
| TensorRT FP16 | **60.00 ms** | **16.66 images/s** |
|
| 137 |
+
|
| 138 |
+
These results describe the reference evaluation environment and do not guarantee production performance.
|
| 139 |
+
|
| 140 |
+
## Model mirrors
|
| 141 |
+
|
| 142 |
+
- [Hugging Face — RicePasteM/MeowID-Base](https://huggingface.co/RicePasteM/MeowID-Base)
|
| 143 |
+
- [ModelScope — RicePasteM/MeowID-Base](https://modelscope.cn/models/RicePasteM/MeowID-Base)
|
| 144 |
+
|
| 145 |
+
## Limitations
|
| 146 |
+
|
| 147 |
+
- Face and whole-cat embeddings occupy different spaces and must not be compared or merged directly.
|
| 148 |
+
- Open-set acceptance thresholds must be calibrated for the target cameras, lighting, gallery size, and operating conditions.
|
| 149 |
+
- Whole-cat fallback remains sensitive to severe occlusion and visually similar coat patterns.
|
| 150 |
+
- TensorRT engines are environment-specific and should be rebuilt for other deployment targets.
|
| 151 |
+
- ECSeg-X cropping currently uses the PyTorch backend.
|
| 152 |
+
|
| 153 |
+
## Citation
|
| 154 |
+
|
| 155 |
+
```bibtex
|
| 156 |
+
@misc{hu2026meowid,
|
| 157 |
+
title = {MeowID: A Dual-Expert Retrieval System for Individual Cat Identification},
|
| 158 |
+
author = {Zhangchi Hu and Yi Shang and Haocheng Yang and Qiwei Hu and Yuzheng Li},
|
| 159 |
+
year = {2026}
|
| 160 |
+
}
|
| 161 |
+
```
|
assets/logo.png
ADDED
|
Git LFS Details
|
assets/meowid-pipeline.png
ADDED
|
Git LFS Details
|