First model version
Browse files- README.md +58 -0
- config.json +39 -0
- pytorch_model.bin +3 -0
README.md
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 EfficientNetB3 based image feature model. Supervisely 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): 12.2
|
16 |
+
- GMACs: 1.6
|
17 |
+
- Activations (M): 21.5
|
18 |
+
- Image size: 288 x 288
|
19 |
+
- **Papers:**
|
20 |
+
- EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks: https://arxiv.org/abs/1905.11946
|
21 |
+
|
22 |
+
## Model Usage
|
23 |
+
### Image Embeddings
|
24 |
+
```python
|
25 |
+
|
26 |
+
import timm
|
27 |
+
import torch
|
28 |
+
import torchvision.transforms as T
|
29 |
+
|
30 |
+
from PIL import Image
|
31 |
+
from urllib.request import urlopen
|
32 |
+
|
33 |
+
model = timm.create_model("hf-hub:BVRA/MegaDescriptor-EfficientNetB3", pretrained=True)
|
34 |
+
model = model.eval()
|
35 |
+
|
36 |
+
transforms = T.Compose([T.Resize(288),
|
37 |
+
T.ToTensor(),
|
38 |
+
T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])])
|
39 |
+
|
40 |
+
img = Image.open(urlopen(
|
41 |
+
'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
|
42 |
+
))
|
43 |
+
|
44 |
+
output = model(transforms(img).unsqueeze(0)) # output is (batch_size, num_features) shaped tensor
|
45 |
+
# output is a (1, num_features) shaped tensor
|
46 |
+
```
|
47 |
+
|
48 |
+
## Citation
|
49 |
+
|
50 |
+
```bibtex
|
51 |
+
@inproceedings{vcermak2024wildlifedatasets,
|
52 |
+
title={WildlifeDatasets: An open-source toolkit for animal re-identification},
|
53 |
+
author={{\v{C}}erm{\'a}k, Vojt{\v{e}}ch and Picek, Lukas and Adam, Luk{\'a}{\v{s}} and Papafitsoros, Kostas},
|
54 |
+
booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
|
55 |
+
pages={5953--5963},
|
56 |
+
year={2024}
|
57 |
+
}
|
58 |
+
```
|
config.json
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"url": "https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/efficientnet_b3_ra2-cf984f9c.pth",
|
3 |
+
"hf_hub_id": "timm/efficientnet_b3.ra2_in1k",
|
4 |
+
"architecture": "efficientnet_b3",
|
5 |
+
"tag": "ra2_in1k",
|
6 |
+
"custom_load": false,
|
7 |
+
"input_size": [
|
8 |
+
3,
|
9 |
+
288,
|
10 |
+
288
|
11 |
+
],
|
12 |
+
"test_input_size": [
|
13 |
+
3,
|
14 |
+
320,
|
15 |
+
320
|
16 |
+
],
|
17 |
+
"fixed_input_size": false,
|
18 |
+
"interpolation": "bicubic",
|
19 |
+
"crop_pct": 0.875,
|
20 |
+
"test_crop_pct": 1.0,
|
21 |
+
"crop_mode": "center",
|
22 |
+
"mean": [
|
23 |
+
0.485,
|
24 |
+
0.456,
|
25 |
+
0.406
|
26 |
+
],
|
27 |
+
"std": [
|
28 |
+
0.229,
|
29 |
+
0.224,
|
30 |
+
0.225
|
31 |
+
],
|
32 |
+
"num_classes": 1000,
|
33 |
+
"pool_size": [
|
34 |
+
9,
|
35 |
+
9
|
36 |
+
],
|
37 |
+
"first_conv": "conv_stem",
|
38 |
+
"classifier": "classifier"
|
39 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6af0897bb68a768a75ebacbb04611fbe8836ec0c85ea526dd29346e2c9077f6d
|
3 |
+
size 445966810
|