🚀 MiewID - msv2 模型
MiewID - msv2 是一個野生動物特徵提取模型,通過對比學習在大規模、高質量的野生動物數據集上進行訓練,可用於不同物種個體的重新識別,還能用於物種分類。
🚀 快速開始
本模型旨在通過與真實樣本數據庫進行匹配,對不同物種的個體進行重新識別。模型特徵也可用於通過檢索進行物種分類。
✨ 主要特性
- 多物種適用:在包含 54 種陸地和水生野生動物的大規模高質量數據集上訓練,包括鰭、尾鰭、側面、面部等特徵。
- 特徵強大:可作為野生動物重新識別的特徵骨幹,提取的特徵可用於個體重新識別和物種分類。
📦 安裝指南
文檔未提及具體安裝步驟,可參考模型倉庫中的說明進行安裝:https://github.com/WildMeOrg/wbia - plugin - miew - id
💻 使用示例
基礎用法
import numpy as np
from PIL import Image
import torch
import torchvision.transforms as transforms
from transformers import AutoModel
model_tag = f"conservationxlabs/miewid-msv2"
model = AutoModel.from_pretrained(model_tag, trust_remote_code=True)
def generate_random_image(height=440, width=440, channels=3):
random_image = np.random.randint(0, 256, (height, width, channels), dtype=np.uint8)
return Image.fromarray(random_image)
random_image = generate_random_image()
preprocess = transforms.Compose([
transforms.Resize((440, 440)),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
])
input_tensor = preprocess(random_image)
input_batch = input_tensor.unsqueeze(0)
with torch.no_grad():
output = model(input_batch)
print(output)
print(output.shape)
更多示例
查看更多使用示例,請訪問:https://github.com/WildMeOrg/wbia - plugin - miew - id/tree/main/wbia_miew_id/examples
📚 詳細文檔
模型詳情
模型描述
MiewID - msv2 是一個特徵提取器,通過對比學習在包含 54 種陸地和水生野生動物的大規模高質量數據集上進行訓練,可用於重新識別,數據集涵蓋鰭、尾鰭、側面、面部等特徵。
屬性 |
詳情 |
模型類型 |
野生動物重新識別特徵骨幹 |
模型參數(M) |
51.11 |
GMACs |
24.38 |
激活值(M) |
91.11 |
圖像尺寸 |
440 x 440 |
模型來源
訓練詳情
訓練數據
用於這些實驗的數據集是 Wildbook 平臺(多個用戶)的數據、Happywhale Kaggle 競賽的多物種數據集以及多個公開可用數據集的組合。Wildbook 平臺的一小部分數據可在 https://lila.science/datasets 找到。
示例圖像

評估結果
多物種模型相比單物種訓練的模型有顯著改進。此外,當以留一法進行訓練和評估時,該模型對大多數物種表現出較強的泛化能力。
來源 |
分組 |
mAP |
排名 - 1 |
排名 - 5 |
排名 - 10 |
排名 - 20 |
視角 |
測試標註數 |
測試名稱數 |
訓練標註數 |
訓練名稱數 |
Wildbook |
amur_tiger |
91.8 |
100.0 |
100.0 |
100.0 |
100.0 |
['left', 'right'] |
233 |
47 |
691 |
75 |
Wildbook |
beluga_whale |
61.36 |
71.85 |
81.63 |
85.51 |
89.28 |
['up'] |
849 |
228 |
2767 |
354 |
Happywhale |
blue_whale |
36.98 |
38.68 |
55.11 |
61.52 |
69.04 |
['unknown'] |
998 |
392 |
1185 |
339 |
... |
... |
... |
... |
... |
... |
... |
... |
... |
... |
... |
... |
Wildbook |
zebra_grevys |
91.79 |
96.79 |
97.57 |
97.74 |
98.04 |
['right'] |
1684 |
332 |
8927 |
362 |