Instructions to use facebook/EUPE-ViT-B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- EUPE
How to use facebook/EUPE-ViT-B with EUPE:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -52,6 +52,8 @@ The models can be used without fine-tuning, with downstream modules ranging from
|
|
| 52 |
|
| 53 |
## Get Started
|
| 54 |
|
|
|
|
|
|
|
| 55 |
The example below demonstrates how to obtain the class token and patch tokens given an input image.
|
| 56 |
|
| 57 |
```python
|
|
@@ -77,7 +79,7 @@ def make_transform(resize_size: int = 256):
|
|
| 77 |
)
|
| 78 |
return v2.Compose([to_tensor, resize, to_float, normalize])
|
| 79 |
|
| 80 |
-
model = torch.hub.load(REPO_DIR, 'eupe_vitb16', source='local', weights=<
|
| 81 |
|
| 82 |
img_size = 256
|
| 83 |
img = get_img()
|
|
|
|
| 52 |
|
| 53 |
## Get Started
|
| 54 |
|
| 55 |
+
Follow the [Installation](https://github.com/facebookresearch/EUPE/tree/main?tab=readme-ov-file#installation) to set up the environment.
|
| 56 |
+
Clone the [EUPE repo](https://github.com/facebookresearch/eupe) and download the PyTorch model checkpoints to local.
|
| 57 |
The example below demonstrates how to obtain the class token and patch tokens given an input image.
|
| 58 |
|
| 59 |
```python
|
|
|
|
| 79 |
)
|
| 80 |
return v2.Compose([to_tensor, resize, to_float, normalize])
|
| 81 |
|
| 82 |
+
model = torch.hub.load(REPO_DIR, 'eupe_vitb16', source='local', weights=<PATH/TO/THE/LOCAL/CHECKPOINT>)
|
| 83 |
|
| 84 |
img_size = 256
|
| 85 |
img = get_img()
|