Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- image-classification
|
4 |
+
library_name: wildlife-datasets
|
5 |
+
license: cc-by-nc-4.0
|
6 |
+
---
|
7 |
+
# Model card for vit_small_patch14_dinov2.lvd142m
|
8 |
+
|
9 |
+
A Swin-V image feature model. Superwisely pre-trained on animal re-identification datasets.
|
10 |
+
|
11 |
+
|
12 |
+
## Model Details
|
13 |
+
- **Model Type:** Animal re-identification / feature backbone
|
14 |
+
- **Model Stats:**
|
15 |
+
- Params (M): ??
|
16 |
+
- GMACs: ??
|
17 |
+
- Activations (M): ??
|
18 |
+
- Image size: 224 x 224
|
19 |
+
- **Papers:**
|
20 |
+
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows -- https://openaccess.thecvf.com/content/ICCV2021/papers/Liu_Swin_Transformer_Hierarchical_Vision_Transformer_Using_Shifted_Windows_ICCV_2021_paper.pdf
|
21 |
+
- **Original:** ??
|
22 |
+
- **Pretrain Dataset:** ??
|
23 |
+
|
24 |
+
## Model Usage
|
25 |
+
### Image Embeddings
|
26 |
+
```python
|
27 |
+
|
28 |
+
import timm
|
29 |
+
import torch
|
30 |
+
import torchvision.transforms as T
|
31 |
+
|
32 |
+
from PIL import Image
|
33 |
+
from urllib.request import urlopen
|
34 |
+
|
35 |
+
model = timm.create_model("hf-hub:BVRA/wildlife-mega", pretrained=True)
|
36 |
+
model = model.eval()
|
37 |
+
|
38 |
+
train_transforms = T.Compose([T.Resize(224),
|
39 |
+
T.ToTensor(),
|
40 |
+
T.Normalize([0.5, 0.5, 0.5], [0.5, 0.5, 0.5])])
|
41 |
+
|
42 |
+
img = Image.open(urlopen(
|
43 |
+
'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
|
44 |
+
))
|
45 |
+
|
46 |
+
output = model(train_transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor
|
47 |
+
# output is a (1, num_features) shaped tensor
|
48 |
+
```
|
49 |
+
|
50 |
+
## Model Comparison
|
51 |
+
???
|
52 |
+
|
53 |
+
## Citation
|
54 |
+
|
55 |
+
```bibtex
|
56 |
+
@article{?????,
|
57 |
+
title={?????},
|
58 |
+
author={????},
|
59 |
+
journal={????},
|
60 |
+
year={????}
|
61 |
+
}
|
62 |
+
```
|