Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
c5f0288b
Unverified
Commit
c5f0288b
authored
Mar 22, 2024
by
amyeroberts
Committed by
GitHub
Mar 22, 2024
Browse files
[`SuperPoint`] Fix doc example (#29816)
[SuperPoint] Fix doc example
parent
7e1413d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/transformers/models/superpoint/modeling_superpoint.py
src/transformers/models/superpoint/modeling_superpoint.py
+2
-2
No files found.
src/transformers/models/superpoint/modeling_superpoint.py
View file @
c5f0288b
...
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment