CoolFace
Modelpublic

BVRA/MegaDescriptor-CLIP-336

sourceHugging Facecc-by-nc-4.0updated 1y agoView on Hugging Face
0likes4kdownloads
README.md57 linesDownload Raw Back to root
1---2tags:3- image-classification4library_name: wildlife-datasets5license: cc-by-nc-4.06---7# Model card8 9A CLIP based image feature model. Supervisely pre-trained on animal re-identification datasets.10Original model: timm/vit_large_patch14_clip_336.openai_ft_in12k_in1k11 12## Model Details13- **Model Type:** Animal re-identification / feature backbone14- **Model Stats:**15 - Params (M): 304.516 - GMACs: 174.717 - Activations (M): 128.218 - Image size: 336 x 33619 20## Model Usage21### Image Embeddings22```python23 24import timm25import torch26import torchvision.transforms as T27 28from PIL import Image29from urllib.request import urlopen30 31model = timm.create_model("hf-hub:BVRA/MegaDescriptor-CLIP-336", pretrained=True)32model = model.eval()33 34transforms = T.Compose([T.Resize(336), 35                              T.ToTensor(), 36                              T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])]) 37 38img = Image.open(urlopen(39    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'40))41 42output = model(transforms(img).unsqueeze(0))  # output is (batch_size, num_features) shaped tensor43# output is a (1, num_features) shaped tensor44```45 46## Citation47 48```bibtex49@inproceedings{vcermak2024wildlifedatasets,50  title={WildlifeDatasets: An open-source toolkit for animal re-identification},51  author={{\v{C}}erm{\'a}k, Vojt{\v{e}}ch and Picek, Lukas and Adam, Luk{\'a}{\v{s}} and Papafitsoros, Kostas},52  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},53  pages={5953--5963},54  year={2024}55}56```57