IMvision12 commited on
Commit
b659f5c
verified
1 Parent(s): 5d36031

Rename to official model id; sync variant + links

Browse files
Files changed (1) hide show
  1. README.md +9 -9
README.md CHANGED
@@ -21,7 +21,7 @@ tags:
21
 
22
  [![GitHub](https://img.shields.io/badge/GitHub-KerasFormers-black?logo=github)](https://github.com/IMvision12/KerasFormers) [![Docs](https://img.shields.io/badge/Docs-DINO-blue)](https://imvision12.github.io/KerasFormers/dino/) [![Collection](https://img.shields.io/badge/HF-DINO%20collection-yellow)](https://huggingface.co/collections/kerasformers/dino-v1-v2-v3-6a6a94f8281a2f373f70e769)
23
 
24
- # kerasformers/dino_vitb8
25
 
26
  Paper: [Emerging Properties in Self-Supervised Vision Transformers (arXiv:2104.14294)](https://arxiv.org/abs/2104.14294) 路 [HF Papers](https://huggingface.co/papers/2104.14294)
27
 
@@ -44,9 +44,9 @@ from kerasformers.models.dino import DinoViTModel, DinoImageProcessor
44
  # The processor resizes + ImageNet-normalizes, so build the model with
45
  # include_normalization=False (it would otherwise normalize a second time).
46
  model = DinoViTModel.from_weights(
47
- "kerasformers/dino_vitb8", include_normalization=False
48
  )
49
- processor = DinoImageProcessor.from_weights("kerasformers/dino_vitb8")
50
 
51
  pixel_values = processor("your_image.jpg")["pixel_values"]
52
  features = model(pixel_values, training=False)
@@ -57,17 +57,17 @@ Load any DINO variant the same way with `from_weights("kerasformers/<variant>")`
57
 
58
  | Variant | Hub | Backbone |
59
  |---|---|---|
60
- | `dino_vits16` | [`kerasformers/dino_vits16`](https://huggingface.co/kerasformers/dino_vits16) | ViT-S/16 |
61
- | `dino_vits8` | [`kerasformers/dino_vits8`](https://huggingface.co/kerasformers/dino_vits8) | ViT-S/8 |
62
- | `dino_vitb16` | [`kerasformers/dino_vitb16`](https://huggingface.co/kerasformers/dino_vitb16) | ViT-B/16 |
63
- | `dino_vitb8` | [`kerasformers/dino_vitb8`](https://huggingface.co/kerasformers/dino_vitb8) | ViT-B/8 |
64
- | `dino_resnet50` | [`kerasformers/dino_resnet50`](https://huggingface.co/kerasformers/dino_resnet50) | ResNet-50 |
65
 
66
  ## Tips
67
 
68
  - Set `KERAS_BACKEND` **before** importing Keras / kerasformers.
69
  - The processor normalizes; pair it with `include_normalization=False`. To skip it, feed raw `[0, 255]` pixels and keep the default `include_normalization=True`.
70
- - `dino_resnet50` was converted from torch.hub `facebookresearch/dino`.
71
  - See [DINO docs](https://imvision12.github.io/KerasFormers/dino/) and [Loading Weights](https://imvision12.github.io/KerasFormers/loading_weights/).
72
  - Community / upstream weights: `DinoViTModel.from_weights("hf:facebook/dino-vitb8")`.
73
 
 
21
 
22
  [![GitHub](https://img.shields.io/badge/GitHub-KerasFormers-black?logo=github)](https://github.com/IMvision12/KerasFormers) [![Docs](https://img.shields.io/badge/Docs-DINO-blue)](https://imvision12.github.io/KerasFormers/dino/) [![Collection](https://img.shields.io/badge/HF-DINO%20collection-yellow)](https://huggingface.co/collections/kerasformers/dino-v1-v2-v3-6a6a94f8281a2f373f70e769)
23
 
24
+ # kerasformers/dino-vitb8
25
 
26
  Paper: [Emerging Properties in Self-Supervised Vision Transformers (arXiv:2104.14294)](https://arxiv.org/abs/2104.14294) 路 [HF Papers](https://huggingface.co/papers/2104.14294)
27
 
 
44
  # The processor resizes + ImageNet-normalizes, so build the model with
45
  # include_normalization=False (it would otherwise normalize a second time).
46
  model = DinoViTModel.from_weights(
47
+ "kerasformers/dino-vitb8", include_normalization=False
48
  )
49
+ processor = DinoImageProcessor.from_weights("kerasformers/dino-vitb8")
50
 
51
  pixel_values = processor("your_image.jpg")["pixel_values"]
52
  features = model(pixel_values, training=False)
 
57
 
58
  | Variant | Hub | Backbone |
59
  |---|---|---|
60
+ | `dino-vits16` | [`kerasformers/dino-vits16`](https://huggingface.co/kerasformers/dino-vits16) | ViT-S/16 |
61
+ | `dino-vits8` | [`kerasformers/dino-vits8`](https://huggingface.co/kerasformers/dino-vits8) | ViT-S/8 |
62
+ | `dino-vitb16` | [`kerasformers/dino-vitb16`](https://huggingface.co/kerasformers/dino-vitb16) | ViT-B/16 |
63
+ | `dino-vitb8` | [`kerasformers/dino-vitb8`](https://huggingface.co/kerasformers/dino-vitb8) | ViT-B/8 |
64
+ | `dino-resnet50` | [`kerasformers/dino-resnet50`](https://huggingface.co/kerasformers/dino-resnet50) | ResNet-50 |
65
 
66
  ## Tips
67
 
68
  - Set `KERAS_BACKEND` **before** importing Keras / kerasformers.
69
  - The processor normalizes; pair it with `include_normalization=False`. To skip it, feed raw `[0, 255]` pixels and keep the default `include_normalization=True`.
70
+ - `dino-resnet50` was converted from torch.hub `facebookresearch/dino`.
71
  - See [DINO docs](https://imvision12.github.io/KerasFormers/dino/) and [Loading Weights](https://imvision12.github.io/KerasFormers/loading_weights/).
72
  - Community / upstream weights: `DinoViTModel.from_weights("hf:facebook/dino-vitb8")`.
73