Update README.md
Browse files
README.md
CHANGED
@@ -195,34 +195,12 @@ processor = AutoImageProcessor.from_pretrained(
|
|
195 |
)
|
196 |
model = AutoModel.from_pretrained(
|
197 |
"apple/aimv2-large-patch14-224",
|
198 |
-
trust_remote_code=True,
|
199 |
)
|
200 |
|
201 |
inputs = processor(images=image, return_tensors="pt")
|
202 |
outputs = model(**inputs)
|
203 |
```
|
204 |
|
205 |
-
### JAX
|
206 |
-
```python
|
207 |
-
import requests
|
208 |
-
from PIL import Image
|
209 |
-
from transformers import AutoImageProcessor, FlaxAutoModel
|
210 |
-
|
211 |
-
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
212 |
-
image = Image.open(requests.get(url, stream=True).raw)
|
213 |
-
|
214 |
-
processor = AutoImageProcessor.from_pretrained(
|
215 |
-
"apple/aimv2-large-patch14-224",
|
216 |
-
)
|
217 |
-
model = FlaxAutoModel.from_pretrained(
|
218 |
-
"apple/aimv2-large-patch14-224",
|
219 |
-
trust_remote_code=True,
|
220 |
-
)
|
221 |
-
|
222 |
-
inputs = processor(images=image, return_tensors="jax")
|
223 |
-
outputs = model(**inputs)
|
224 |
-
```
|
225 |
-
|
226 |
## Citation
|
227 |
If you find our work useful, please consider citing us as:
|
228 |
```bibtex
|
|
|
195 |
)
|
196 |
model = AutoModel.from_pretrained(
|
197 |
"apple/aimv2-large-patch14-224",
|
|
|
198 |
)
|
199 |
|
200 |
inputs = processor(images=image, return_tensors="pt")
|
201 |
outputs = model(**inputs)
|
202 |
```
|
203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
## Citation
|
205 |
If you find our work useful, please consider citing us as:
|
206 |
```bibtex
|