🚀 MegaDescriptor-L-384模型卡片
MegaDescriptor-L-384是一個基於Swin-L架構的圖像特徵模型,它在動物重識別數據集上進行了超智能的預訓練,能夠為動物圖像的特徵提取和重識別任務提供強大支持。
🚀 快速開始
MegaDescriptor-L-384是一個Swin-L圖像特徵模型,在動物重識別數據集上進行了預訓練。下面是使用該模型生成圖像嵌入的示例代碼:
import timm
import torch
import torchvision.transforms as T
from PIL import Image
from urllib.request import urlopen
model = timm.create_model("hf-hub:BVRA/MegaDescriptor-L-384", pretrained=True)
model = model.eval()
train_transforms = T.Compose([T.Resize(size=(384, 384)),
T.ToTensor(),
T.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5])])
img = Image.open(urlopen(
'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))
output = model(train_transforms(img).unsqueeze(0))
✨ 主要特性
- 適用領域廣泛:適用於圖像分類、生態學、動物識別和重識別等多個領域。
- 預訓練優勢:在動物重識別數據集上進行預訓練,能更好地處理動物相關圖像。
📚 詳細文檔
模型詳情
模型使用
圖像嵌入
import timm
import torch
import torchvision.transforms as T
from PIL import Image
from urllib.request import urlopen
model = timm.create_model("hf-hub:BVRA/MegaDescriptor-L-384", pretrained=True)
model = model.eval()
train_transforms = T.Compose([T.Resize(size=(384, 384)),
T.ToTensor(),
T.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5])])
img = Image.open(urlopen(
'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))
output = model(train_transforms(img).unsqueeze(0))
引用信息
@inproceedings{vcermak2024wildlifedatasets,
title={WildlifeDatasets: An open-source toolkit for animal re-identification},
author={{\v{C}}erm{\'a}k, Vojt{\v{e}}ch and Picek, Lukas and Adam, Luk{\'a}{\v{s}} and Papafitsoros, Kostas},
booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
pages={5953--5963},
year={2024}
}
📄 許可證
本項目採用CC BY-NC 4.0許可證。