From c5f0288bc7d76f65996586f79f69fba8867a0e67 Mon Sep 17 00:00:00 2001 From: amyeroberts <22614925+amyeroberts@users.noreply.github.com> Date: Fri, 22 Mar 2024 16:04:30 +0000 Subject: [PATCH] [`SuperPoint`] Fix doc example (#29816) [SuperPoint] Fix doc example --- src/transformers/models/superpoint/modeling_superpoint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transformers/models/superpoint/modeling_superpoint.py b/src/transformers/models/superpoint/modeling_superpoint.py index d3fc9bfd5a98d5..a4350e6d79af6e 100644 --- a/src/transformers/models/superpoint/modeling_superpoint.py +++ b/src/transformers/models/superpoint/modeling_superpoint.py @@ -423,7 +423,7 @@ def forward( Examples: ```python - >>> from transformers import AutoImageProcessor, AutoModel + >>> from transformers import AutoImageProcessor, SuperPointForKeypointDetection >>> import torch >>> from PIL import Image >>> import requests @@ -432,7 +432,7 @@ def forward( >>> 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)