[SuperPoint] Fix doc example (#29816)

[SuperPoint] Fix doc example
This commit is contained in:
amyeroberts 2024-03-22 16:04:30 +00:00 committed by GitHub
parent 7e1413d16a
commit c5f0288bc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -423,7 +423,7 @@ class SuperPointForKeypointDetection(SuperPointPreTrainedModel):
Examples:
```python
>>> from transformers import AutoImageProcessor, AutoModel
>>> from transformers import AutoImageProcessor, SuperPointForKeypointDetection
>>> import torch
>>> from PIL import Image
>>> import requests
@ -432,7 +432,7 @@ class SuperPointForKeypointDetection(SuperPointPreTrainedModel):
>>> image = Image.open(requests.get(url, stream=True).raw)
>>> processor = AutoImageProcessor.from_pretrained("magic-leap-community/superpoint")
>>> model = AutoModel.from_pretrained("magic-leap-community/superpoint")
>>> model = SuperPointForKeypointDetection.from_pretrained("magic-leap-community/superpoint")
>>> inputs = processor(image, return_tensors="pt")
>>> outputs = model(**inputs)